You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ron Piterman <rp...@gmx.net> on 2006/11/28 15:03:16 UTC

Update component loses its @EventListener

Hi all -
I have a simlar scenario to the above post with the same name:

I call responseBuilder.updateComponent on the template-container of a 
component with an @EventListener.

The component is being rendered but the javascript is not regenerated.

The usecase is as follows:

<tr jwcid="color@Any">
  <td><label .../></td>
  <td><select jwcid="select@PropertySelection" .../></td>
  <span jwcid="@If" condition="prop:selectionIsRed"
        renderTag="ognl:false">
   <td><label .../></td>
   <td> <input .../></td>
  </span>
  <span jwcid="@If" condition="prop:selectionIsBlue"
        renderTag="ognl:false">
   <td><label .../></td>
   <td><input .../></td>
  </span>
</tr>

@EventListener(
   submitForm="myform", validateForm=false ,
   elements="select" , events="onchange")
public void colorChanged() {
   getResponseRenderer().updateComponent("color");
}

Any advise?

Cheers,
Ron




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


Re: Update component loses its @EventListener

Posted by Ron Piterman <rp...@gmx.net>.
Thanx for pointing this out !
Ron


Mark Reynolds wrote:
> Jesse pointed out that it should be target= instead of element= when the
> thing being listened to is a Tapestry component (i.e., has a jwcid).
> Apparently, element= is for html elements that aren't tapestry components.
> 
> If the problem you are having is the same as mine (I think it might be) 
> then
> it is fixed in the snapshot from last night.
> 
> On 11/28/06, Ron Piterman <rp...@gmx.net> wrote:
> 
>>
>> ok - I see there is a jira issue about this one...
>>
>>
>> Ron Piterman wrote:
>> > Hi all -
>> > I have a simlar scenario to the above post with the same name:
>> >
>> > I call responseBuilder.updateComponent on the template-container of a
>> > component with an @EventListener.
>> >
>> > The component is being rendered but the javascript is not regenerated.
>> >
>> > The usecase is as follows:
>> >
>> > <tr jwcid="color@Any">
>> >  <td><label .../></td>
>> >  <td><select jwcid="select@PropertySelection" .../></td>
>> >  <span jwcid="@If" condition="prop:selectionIsRed"
>> >        renderTag="ognl:false">
>> >   <td><label .../></td>
>> >   <td> <input .../></td>
>> >  </span>
>> >  <span jwcid="@If" condition="prop:selectionIsBlue"
>> >        renderTag="ognl:false">
>> >   <td><label .../></td>
>> >   <td><input .../></td>
>> >  </span>
>> > </tr>
>> >
>> > @EventListener(
>> >   submitForm="myform", validateForm=false ,
>> >   elements="select" , events="onchange")
>> > public void colorChanged() {
>> >   getResponseRenderer().updateComponent("color");
>> > }
>> >
>> > Any advise?
>> >
>> > Cheers,
>> > Ron
>> >
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> > For additional commands, e-mail: users-help@tapestry.apache.org
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 


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


Re: Update component loses its @EventListener

Posted by Mark Reynolds <ma...@gmail.com>.
Jesse pointed out that it should be target= instead of element= when the
thing being listened to is a Tapestry component (i.e., has a jwcid).
Apparently, element= is for html elements that aren't tapestry components.

If the problem you are having is the same as mine (I think it might be) then
it is fixed in the snapshot from last night.

On 11/28/06, Ron Piterman <rp...@gmx.net> wrote:
>
> ok - I see there is a jira issue about this one...
>
>
> Ron Piterman wrote:
> > Hi all -
> > I have a simlar scenario to the above post with the same name:
> >
> > I call responseBuilder.updateComponent on the template-container of a
> > component with an @EventListener.
> >
> > The component is being rendered but the javascript is not regenerated.
> >
> > The usecase is as follows:
> >
> > <tr jwcid="color@Any">
> >  <td><label .../></td>
> >  <td><select jwcid="select@PropertySelection" .../></td>
> >  <span jwcid="@If" condition="prop:selectionIsRed"
> >        renderTag="ognl:false">
> >   <td><label .../></td>
> >   <td> <input .../></td>
> >  </span>
> >  <span jwcid="@If" condition="prop:selectionIsBlue"
> >        renderTag="ognl:false">
> >   <td><label .../></td>
> >   <td><input .../></td>
> >  </span>
> > </tr>
> >
> > @EventListener(
> >   submitForm="myform", validateForm=false ,
> >   elements="select" , events="onchange")
> > public void colorChanged() {
> >   getResponseRenderer().updateComponent("color");
> > }
> >
> > Any advise?
> >
> > Cheers,
> > Ron
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Update component loses its @EventListener

Posted by Ron Piterman <rp...@gmx.net>.
ok - I see there is a jira issue about this one...


Ron Piterman wrote:
> Hi all -
> I have a simlar scenario to the above post with the same name:
> 
> I call responseBuilder.updateComponent on the template-container of a 
> component with an @EventListener.
> 
> The component is being rendered but the javascript is not regenerated.
> 
> The usecase is as follows:
> 
> <tr jwcid="color@Any">
>  <td><label .../></td>
>  <td><select jwcid="select@PropertySelection" .../></td>
>  <span jwcid="@If" condition="prop:selectionIsRed"
>        renderTag="ognl:false">
>   <td><label .../></td>
>   <td> <input .../></td>
>  </span>
>  <span jwcid="@If" condition="prop:selectionIsBlue"
>        renderTag="ognl:false">
>   <td><label .../></td>
>   <td><input .../></td>
>  </span>
> </tr>
> 
> @EventListener(
>   submitForm="myform", validateForm=false ,
>   elements="select" , events="onchange")
> public void colorChanged() {
>   getResponseRenderer().updateComponent("color");
> }
> 
> Any advise?
> 
> Cheers,
> Ron
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 


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