[ 
http://issues.apache.org/jira/browse/BEEHIVE-217?page=comments#action_60535 ]
     
Carlin Rogers commented on BEEHIVE-217:
---------------------------------------

As pointed out, this is only an issue with using a
relative path in the tilesDefinitionsConfigs
attribute of the Controller annotation. An absolute
path from the web app root will work, even with 
inheritance.

This bug points to a larger problem in that at compile
time we cannot check or verify where the tiles definitions
config file will live at deployment time. 

Since the tilesDefinitionsConfigs attribute is used
at compile time only to set up a path to be used at 
runtime, it's probably best just to accept an absolute
path.

I will put a change into the copiler to check for 
an absolute path and report an error if the path
does not start with the '/' character.

> Inherited page flows do not inherit the correct config path to a Tiles 
> Definition file as defined by the parent Controller class.
> ---------------------------------------------------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-217
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-217
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1Beta
>  Environment: Running the usual components required by Beehive V1Beta on a 
> Win32 box. Local test environment.
>     Reporter: Nathan Jantz
>     Assignee: Carlin Rogers

>
> Inherited page flows do not inherit the correct config path to a Tiles 
> Definition file as defined by the parent Controller class.
> Example use-case (inherited page flow):
> ------------------------------------------
> ParentPageFlow.jpf:
> @Jpf.Controller(
>     tilesDefinitionsConfigs = { "tiles-defs.xml" },
>     simpleActions={
>         @Jpf.SimpleAction(name="begin", tilesDefinition="default.page")
>     }
> )
> ChildPageFlow.jpf (extends ParentPageFlow):
> ChildFlow1Controller.jpf:
> @Jpf.Controller(
>     simpleActions={
>         @Jpf.SimpleAction(name="begin", tilesDefinition="default.page")
>     }
> )
> Generated struts-config output:
> <plug-in className="org.apache.struts.tiles.TilesPlugin">
>     <set-property property="definitions-config" 
> value="\childFlow1/tiles-defs.xml"/>
>     <set-property property="moduleAware" value="true"/>
> </plug-in>
> Reference to tiles-defs.xml is incorrect. tiles-defs.xml lives in the 
> ParentPageFlow directory. ChildPageFlow should of inherited the correct path.
> This currently limits how tiles can be set up within inherited page flows. In 
> other words, the current PF implementation doesn't support sharing of one 
> common tiles definition file (tiles-defs.xml) AND an associated common set of 
> JSPs among inherited page flows. It requires multiple tiles definitions and 
> JSP tiles to live in different places within the same webapp.  This does not 
> encourage code re-use.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to