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

2007-10-12 Thread Malin Ljungh
OK, thanks!
Works fine with the Any wrapping :)


On 10/8/07, Martino Piccinato [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




T4.1.3: Why is id suffixed with _0 ?

2007-10-08 Thread Malin Ljungh
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 ?

2007-10-08 Thread Martino Piccinato
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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]