Maya-
Just had a thought...you can set the "style" attribute on the <option>
element to say 'style="display: none;"' to hide a row in the list.
Additionally, it collapses the list so that there's not an empty space.
Very cool, IMHO.
-Adam
Adam Gordon wrote:
Maya-
If you use validation, you really don't want to use the value
attribute at all because when the JSP reloads after a failed
validation, the struts widget will take it's value from the value
attribute you specified and NOT not take it from the bean. This is
why I suggested just setting the property on the bean to the empty
string inside the Action.
If you don't use validation, then you can ignore this.
Depending on what you want to do to the HTML list box after it's
rendered you may run into issues. Removing a row is pretty easy.
Adding a row is quite difficult and according to W3C it's not fully
supported in all browsers. When you add a row, you need to actually
specify the <option> element to add and the <option> element it's to
be inserted before. Changing the text of a row in a list box
shouldn't be hard either. There are some really good (free)
Javascript debuggers out there that can give you the whole DOM tree so
you know exactly how to reference specified elements of a list box
without using alert() debugging.
Happy coding.
Cheers,
-Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]