我在使用Jahia时遇到了一些麻烦。我想要的是让客户端在我移动Jahia节点时向我显示一个验证弹出窗口。
首先,由于Drools规则,我抓住了移动节点的动作。我可以从then
执行操作。
在此操作中,我想打开一个弹出窗口,因此我使用了一个扩展Window的类(来自extjs)。
public class DialogBox extends action implements Backgroundaction {
private transient static Logger LOGGER = LoggerFactory.getLogger(DialogBox.class);
@Override
public void executeBackgroundaction(JCRNodeWrapper jcrNodeWrapper) {
LOGGER.info("I'm in BackgroundExecution");
new MoveItemWindow().start();
}
}
import com.extjs.gxt.ui.client.widget.Window;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class MoveItemWindow extends Window {
private transient static Logger LOGGER =LoggerFactory.getLogger(MoveItemWindow.class);
void start() {
LOGGER.info("I'm in MoveItemWindow");
}
}
这是我收到的错误日志:
2019-11-04 10:10:34,481: INFO [DialogBox] - I'm in BackgroundExecution
2019-11-04 10:10:34,482: ERROR [JahiaRPC] - An error occurred calling the GWT
service method public abstract void org.jahia.ajax.gwt.client.service.content.
JahiaContentManagementService.moveonTopOf(java.util.List,java.lang.String) throws
org.jahia.ajax.gwt.client.service.GWTJahiaServiceException. Cause:
com.extjs.gxt.ui.client.widget.Window
java.lang.NoClassDefFoundError: com.extjs.gxt.ui.client.widget.Window
at com.<my-project>.action.DialogBox.executeBackgroundaction
(DialogBox.java:36)
[...]
2019-11-04 10:10:34,483: ERROR [GWTController] - An error occurred
calling the GWT service method public abstract void
org.jahia.ajax.gwt.client.service.content.JahiaContentManagementService.
moveonTopOf(java.util.List,java.lang.String) throws
org.jahia.ajax.gwt.client.service.GWTJahiaServiceException. Cause:
Service method 'public abstract void
org.jahia.ajax.gwt.client.service.content.JahiaContentManagementService.
moveonTopOf(java.util.List,java.lang.String) throws
org.jahia.ajax.gwt.client.service.GWTJahiaServiceException' threw an
unexpected exception: java.lang.NoClassDefFoundError:
com.extjs.gxt.ui.client.widget.Window
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract void
org.jahia.ajax.gwt.client.service.content.JahiaContentManagementService.
moveonTopOf(java.util.List,java.lang.String) throws
org.jahia.ajax.gwt.client.service.GWTJahiaServiceException' threw an
unexpected exception: java.lang.NoClassDefFoundError:
com.extjs.gxt.ui.client.widget.Window
[...]
删除extends Window
类的MoveItemWindow
时,它可以正常工作。
查看日志:
2019-11-04 10:36:34,898: INFO [DialogBox] - I'm in BackgroundExecution
2019-11-04 10:36:34,899: INFO [MoveItemWindow] - I'm in MoveItemWindow
2019-11-04 10:36:34,900: INFO [RulesListener] - Rules executed for
default ... and 1 other nodes in 7ms
我不太了解GWT的工作方式,它提示了我的问题的关键(但也许我弄错了)。如果有人有任何想法或建议,我在听:)
预先感谢