You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by matt22 <s1...@zoznam.sk> on 2009/11/22 21:20:01 UTC
Submit(with context) in Loop In Form
Hello,
i have a problem with submit component with context,
easy form with loop in TML:
<form t:type="form" t:id="testForm" enctype="multipart/form-data">
<t:loop source="1..3" value="testIndex" formState="literal:VALUES">
<input t:type="Submit" t:context="testIndex" value="testButton"
t:id="testButton" />
</t:loop>
</form>
easy method in CLASS:
@Property
private Integer _testIndex;
@OnEvent(value = "selected",component="testButton")
void testButton(Integer param){
...
}
BUT in the testButton(Integer param) param is always 3(last index)!!!
(after click a button 1, 2, or 3)
where is a problem?
i have tried loop with formState="literal:VALUES", ITERATION and NONE...
really thanks for any suggestions in advance...
thanks
Matt
--
View this message in context: http://old.nabble.com/Submit%28with-context%29-in-Loop-In-Form-tp26467882p26467882.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Submit(with context) in Loop In Form
Posted by Stephan Windmüller <st...@cs.tu-dortmund.de>.
matt22 wrote:
> BUT in the testButton(Integer param) param is always 3(last index)!!!
> (after click a button 1, 2, or 3)
> where is a problem?
I posted the same question two months ago. Please have a look at this
thread:
http://old.nabble.com/Wrong-context-for-submit-button-in-loop-td25449383.html
HTH
Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Submit(with context) in Loop In Form
Posted by Shing Hing Man <ma...@yahoo.com>.
Hi,
Have you tried to set the defer parameter to false in the submit component ?
http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Submit.html
The following is a demo on how to use submit with context.
http://lombok.demon.co.uk/tapestry5Demo/test/core/submitcontextdemo
Shing
--- On Mon, 23/11/09, matt22 <s1...@zoznam.sk> wrote:
> From: matt22 <s1...@zoznam.sk>
> Subject: Submit(with context) in Loop In Form
> To: users@tapestry.apache.org
> Date: Monday, 23 November, 2009, 4:20
>
> Hello,
> i have a problem with submit component with context,
>
> easy form with loop in TML:
> <form t:type="form" t:id="testForm"
> enctype="multipart/form-data">
> <t:loop
> source="1..3" value="testIndex"
> formState="literal:VALUES">
>
> <input t:type="Submit" t:context="testIndex"
> value="testButton"
> t:id="testButton" />
> </t:loop>
> </form>
>
> easy method in CLASS:
> @Property
> private Integer _testIndex;
>
> @OnEvent(value =
> "selected",component="testButton")
> void testButton(Integer
> param){
> ...
> }
>
>
> BUT in the testButton(Integer param) param is always 3(last
> index)!!!
> (after click a button 1, 2, or 3)
> where is a problem?
> i have tried loop with formState="literal:VALUES",
> ITERATION and NONE...
>
> really thanks for any suggestions in advance...
> thanks
>
> Matt
> --
> View this message in context: http://old.nabble.com/Submit%28with-context%29-in-Loop-In-Form-tp26467882p26467882.html
> Sent from the Tapestry - User mailing list archive at
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org