Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Linking checkbox to textfield in nested?

 
Karl Beowulph
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy.

I've got a nested statement to go through a populated DTO and display the contents.

That part works fine, but what I'd like to do next is have a column of checkboxes / multiboxes. When the user clicks on the checkbox, I'd like to display the ID in an alert box.

Example
____________________
|Check | ID | Name |
|-------------------
| [] | 6 | Fred |
|-------------------
| [] | 12 | John |
|-------------------

When the user hits the first box, "6" would pop up on the screen etc.

This is my current (non-working) code.


When I do this, it literally displays "nested:write property="ID" ". Anyone have any ideas?

Any suggestions?
 
Junilu Lacar
Bartender
Pie
Posts: 7465
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<nested:multibox property ="SELECTED_ROW" value='<nested:write property="ID"/>' onklick="display(this.value)"/>

You can't nest tags like this. There may be a more straightforward way but I think you could do this:

<nested:writeNesting id="value" property="ID" />
<nested:multibox property ="SELECTED_ROW" value='<%= value %>' onklick="display(this.value)"/>
[ July 15, 2004: Message edited by: Junilu Lacar ]
 
Karl Beowulph
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, but I couldn't do that either, as I'm not going to know the values that are going in (it's a search result page).

I actually did find the solution, and it's much simpler then I thought. I just had to use the Bean:write using the name of my nested parameter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic