Hello,

I also posted this on StackOverflow (SO), but it seems that the forum
is more active for these questions than SO. I'd really appreciate any
help. Here is the SO question, and the problem below (the same as it
is on SO).

http://stackoverflow.com/questions/23756438/tapestry-5-edit-arraylist-of-strings


I have a Result object (named result), and inside that object is an
arraylist of strings (named action), as well as some other values.

I can make a text area to edit values of the Result object like this:

    <input t:type="TextArea" t:id="feedback" t:value="result.someValue" />

This works fine. However, I would like to show a text field for each
of the Strings in the ArrayList within the result object

I can create a loop like this:

    <t:loop t:source="result.action" t:value="currentAction"
index="indexProp" t:formstate="ITERATION">
       ${currentAction}
    </t:loop>

This will show me on the screen all of the actions (that is great,
half way there). However I want these to be editable using a
TextField.

I have tried several things, none of which have worked how I wanted.
However, to help explain and as an example of what I have tried, this
is what I have:


    <t:loop t:source="result.action" t:value="currentAction"
index="indexProp" t:formstate="ITERATION">
    <input t:type="TextField" t:value="result.action.indexProp"/>
    </t:loop>

This won't work because (as far as I know), this is the same as
getResult().getAction.getIndexProp. So I tried

    <input t:type="TextField" t:value="result.action.${indexProp}"/>


This doesn't work either, although it shows the correct number of
TextFields, it does not link them up properly (they just say inside
them "result.action.0" and "result.action.1".


Any help is much appreciated.

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

Reply via email to