Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tiles question

 
SANJAY KUMAR
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Joan Horta Tosas
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic