ExtDirectStoreResult sending extra parameters

68 views
Skip to first unread message

bo.co...@gmail.com

unread,
Jul 15, 2014, 7:31:51 AM7/15/14
to extdire...@googlegroups.com
Hello Ralph,

Would like to send a list of visible columns from a grid to a STORE_READ method but when I send it a second param I get param mismatch.

"public ExtDirectStoreResult<Contacts> read(ExtDirectStoreReadRequest request, ArrayList columns) "

I need the columns to create a search depending on which columns are visible. Currently I do this to build a report query for Jasper via ExtDirectFormPostResult and send arraylist of columns.

I get the filters for my search and params for filterfeature from the request.
Is there any way to inject a column list into the request if another parameter is not possible?

I was thinking that ExtDirectStoreResult probably can take extra parameters but I don't know how to send, in the reports extjs method I just use the Service.Method(reportname,sfilter,columns)

Thanks,
 

Bo

Ralph Schaer

unread,
Jul 15, 2014, 8:50:01 AM7/15/14
to extdire...@googlegroups.com
Hi

I'm wondering how do you send the extra parameters.
Something like this: store.load({params: {columns: ['one','two']}}); ?

I'm trying to reproduce this in one of my own projects.


Ralph


--
You received this message because you are subscribed to the Google Groups "extdirectspring" group.
To unsubscribe from this group and stop receiving emails from it, send an email to extdirectspri...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bo.co...@gmail.com

unread,
Jul 15, 2014, 9:35:11 AM7/15/14
to extdire...@googlegroups.com

I tried store.load( params and extraParams) hoping that it would go into the ExtDirectStoreReadRequest like the FilterFeature does but no params. That was my way trying to inject it into request. Hoping that you had another way.

bo.co...@gmail.com

unread,
Jul 15, 2014, 10:09:24 AM7/15/14
to extdire...@googlegroups.com


Solved it by sending store.proxy.extraParams = columnsArray;

Then it comes in on the params of ExtDirectStoreReadRequest.

Thanks for your guidance.

Bo
Message has been deleted

ralph

unread,
Jul 15, 2014, 11:20:07 AM7/15/14
to extdire...@googlegroups.com
It should also work this way (at least it works in my project)

userStore.load({
  params: {
    col: ['one','two','three','four']
  }
});

@ExtDirectMethod(STORE_READ)
public ExtDirectStoreResult<User> read(ExtDirectStoreReadRequest readRequest, @RequestParam("col") List<String> columns) {
}

 
You can omit @RequestParam if the names match and the java code is compiled with debug informations on.


userStore.load({
  params: {
    columns: ['one','two','three','four']
  }
});

@ExtDirectMethod(STORE_READ)
public ExtDirectStoreResult<User> read(ExtDirectStoreReadRequest readRequest, List<String> columns) {
}

bo.co...@gmail.com

unread,
Jul 15, 2014, 1:41:19 PM7/15/14
to extdire...@googlegroups.com
Very nice!  Easy to implement.  You are like the Rodger Federer of programming.

Thanks again
Reply all
Reply to author
Forward
0 new messages