-
1. Re: Problem with selectOneMenu
tmalatinszki Apr 28, 2010 5:21 PM (in response to marcel.m.vielsack.cluetec.de)Hi Marcel,
Try this one:
<h:selectOneMenu id="dim" value="#{product.dimension}"> <f:selectItems value="#{ProductDetailsAction.coicopDimensions}"/> <a4j:support event="onchange" ajaxSingle="true"/> <s:convertEntity /> </h:selectOneMenu>
Regards,
Tamas
-
2. Re: Problem with selectOneMenu
marcel.m.vielsack.cluetec.de Apr 29, 2010 8:55 AM (in response to marcel.m.vielsack.cluetec.de)Thanks for your answer tamas!
Seems like your hint leads me in the right direction! - Thanks for that too ;)
But now I get an java.lang.NumberFormatException.
I think the <s:convertEntity /> - tag is the source, because when I remove it from the code there's no exception. But the return value is null again.Do I have to create my own converter or is there an build-in converter which can handle strings?
-
3. Re: Problem with selectOneMenu
marcel.m.vielsack.cluetec.de Apr 29, 2010 2:12 PM (in response to marcel.m.vielsack.cluetec.de)I tested a bit and wrote my own converter. The converter just returns Strings, but seems to work fine.
I also wrote a litte javascript which promts the value of my selectOneMenu. The script works an shows the value I selected.
But the binding to the bean doesn't work. When I change the selectOneMenu to an inputText the binding works.
Has anybody an idea what's the problem?
-
4. Re: Problem with selectOneMenu
shin0135 Apr 29, 2010 3:05 PM (in response to marcel.m.vielsack.cluetec.de)Marcel,
I think you could just use
<s:selectItems>
if your list contains string items. I don't think you need to create a converter.
Thank you,