On 04.03.2011 19:47, Josh Canfield wrote:

>> But when I change the data in the submit event like
>> "onSelectedFromMoveUpButton". the sorting is overwritten by the form
>> submission values.
> How is it getting overwritten? How are you doing the ordering? What
> you've described could work, here is a really simple example:

Thanks for the small example, I figured out what caused the problem. I
did not use @Property for the value, instead I wrote my own getter and
setter:

-----

public void setValue(String value) {
    if (list.size() < counter + 1) {
        list.add(value);
    } else {
        list.set(counter, value);
    }
}

public String getValue() {
    return list.get(counter);
}

-----

After I replaced this with the @Property annotation, the sorting code
works. But now I have to persist all values in the session, flash
persistence is not enough anymore.

What exactly is the difference between @Property and self-made getters
and setters?

- Stephan

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

Reply via email to