Announcement Announcement Module
Collapse
No announcement yet.
Need idea other then @RequestParam Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need idea other then @RequestParam

    Hi Guy,

    I'm newbie to Spring 3.0 and in this forums, I have started with the testing and have figure out how to use the @RequestParam to retrieve particular / specific param from the web (example as below)

    @RequestMapping(value = "/getItem", method = RequestMethod.POST)
    public @ResponseBody BcnJSONResponse getItemType(
    @RequestParam(value = "start", required = true) Integer start,
    @RequestParam(value = "limit", required = true) Integer size,
    @RequestParam(value = "sort", required = false) String sort,
    @RequestParam(value = "dir", required = false) String dir){
    /// logic here
    }

    However the problem I having now is the param will pass into the method will in dynamic way such as

    filter[0][data][type]
    filter[0][data][value]
    filter[0][field]
    filter[1][data][type]
    filter[1][data][value]
    filter[1][field]

    filter[x] <-- the number will dynamic but the following information will pass together (example as above)

    filter[x][data][type]
    filter[x][data][value]
    filter[x][field]

    If using the normal way to request getparam can try use looping to get the value if null then can skip else got value the variable will contain the information. Now the question is in Spring 3.0 do it have any way to do this?

    Thank you and please post me the solution for this if have answer in other topic (I unable to find much related with this). Sorry if I have posted in wrong thread
Working...
X