Results 1 to 2 of 2

Thread: Sending model attribute from a clickable column table in jsp page

  1. #1

    Default Sending model attribute from a clickable column table in jsp page

    I have a table displayed on jsp page using <display:table> tags.this table is coming out of List<Account>
    and one column i created is clickable using decorator. When i click link , it is redirected to a spring controller
    and furthur processed.
    All i want it to pass the same - object to the controller when link is clicked.
    Something like that ..but its not being sent.
    I dont want to send request params on Url and it would be great if i can send the whole object as a whole and wont have to send atrributes .

    In jso i have table of List<Account> and using <form:hidden> for attributes also dint help.
    Code:
    public String modifyAccountDetails(HttpServletRequest request,
    						@ModelAttribute("Account") Account Account, Errors errors,
    	....					ModelMap model) throws ConsoleException {

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    You cannot and never will be able to. This is the nature of HTTP the only thing it can do is to send an attribute (accountId) and you use a converter to use that to retrieve the account (instead of ModelAttribute use RequestParam).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •