Hello!
I try to adapt libero manufacturing to release 5.1 but it is my first such experiance and i encounter with problem.
I created my plugin, then i created public class MITSFormFactory implements IFormFactory and register it - it works correct but then i lounch class WFPanelManufacturing() and java speacks that the type is incomparetible.
The question - is there other type of factory which can return a right type?
my code below:
//-----------------------
package org.eevolution.factories;
import org.adempiere.webui.factory.IFormFactory;
import org.adempiere.webui.panel.ADForm;
import org.eevolution.form.WFPanelManufacturing;
public class MITSFormFactory implements IFormFactory {
@Override
public WFPanelManufacturing newFormInstance(String formName) {
if (formName.equals("org.eevolution.form.WFPanelManufacturing"))
return new WFPanelManufacturing();
return null;
}
}
//-----------------------
package org.eevolution.form;
import org.compiere.apps.wf.WFPanel;
import org.compiere.util.DB;
import org.compiere.wf.MWorkflow;
/**
* Manufacturing WorkFlow Editor
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
*/
public class WFPanelManufacturing extends WFPanel {
private static final long serialVersionUID = 1L;
private static final String WF_WhereClause = MWorkflow.COLUMNNAME_WorkflowType+" IN ("
+ DB.TO_STRING(MWorkflow.WORKFLOWTYPE_Manufacturing)
+","+DB.TO_STRING(MWorkflow.WORKFLOWTYPE_Quality)
+")";
private static final int WF_Window_ID = 53005; // TODO: HARDCODED (Manufacturing Workflows)
/*
SELECT AD_Window_Id
FROM AD_Window
WHERE Name = 'Manufacturing Workflows'
*/
/**
* Default constructor
*/
public WFPanelManufacturing() {
super(null, WF_WhereClause, WF_Window_ID);
}
}