Hi, Use a boolean variable to track whether the form is submitted or not. Based on the boolean variable disable the input field.
Assign appropriate value to the boolean variable after for is submitted. Regards, Jagadesh On Wed, Mar 17, 2010 at 5:28 AM, Kai Weber <kai.we...@glorybox.de> wrote: > Hi, > > if I have a page with an input field which I want to set to a default > value. After the form was displayed and submitted the value of the input > field should be left alone and not changed anymore. What is the > recommended way to do it? My current solution is the following, but I > feel I miss something. For a text field preferredName I do the > following: > > <input t:type="TextField" t:id="preferredName" size="30"/> > > @Persist > private String preferredName; > > public void setupRender() { > if (preferredName==null) { > // preferredName not set already, set default value > preferredName = "DEFAULT"; > } > } > > public void setPreferredName(String name) { > this.preferredName = name; > } > > public String getPreferredName() { > return this.preferredName; > } > > Regards, Kai > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Regards Jagadesh