You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "paul deg (JIRA)" <ji...@apache.org> on 2016/06/03 16:08:59 UTC

[jira] [Comment Edited] (WW-4629) Tile definition Inheritance/overriding is broken in Struts2 tiles plugin 2.3.28+

    [ https://issues.apache.org/jira/browse/WW-4629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15314280#comment-15314280 ] 

paul deg edited comment on WW-4629 at 6/3/16 4:08 PM:
------------------------------------------------------

I access the title like this:

in the base layout JSP:
<tiles:useAttribute  name="title" ignore="true"/>

<tiles:insertAttribute name="header">

<tiles:putAttribute name="title" value="<%=title%>" />
</tiles:insertAttribute>

"header" is another JSP which needs to have access to the title value. This code works fine with 2.3.24 version of the plugin. If I upgrade, then the base layout JSP chokes up on "<tiles:putAttribute name="title" value="<%=title%>" />" - compiler says cannot find variable "title".

I noticed Maven pulls Tiles version 2.2.2, is this correct version for the 2.3.28?



was (Author: pauldeg):
I access the title like this:

in the base layout JSP:
<tiles:useAttribute  name="title" ignore="true"/>

<tiles:insertAttribute name="header">

<tiles:putAttribute name="title" value="<%=title%>" />
</tiles:insertAttribute>

"header" is another JSP which needs to have access to the title value. This code works fine with 2.3.24 version of the plugin. If I upgrade, then the base layout JSP chokes up on "<tiles:putAttribute name="title" value="<%=title%>" />" - compiler says cannot find variable "title".


> Tile definition Inheritance/overriding is broken in Struts2 tiles plugin 2.3.28+
> --------------------------------------------------------------------------------
>
>                 Key: WW-4629
>                 URL: https://issues.apache.org/jira/browse/WW-4629
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Tiles
>    Affects Versions: 2.3.28
>            Reporter: paul deg
>             Fix For: 2.3.29
>
>
> Tiles definition working with Struts2 release 2.3.24 stopped working in 2.3.28+.
> Example:
> {code:xml}
> <definition name="layouts.enroll.resp" template="/WEB-INF/tiles/EnrollmentLayout_resp.jsp" >		
> 	<put-attribute name="app" value="Banking" />		
> 	<put-attribute name="title" value="ATTN: Missing Page Title!" />
> 	<put-attribute name="content" />	
> </definition>
> <definition name="enrollment.resp.choose" extends="layouts.enroll.resp">
> 	<put-attribute name="content" value="/ChooseService_Captcha.jsp" />
> 	<put-attribute name="title"	value="Sign Up for Online Access" cascade="true"/>		
> </definition>
> {code}
> Value of attribute "title" defined in "enrollment.resp.choose" definition is not available in any scope.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)