You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by "Rabenda, Clay" <Cl...@mtvnmix.com> on 2009/04/17 23:41:07 UTC

Put-list-attribute inheritance

Hi everyone,
I'm using Tiles 2.1.2 and am seeing some bugs using putListAttribute
inheritance.  I am seeing 2 of the 'parent' elements(and I think 3 with
2.1.1).

E.G.
This configuration:
<definition name="main" template="/views/main.jspx">
	...
	<put-list-attribute name="css_files">
		<add-attribute value="common.css" />
	</put-list-attribute>
	...
</definition>
...
<definition name="home" extends="main">
	...
	<put-list-attribute name="css_files" inherit="true">
    		<add-attribute value="foo.css" />
	</put-list-attribute>
	...
</definition>
Results in:
<link media="screen" type="text/css" rel="stylesheet"
href="/styles/common.css" />
<link media="screen" type="text/css" rel="stylesheet"
href="/styles/common.css" />
<link media="screen" type="text/css" rel="stylesheet"
href="/styles/foo.css" />

Unfortunately, due to a Spring 2.5.6 requirement I am using a custom
TilesConfigurer which was posted by Slava Kudinov here:
http://forum.springsource.org/showthread.php?t=65907
I'm not sure if this might be the cause of my problem but that's my best
guess...

Thanks in advance,
Clayton Rabenda



Re: Put-list-attribute inheritance

Posted by Antonio Petrelli <an...@gmail.com>.
Please do not hijack others' thread, especially the ones of 2 years ago.
Please start a new thread.

Antonio

2011/8/8 mikecg <mi...@celerityglobal.com>

> Ok..maybe you could help me.. I'm trying to use the inherit on a
> put-list-attribute using 2.2.2, but I'm getting the error *Attribute
> "inherit" must be declared for element type "put-list- attribute"*. See my
> code below--thanks to anyone who can help!
>
> <?xml version="1.0" encoding="UTF-8" ?>
>        &lt;!DOCTYPE tiles-definitions PUBLIC
>                &quot;-//Apache Software Foundation//DTD Tiles Configuration
> 2.0//EN&quot;
>                &quot;
> http://tiles.apache.org/dtds/tiles-config_2_0.dtd&quot;&gt;
>
>
>              <definition name="base.js" template="/WEB-INF/jsp/js/js.jsp">
>                  <put-list-attribute name="js">
>                    <add-attribute value="/js/jquery.js" type="string" />
>                    <add-attribute value="/js/jquery-ui.js" type="string" />
>                  </put-list-attribute>
>                </definition>
>
>                <definition name="arbor.js" extends="base.js">
>                  <put-list-attribute name="js" inherit="true" >
>                    <add-attribute value="/js/arbor.js" type="string" />
>                  </put-list-attribute>
>                </definition>
>
>
>
> --
> View this message in context:
> http://struts.1045723.n5.nabble.com/Put-list-attribute-inheritance-tp3554106p4678736.html
> Sent from the tiles users mailing list archive at Nabble.com.
>

Re: Put-list-attribute inheritance

Posted by mikecg <mi...@celerityglobal.com>.
Ok..maybe you could help me.. I'm trying to use the inherit on a
put-list-attribute using 2.2.2, but I'm getting the error *Attribute
"inherit" must be declared for element type "put-list- attribute"*. See my
code below--thanks to anyone who can help!

<?xml version="1.0" encoding="UTF-8" ?> 
	&lt;!DOCTYPE tiles-definitions PUBLIC        
		&quot;-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN&quot;        
		&quot;http://tiles.apache.org/dtds/tiles-config_2_0.dtd&quot;&gt; 


              <definition name="base.js" template="/WEB-INF/jsp/js/js.jsp">
		  <put-list-attribute name="js">
		    <add-attribute value="/js/jquery.js" type="string" />
		    <add-attribute value="/js/jquery-ui.js" type="string" />
		  </put-list-attribute>
		</definition> 
		
		<definition name="arbor.js" extends="base.js">
		  <put-list-attribute name="js" inherit="true" >
		    <add-attribute value="/js/arbor.js" type="string" />
		  </put-list-attribute>
		</definition>



--
View this message in context: http://struts.1045723.n5.nabble.com/Put-list-attribute-inheritance-tp3554106p4678736.html
Sent from the tiles users mailing list archive at Nabble.com.

RE: Put-list-attribute inheritance

Posted by "Rabenda, Clay" <Cl...@mtvnmix.com>.
That seems to have fixed it.
Thanks Antonio!
Cheers!

-----Original Message-----
From: Antonio Petrelli [mailto:antonio.petrelli@gmail.com] 
Sent: Friday, April 17, 2009 5:49 PM
To: users@tiles.apache.org
Subject: Re: Put-list-attribute inheritance

2009/4/17 Rabenda, Clay <Cl...@mtvnmix.com>:
> I'm using Tiles 2.1.2 and am seeing some bugs using putListAttribute 
> inheritance.  I am seeing 2 of the 'parent' elements(and I think 3 
> with 2.1.1).

It is a fixed bug:
https://issues.apache.org/struts/browse/TILES-365

Try to use the version present in the Subversion repository:
http://svn.eu.apache.org/repos/asf/tiles/framework/branches/TILES_2_1_X/

Ciao
Antonio

Re: Put-list-attribute inheritance

Posted by Antonio Petrelli <an...@gmail.com>.
2009/4/17 Rabenda, Clay <Cl...@mtvnmix.com>:
> I'm using Tiles 2.1.2 and am seeing some bugs using putListAttribute
> inheritance.  I am seeing 2 of the 'parent' elements(and I think 3 with
> 2.1.1).

It is a fixed bug:
https://issues.apache.org/struts/browse/TILES-365

Try to use the version present in the Subversion repository:
http://svn.eu.apache.org/repos/asf/tiles/framework/branches/TILES_2_1_X/

Ciao
Antonio