tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcosio <dcco...@gmail.com>
Subject Re: Tiles not building extended content
Date Tue, 07 Oct 2008 13:35:36 GMT

ok, I think I found a way throught this. I changed the
<tiles:insertAttribute>...</tiles:insertAttribute>
to <tiles:insertTemplate> and now im getting the page content renders.. 
Here is how the tags are now


<tiles:insertTemplate template="${pageContent}">
    <tiles:putAttribute
name="sectionTitle">${sectionTitle}</tiles:putAttribute>
    <tiles:putAttribute name="pageContent">${tabPane}</tiles:putAttribute>
    <tiles:putAttribute name="tabs"       >${tabs}</tiles:putAttribute>
    <tiles:putAttribute name="activeTab"  >${activeTab}</tiles:putAttribute>
  </tiles:insertTemplate>

I really appreciate all the help..

Dan

Antonio Petrelli-3 wrote:
> 
> I forgot one thing, did you upgrade to Tiles 2.0.6?
> 
> Antonio
> 
> 2008/10/7 dcosio <dccosio@gmail.com>:
>>
>> Ok, I'm using "userAttribute", importAttribute didn't seem to provide the
>> values..So now the values are making it down 2 levels..
>>
>> The page i'm trying to render uses: This chain of definitions.. With the
>> changes Im seeing the values being passed to the ".tile.layout.content"
>> Here
>> are the values
>>
>> Content Layout:pageContent../WEB-INF/layouts/tabbed_layout.jsp
>> Content Layout:sectionTitle..Grant Permissions
>> Content Layout:tabs../WEB-INF/views/chrome/gpoTabs.jsp
>> Content Layout:activeTab..Open Requests
>> Content Layout:tabPane../WEB-INF/views/content/gpo/requestsView.jsp
>>
>> The content layout uses another insert
>> <tiles:insertAttribute name="pageContent">
>>    <tiles:putAttribute
>> name="sectionTitle">${sectionTitle}</tiles:putAttribute>
>>    <tiles:putAttribute name="pageContent">${tabPane}</tiles:putAttribute>
>>    <tiles:putAttribute name="tabs"       >${tabs}</tiles:putAttribute>
>>    <tiles:putAttribute name="activeTab" 
>> >${activeTab}</tiles:putAttribute>
>>  </tiles:insertAttribute>
>> So these values are inserted here.. but nothing happens . I would expect
>> the
>> tabbed_layout.jsp to compile and render but nothing is happening.
>> Everything
>> stops at the content layout..
>>
>> any idea why?
>>
>> <definition name=".tile.layout.main"
>> template="/WEB-INF/layouts/main_layout.jsp">
>>        <put-attribute  name="header"
>> value="/WEB-INF/views/chrome/header.jsp"/>
>>        <put-attribute name="pageTitle" type="string" value="REPLACE_ME"/>
>>        <put-attribute name="pageContent" value="REPLACE_ME"/>
>>        <put-attribute name="footer"
>> value="/WEB-INF/views/chrome/footer.jsp"/>
>>    </definition>
>>
>>    <definition name=".tile.layout.content" extends=".tile.layout.main">
>>      <put-attribute name="pageContent"
>> value="/WEB-INF/layouts/content_layout.jsp" />
>>      <put-attribute name="sectionTitle" value="REPLACE_ME" />
>>      <put-attribute name="contentPane" value="REPLACE_ME" />
>>    </definition>
>> <definition name=".tile.layout.tabbed" extends=".tile.layout.content">
>>      <put-attribute name="contentPane"
>> value="/WEB-INF/layouts/tabbed_layout.jsp" />
>>      <put-attribute name="tabs" value="REPLACE_ME_TABS"/>
>>      <put-attribute name="activeTab" value="REPLACE_ME"/>
>>      <put-attribute name="tabPane" value="REPLACE_ME_TAB_PANE"/>
>>    </definition>
>> <definition name=".tile.layout.gpo" extends=".tile.layout.tabbed">
>>        <put-attribute name="pageTitle"  value="Grant Permissions"/>
>>        <put-attribute name="sectionTitle" value="Grant Permissions"/>
>>        <put-attribute name="tabs"
>> value="/WEB-INF/views/chrome/gpoTabs.jsp"/>
>>    </definition>
>>
>>    <definition name="tile.gpo.openRequests" extends=".tile.layout.gpo">
>>        <put-attribute name="activeTab" value="Open Requests"/>
>>        <put-attribute name="tabPane"
>> value="/WEB-INF/views/content/gpo/requestsView.jsp"/>
>>    </definition>
>>
>> Antonio Petrelli-3 wrote:
>>>
>>> 2008/10/6 dcosio <dccosio@gmail.com>:
>>>>
>>>> Ah, I tried that and it did fail. This is quite a change from tiles 1.
>>>
>>> I don't think so, it is a change from "Tiles 2.0.3" where there was a
>>> bug (or an "unintended feature").
>>>
>>>> I
>>>> guess I will have to go through and redefine these. So, there is no way
>>>> to
>>>> get the current context values out to use them in the putAttribute
>>>> tags?
>>>> I
>>>> did try "useAttribute tags .. and that didn't work.. This seems strange
>>>> that
>>>> I loose the values
>>>
>>> You don't loose them, they are available to an "outer" context.
>>> In the e-mail with the 3 options, the first was this:
>>>
>>> <snip>
>>> 1. Use <tiles:importAttribute> to import attributes and then use it in
>>> <tiles:putAttribute>
>>>
>>> For example:
>>>
>>> <tiles:importAttribute name="pageContent">
>>> ...
>>> <tiles:insertAttribute name="pageContent">
>>>       <tiles:putAttribute name="pageContent"  value="${pageContent}" />
>>> </snip>
>>>
>>> So you have to use the <tiles:importAttribute> tag (or
>>> <tiles:useAttribute>) *outside* of <tiles:insertAttribute>.
>>>
>>> Antonio
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Tiles-not-building-extended-content-tp19837124p19857774.html
>> Sent from the tiles users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Tiles-not-building-extended-content-tp19837124p19858307.html
Sent from the tiles users mailing list archive at Nabble.com.


Mime
View raw message