You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Rumiana Todorova <ro...@hotmail.com> on 2006/12/05 12:36:45 UTC

wrong submittedValue of selectOneMenu

We have a managed bean (mProbe) in session scope.
In the jsp we build a simple panelTabbedPane component in which we have a 
selectOneMenu component. Out of the panelTabbedPane there are 2 buttons that 
hide and show the panelTabbedPane component.

We select a value from the selectOneMenu component. Then we click the "Hide" 
button and the submittedValue of the selectOneMenu component is null.
Then we click the "Show" button and the submittedValue of the selectOneMenu 
component is an instance of 
org.apache.myfaces.shared_impl.renderkit.RendererUtils.
In this way the value of the selectOneMenu component that we selected is not 
set.

Here is the fragment of the jsp file:

<h:form id="probeForm">

<h:commandButton value="Hide" id="hideId" action="#{mProbe.hide}" 
rendered="#{mProbe.toShow}"/>
<h:commandButton value="Show" id="showId" action="#{mProbe.show}" 
rendered="#{not mProbe.toShow}"/>

<t:panelTabbedPane rendered="#{mProbe.toShow}" >
<t:panelTab id="tab1" label="Probe1">

<h:selectOneMenu value="#{mProbe.locale}" id="localeId" 
binding="#{mProbe.localeComp}">
<f:selectItem itemValue="_en" itemLabel="EN"/>
<f:selectItem itemValue="_bg" itemLabel="BG"/>
</h:selectOneMenu>

</t:panelTab>
</t:panelTabbedPane>

</h:form>

The same problem appears with all check boxes, radio buttons and combo boxes 
with such scenario.
We tested it with tomahawk-1.1.3, tomahawk-1.1.4-SNAPSHOT and 
tomahawk-1.1.5-SNAPSHOT.
The version of myfaces is 1.1.4.

Hope it will be fixed.

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/