use of pl.x3E.adInterface.GetLookupSearchDataReq in project adempiere by adempiere.
the class ADServiceImpl method getLookupSearchData.
public WindowTabDataDocument getLookupSearchData(GetLookupSearchDataReqDocument req) throws XFireFault {
//int WindowNo, int TabNo, int RowNo, DataRow dr
authenticate(webServiceName, "getLookupSearchData");
GetLookupSearchDataReq reqt = req.getGetLookupSearchDataReq();
DataField[] df = reqt.getParams().getFieldArray();
for (int i = 0; i < df.length; i++) {
if (df[i].getVal() != null && df[i].getVal().length() > 0)
log.info("LookUp COlumn: " + df[i].getColumn() + " " + df[i].getVal());
}
WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance();
WindowTabData wd = ret.addNewWindowTabData();
DataSet ds = wd.addNewDataSet();
int WindowNo = reqt.getWindowNo();
int TabNo = reqt.getTabNo();
int RowNo = reqt.getTabNo();
WWindowStatus ws = null;
if (WindowNo > 0)
//<-- Note changes to the active record (bledne action), probably are not properly communicated parameters
ws = WWindowStatus.get(WindowStatusMap, WindowNo, true, TabNo, true, RowNo);
if (ws != null) {
ADLookup lk = new ADLookup(df[0].getVal());
lk.getLookupSearchValues(reqt.getParams(), ds, ws.ctx, WindowNo);
} else {
ADLookup lk = new ADLookup(df[0].getVal());
lk.getLookupSearchValues(reqt.getParams(), ds, this.m_cs.getM_ctx(), 0);
}
return ret;
}
Aggregations