Hi Thiago, thanks for the help!

I appreciate your comments and thank you for taking the time to help.
The loop which you posted does show the text fields exactly as I want
them (and they are pre populated with the original values from the
array list of strings), but when I submit the form, the updated values
are not in the result object. When the user arrives at the page, there
are already values in the array list, the user may then edit them and
submit the form.

In my "OnSuccessFromSubmitResults" method, I check to see if the
result.action list has changed (at the moment I simply print these out
to the console so I can see which ones are there). It is showing me
the original values which were in the list, which suggests it didn't
set the value. If I was to do what I am wanting it to do in java, it
would have to be: result.getAction().set(index, somethingTheyEntered);

But i'm not sure if Tapestry can do that this easily?



Thanks,
Steve


On 20 May 2014 14:08, Thiago H de Paula Figueiredo <thiag...@gmail.com> wrote:
> On Tue, 20 May 2014 09:14:08 -0300, Stephen Nutbrown <steves...@gmail.com>
> wrote:
>
>> Hello,
>
>
> Hi!
>
>
>>     <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>
>
>
> The prop binding (the default one) doesn't support using list or array
> indexes.
>
>
>> 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}"/>
>
>
> Never, never, ever use ${} when passing parameters. In 100% of the times,
> it's either completely wrong or completely useless.
>
> Try this:
>
>
> <t:loop t:source="result.action" t:value="currentAction">
>      <input t:type="TextField" t:value="currentAction"/>
> </t:loop>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>

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

Reply via email to