You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Malin Ljungh <ma...@gmail.com> on 2007/10/08 20:53:13 UTC

T4.1.3: Why is id suffixed with "_0" ?

Hi all,

I have a problem with the async and updateComponents.

I have an If component with id ifNotLoggedIn with renderTag true.
Inside this I have som DirectLinks to switch the content of my If using
async and updateComponents="ifNotLoggedIn".
I get the following exception:

org.apache.hivemind.ApplicationRuntimeException: Parameter id can't be null
must not be null. [context:/WEB-INF/Home.page, line 5, column 54]
    at org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java
:411)
    at
org.apache.tapestry.services.impl.DojoAjaxResponseBuilder.renderResponse(
DojoAjaxResponseBuilder.java:241)
    at org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse
(ResponseRendererImpl.java:33)
    at
$ResponseRenderer_11580f03168.renderResponse($ResponseRenderer_11580f03168.java)
    at org.apache.tapestry.engine.DirectService.service(DirectService.java
:147)


and this is because the If component gets the id ifNotLoggedIn_0 when
rendered.
Why? Where did I go wrong?


Cheers,
Malin

Re: T4.1.3: Why is id suffixed with "_0" ?

Posted by andyhot <an...@di.uoa.gr>.
perhaps try updateComponents="clientId:ifNotLoggedIn"

I think Jesse has made it so that both are the same, but i almost always
use the clientId approach myself


Martino Piccinato wrote:
> Unfortunately for some reason some components cannot be used with
> updateComponents:
>
> most notably Insert and If. The solution is to wrap you if with an Any
> component that can be updated.
>
> Id of components are suffixed with indexex "_0, _1 ecc". usually when
> inside a For to ensure each one has a different id (that is usually
> the component name + the index).
>
> On 10/8/07, Malin Ljungh <ma...@gmail.com> wrote:
>   
>> Hi all,
>>
>> I have a problem with the async and updateComponents.
>>
>> I have an If component with id ifNotLoggedIn with renderTag true.
>> Inside this I have som DirectLinks to switch the content of my If using
>> async and updateComponents="ifNotLoggedIn".
>> I get the following exception:
>>
>> org.apache.hivemind.ApplicationRuntimeException: Parameter id can't be null
>> must not be null. [context:/WEB-INF/Home.page, line 5, column 54]
>>     at org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java
>> :411)
>>     at
>> org.apache.tapestry.services.impl.DojoAjaxResponseBuilder.renderResponse(
>> DojoAjaxResponseBuilder.java:241)
>>     at org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse
>> (ResponseRendererImpl.java:33)
>>     at
>> $ResponseRenderer_11580f03168.renderResponse($ResponseRenderer_11580f03168.java)
>>     at org.apache.tapestry.engine.DirectService.service(DirectService.java
>> :147)
>>
>>
>> and this is because the If component gets the id ifNotLoggedIn_0 when
>> rendered.
>> Why? Where did I go wrong?
>>
>>
>> Cheers,
>> Malin
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>   

-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / JEE Consulting


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


Re: T4.1.3: Why is id suffixed with "_0" ?

Posted by Malin Ljungh <ma...@gmail.com>.
OK, thanks!
Works fine with the Any wrapping :)


On 10/8/07, Martino Piccinato <ma...@gmail.com> wrote:
>
> Unfortunately for some reason some components cannot be used with
> updateComponents:
>
> most notably Insert and If. The solution is to wrap you if with an Any
> component that can be updated.
>
> Id of components are suffixed with indexex "_0, _1 ecc". usually when
> inside a For to ensure each one has a different id (that is usually
> the component name + the index).
>
> On 10/8/07, Malin Ljungh <ma...@gmail.com> wrote:
> > Hi all,
> >
> > I have a problem with the async and updateComponents.
> >
> > I have an If component with id ifNotLoggedIn with renderTag true.
> > Inside this I have som DirectLinks to switch the content of my If using
> > async and updateComponents="ifNotLoggedIn".
> > I get the following exception:
> >
> > org.apache.hivemind.ApplicationRuntimeException: Parameter id can't be
> null
> > must not be null. [context:/WEB-INF/Home.page, line 5, column 54]
> >     at org.apache.tapestry.engine.RequestCycle.renderPage(
> RequestCycle.java
> > :411)
> >     at
> > org.apache.tapestry.services.impl.DojoAjaxResponseBuilder.renderResponse
> (
> > DojoAjaxResponseBuilder.java:241)
> >     at
> org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse
> > (ResponseRendererImpl.java:33)
> >     at
> >
> $ResponseRenderer_11580f03168.renderResponse($ResponseRenderer_11580f03168.java)
> >     at org.apache.tapestry.engine.DirectService.service(
> DirectService.java
> > :147)
> >
> >
> > and this is because the If component gets the id ifNotLoggedIn_0 when
> > rendered.
> > Why? Where did I go wrong?
> >
> >
> > Cheers,
> > Malin
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: T4.1.3: Why is id suffixed with "_0" ?

Posted by Martino Piccinato <ma...@gmail.com>.
Unfortunately for some reason some components cannot be used with
updateComponents:

most notably Insert and If. The solution is to wrap you if with an Any
component that can be updated.

Id of components are suffixed with indexex "_0, _1 ecc". usually when
inside a For to ensure each one has a different id (that is usually
the component name + the index).

On 10/8/07, Malin Ljungh <ma...@gmail.com> wrote:
> Hi all,
>
> I have a problem with the async and updateComponents.
>
> I have an If component with id ifNotLoggedIn with renderTag true.
> Inside this I have som DirectLinks to switch the content of my If using
> async and updateComponents="ifNotLoggedIn".
> I get the following exception:
>
> org.apache.hivemind.ApplicationRuntimeException: Parameter id can't be null
> must not be null. [context:/WEB-INF/Home.page, line 5, column 54]
>     at org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java
> :411)
>     at
> org.apache.tapestry.services.impl.DojoAjaxResponseBuilder.renderResponse(
> DojoAjaxResponseBuilder.java:241)
>     at org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse
> (ResponseRendererImpl.java:33)
>     at
> $ResponseRenderer_11580f03168.renderResponse($ResponseRenderer_11580f03168.java)
>     at org.apache.tapestry.engine.DirectService.service(DirectService.java
> :147)
>
>
> and this is because the If component gets the id ifNotLoggedIn_0 when
> rendered.
> Why? Where did I go wrong?
>
>
> Cheers,
> Malin
>

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