You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by David Graham <dg...@hotmail.com> on 2003/03/18 15:50:50 UTC

Tiles insert tag was Re: cvs commit: jakarta-struts/src/share/org/apache/...

Cedric,
Here's the problem as I understand it:
To extend a definition you must declare all the attributes in the parent 
definition even if they're set to "", right?

So, only in WAS 5 when I try <tile:insert> I get an error.  The attribute is 
defined, it's just set to "".  So, it's burdensome to use ignore="true" when 
this is the only way of inserting an extended tile that sets the attribute 
to ""(AFAIK).

David

>  This introduce an important change in the behavior: until now, a null 
>page was considered as an error, and so an exception was thrown.
>  Doing this modification let consider a null page as a valid page value, 
>with no error report !
>
>  Personally, I thing that having a null page is an error. Let consider the 
>following declarations:
>  <tiles:insert page="aPage" />  OK
>  <tiles:insert /> ERROR !! (but this one is also reported by the tld)
>
>  <definition name="aDef" path="aPage" /> OK
>  <definition name="aDef" /> ERROR ! (no report, no exception ;-) )
>
>  Checking the struts user list, I suppose you have try to correct a bug 
>encountered with WS 5 where you have something like the following and got a 
>null exception:
>
><definition name="tiles.leftnav" path="/layout/leftnav.jsp">
><!-- this is the optional secure part of the navigation -->
><put name="secureLeftNav" value=""/>
></definition>
>
>  For me the problem comes from WS 5 that replace the empty string "" by a 
>null reference ;-(.
>  A solution is to put a blank in the string, and set the flag 
>ignore="true" when inserting the attribute value.
>
>  Cedric
>
>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-dev-help@jakarta.apache.org


_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: Tiles insert tag was Re: cvs commit: jakarta-struts/src/share/org/apache/...

Posted by Cedric Dumoulin <ce...@apache.org>.

David Graham wrote:

> Cedric,
> Here's the problem as I understand it:
> To extend a definition you must declare all the attributes in the 
> parent definition even if they're set to "", right? 

  No. The parent definition only declare the attributes relevant to the 
parent. A child (extending a parent) can add some new attributes.
  If an attribute is not used in a parent, you don't need to declare it.
  In your case, the attribute is used by the associated layout, but you 
want the layout to ignore it (to show nothing).

  Cedric

>
>
> So, only in WAS 5 when I try <tile:insert> I get an error.  The 
> attribute is defined, it's just set to "".  So, it's burdensome to use 
> ignore="true" when this is the only way of inserting an extended tile 
> that sets the attribute to ""(AFAIK).

>
>
> David
>
>>  This introduce an important change in the behavior: until now, a 
>> null page was considered as an error, and so an exception was thrown.
>>  Doing this modification let consider a null page as a valid page 
>> value, with no error report !
>>
>>  Personally, I thing that having a null page is an error. Let 
>> consider the following declarations:
>>  <tiles:insert page="aPage" />  OK
>>  <tiles:insert /> ERROR !! (but this one is also reported by the tld)
>>
>>  <definition name="aDef" path="aPage" /> OK
>>  <definition name="aDef" /> ERROR ! (no report, no exception ;-) )
>>
>>  Checking the struts user list, I suppose you have try to correct a 
>> bug encountered with WS 5 where you have something like the following 
>> and got a null exception:
>>
>> <definition name="tiles.leftnav" path="/layout/leftnav.jsp">
>> <!-- this is the optional secure part of the navigation -->
>> <put name="secureLeftNav" value=""/>
>> </definition>
>>
>>  For me the problem comes from WS 5 that replace the empty string "" 
>> by a null reference ;-(.
>>  A solution is to put a blank in the string, and set the flag 
>> ignore="true" when inserting the attribute value.
>>
>>  Cedric
>>
>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>
>
> _________________________________________________________________
> The new MSN 8: advanced junk mail protection and 2 months FREE*  
> http://join.msn.com/?page=features/junkmail
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org