Hi Caarney,
I'm new to Tapestry 4.1, but checked the docs for the @EventListener
annotation. The docs say " The EventListener
<http://tapestry.apache.org/tapestry4.1/tapestry-annotations/apidocs/org/apache/tapestry/annotations/EventListener.html>annotation
is attached to listener
<http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/IActionListener>methods
to dynamically bind and listen to client side browser events.",
which tells me that you're not handling a server-side form post.
You can try something like:
@EventListener(events="onchange", elements="recName") to implement an AJAX
style handler, or if you just want to handle a simple form post, do
something like:
<form jwcid="@Form" listener="listener:onRefresh"> and remove the
@EventListener annotation. Your onRefresh method should work when the form
is submitted.
HTH,
Mark
On Dec 5, 2007 8:51 AM, caarney <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I'm using Tapestry 4.1.3 and the @EventListener functionality. The
> eventlistener method is called correctly, but I can't get any user-entered
> values from the form. As I understood from the documentation, the form
> should submit itself by default and send the values to the server, but it
> doesn't work for me. I tried to use @Persist annotation for the getter of
> the requested value, but it didn't help.
>
> <input jwcid="@TextField" value="ognl:recName" id="recName"
> class="text large" type="text" />
>
> @Persist
> public abstract String getRecName();
>
> @EventListener(events="onchange", elements="ddRecipient")
> public void onRefresh(IRequestCycle cycle) {
> log.debug(getRecName()); // this returns null (or initial value)
> }
>
> I presume that the getRecName() function in the EventListener is supposed
> to
> return the value entered by user - is it right? Am I doing something
> wrong?
> Thanks
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Tapestry-EventListener-doesn%27t-seem-to-submit-form-tf4950403s2369.html#a14174059
> Sent from the AppFuse - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>