Hi,
I am using SmartClient Version: v8.3p_2013-05-14/PowerEdition Deployment (built 2013-05-14) with IE8 and SmartGWT Power Edition 3.1p.
One year ago (while using another version of SmartGWT) we implemented a tree view, after a while we changed to 3.1p version and now we noticed that the tree view does not work anymore. The error message is:
"Can not convert element 0 of the array to a JavaScriptObject. Instances of class '..client.datamodel.ActionLinks' can not automatically be converted. Please see the SmartClient documentation of RPCRequest.data for a table of Java types that can be converted automatically."
The class to initialize is the following (a TreeNode class), see constructor:
private class ActionsTreeNode extends TreeNode {
public ActionsTreeNode(final String actionId, final String actionType,
final String actionLogsLink, final String rootAction,
final String mainLog, final List<ActionLinks> attachments, final boolean isOpen) {
setAttribute("actionId", actionId);
setAttribute("actionType", actionType);
setAttribute("actionLogsLink", actionLogsLink);
setAttribute("rootAction", rootAction);
setAttribute("mainLog", mainLog);
setAttribute("attachments", attachments);
setAttribute("isOpen", isOpen);
}
}
Class ActionLinks (see "List<ActionLinks>") is serializable.
The initialization is done as follows:
try {
actionsData.add(new ActionsTreeNode
(action.getActionId(), action.getActionType(),
link, action.getRootAction(),
action.getMainLog(), action.getAttachments(), true));
} catch (Exception e) {
SC.say(e.getMessage());
}
Please could you shed some light on this, as it used to work fine before we moved to the above mentioned version of SmartGWT ?
Many thanks in advance
PS: please move this to Technical Q&A, if possible
Many thanks
I am using SmartClient Version: v8.3p_2013-05-14/PowerEdition Deployment (built 2013-05-14) with IE8 and SmartGWT Power Edition 3.1p.
One year ago (while using another version of SmartGWT) we implemented a tree view, after a while we changed to 3.1p version and now we noticed that the tree view does not work anymore. The error message is:
"Can not convert element 0 of the array to a JavaScriptObject. Instances of class '..client.datamodel.ActionLinks' can not automatically be converted. Please see the SmartClient documentation of RPCRequest.data for a table of Java types that can be converted automatically."
The class to initialize is the following (a TreeNode class), see constructor:
private class ActionsTreeNode extends TreeNode {
public ActionsTreeNode(final String actionId, final String actionType,
final String actionLogsLink, final String rootAction,
final String mainLog, final List<ActionLinks> attachments, final boolean isOpen) {
setAttribute("actionId", actionId);
setAttribute("actionType", actionType);
setAttribute("actionLogsLink", actionLogsLink);
setAttribute("rootAction", rootAction);
setAttribute("mainLog", mainLog);
setAttribute("attachments", attachments);
setAttribute("isOpen", isOpen);
}
}
Class ActionLinks (see "List<ActionLinks>") is serializable.
The initialization is done as follows:
try {
actionsData.add(new ActionsTreeNode
(action.getActionId(), action.getActionType(),
link, action.getRootAction(),
action.getMainLog(), action.getAttachments(), true));
} catch (Exception e) {
SC.say(e.getMessage());
}
Please could you shed some light on this, as it used to work fine before we moved to the above mentioned version of SmartGWT ?
Many thanks in advance
PS: please move this to Technical Q&A, if possible
Many thanks
Comment