Hey Carlin,
Thanks for implementing the long-awaited, much-requested Tiles support for Page Flows. You're sure to have some new fans out there now. Looks great -- I just checked this in. I made three minor changes -- let me know if any of this seems problematic.
In GenStrutsApp, I changed this:
paths.add( prefix + File.separator + definitionsConfig );
to this:
paths.add( prefix + '/' + definitionsConfig );It looks like Tiles can accept either one, but since all other webapp-relative paths use forward slashes, I thought we should follow the same convention here.
In StrutsApp, I removed the following line:
if ( TILES_MODULE_AWARE_PROPERTY.equals( name ) )
{
// Make sure "moduleAware" is true
<-- existingSetProperties[i].setValue( "true" );
moduleAwarePropertyIsSet = true;
}If the user has specified a value for this property in the Struts-merge file, we don't want to overwrite it, even if we think it will break our auto-generated functionality.
Also, I changed the following loop to prevent a ',' at the end of the list of Tiles configs. Doesn't seem to change the behavior, but it looks better in the generated output. :)
for ( String definitionsConfig : _tilesDefinitionsConfigs )
{
pathNames.append( definitionsConfig ).append( ',' );
}is changed to:
boolean firstOne = true;
for ( String definitionsConfig : _tilesDefinitionsConfigs )
{
if ( ! firstOne ) pathNames.append( ',' );
firstOne = false;
pathNames.append( definitionsConfig );
}Thanks again, Rich
Carlin Rogers wrote:
The patch file attached below contains the following changes for beehive NetUI.
- Added support for Tiles: - The PageFlowRequestProcessor is now a subclass of TilesRequestProcessor (required condition for the correct tiles initialization via the TilesPlugin). - Added annotations for Jpf to indicate the location of the tiles definitions XML files (either from the webapp root or relative to the JPF directory) and the specific tiles definition to forward to for a given JPF action. Multiple definition files can be listed in new controller annotation. I.E. @Jpf.Controller( tilesDefinitionsConfigs = { "tiles-defs.xml", "/WEB-INF/tiles-defs.xml" } ) ... @Jpf.Action( forwards = { @Jpf.Forward( name = "continue", tilesDefinition = "defaultLayout") })
- The generated page flow struts configuration file will include the TilesPlugin plug-in element.
- Added a new BVT for tiles.
- Also changed the coreWeb/WEB-INF/web.xml to include the struts-tiles.tld tag lib.
- Modified the undeploy.netui.runtime target in webappTemplate.xml so that we also remove the pageflow generated validation files, jpf-validation-*.xml, in the WEB-INF/.pageflow-struts-generated/ directory.
DRT/BVT: NetUI (WinXP) BB: self (WinXP)
Thanks, Carlin
