You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by madan chowdary <ma...@yahoo.com> on 2007/02/03 17:07:51 UTC
[ Tobago ] Help regarding valueChangelistener
Hi all,
i am using valueChangeListener with <tx:selectOneChoice/>.
this part of code
<f:facet name="change">
<tc:command immediate="true"/>
</f:facet>
is used to submit the page when a item is the listbox selected which alters another <tx:selectOneChoice/> component.
the JSP code snippet is as below
<tx:selectOneChoice label="#{bundle.select}"
value="#{checkout.selectedBillingAddress}"
id="selectedBillingAddress"
rendered="#{checkout.billToSiteSize > 1}"
valueChangeListener="#{checkout.billingAddressValueChanged}"
>
<f:selectItems value="#{checkout.billToSites}"/>
<f:facet name="change">
<tc:command immediate="true"/>
</f:facet>
</tx:selectOneChoice>
and the method called for valueChangeListener is as below
public void billingAddressValueChanged(ValueChangeEvent e){
log.debug(" *** billingAddressValueChanged is called *** ");
}
When i select a particular method the bean constructor is called, but the method binding to valueChangeListener is never called.
am using Tobago 1.0.9 .
Regards,
Madan
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/
Re: [ Tobago ] Help regarding valueChangelistener
Posted by Bernd Bohmann <be...@atanion.com>.
Hello Madan,
I extend the selectOneChoice example with a selectOneChoice that depend
on an other selectOneChoice.
http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectOneChoice.jsp?revision=503396&view=markup
To avoid validation or required messages please surround the
selectOneChoice with a tc:form. See comment in example page.
The immediate="true" should be removed,
I would suggest to switch the selectItem in the action of the command or
in the getter of the getSelectItem method of the depend selectOneChoice.
Bernd
madan chowdary wrote:
> Hi all,
>
> i am using valueChangeListener with <tx:selectOneChoice/>.
>
> this part of code
> <f:facet name="change">
> <tc:command immediate="true"/>
> </f:facet>
> is used to submit the page when a item is the listbox selected which alters another <tx:selectOneChoice/> component.
>
> the JSP code snippet is as below
>
> <tx:selectOneChoice label="#{bundle.select}"
> value="#{checkout.selectedBillingAddress}"
> id="selectedBillingAddress"
> rendered="#{checkout.billToSiteSize > 1}"
> valueChangeListener="#{checkout.billingAddressValueChanged}"
> >
> <f:selectItems value="#{checkout.billToSites}"/>
> <f:facet name="change">
> <tc:command immediate="true"/>
> </f:facet>
> </tx:selectOneChoice>
>
> and the method called for valueChangeListener is as below
>
> public void billingAddressValueChanged(ValueChangeEvent e){
> log.debug(" *** billingAddressValueChanged is called *** ");
> }
>
> When i select a particular method the bean constructor is called, but the method binding to valueChangeListener is never called.
>
> am using Tobago 1.0.9 .
>
> Regards,
> Madan
>
>
>
>
>
>
>
>
> __________________________________________________________
> Yahoo! India Answers: Share what you know. Learn something new
> http://in.answers.yahoo.com/