Q: Why does the form show old data and old errors not the newly set object?
(see:
http://www.nabble.com/-T5--Why-is-default-ValidationTracker-in-Form-marked-Persist-not-Persist%28%22flash%22%29-td11981083.html)

A1: Write your own form extending the tapestry default form:
public class Form extends org.apache.tapestry.corelib.components.Form
{
        @Persist("flash")
        private ValidationTracker defaultTracker;

        @Override
    public ValidationTracker getDefaultTracker()
        {
                if (defaultTracker == null)
                        defaultTracker = new ValidationTrackerImpl();

                return defaultTracker;
        }

        @Override
    public void setDefaultTracker(ValidationTracker defaultTracker)
        {
                this.defaultTracker = defaultTracker;
        }

}

A2: use @Meta("tapestry.persistence-strategy=flash") on your page to control
the default persistence of components below it. This will result in *all*
components having a default flash persistence.

@Howard: any better idea?

-- 
Chris
-- 
View this message in context: 
http://www.nabble.com/Writing-an-FAQ-for-Tapestry-5-tp15719185p15732836.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to