Enviroment : 4.0p , ie10 ,eclipse indigo
I defined 2 DMIs
I call this one DMI1
I call this one DMI2
Following is my client code in which it fires the calling of 2 nested DMIs
Now my problem is , in the line
of DMI1
after the execution of the DMI2 ,i checked variable data2 in debug mode ,and i found there is no variable a i added in the DMI2 ,why is this happening?
I defined 2 DMIs
Code:
<operationBinding operationType="fetch" operationId="pdfFetch"
methodArguments="$dsRequest,'pdfFetch','organization_info_annual' ">
<serverObject className="cn.gov.nsccsz.server.CascadingFetch" dropExtraFields="false"
methodName="cascadeFetch" >
</serverObject>
</operationBinding>Code:
public DSResponse cascadeFetch(DSRequest dsRequest,String operationId ,String dsCouplestr)
{
com.isomorphic.datasource.DSResponse dsresponse = null;
try
{
dsresponse = dsRequest.execute();
dsresponse.setDropExtraFields(false);
dsresponse.setBypassDataFilter(true);
List data = dsresponse.getRecords();
DSRequest queryRequest = null;
for (Object object : data)
{
HashMap record = (HashMap) object;
Object pk = record.get("pk");
queryRequest = new DSRequest("a", "fetch");
queryRequest.setOperationId("testFetch");
queryRequest.setCriteria("fk", pk);
List data2 = queryRequest.execute().getRecords();
record.put("a",data2);
}
dsresponse.setData(data);
}
catch (Exception e)
{
e.printStackTrace();
}
return dsresponse;
}Code:
<operationBinding operationType="fetch" operationId="testFetch" >
<serverObject className="cn.gov.nsccsz.server.CascadingFetch" dropExtraFields="false"
methodName="testFetch" >
</serverObject>
</operationBinding>Code:
public DSResponse testFetch (DSRequest dsRequest )
{
DSResponse r = null;
try
{
r = dsRequest.execute();
List data = r.getRecords();
for (Object object : data)
{
((HashMap)object).put("a", "a");
}
r.setData(data);
}
catch (Exception e)
{
e.printStackTrace();
}
return r;
}Following is my client code in which it fires the calling of 2 nested DMIs
Code:
DataSource documentOrganization = DataSource.get("document");
DSRequest dsr = new DSRequest();
dsr.setDataSource("document");
dsr.setOperationType(DSOperationType.FETCH);
dsr.setOperationId("pdfFetch");
Criteria c = new Criteria("pk","8d6e965b-532a-4172-93be-9e252b0c587a");
documentOrganization.fetchData(c, new DSCallback()
{
@Override
public void execute(DSResponse response, Object rawData, DSRequest request)
{
Record rs [] = response.getData();Code:
List data2 = queryRequest.execute().getRecords();after the execution of the DMI2 ,i checked variable data2 in debug mode ,and i found there is no variable a i added in the DMI2 ,why is this happening?