IDEMPIERE-1110 NPE on Setup Wizard
This commit is contained in:
parent
69de4d3d87
commit
f36853a3d7
|
@ -85,6 +85,7 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
//
|
//
|
||||||
private Tree wfnodeTree;
|
private Tree wfnodeTree;
|
||||||
private Treeitem prevti = null;
|
private Treeitem prevti = null;
|
||||||
|
private Treeitem firstti = null;
|
||||||
|
|
||||||
private Label pretitleLabel = new Label(Msg.getMsg(Env.getCtx(), "SetupTask"));
|
private Label pretitleLabel = new Label(Msg.getMsg(Env.getCtx(), "SetupTask"));
|
||||||
private Label titleLabel = new Label();
|
private Label titleLabel = new Label();
|
||||||
|
@ -150,14 +151,16 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
if (event.getName().equals(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT))
|
if (event.getName().equals(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT))
|
||||||
{
|
{
|
||||||
Treeitem ti = wfnodeTree.getSelectedItem();
|
Treeitem ti = wfnodeTree.getSelectedItem();
|
||||||
if (ti.getAttribute("AD_Workflow_ID") != null) {
|
if (ti != null) {
|
||||||
// MWorkflow
|
if (ti.getAttribute("AD_Workflow_ID") != null) {
|
||||||
int wfid = (Integer) ti.getAttribute("AD_Workflow_ID");
|
// MWorkflow
|
||||||
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Workflow, wfid);
|
int wfid = (Integer) ti.getAttribute("AD_Workflow_ID");
|
||||||
} else if (ti.getAttribute("AD_WF_Node_ID") != null) {
|
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Workflow, wfid);
|
||||||
// MWFNode
|
} else if (ti.getAttribute("AD_WF_Node_ID") != null) {
|
||||||
int nodeid = (Integer) ti.getAttribute("AD_WF_Node_ID");
|
// MWFNode
|
||||||
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Node, nodeid);
|
int nodeid = (Integer) ti.getAttribute("AD_WF_Node_ID");
|
||||||
|
SessionManager.getAppDesktop().updateHelpContext(X_AD_CtxHelp.CTXTYPE_Node, nodeid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -192,11 +195,12 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addWfEntry(MWorkflow wfwizard) {
|
protected void addWfEntry(MWorkflow wfwizard) {
|
||||||
/* TODO: Color of workflow according to wizard status */
|
|
||||||
allFinished = true;
|
allFinished = true;
|
||||||
Treechildren treeChildren = wfnodeTree.getTreechildren();
|
Treechildren treeChildren = wfnodeTree.getTreechildren();
|
||||||
Treeitem treeitemwf = new Treeitem();
|
Treeitem treeitemwf = new Treeitem();
|
||||||
treeChildren.appendChild(treeitemwf);
|
treeChildren.appendChild(treeitemwf);
|
||||||
|
if (firstti == null)
|
||||||
|
firstti = treeitemwf;
|
||||||
|
|
||||||
Label wizardLabel = new Label(wfwizard.getName(true));
|
Label wizardLabel = new Label(wfwizard.getName(true));
|
||||||
wizardLabel.setStyle(WIZARD_LABEL_STYLE);
|
wizardLabel.setStyle(WIZARD_LABEL_STYLE);
|
||||||
|
@ -432,10 +436,8 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
|
|
||||||
setNotesPanelVisible(false);
|
setNotesPanelVisible(false);
|
||||||
|
|
||||||
MWorkflow wf = MWorkflow.get(Env.getCtx(), getWfWizards().get(0).get_ID());
|
wfnodeTree.setSelectedItem(firstti);
|
||||||
showInRightPanel(wf.getAD_Workflow_ID(), 0);
|
showItem(firstti);
|
||||||
|
|
||||||
|
|
||||||
} // jbInit
|
} // jbInit
|
||||||
|
|
||||||
private void refreshProgress() {
|
private void refreshProgress() {
|
||||||
|
|
Loading…
Reference in New Issue