You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Eric BIANCHI <er...@rodanotech.ch> on 2007/05/28 17:00:44 UTC

EventListener is not working in 4.1.2 [UPDATED]

Hello list,

On Friday the 18th of May, I wrote :

--- CUT HERE ---
I've been happily using the EventListener Annotation in Tapestry
4.1.1 and everything works fine.

Using the latest snapshot (4.1.2), my EventListener doesn't work
anymore.

Here's my code :

<form jwcid="myForm@Form" async="true"
delegate="ognl:validationDelegate" clientValidationEnabled="false">
<select jwcid="transplant_has_history@PropertySelection"
            model="ognl:page.affirmationSelectionModel"
            value="ognl:visit.medicalHistory.hasTransplant"
            class="text"
            displayName="message:form.transplant"
            validators="validators:required"/>
</form>
	
@EventListener(targets = "transplant_has_history", events =
"onchange", submitForm = "myForm", async = true)
public void transplantSelected(IRequestCycle cycle) {
	System.out.println ("Called !!");
	getRequestCycle().getResponseBuilder().updateComponent
("transplant_condition");	
}

I can see that my form is being submitted (the annotation works
great) but my method never get called. I changed the method's
parameters (no parameters, BrowerEvent), but it still doesn't work.
Switching back to 4.1.1 and everything works fine again.
--- CUT HERE ---

Well, I finally found a workaround. It seems that the EventListener  
Annotation doesn't work if the id contains _

For example : targets = "transplantHasHistory" works great in 4.1.2,  
"transplant_has_history" does not.

Do i have to fill a bug for that ?

Regards,

Eric

--
Eric BIANCHI
---------------------------------------
eric.bianchi@rodanotech.ch
http://www.rodanotech.ch




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: EventListener is not working in 4.1.2 [UPDATED]

Posted by Jesse Kuhnert <jk...@gmail.com>.
Yeah it sounds like a bug of some sort to me.

On 5/28/07, Eric BIANCHI <er...@rodanotech.ch> wrote:
>
> Hello list,
>
> On Friday the 18th of May, I wrote :
>
> --- CUT HERE ---
> I've been happily using the EventListener Annotation in Tapestry
> 4.1.1 and everything works fine.
>
> Using the latest snapshot (4.1.2), my EventListener doesn't work
> anymore.
>
> Here's my code :
>
> <form jwcid="myForm@Form" async="true"
> delegate="ognl:validationDelegate" clientValidationEnabled="false">
> <select jwcid="transplant_has_history@PropertySelection"
>             model="ognl:page.affirmationSelectionModel"
>             value="ognl:visit.medicalHistory.hasTransplant"
>             class="text"
>             displayName="message:form.transplant"
>             validators="validators:required"/>
> </form>
>
> @EventListener(targets = "transplant_has_history", events =
> "onchange", submitForm = "myForm", async = true)
> public void transplantSelected(IRequestCycle cycle) {
>         System.out.println ("Called !!");
>         getRequestCycle().getResponseBuilder().updateComponent
> ("transplant_condition");
> }
>
> I can see that my form is being submitted (the annotation works
> great) but my method never get called. I changed the method's
> parameters (no parameters, BrowerEvent), but it still doesn't work.
> Switching back to 4.1.1 and everything works fine again.
> --- CUT HERE ---
>
> Well, I finally found a workaround. It seems that the EventListener
> Annotation doesn't work if the id contains _
>
> For example : targets = "transplantHasHistory" works great in 4.1.2,
> "transplant_has_history" does not.
>
> Do i have to fill a bug for that ?
>
> Regards,
>
> Eric
>
> --
> Eric BIANCHI
> ---------------------------------------
> eric.bianchi@rodanotech.ch
> http://www.rodanotech.ch
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com