aspose file tools*
The moose likes Struts and the fly likes tiles question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "tiles question " Watch "tiles question " New topic
Author

tiles question

SANJAY KUMAR
Greenhorn

Joined: Mar 27, 2002
Posts: 25
hi friends,
If if I have tile def like



<definition name="ADef" extends="newDef">
<put name="body" value="newB"/>
</definition>

<definition name="AADef" extends="newDef">
<put name="body" value="newC"/>
</definition>

<definition name="newB" page="/login/login.jsp">
<put name="first" value="/login/myLogin.jsp"/>
<put name="second" value="/common/common.jsp"/>
</definition>

<definition name="newC" page="/login/login.jsp">
<put name="first" value="/login/myLogin.jsp"/>
<put name="second" value="/common/common.jsp"/>
<put name="third" value="/common/third.jsp"/>
</definition>




-----------------------------------------------

My login.jsp is like

<tiles:insert attribute="first"/>
<tiles:insert attribute="second"/>
<tiles:insert attribute="third"/>

------------------------------------------

Will I get error if I call ADef as I am not passing variable third.

Please advice me

Thanks


SCJP, SCWCD , SCBCD
Joan Horta Tosas
Ranch Hand

Joined: Feb 01, 2007
Posts: 59
To avoid an exception to be thrown, put in the tiles:insert tag that can be optional the attribute ignore="true"
ignore: If this attribute is set to true, and the attribute specified by the name does not exist, simply return without writing anything. The default value is false, which will cause a runtime exception to be thrown. [RT Expr]
SANJAY KUMAR
Greenhorn

Joined: Mar 27, 2002
Posts: 25
Thanks a lot
 
 
subject: tiles question