tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaaaa <aa...@mytrashmail.com>
Subject Re: question about <tiles:importAttribute ...
Date Fri, 28 Nov 2008 18:47:01 GMT



Antonio Petrelli-3 wrote:
> 
> And how do you call the definition?
> 
> 2008/11/28 aaaaa <aaaaa@mytrashmail.com>:
>>
>> definition:
>>        <definition name="index" extends="layout">
>>          <put-attribute name="body" value="/WEB-INF/jsp/index.jsp" />
>>          <put-attribute name="var" value="0" type="string"/>
>>        </definition>
>>
>> jsp:
>> ...
>> <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
>>
>> <tiles:importAttribute name="var" />
>> <c:out value="${var}"></c:out>
>>
>>
>> thanks.
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/question-about-%3Ctiles%3AimportAttribute-...-tp20724529p20737656.html
>> Sent from the tiles users mailing list archive at Nabble.com.
>>
>>
> 
> 


that's all I did. 
Looking at http://tiles.apache.org/tutorial/advanced/menu.html I decided
that 
<tiles:importAttribute name="var" /> will make "var" visible in pagescope...
All I need is just to create a variable directly in definition and than to
be able to import it in jsp page..

I use spring and I use
org.springframework.web.servlet.view.tiles2.TilesConfigurer to configure
tiles...
 and in controller I do:

@Controller
public class Index {
	
	@RequestMapping("/index.html")
	public String index(@RequestParam(value="q",required=false) String q,
ModelMap model

		return "index";
...



-- 
View this message in context: http://www.nabble.com/question-about-%3Ctiles%3AimportAttribute-...-tp20724529p20738184.html
Sent from the tiles users mailing list archive at Nabble.com.


Mime
View raw message