Hi Robert (and all others),

sorry to bother you, but

I implemented a ComponentAction and use FormSupport as you suggested it. And it's near to what I need :-) Unfortunately the "execute" method is called before tapestry updates the property thus I see the orginal value not the new one?
Any idea how to solve the last piece of the puzzle?

Jens



...
@Property(write = false) // ---->> test to see when tapestry reflects changes
    private boolean _weeklyNewsletter;

@Component(id = "weeklyNewsletter", parameters = {"value=weeklyNewsletter"})
    private Checkbox _weeklyNewsletterCheckbox;


    @Environmental
    private FormSupport _formSupport;

private static class NewsletterComponentAction implements ComponentAction<Newsletter>
    {
        // ---->> called but properties not set yet
        public void execute(final Newsletter c)
        {
c._userAccount.setNewsLetter("" + (c._dailyNewsletter ? "1" : "0") + (c._weeklyNewsletter ? "1" : "0") + (c._monthlyNewsletter ? "1" : "0"));
        }
    }

    public void setupRender()
    {
...
        _formSupport.store(this, new NewsletterComponentAction());
    }

    // ---->> this method is called after execute?
    public void setWeeklyNewsletter(final boolean b)
    {
        _weeklyNewsletter = b;
    }
....




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to