Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Bug in serverside DSRequest.getOutputs() (always null)?

$
0
0
Hi Isomorphic,

I subclassed the SQLDataSource as follows:

Code:

        @Override
        public DSResponse executeFetch(DSRequest req) throws Exception {
                // T_USER.fetchUserIdForLoginname occurs before session parameter are set,
                // so do not try to modify.
                req.getOperationId().equals("fetchUserIdForLoginname");
                if (!req.getDataSourceName().equals("T_USER") || !req.getOperationId().equals("fetchUserIdForLoginname"))
                        modifyCriteria(req);
                return super.executeFetch(req);
        }

If I put a breakpoint in the method right before this operation binding is executed:
ds.xml
Code:

<operationBinding operationType="fetch" operationId="fetchChildResellers" serverMethod="fetchChildResellers" outputs="NAME">
Java:
Code:

public DSResponse fetchChildResellers(DSRequest dsRequest, HttpServletRequest servletRequest) throws Exception {
                HashMap<String, ArrayList<Long>> childCompanies = User.getChildCompanies(dsRequest);
                SetCriterion resellerChildCriterion = null;
                if (childCompanies.get("RESELLER_IDS").size() > 0) {
                        resellerChildCriterion = new SetCriterion("ID", DefaultOperators.InSet.getID(),
                                        childCompanies.get("RESELLER_IDS"));
                        dsRequest.addToCriteria(resellerChildCriterion);
                }
                return dsRequest.execute();

, the following happens:
The generated SQL includes only the name field from outputs="NAME" (as expected), but req.getOutputs() (as expression in the Eclipse debugger) returns always null.
Could you please check if this is true for you as well? I'd expect it to be a java.util.List with 1 element in it.

I'm using SNAPSHOT_v9.1d_2014-01-19/EVAL Deployment with GWT 2.6.0rc4 and Eclipse Kepler.

Thank you & Best regards,
Blama

Viewing all articles
Browse latest Browse all 4756

Trending Articles