incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Traunecker <>
Subject [TRINIDAD] How to reset a form
Date Thu, 22 Mar 2007 09:53:13 GMT
Hello everybody,

using Trinidad and Shale I ran into this silly simple problem: I want a form containing a
bunch of text-input fields, each of them with some validator associated to get reset by clicking
a commandButton. To avoid validating the input fields I use immediate="true" for the reset
button. My model gets reset (see pseudocode) but the textfields in the browser don't disply
the model-values - they keep their values. I'm wondering, how to reset some UIComponents (without
any validation). I thougth, that all updates to the datamodel/backingbean before RENDER_RESPONSE
will have an impact on the rendered output, regardless of immediate="true". Is this a partialPageRendering
issue ?

Thanks for your help! 


        <tr:panelHorizontalLayout ...>
          <tr:switcher facetName="...">
               <tr:facet name="a"> ...</tr:facet>
                <tr:facet name="b">
                        <tr:inputText id="name"> <f:validateLength .../></inputText>
                        <tr:inputText id="street"> <f:validateLength .../></inputText>
                        <tr:commandButton text="save" action="#{}"/>
                        <tr:commandButton text="reset" action="#{backingbean.reset}" immediate="true"/>


String name="Foo";

public String save(){
    //getName is set to validated name provided by the user

public String reset(){
    //do nothing, as prerender will reset the model
public void prerender(){
   name=someDao.retrieve(); //allways reset datamodel to latest persistent state

public String getName(){
    return name;

public void setName(String name){ name;

Telefonate ohne weitere Kosten vom PC zum PC:

View raw message