You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by amebaliu <am...@yahoo.com> on 2008/05/12 12:14:14 UTC
question about submit component
<t:form t:id="addTasksForm">
<div class="enter-todo">Enter a to-do item</div>
<div class="task-textarea enter-todo"><t:textArea
t:value="task" t:id="editplace" /></div>
<div class="enter-todo">Who's responsible?</div>
<div class="enter-todo">
<select t:type="select" t:model="users" t:value="user">
<option>User 1</option>
<option>User 2</option>
</select>
</div>
<div class="submit-clear-button"><input type="submit"
t:type="submit" t:id="submitButton" value="Add this item" /> or # I'm done
adding items </div>
</t:form>
I am new to the Tapestry, and I wanna create the event handler for the
submit button which is a submit component..
In page class
I put the codes
@OnEvent(component="submitButton")
void onSubmitButton()
{
System.out.println("Submit Here");
}
But somehow, i can not get the eventhander working for this button, i can
get the event handler working for the textfield, textarea, form,link, but
only not for the submit button.. just wanna ask how can i get the event
handler working for this submit button
Thanks a lot :-D
--
View this message in context: http://www.nabble.com/question-about-submit-component-tp17184672p17184672.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: question about submit component
Posted by Marcelo Lotif <ml...@gmail.com>.
Try to catch the event by your FORM ID:
@OnEvent(component="addTasksForm")
void onSubmitButton()
{
System.out.println("Submit Here");
}
or simply switch the onSubmiot method by onSuccess()
see http://tapestry.formos.com/nightly/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/Submit.html
if you have more than one submit on your page.
2008/5/12 amebaliu <am...@yahoo.com>:
>
> <t:form t:id="addTasksForm">
> <div class="enter-todo">Enter a to-do item</div>
> <div class="task-textarea enter-todo"><t:textArea
> t:value="task" t:id="editplace" /></div>
> <div class="enter-todo">Who's responsible?</div>
> <div class="enter-todo">
> <select t:type="select" t:model="users" t:value="user">
> <option>User 1</option>
> <option>User 2</option>
> </select>
> </div>
> <div class="submit-clear-button"><input type="submit"
> t:type="submit" t:id="submitButton" value="Add this item" /> or # I'm done
> adding items </div>
> </t:form>
>
> I am new to the Tapestry, and I wanna create the event handler for the
> submit button which is a submit component..
>
> In page class
>
> I put the codes
>
> @OnEvent(component="submitButton")
> void onSubmitButton()
> {
> System.out.println("Submit Here");
> }
>
> But somehow, i can not get the eventhander working for this button, i can
> get the event handler working for the textfield, textarea, form,link, but
> only not for the submit button.. just wanna ask how can i get the event
> handler working for this submit button
>
> Thanks a lot :-D
> --
> View this message in context: http://www.nabble.com/question-about-submit-component-tp17184672p17184672.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
>
>
--
Atenciosamente,
Marcelo Lotif
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org