Short answer: Yhere's nothing directly in displaytag for handling this.

Longer answer: You can use the implicit row object along with the BeanUtils
library to create these controls, something like:

<display:table name="myList" uid="myItem">
  <display:column title="...">
    <input type="checkbox" name="myList[${myItem.id}]"
value="${myItem.property}"/>
      ${myItem.property}
   </display:column>
</display:table>

This assumes that the id of each row is the index of the row in the list.
This also works when the id is the key in a map, although it's less
straightforward.

Most satisfying answer: I think I have a little sandbox app that illustrates
this functionality.  I created it when I was trying to figure out how to do
this myself.  If I can find it, I'll post it somewhere.  In the meantime, if
you try to implement this yourself, post any questions you might run into.

But the things that you want to do are entirely possible.  I use both
checkboxes and select lists with displaytag all the time.

Rick Herrick
[EMAIL PROTECTED]


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:displaytag-user-
> [EMAIL PROTECTED] On Behalf Of Dean Pullen
> Sent: Thursday, March 09, 2006 4:57 AM
> To: displaytag-user@lists.sourceforge.net
> Subject: [displaytag-user] Selection/Checkbox Tutorial
> 
> Hi. I'm very much looking forward to integrating this taglib into our
> project(s).
> 
> However, I am still very unsure how to implement multiple-selection of
> table rows via checkbox functionality. This is not within the
> tutorials and I can find no definitive (or even rough description) of
> how to implement a checkbox selection methodology using the displaytab
> taglib.
> 
> (Also how to incorporate this into the export funtionality would be
> great).
> 
> If anyone could point me in the right direction, I'd appreciate it.
> 
> Dean.
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language
> that extends applications into web and mobile media. Attend the live
> webcast
> and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
> _______________________________________________
> displaytag-user mailing list
> displaytag-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/displaytag-user


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to