Java Mailing List Archive

http://www.junlu.com/

Home » users.myfaces »

default value in tr:selectOneChoice

tkazmierczak

2008-09-09

Replies: Find Java Web Hosting

Author LoginPost Reply

Hello,
I've searched half of the Internet, but haven't found an answer to my
question.

I create a tr:selectOneChoice this way:

<tr:selectOneChoice label="Start year" value="1" required="true"
valuePassThru="true">
 <tr:forEach var="year" begin="0" end="10">
   <tr:selectItem label="#{year}" value="#{year}" />
 </tr:forEach>
</tr:selectOneChoice>

and want the resulting HTML combobox to have the value with label "1" set by
default, but what I get is that the combobox is set to an "empty" value and
I get this error message in the server's output:

2008-09-09 15:54:23
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer
_getSelectedIndex
WARNING: Could not find selected item matching value "1" in
CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=_idJsp9]

What is wrong/missing in the code?
I'm using Trinidad 1.0.7.
--
Sent from the MyFaces - Users mailing list archive at Nabble.com.

©2008 junlu.com - Jax Systems, LLC, U.S.A.