First of all thanks millions for your answer.

I tried that but I had the following SAXParseException : Element type
"put-attribute" must be declared.
I tried it whit put element: 
<definition name="myHomePage" layout="/my/layout.jsp">
  <put name="css_role1" value="/css/role1.css" role="role1" />
  <put name="css_role2" value="/css/role1.css" role="role2" />
</definition>

But I got the following SAXParseException: Attribute "role" must be declared
for element type "put".
What am I doing wrong???



Antonio Petrelli-3 wrote:
> 
> 2007/12/18, maitri <[EMAIL PROTECTED]>:
>>
>>
>> Is there a way to insert a css
>> stylesheet depending of a role???
>> I cant find out how can I put a stylesheet with a tag like (put,
>> insert..etc.. I mean, a tag in tile that has the role attribute)
>> thanks in advance...
>>
> 
> You have various options, all based upon the "role" attribute in XML and
> JSP
> tags.
> For example you could have:
> 
> <definition name="myHomePage" layout="/my/layout.jsp">
>   <put-attribute name="css_role1" value="/css/role1.css" role="role1" />
>   <put-attribute name="css_role2" value="/css/role1.css" role="role2" />
> </definition>
> 
> 
> And in your layout.jsp:
> 
> <head>
>   <link rel="stylesheet" type="text/css" href="<tiles:getAsString
> name='css_role1' /><tiles:getAsString name='css_role2' />">
> </head>
> 
> Another option is to have HTML fragments containing only the <link> tag,
> one
> for each role.
> 
> HTH
> Antonio
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tiles-and-roles-tp14391977p14396172.html
Sent from the tiles users mailing list archive at Nabble.com.

Reply via email to