I have a <stripes:select> that I'm using to provide a list of items to the
user using the <stripes:option-collection>.

When an item is selected in the list, some javascript is triggered that
adds some on-screen text to a table along with some hidden input tags that
get submitted with the page.

However, the actual value currently selected in the <stripes:select> isn't
important and I don't need or want it to be submitted.  The only reason I'm
suing <stripes:select> is to take advantage of the collection population
feature.

The problem I'm having is that <stripes:select> requires a name.
If you leave the name blank like this...

<stripes:select name="">
<stripes:options-collection collection="${actionBean.itemList}" value="id"
label="display" />
</stripes:select>

...you get an error when you submit...

[DefaultActionBeanPropertyBinder] Could not bind property with name [] to
bean of type...

...followed by a NullPointerException.


However, if you give it a dummy name like this...

<stripes:select name="dummyName">
<stripes:options-collection collection="${actionBean.itemList}" value="id"
label="display" />
</stripes:select>

...you get a different error when the page loads...

[DefaultPopulationStrategy] Could not find property [dummyName] on ...


Obviously, out of the two choices, the second option is better because it
doesn't cause an exception, but I was wondering if other people are using
<stripes:select> this way and how they deal with the warnings/errors or if
they just ignore them.

I even tried this...

<select>
<stripes:options-collection collection="${actionBean.itemList}" value="id"
label="display" />
</select>

...but that throws an exception when the page loads...

net.sourceforge.stripes.exception.StripesJspException: Option tags must
always be contained inside a select tag.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to