Use:
<t:loop source="values" value="value" t:volatile="true">

Cheers,
Nick.


Marcus Schmidke wrote:
Hello all,

the following might be an absolute beginner's error, but since I'm an
absolute beginner, I probably am allowed to have this kind of problem
...

I'm trying to edit a list of values:

class Value {
  String name;
  String text;
  boolean used;
  ... getters ...
  ... setters ...
}

class Page {
  private @Persist List<Value> values;
  private Value value; //iterator

  ... getters / setters ...
  ... some code to initialize values list ...
}

And the html code:
        <t:form>
        <table border="1">
          <t:loop source="values" value="value">
                <tr>
                        <td>${value.name}</td>
                        <td><input t:type="textfield" size="100" value="value.text" 
/></td>
                        <td><input t:type="checkbox" value="value.used" /></td>
                </tr>
          </t:loop>
        </table>
        <t:submit />
        </t:form>

The page is rendered perfectly. On Submit, the new values are passed
into some Value objects.

But: those Value objects are serialized/deserialized instances of the
original Value objects. While the List still holds the original Value
objects, only copies of them get modified. Result is that my program
code (which works on the list) never sees the modified versions, and
on re-rendering, the old values are displayed again.

What am I doing wrong??


Marcus.

---------------------------------------------------------------------
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