You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by stephanos2k <st...@googlemail.com> on 2011/07/25 14:11:31 UTC

How to set 'parameters' on EventLink?

I was trying out the new 'parameters' property of the EventLink, but I don't
know how it's supposed to work - I tried:
    /<t:eventlink t:id="init" parameters="literal:test"/>/

But I only get 
    /UnknownValueException: "Could not find a coercion from type
java.lang.String to type java.util.Map."/

What am I doing wrong?

Cheers

--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-set-parameters-on-EventLink-tp4630532p4630532.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: How to set 'parameters' on EventLink?

Posted by stephanos2k <st...@googlemail.com>.
Thanks a lot you guys for clearing that up! :-)

--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-set-parameters-on-EventLink-tp4630532p4630695.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: How to set 'parameters' on EventLink?

Posted by Emmanuel DEMEY <de...@gmail.com>.
Here is an example :

<a t:type="eventLink" t:parameters="prop:{'name':'test'}"
t:id="eventLink">link</a>

public void onEventLink(@RequestParameter("name") String value){
System.out.println("##### EVENT " + value);
}

Emmanuel

2011/7/25 kleanthis <kl...@gmail.com>

> The problem is rhat EventLink needs also an Event parameter to function
> correctly.
>
> try
> <t:eventlink t:id="init" event="test1" parameters="literal:test">test
> text</t:eventlink>
>  and it should work. you also need a handler method in the corresponding
> java file is something similar to this page :
>
> http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/EventLink.html
>
> Good luck.
>
> -----
> Do not confuse motion for action.
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/How-to-set-parameters-on-EventLink-tp4630532p4630600.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
>
>


-- 
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emmanuel@gmail.com
http://emmanueldemey.fr

Re: How to set 'parameters' on EventLink?

Posted by kleanthis <kl...@gmail.com>.
The problem is rhat EventLink needs also an Event parameter to function
correctly.

try 
<t:eventlink t:id="init" event="test1" parameters="literal:test">test
text</t:eventlink>
 and it should work. you also need a handler method in the corresponding
java file is something similar to this page : 
http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/EventLink.html

Good luck.

-----
Do not confuse motion for action.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-set-parameters-on-EventLink-tp4630532p4630600.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: How to set 'parameters' on EventLink?

Posted by nillehammer <ta...@winfonet.eu>.
Hi stephanos2k,

A parameter with just "test" does not make any sense. Url parameters are
name/value pairs with equals sign, e.g. ...id=1&sortOrder=asc. That's why
taprestry expects a map. In the component/page class, where you want to use
the parameters provide a Map as a property and use that in the
parameters-Attribute.

Cheers nillehammer

-----
http://www.winfonet.eu
--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-set-parameters-on-EventLink-tp4630532p4630596.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