Search in sources :

Example 1 with GetLookupSearchDataReq

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;
}
Also used : WindowTabDataDocument(pl.x3E.adInterface.WindowTabDataDocument) DataField(pl.x3E.adInterface.DataField) DataSet(pl.x3E.adInterface.DataSet) WindowTabData(pl.x3E.adInterface.WindowTabData) GetLookupSearchDataReq(pl.x3E.adInterface.GetLookupSearchDataReq)

Aggregations

DataField (pl.x3E.adInterface.DataField)1 DataSet (pl.x3E.adInterface.DataSet)1 GetLookupSearchDataReq (pl.x3E.adInterface.GetLookupSearchDataReq)1 WindowTabData (pl.x3E.adInterface.WindowTabData)1 WindowTabDataDocument (pl.x3E.adInterface.WindowTabDataDocument)1