I'm referring to the following post from Mr. Starr:
RE: Shale 1.0.3 and Tiles Question - Tag Question
<http://www.nabble.com/RE%3A-Shale-1.0.3-and-Tiles-Question---Tag-Question-p6288731.html>
Click to flag this post <javascript: void Nabble.setFlag(6288731);>
by Dick Starr <http://www.nabble.com/user/UserProfile.jtp?user=4421> Sep
13, 2006; 12:06pm :: Rate this Message: Click to rate as Poor Post
<http://www.nabble.com/Shale-1.0.3-and-Tiles-Question---Tag-Question-t2204571.html#>Click
to rate as Below Average Post
<http://www.nabble.com/Shale-1.0.3-and-Tiles-Question---Tag-Question-t2204571.html#>Click
to rate as Average Post
<http://www.nabble.com/Shale-1.0.3-and-Tiles-Question---Tag-Question-t2204571.html#>Click
to rate as Above Average Post
<http://www.nabble.com/Shale-1.0.3-and-Tiles-Question---Tag-Question-t2204571.html#>Click
to rate as Excellent Post
<http://www.nabble.com/Shale-1.0.3-and-Tiles-Question---Tag-Question-t2204571.html#>Click
to clear rating
<http://www.nabble.com/Shale-1.0.3-and-Tiles-Question---Tag-Question-t2204571.html#>
- Use ratings to moderate (? <http://www.nabble.com/help/Answer.jtp?id=16>)
Reply <http://www.nabble.com/forum/Reply.jtp?post=6288731> | Reply to
Author <http://www.nabble.com/user/SendEmail.jtp?type=pm&post=6288731> |
View Threaded <javascript: void Nabble.setView('threaded',6288731);> |
Link to this Message
<http://www.nabble.com/Shale-1.0.3-and-Tiles-Question---Tag-Question-t2204571.html#a6288731>
I installed the 20060911 version and got NullPointerExceptions. It is
working now however, with the following fixes:
(1) My index.jsp contained <jsp:forward
page="/tiles/system/SaLogon.faces"/>
where my /tiles/system/SaLogon.jsp now contains
<tiles:insert flush="false" name="/saLogon" type="definition"/>
(to get it to work I added the type="definition").
(2)
In my tiles.xml I have
<definition name="/siteMainLayout"
path="/tiles/layouts/classicLayout.jsp>
put name="title" value="/title.jsp"/>
put name="header" ...
put name="menuBar" ...
put name="body" value=""/>
...
<definition name="/saLogon" extends="/siteMainLayout">
<put name="body" type="template" value="/jsp/system/saLogon.jsp"/>
</definition>
(saLogon.jsp is an <h:form ...; to get this to work I added the
type="template")
My /tiles/layouts/classicLayout tiles inserts look like this:
<f:view>
...
<tiles:insert flush="false" name="title"/>
...
<tiles:insert flush="false" name="body"/>
...
</f:view>
My tiles inserts work whether or not each insert is bracketed by a
subview.
----
Dick
Sorry, I'm still confused as to how my original approach is different
from Mr. Starr's. As far as I can see, he seems to be inserting tiles
in his /tiles/layouts/classicLayout _directly_ from the "puts" for title
and body, not from an extended definition wrapped around either the
title or body. Is his approach correct because he is inserting from
"puts" that are defined within an extended definition?
-=> Gregg <=-
Antonio Petrelli wrote:
> Gregg Leichtman ha scritto:
>> I suppose that I could create a different definition like:
>>
>> <definition name="/mainLayout" path="/tiles/layouts/siteLayout.jsp">
>> <put name="htmlHeader" type="template" value=""/>
>> <put name="header" type="template"
>> value="/tiles/headerTile.jsp"/>
>> <put name="rightSideBar" type="template"
>> value="/tiles/rightSideBarTile.jsp"/>
>> <put name="footer" type="template"
>> value="/tiles/footerTile.jsp"/>
>> </definition>
>>
>> <definition name="/htmlHeaderPage" extends="/mainLayout">
>> <put name="htmlHeader" type="template"
>> value="/tiles/htmlHeaderTile.jsp"/>
>> </definition>
>>
>> and then use
>> <tiles:insert name="/htmlHeaderPage" />
>>
>
> This is the *right* way!
>
>> however, I have used the previous method for rendering the "put"
>> described _within_ the definition successfully under Tomcat with
>> shale-1.0.3. This is also described by Dick Starr at:
>>
>>
>> http://www.nabble.com/Shale-1.0.3-and-Tiles-Question---Tag-Question-t2204571.html#a6288731
>>
>>
>
> I suppose that Dick describes an already fixed bug, since its NPE
> stack trace points to a line where there is no code.
>
>> Are both of use doing different things?
>
> Sure! You are trying to forward to a layout page without filling
> attributes, you have to forward to a page that contains a
> <tiles:insert name="definitionName" />
> Dick did the right thing.
>
>> If so, can you point out what I'm doing that is different or
>> something that is now obsolete in shale-1.0.4?
>>
>
> It has nothing to do with Shale, eventually it is a Tiles bug (though
> in this case is a bug of yours :-) ).
>
> Ciao
> Antonio
>
signature.asc
Description: OpenPGP digital signature
