You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Geoff Callender <ge...@gmail.com> on 2007/08/19 13:59:16 UTC

Ajax example in doco not working?

Is the basic Ajax example in the doco missing something (http:// 
tapestry.apache.org/tapestry4.1/ajax/basics.html)?

The example has this:

	<a jwcid="@DirectLink" listener="listener:setTime"  
updateComponents="time">Refresh time</a>
	<div jwcid="time@Insert" value="ognl:time" renderTag="true"/>

which rendered as:

	<div>Sun Aug 19 21:29:00 EST 2007</div>

and it wouldn't update the time.  It seems updateComponents must  
reference an id, so I tried adding an id explicitly:

	<div jwcid="time@Insert" value="ognl:time" renderTag="true" id="time"/>

which rendered as:

	<div id="time">Sun Aug 19 21:29:00 EST 2007</div>

and it started working!  I have to admit, I was expecting that  
@Insert would render an id without my help, taking the name "time"  
from jwcid="time@Insert".

So, is the example wrong, or is @Insert misbehaving, or is my  
environment misbehaving?

Geoff

Re: Ajax example in doco not working?

Posted by Geoff Callender <ge...@gmail.com>.
That's right - it's the @Insert that surprised me.  I''l put it in  
JIRA.  Thanks.

On 22/08/2007, at 4:37 PM, <Ma...@bmw.ch> wrote:

> I think Geoff is not complaining about @Any, but about @Insert.
> In fact, most components nowadays call
> AbstractComponent.renderIdAttribute(), including Any. Insert does not.
> This seems inconsistent to me and it's an easy fix, so I'd file an
> issue.
>
>> -----Original Message-----
>> From: Jesse Kuhnert [mailto:jkuhnert@gmail.com]
>> Sent: Wednesday, August 22, 2007 7:04 AM
>> To: Tapestry users
>> Subject: Re: Ajax example in doco not working?
>>
>> Id isn't a formal parameter of Any - so providing it forces
>> @Any to render tags.
>>
>> Without it there are no tags / markup rendered at all - thus
>> no client side elements to find and update in an ajax request.
>>
>> On 8/19/07, Geoff Callender
>> <ge...@gmail.com> wrote:
>>> Is the basic Ajax example in the doco missing something (http://
>>> tapestry.apache.org/tapestry4.1/ajax/basics.html)?
>>>
>>> The example has this:
>>>
>>>         <a jwcid="@DirectLink" listener="listener:setTime"
>>> updateComponents="time">Refresh time</a>
>>>         <div jwcid="time@Insert" value="ognl:time"
>> renderTag="true"/>
>>>
>>> which rendered as:
>>>
>>>         <div>Sun Aug 19 21:29:00 EST 2007</div>
>>>
>>> and it wouldn't update the time.  It seems updateComponents must
>>> reference an id, so I tried adding an id explicitly:
>>>
>>>         <div jwcid="time@Insert" value="ognl:time" renderTag="true"
>>> id="time"/>
>>>
>>> which rendered as:
>>>
>>>         <div id="time">Sun Aug 19 21:29:00 EST 2007</div>
>>>
>>> and it started working!  I have to admit, I was expecting
>> that @Insert
>>> would render an id without my help, taking the name "time"
>>> from jwcid="time@Insert".
>>>
>>> So, is the example wrong, or is @Insert misbehaving, or is my
>>> environment misbehaving?
>>>
>>> Geoff
>>
>>
>> --
>> 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
>


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


RE: Ajax example in doco not working?

Posted by Ma...@bmw.ch.
I think Geoff is not complaining about @Any, but about @Insert.
In fact, most components nowadays call
AbstractComponent.renderIdAttribute(), including Any. Insert does not.
This seems inconsistent to me and it's an easy fix, so I'd file an
issue.

> -----Original Message-----
> From: Jesse Kuhnert [mailto:jkuhnert@gmail.com] 
> Sent: Wednesday, August 22, 2007 7:04 AM
> To: Tapestry users
> Subject: Re: Ajax example in doco not working?
> 
> Id isn't a formal parameter of Any - so providing it forces 
> @Any to render tags.
> 
> Without it there are no tags / markup rendered at all - thus 
> no client side elements to find and update in an ajax request.
> 
> On 8/19/07, Geoff Callender 
> <ge...@gmail.com> wrote:
> > Is the basic Ajax example in the doco missing something (http:// 
> > tapestry.apache.org/tapestry4.1/ajax/basics.html)?
> >
> > The example has this:
> >
> >         <a jwcid="@DirectLink" listener="listener:setTime"
> > updateComponents="time">Refresh time</a>
> >         <div jwcid="time@Insert" value="ognl:time" 
> renderTag="true"/>
> >
> > which rendered as:
> >
> >         <div>Sun Aug 19 21:29:00 EST 2007</div>
> >
> > and it wouldn't update the time.  It seems updateComponents must 
> > reference an id, so I tried adding an id explicitly:
> >
> >         <div jwcid="time@Insert" value="ognl:time" renderTag="true" 
> > id="time"/>
> >
> > which rendered as:
> >
> >         <div id="time">Sun Aug 19 21:29:00 EST 2007</div>
> >
> > and it started working!  I have to admit, I was expecting 
> that @Insert 
> > would render an id without my help, taking the name "time"
> > from jwcid="time@Insert".
> >
> > So, is the example wrong, or is @Insert misbehaving, or is my 
> > environment misbehaving?
> >
> > Geoff
> 
> 
> --
> 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: Ajax example in doco not working?

Posted by Jesse Kuhnert <jk...@gmail.com>.
Id isn't a formal parameter of Any - so providing it forces @Any to
render tags.

Without it there are no tags / markup rendered at all - thus no client
side elements to find and update in an ajax request.

On 8/19/07, Geoff Callender <ge...@gmail.com> wrote:
> Is the basic Ajax example in the doco missing something (http://
> tapestry.apache.org/tapestry4.1/ajax/basics.html)?
>
> The example has this:
>
>         <a jwcid="@DirectLink" listener="listener:setTime"
> updateComponents="time">Refresh time</a>
>         <div jwcid="time@Insert" value="ognl:time" renderTag="true"/>
>
> which rendered as:
>
>         <div>Sun Aug 19 21:29:00 EST 2007</div>
>
> and it wouldn't update the time.  It seems updateComponents must
> reference an id, so I tried adding an id explicitly:
>
>         <div jwcid="time@Insert" value="ognl:time" renderTag="true" id="time"/>
>
> which rendered as:
>
>         <div id="time">Sun Aug 19 21:29:00 EST 2007</div>
>
> and it started working!  I have to admit, I was expecting that
> @Insert would render an id without my help, taking the name "time"
> from jwcid="time@Insert".
>
> So, is the example wrong, or is @Insert misbehaving, or is my
> environment misbehaving?
>
> Geoff


-- 
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