You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by Pedro Herrera <pe...@hotmail.com> on 2008/04/01 12:04:41 UTC

Re: change header param

ok. The list is filled within dojo req (and others) in the action(struts2)
isn´t ? No sounds good to me. Is there other way to put  a different head
for specific pages ?

Thanks

Herrera



Antonio Petrelli-3 wrote:
> 
> 2008/3/31, Pedro Herrera <pe...@hotmail.com>:
>>  How I use dojo tags,  I have to put in the head for a specific page:
>>      <script type="text/javascript">
>>         dojo.require("dojo.parser");
>>         dojo.require("dijit.form.ComboBox");
>>      </script>
>>
>>  My problem is that each page(jsp) has differents dojo.requires(need
>> inside
>>  head tags). How do I resolve this, ie, each page has a specific head ?
> 
> You could use a list attribute, containing the needed Dojo
> requirement, and iterate in the JSP page:
> http://tiles.apache.org/tutorial/advanced/list-attributes.html
> In your case it could be:
> 
> 
> <script type="text/javascript">
> <c:forEach var="item" items="${list}">
>   dojo.require("${item.value}");
> </c:forEach>
> </script>
> 
> HTH
> Antonio
> 
> 

-- 
View this message in context: http://www.nabble.com/change-header-param-tp16396401p16417505.html
Sent from the tiles users mailing list archive at Nabble.com.


Re: change header param

Posted by Antonio Petrelli <an...@gmail.com>.
2008/4/1, Pedro Herrera <pe...@hotmail.com>:
>
>  ok. The list is filled within dojo req (and others) in the action(struts2)
>  isn´t ? No sounds good to me. Is there other way to put  a different head
>  for specific pages ?

The attributes can be filled in the Tiles definition files:

  <put-list-attribute name="items">
    <add-attribute value="dojo.parser" />
    <add-attribute value="dijit.form.ComboBox" />
  </put-list-attribute>

BTW, did you read the link that I gave you?


Antonio