-
1. Re: noSelectionLabel in selectManyListbox
maciekpazur Apr 2, 2009 5:56 PM (in response to maciekpazur)I've also tried replacing noSelectionLabel with <f:selectItem>
I need a functionality like this: http://jira.atlassian.com/secure/IssueNavigator.jspa (I mean Project and IssueType selectManyListbox). And sadly, I don't have any other ideas how I could implement it.
Does anybody have any ideas or suggestions?
Greetings. -
2. Re: noSelectionLabel in selectManyListbox
gonorrhea Apr 2, 2009 6:40 PM (in response to maciekpazur)If you need to know when a particular value in a JSF UI control (in this case it's a HtmlSelectManyListBox), you can add <a4j:support event="onchange" action="#{fooBean.barAction}">.
In the barAction() method, you can check the value of the selection.
If your exception is only occurring when you select the value that corresponds to noSelectionLabel, then you can hard-code a test String like noSelectionLabel="Please select a value." to eliminate the messages resource bundle lookup being the root cause of the problem.
Also, for testing, you may try a h:selectOneMenu, but the two JSF UI components are very similar...
Try it w/o the <s:convertEntity> tag as well (simplify the scenario as much as possible to isolate the root cause).
-
3. Re: noSelectionLabel in selectManyListbox
gonorrhea Apr 2, 2009 6:43 PM (in response to maciekpazur)setSelectedModules() will be called before barAction() is called. Thus, selectedModules instance will be available in barAction() method.
-
4. Re: noSelectionLabel in selectManyListbox
maciekpazur Apr 3, 2009 12:25 PM (in response to maciekpazur)Thanks for your help. I followed your advice, but my application still doesn't work.
I eliminated the messages resource bundle lookup.
I eliminated <s:convertEntity> by trying how list of Strings (instead of list of Objects) would behave.
I added a4j:support but the action method is called only if noSelectionLabel is not selected. Selecting it gives the above-mentioned exception immediately.Does anybody have an idea how to fix it?