Sure... An example is below.  The "values" field disappears from the
screen if validation fails.

//JAVA
public class MyClass {

        //(assume getters and setters exist)
        @Persist("flash")
        List<String> values;

        public void onPrepare() {
                //populate values with stuff
        }

        public void onValidateForm() {
                //possibly some form validation here
        }

}

//TML

<t:form>

//other fields with validation rules would be here

<div t:type="loop" source="values" value="selectedValue">
        ${selectedValue}
</div>

<t:form>

-----Original Message-----
From: Ted Steen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 02, 2008 6:10 PM
To: Tapestry users
Subject: Re: T5.0.11: @Persist("flash") values are not retained if
validation fails

Could you give a simple example of the problem?

2008/4/2, Joel Wiegman <[EMAIL PROTECTED]>:
> As an addendum, I shouldn't say "any field".  The culprit is a List 
> that  gets iterated over in the TML.
>
>
>  -----Original Message-----
>  From: Joel Wiegman [mailto:[EMAIL PROTECTED]
>  Sent: Wednesday, April 02, 2008 2:20 PM
>  To: Tapestry users
>  Subject: T5.0.11: @Persist("flash") values are not retained if  
> validation fails
>
>  All,
>
>  I've noticed that if validation fails on my page, any field annotated

> with @Persist("flash") is not retained when the response is rendered.
>
>  Per the documentation for @Persist("flash"), this doesn't appear to 
> be  expected behavior.
>
>  Should I put this in JIRA?
>
>  Joel
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
/ted

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to