You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Daniel Tabuenca <dt...@gmail.com> on 2007/02/08 02:56:13 UTC

@EventListener and unrendered components.

I'm trying out the new Tapestry 4.1.1 @EventListener annotation and it
works great, except that if the event is on a component that is
conditionally rendered, it breaks with the following error:

FATAL exception raised: bad srcObj for srcFunc: onclick

This is understandable since dojo cannot connect the requested event
because the element does not exist.

Is there a way to deal with this? Or should event listeners not be
used with conditionally rendered components? Is there away to
conditionally enable/disable EventListeners?

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


Re: @EventListener and unrendered components.

Posted by Daniel Tabuenca <dt...@gmail.com>.
Ok, I'll try to get an example up on the jira that demostrates this.

On 2/8/07, Jesse Kuhnert <jk...@gmail.com> wrote:
> Ah....That is the bread & butter sort of logic I use often as well.
> I'd need a specific example of how it's not working to be more
> helpful. (preferrably in JIRA, most time spent on the list is fun
> "talking time" whereas actually sitting down and fixing things is
> reserved for fun "jira time" . ;) )
>
> On 2/8/07, Daniel Tabuenca <dt...@gmail.com> wrote:
> > Well Simply put... something like...  (in pseudo tapestry tags... hehe)
> >
> > <div updatedDiv>
> >
> > <@If condition=true >
> >      <component event listener attached to /> <!-- On click (condition
> > =false) (update updateDiv) -->
> > </If>
> >
> > <@Else>
> >      content......
> > </else>
> >
> > </div>
> >
> >
> >
> > On 2/8/07, Jesse Kuhnert <jk...@gmail.com> wrote:
> > > Ah...I guess that depends on how something is "conditionally"
> > > rendered. If the renderComponent() method gets called on it and
> > > Tapestry thinks you want it to get updated it'll happen.
> > >
> > > Need more info on how it's being conditionally rendered.
> > >
> > > On 2/7/07, Daniel Tabuenca <dt...@gmail.com> wrote:
> > > > I'm trying out the new Tapestry 4.1.1 @EventListener annotation and it
> > > > works great, except that if the event is on a component that is
> > > > conditionally rendered, it breaks with the following error:
> > > >
> > > > FATAL exception raised: bad srcObj for srcFunc: onclick
> > > >
> > > > This is understandable since dojo cannot connect the requested event
> > > > because the element does not exist.
> > > >
> > > > Is there a way to deal with this? Or should event listeners not be
> > > > used with conditionally rendered components? Is there away to
> > > > conditionally enable/disable EventListeners?
> > > >
> > > > ---------------------------------------------------------------------
> > > > 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
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
> ---------------------------------------------------------------------
> 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: @EventListener and unrendered components.

Posted by Jesse Kuhnert <jk...@gmail.com>.
Ah....That is the bread & butter sort of logic I use often as well.
I'd need a specific example of how it's not working to be more
helpful. (preferrably in JIRA, most time spent on the list is fun
"talking time" whereas actually sitting down and fixing things is
reserved for fun "jira time" . ;) )

On 2/8/07, Daniel Tabuenca <dt...@gmail.com> wrote:
> Well Simply put... something like...  (in pseudo tapestry tags... hehe)
>
> <div updatedDiv>
>
> <@If condition=true >
>      <component event listener attached to /> <!-- On click (condition
> =false) (update updateDiv) -->
> </If>
>
> <@Else>
>      content......
> </else>
>
> </div>
>
>
>
> On 2/8/07, Jesse Kuhnert <jk...@gmail.com> wrote:
> > Ah...I guess that depends on how something is "conditionally"
> > rendered. If the renderComponent() method gets called on it and
> > Tapestry thinks you want it to get updated it'll happen.
> >
> > Need more info on how it's being conditionally rendered.
> >
> > On 2/7/07, Daniel Tabuenca <dt...@gmail.com> wrote:
> > > I'm trying out the new Tapestry 4.1.1 @EventListener annotation and it
> > > works great, except that if the event is on a component that is
> > > conditionally rendered, it breaks with the following error:
> > >
> > > FATAL exception raised: bad srcObj for srcFunc: onclick
> > >
> > > This is understandable since dojo cannot connect the requested event
> > > because the element does not exist.
> > >
> > > Is there a way to deal with this? Or should event listeners not be
> > > used with conditionally rendered components? Is there away to
> > > conditionally enable/disable EventListeners?
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> > ---------------------------------------------------------------------
> > 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
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

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

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


Re: @EventListener and unrendered components.

Posted by Daniel Tabuenca <dt...@gmail.com>.
Well Simply put... something like...  (in pseudo tapestry tags... hehe)

<div updatedDiv>

<@If condition=true >
     <component event listener attached to /> <!-- On click (condition
=false) (update updateDiv) -->
</If>

<@Else>
     content......
</else>

</div>



On 2/8/07, Jesse Kuhnert <jk...@gmail.com> wrote:
> Ah...I guess that depends on how something is "conditionally"
> rendered. If the renderComponent() method gets called on it and
> Tapestry thinks you want it to get updated it'll happen.
>
> Need more info on how it's being conditionally rendered.
>
> On 2/7/07, Daniel Tabuenca <dt...@gmail.com> wrote:
> > I'm trying out the new Tapestry 4.1.1 @EventListener annotation and it
> > works great, except that if the event is on a component that is
> > conditionally rendered, it breaks with the following error:
> >
> > FATAL exception raised: bad srcObj for srcFunc: onclick
> >
> > This is understandable since dojo cannot connect the requested event
> > because the element does not exist.
> >
> > Is there a way to deal with this? Or should event listeners not be
> > used with conditionally rendered components? Is there away to
> > conditionally enable/disable EventListeners?
> >
> > ---------------------------------------------------------------------
> > 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
>
> ---------------------------------------------------------------------
> 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: @EventListener and unrendered components.

Posted by Jesse Kuhnert <jk...@gmail.com>.
Ah...I guess that depends on how something is "conditionally"
rendered. If the renderComponent() method gets called on it and
Tapestry thinks you want it to get updated it'll happen.

Need more info on how it's being conditionally rendered.

On 2/7/07, Daniel Tabuenca <dt...@gmail.com> wrote:
> I'm trying out the new Tapestry 4.1.1 @EventListener annotation and it
> works great, except that if the event is on a component that is
> conditionally rendered, it breaks with the following error:
>
> FATAL exception raised: bad srcObj for srcFunc: onclick
>
> This is understandable since dojo cannot connect the requested event
> because the element does not exist.
>
> Is there a way to deal with this? Or should event listeners not be
> used with conditionally rendered components? Is there away to
> conditionally enable/disable EventListeners?
>
> ---------------------------------------------------------------------
> 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

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