You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Tapestry5 Newbie Beginner <tt...@yahoo.com> on 2010/08/02 21:16:16 UTC
actionlink vs onAction()
I was trying to tutorial on the web (the number guessing one); And I was able
to set it up. However, when I add this to the Index.tml:
<t:actionlink t:id="create">Create</t:actionlink>
Then, in my Index.java, I have,
public class Index
{
@InjectPage
private CreateContact contact;
public Date getCurrentTime()
{
return new Date();
}
Object OnActionFromCreate() {
return contact.initialize();
}
}
I then click on the "Create" link under the index page, I get a stack trace:
Request event 'action' (on component Index:create) was not handled; you must
provide a matching event handler method in the component or in one of its
containers.
If I remove the "t:id="create"" and then remove the "FromCreate" in the
method, I still get the same thing. Anyone knows what could potentially go
wrong?
Thanks.
-- Daniel.
--
View this message in context: http://old.nabble.com/actionlink-vs-onAction%28%29-tp29328712p29328712.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: actionlink vs onAction()
Posted by Howard Lewis Ship <hl...@gmail.com>.
Seems like a bug to me; Tapestry is supposed to be case-insensitive.
The "on" and "from" parts of the method name should work regardless of
case.
On Mon, Aug 2, 2010 at 12:22 PM, Tapestry5 Newbie Beginner
<tt...@yahoo.com> wrote:
>
> Thanks. It works. My bad.
>
> -- Daniel.
>
>
> Thiago H. de Paula Figueiredo wrote:
>>
>> On Mon, 02 Aug 2010 16:16:16 -0300, Tapestry5 Newbie Beginner
>> <tt...@yahoo.com> wrote:
>>
>>> public class Index
>>> {
>>> @InjectPage
>>> private CreateContact contact;
>>>
>>>
>>> public Date getCurrentTime()
>>> {
>>> return new Date();
>>> }
>>>
>>> Object OnActionFromCreate() {
>>> return contact.initialize();
>>> }
>>> }
>>
>> Have you tried onActionFromCreate()? (notice the case of the first letter)
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/actionlink-vs-onAction%28%29-tp29328712p29328762.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
>
>
--
Howard M. Lewis Ship
Creator of Apache Tapestry
The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!
(971) 678-5210
http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: actionlink vs onAction()
Posted by Tapestry5 Newbie Beginner <tt...@yahoo.com>.
Thanks. It works. My bad.
-- Daniel.
Thiago H. de Paula Figueiredo wrote:
>
> On Mon, 02 Aug 2010 16:16:16 -0300, Tapestry5 Newbie Beginner
> <tt...@yahoo.com> wrote:
>
>> public class Index
>> {
>> @InjectPage
>> private CreateContact contact;
>>
>>
>> public Date getCurrentTime()
>> {
>> return new Date();
>> }
>>
>> Object OnActionFromCreate() {
>> return contact.initialize();
>> }
>> }
>
> Have you tried onActionFromCreate()? (notice the case of the first letter)
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
--
View this message in context: http://old.nabble.com/actionlink-vs-onAction%28%29-tp29328712p29328762.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: actionlink vs onAction()
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 02 Aug 2010 16:16:16 -0300, Tapestry5 Newbie Beginner
<tt...@yahoo.com> wrote:
> public class Index
> {
> @InjectPage
> private CreateContact contact;
>
>
> public Date getCurrentTime()
> {
> return new Date();
> }
>
> Object OnActionFromCreate() {
> return contact.initialize();
> }
> }
Have you tried onActionFromCreate()? (notice the case of the first letter)
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org