When I saw that the navigation rule required a slash, I went with a
slash on the tiles defs. Per Kito's book (p 132), the view-id must
always start with a slash - but I don't know why.

Dick

-----Original Message-----
From: Baker,Jonathan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 29, 2006 7:48 AM
To: [email protected]
Subject: RE: TilesViewHandler

I'm sure if I renamed my tiles to have the slash at the beginning of
their names that it would work as well.  My confusion is over the
explicit statement that it will look for a tile both with and without
the leading slash and that does not seem to be the case.

JB

-----Original Message-----
From: Dick Starr [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 29, 2006 8:37 AM
To: [email protected]
Subject: RE: TilesViewHandler


Standalone Tiles works for me.

In tiles.xml I use definitions like <definition name="/myDef" ...

My navigation rules are like <from-view-id>/myDef.jsp</from-view-id>

I do not have to do an extra jsp containing a <tiles:insert definition=
... for my tiles - except for my very first tile (a jsp:forward from
index.jsp).

I am using the 8/3/06 release.

Dick

-----Original Message-----
From: Baker,Jonathan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 29, 2006 6:28 AM
To: Shale User Group (E-mail 2)
Subject: TilesViewHandler

According to the Documentation for the shale-tiles TilesViewHandler:

*       Strips off the view ID's suffix (eg: "/tiles/test.jsp" becomes
"/tiles/test") 
*       Searches for a tile with the resulting name, with or without the
leading slash (eg: "/tiles/test" or "tiles/test") 

I was not getting this behavior at all.  My tile is defined as inbox,
and my navigation rule points to /inbox.jsp.  The view handler cannot
successfully find the tile named inbox.  I looked at the source for this
class and even though the javadoc says that the leading slash is
stripped off, I could find no code anywhere in that class that looked
for the tile, and if it wasn't found stripped of a leading slash and
looked for the tile again.

If I remove the leading slash from my navigation rule, I get the
follwoing error:

(JspViewHandlerImpl.java:285) - ViewId must start with '/' (viewId =
inbox.jsp)

I am using the shale 1.03 release.

Thanks for your help.


JB



Reply via email to