Author: rich
Date: Wed Mar 16 17:27:14 2005
New Revision: 157848
URL: http://svn.apache.org/viewcvs?view=rev&rev=157848
Log:
This is a contribution from Carlin Rogers to address
http://issues.apache.org/jira/browse/BEEHIVE-217 : Inherited page flows do not
inherit the correct config path to a Tiles Definition file as defined by the
parent Controller class
"- a fix to require the paths to the tiles definitions configuration
files be absolute from the webapp root.
- a test for tiles and page flow inheritance (Jira Beehive-217)
- a test for tiles and nested page flow (Jira Beehive-199)
- an update to the TilesDefinition test and the supporting files in
coreWeb/miniTests/tiles to exercise the case outlined in Jira
Beehive-158.
- general tiles test clean up."
Thanks Carlin!
tests: netui bvt (WinXP)
BB: self (linux)
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/tiles-defs-common.xml
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/alternate.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/alternateBody.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/blank.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/default.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/editMenu.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/footer.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/header.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/mainBody.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/mainMenu.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/netui-body.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/panel1.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/panel2.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/sideMenu.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/struts-body.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/defaultBody.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/defaultMenu.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/footer.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/header.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/panel1.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/panel2.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/layout/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/layout/default.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/layout/sidePanel.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/Controller.jpf
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherBody.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/Controller.jpf
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/localBody.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/localMenu.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/overrideBody.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/tiles-defs.xml
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/inherit/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/inherit/Controller.jpf
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/inherit/index.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/mainBody.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/mainMenu.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/Controller.jpf
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/nestedBody.jsp
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/tiles-defs.xml
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/tiles-defs.xml
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/TilesAndInheritance.xml
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/TilesAndMoreInheritance.xml
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/TilesAndNesting.xml
(with props)
Removed:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/components.blank.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/components.editMenu.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/components.footer.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/components.header.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/components.mainMenu.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/components.netui-body.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/components.panel1.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/components.panel2.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/components.sideMenu.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/components.struts-body.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/layout.alternate.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/layout.alternateBody.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/layout.default.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/layout.mainBody.jsp
Modified:
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/diagnostics.properties
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/genmodel/GenStrutsApp.java
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/grammar/TilesDefinitionsConfigsType.java
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/annotations/Jpf.java
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/InterceptorChain.java
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/Interceptors.java
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/action/ActionInterceptor.java
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/tiles-defs.xml
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/messages/args/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/messages/args11/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/messages/merge/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/messages/merge11/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/TilesDefinitions.xml
Modified:
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/diagnostics.properties
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/diagnostics.properties?view=diff&r1=157847&r2=157848
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/diagnostics.properties
(original)
+++
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/diagnostics.properties
Wed Mar 16 17:27:14 2005
@@ -185,6 +185,9 @@
warning.inherited-file-not-found =
File "{0}" (reference inherited from a {1} annotation on {2}) could not be
found in the web application.
+error.absolute-path-required-for-tiles-def = \
+An absolute path from the webapp root is required for a tiles definitions
configuration file.
+
error.validate-with-no-validation-error-forward = The {0} attribute requires a
value for {1} when set to true.
warning.validate-required-on-primitive-type = \
Modified:
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/genmodel/GenStrutsApp.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/genmodel/GenStrutsApp.java?view=diff&r1=157847&r2=157848
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/genmodel/GenStrutsApp.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/genmodel/GenStrutsApp.java
Wed Mar 16 17:27:14 2005
@@ -248,13 +248,10 @@
for ( Iterator ii = tilesDefinitionsConfigs.iterator(); ii.hasNext();
)
{
String definitionsConfig = ( String ) ii.next();
- if ( definitionsConfig != null && definitionsConfig.length() > 0
&& definitionsConfig.charAt( 0 ) == '/' )
+
+ if ( definitionsConfig != null && definitionsConfig.length() > 0 )
{
paths.add( definitionsConfig );
- }
- else
- {
- paths.add( getStrutsModulePath() + '/' + definitionsConfig );
}
}
Modified:
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/grammar/TilesDefinitionsConfigsType.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/grammar/TilesDefinitionsConfigsType.java?view=diff&r1=157847&r2=157848
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/grammar/TilesDefinitionsConfigsType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/grammar/TilesDefinitionsConfigsType.java
Wed Mar 16 17:27:14 2005
@@ -47,6 +47,16 @@
for ( Iterator ii = values.iterator(); ii.hasNext(); )
{
AnnotationValue pathValue = ( AnnotationValue ) ii.next();
+
+ if ( pathValue != null )
+ {
+ String filePath = ( String ) pathValue.getValue();
+ if ( filePath == null || filePath.length() == 0 ||
filePath.charAt( 0 ) != '/' )
+ {
+ addError( value,
"error.absolute-path-required-for-tiles-def" );
+ }
+ }
+
super.onCheck( valueDecl, pathValue, parentAnnotations,
classMember, annotationArrayIndex );
}
}
Modified:
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java?view=diff&r1=157847&r2=157848
==============================================================================
---
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java
(original)
+++
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java
Wed Mar 16 17:27:14 2005
@@ -18,15 +18,21 @@
package org.apache.beehive.netui.pageflow;
import org.apache.beehive.netui.core.urls.URLRewriterService;
-import org.apache.beehive.netui.pageflow.config.PageFlowActionFormBean;
import org.apache.beehive.netui.pageflow.config.PageFlowActionForward;
import org.apache.beehive.netui.pageflow.config.PageFlowActionMapping;
+import org.apache.beehive.netui.pageflow.handler.ActionForwardHandler;
+import org.apache.beehive.netui.pageflow.handler.FlowControllerHandlerContext;
import org.apache.beehive.netui.pageflow.handler.ForwardRedirectHandler;
+import org.apache.beehive.netui.pageflow.handler.Handlers;
import org.apache.beehive.netui.pageflow.handler.LoginHandler;
import org.apache.beehive.netui.pageflow.handler.ReloadableClassHandler;
-import org.apache.beehive.netui.pageflow.handler.Handlers;
-import org.apache.beehive.netui.pageflow.handler.ActionForwardHandler;
-import org.apache.beehive.netui.pageflow.handler.FlowControllerHandlerContext;
+import org.apache.beehive.netui.pageflow.interceptor.Interceptor;
+import org.apache.beehive.netui.pageflow.interceptor.InterceptorException;
+import org.apache.beehive.netui.pageflow.interceptor.Interceptors;
+import
org.apache.beehive.netui.pageflow.interceptor.action.ActionInterceptorContext;
+import org.apache.beehive.netui.pageflow.interceptor.action.InterceptorForward;
+import
org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors;
+import
org.apache.beehive.netui.pageflow.interceptor.request.RequestInterceptorContext;
import org.apache.beehive.netui.pageflow.internal.AdapterManager;
import org.apache.beehive.netui.pageflow.internal.DefaultURLRewriter;
import org.apache.beehive.netui.pageflow.internal.FlowControllerAction;
@@ -36,12 +42,6 @@
import org.apache.beehive.netui.pageflow.internal.PageFlowRequestWrapper;
import org.apache.beehive.netui.pageflow.scoping.ScopedRequest;
import org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils;
-import org.apache.beehive.netui.pageflow.interceptor.Interceptor;
-import org.apache.beehive.netui.pageflow.interceptor.Interceptors;
-import org.apache.beehive.netui.pageflow.interceptor.InterceptorException;
-import
org.apache.beehive.netui.pageflow.interceptor.request.RequestInterceptorContext;
-import
org.apache.beehive.netui.pageflow.interceptor.action.ActionInterceptorContext;
-import org.apache.beehive.netui.pageflow.interceptor.action.InterceptorForward;
import org.apache.beehive.netui.script.common.ImplicitObjectUtil;
import org.apache.beehive.netui.util.DiscoveryUtils;
import org.apache.beehive.netui.util.FileUtils;
@@ -1949,6 +1949,31 @@
PageFlowPageFilter.preventCache( request );
}
}
+
+ private class ActionRunner
+ implements ActionInterceptors.ActionExecutor
+ {
+ RequestInterceptorContext _ctxt;
+ private Action _action;
+ private ActionForm _formBean;
+ private ActionMapping _actionMapping;
+
+ public ActionRunner( RequestInterceptorContext context, Action action,
ActionForm formBean,
+ ActionMapping actionMapping )
+ {
+ _ctxt = context;
+ _action = action;
+ _formBean = formBean;
+ _actionMapping = actionMapping;
+ }
+
+ public ActionForward execute()
+ throws InterceptorException, ServletException, IOException
+ {
+ return PageFlowRequestProcessor.super.processActionPerform(
_ctxt.getRequest(), _ctxt.getResponse(),
+
_action, _formBean, _actionMapping );
+ }
+ }
protected ActionForward processActionPerform( HttpServletRequest request,
HttpServletResponse response,
Action action, ActionForm
form, ActionMapping mapping )
@@ -2002,7 +2027,12 @@
//
// Execute the action.
//
- ActionForward ret = super.processActionPerform( request, response,
action, form, mapping );
+ RequestInterceptorContext requestContext =
+ context != null ?
+ context :
+ new RequestInterceptorContext( request, response,
getServletContext() );
+ ActionRunner actionExecutor = new ActionRunner( requestContext,
action, form, mapping );
+ ActionForward ret = ActionInterceptors.wrapAction( context,
interceptors, actionExecutor );
//
// Run any after-action interceptors.
Modified:
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/annotations/Jpf.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/annotations/Jpf.java?view=diff&r1=157847&r2=157848
==============================================================================
---
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/annotations/Jpf.java
(original)
+++
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/annotations/Jpf.java
Wed Mar 16 17:27:14 2005
@@ -85,8 +85,7 @@
String[] customValidatorConfigs() default {};
/**
- * Location of the Tiles Definitions XML files; relative to the page
flow, or a path from the webapp root.
- * For multiple definition files are allowed.
+ * Location of the Tiles Definitions XML files. Must be a path from
the webapp root.
* Optional.
*/
String[] tilesDefinitionsConfigs() default {};
Modified:
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/InterceptorChain.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/InterceptorChain.java?view=diff&r1=157847&r2=157848
==============================================================================
---
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/InterceptorChain.java
(original)
+++
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/InterceptorChain.java
Wed Mar 16 17:27:14 2005
@@ -31,19 +31,33 @@
_chain.addAll( interceptors );
}
- public void continueChain()
+ public Object continueChain()
throws InterceptorException
{
if ( ! _chain.isEmpty() )
{
- invoke( _chain.remove() );
+ return invoke( _chain.remove() );
+ }
+ else
+ {
+ return null;
}
}
- protected abstract void invoke( Interceptor interceptor ) throws
InterceptorException;
+ protected abstract Object invoke( Interceptor interceptor ) throws
InterceptorException;
public InterceptorContext getContext()
{
return _context;
+ }
+
+ public boolean isEmpty()
+ {
+ return _chain.isEmpty();
+ }
+
+ protected Interceptor removeFirst()
+ {
+ return _chain.remove();
}
}
Modified:
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/Interceptors.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/Interceptors.java?view=diff&r1=157847&r2=157848
==============================================================================
---
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/Interceptors.java
(original)
+++
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/Interceptors.java
Wed Mar 16 17:27:14 2005
@@ -50,10 +50,11 @@
super( context, interceptors );
}
- protected void invoke( Interceptor interceptor )
+ protected Object invoke( Interceptor interceptor )
throws InterceptorException
{
interceptor.preInvoke( getContext(), this );
+ return null;
}
}
@@ -65,10 +66,11 @@
super( context, interceptors );
}
- protected void invoke( Interceptor interceptor )
+ protected Object invoke( Interceptor interceptor )
throws InterceptorException
{
interceptor.postInvoke( getContext(), this );
+ return null;
}
}
}
Modified:
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/action/ActionInterceptor.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/action/ActionInterceptor.java?view=diff&r1=157847&r2=157848
==============================================================================
---
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/action/ActionInterceptor.java
(original)
+++
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/interceptor/action/ActionInterceptor.java
Wed Mar 16 17:27:14 2005
@@ -17,10 +17,10 @@
*/
package org.apache.beehive.netui.pageflow.interceptor.action;
+import org.apache.beehive.netui.pageflow.interceptor.AbstractInterceptor;
import org.apache.beehive.netui.pageflow.interceptor.InterceptorChain;
-import org.apache.beehive.netui.pageflow.interceptor.InterceptorException;
import org.apache.beehive.netui.pageflow.interceptor.InterceptorContext;
-import org.apache.beehive.netui.pageflow.interceptor.AbstractInterceptor;
+import org.apache.beehive.netui.pageflow.interceptor.InterceptorException;
/**
@@ -84,5 +84,11 @@
protected void setOverrideForward( InterceptorForward forward,
ActionInterceptorContext context )
{
context.setOverrideForward( forward, this );
+ }
+
+ public Object wrapAction( ActionInterceptorContext context,
InterceptorChain chain )
+ throws InterceptorException
+ {
+ return chain.continueChain();
}
}
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/tiles-defs-common.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/tiles-defs-common.xml?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/tiles-defs-common.xml
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/tiles-defs-common.xml
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!DOCTYPE tiles-definitions PUBLIC
+ "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
+ "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
+
+<!-- This is Tiles definition file for tests in coreWeb/tiles. -->
+
+<tiles-definitions>
+
+ <definition name="defaultLayout" path="/tiles/jsp/layout/default.jsp">
+ <put name="titleString" value="Sample Page Title" />
+ <put name="header" value="/tiles/jsp/components/header.jsp"/>
+ <put name="menu"
value="/tiles/jsp/components/defaultMenu.jsp"/>
+ <put name="panel" value="sidePanel"/>
+ <put name="footer" value="/tiles/jsp/components/footer.jsp"/>
+ <put name="body"
value="/tiles/jsp/components/defaultBody.jsp"/>
+ </definition>
+
+ <!-- using a relative path from the template for the includes -->
+ <definition name="sidePanel" path="/tiles/jsp/layout/sidePanel.jsp">
+ <put name="panel1" value="../components/panel1.jsp"/>
+ <put name="panel2" value="../components/panel2.jsp"/>
+ </definition>
+
+</tiles-definitions>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/tiles-defs-common.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/Controller.jpf
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/Controller.jpf?view=diff&r1=157847&r2=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/Controller.jpf
Wed Mar 16 17:27:14 2005
@@ -17,28 +17,22 @@
*/
package miniTests.tiles;
-import java.util.Enumeration;
-import java.util.Locale;
import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
import org.apache.beehive.netui.pageflow.PageFlowController;
import org.apache.beehive.netui.pageflow.Forward;
-import org.apache.beehive.netui.pageflow.FormData;
-
-import org.apache.struts.action.ActionMapping;
-import org.apache.struts.action.ActionForward;
@Jpf.Controller(
- tilesDefinitionsConfigs = { "tiles-defs.xml", "/WEB-INF/tiles-defs.xml" },
+ // Note: normally, a tiles definitions config file would go in WEB-INF.
+ // It's here to encapsulate the test.
+ tilesDefinitionsConfigs = { "/miniTests/tiles/tiles-defs.xml" },
simpleActions={
@Jpf.SimpleAction(name="begin", tilesDefinition="defaultPage")
})
public class Controller extends PageFlowController
{
- StringBuilder _sb = new StringBuilder();
+ protected StringBuilder _sb = new StringBuilder();
public String getResults()
{
return _sb.toString();
@@ -120,7 +114,7 @@
forwards = {
@Jpf.Forward(
name = "continue",
- tilesDefinition = "alternateLayout")
+ tilesDefinition = "j158Page")
})
public Forward alternate()
{
@@ -128,7 +122,19 @@
return new Forward("continue");
}
- private void doWork()
+ @Jpf.Action(
+ forwards = {
+ @Jpf.Forward(
+ name = "continue",
+ tilesDefinition = "alternateLayout")
+ })
+ public Forward j158()
+ {
+ doWork();
+ return new Forward("continue");
+ }
+
+ protected void doWork()
{
_sb = new StringBuilder();
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/alternate.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/alternate.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/alternate.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/alternate.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,58 @@
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
+<html>
+<head>
+ <%-- We rely on tiles-defs.xml to set the title --%>
+ <title><tiles:getAsString name="titleString"/></title>
+</head>
+<body>
+
+<table width="750" cellspacing="0" cellpadding="0" border="0">
+<tr>
+ <td colspan="2">
+ <!-- Begin header -->
+ <tiles:insert attribute="header"/>
+ <!-- End header -->
+ </td>
+</tr>
+<tr>
+ <td bgcolor="#CD5C5C" align="top">
+ <!-- Begin sideMenu -->
+ <tiles:insert attribute="menu"/>
+ <!-- End sideMenu -->
+ </td>
+ <td>
+ <br>
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr valign="top">
+ <td>
+ <!-- Begin panel1 -->
+ <tiles:insert attribute="panel1"/>
+ <!-- End panel1 -->
+ </td>
+ <td>
+ <!-- Begin panel2 -->
+ <tiles:insert attribute="panel2"/>
+ <!-- End panel2 -->
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <!-- Begin body -->
+ <tiles:insert attribute="body"/>
+ <!-- End body -->
+ </td>
+ </tr>
+ </table>
+ <br>
+ </td>
+</tr>
+</table>
+
+<!-- Begin footer -->
+<tiles:insert attribute="footer"/>
+<!-- End footer -->
+
+</body>
+</html>
+
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/alternate.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/alternateBody.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/alternateBody.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/alternateBody.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/alternateBody.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,22 @@
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
+
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr valign="top">
+ <td width="63%">
+ <!-- Begin body -->
+ <tiles:insert attribute="body"/>
+ <!-- End body -->
+ </td>
+ <td width="2%"> </td>
+ <td width="35%">
+ <!-- Begin panel1 -->
+ <tiles:insert attribute="panel1"/>
+ <!-- End panel1 -->
+ <br>
+ <!-- Begin panel2 -->
+ <tiles:insert attribute="panel2"/>
+ <!-- End panel2 -->
+ </td>
+ </tr>
+ </table>
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/alternateBody.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/blank.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/blank.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/blank.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/blank.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,3 @@
+
+<h1> Blank Body Tile </h1>
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/blank.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/default.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/default.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/default.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/default.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,41 @@
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
+<html>
+<head>
+ <%-- We rely on tiles-defs.xml to set the title --%>
+ <title><tiles:getAsString name="titleString"/></title>
+</head>
+<body>
+
+<table width="750" cellspacing="0" cellpadding="0" border="0">
+<tr>
+ <td>
+ <!-- Begin header -->
+ <tiles:insert attribute="header"/>
+ <!-- End header -->
+ </td>
+</tr>
+<tr>
+ <td>
+ <!-- Begin topMenu -->
+ <tiles:insert attribute="menu"/>
+ <!-- End topMenu -->
+ </td>
+</tr>
+<tr>
+ <td>
+ <br>
+ <!-- Begin content -->
+ <tiles:insert attribute="content"/>
+ <!-- End content -->
+ <br>
+ </td>
+</tr>
+</table>
+
+<!-- Begin footer -->
+<tiles:insert attribute="footer"/>
+<!-- End footer -->
+
+</body>
+</html>
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/default.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/editMenu.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/editMenu.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/editMenu.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/editMenu.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,13 @@
+<table bgcolor="#CD5C5C" cellspacing="0" cellpadding="5" border="0"
+ width="100%">
+<tr>
+ <td>
+ |
+ <b>Undo</b> |
+ <u>Redo</u> |
+ <u>Cut</u> |
+ <u>Copy</u> |
+ <u>Paste</u> |
+ </td>
+</tr>
+</table>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/editMenu.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/footer.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/footer.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/footer.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/footer.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,8 @@
+<table bgcolor="#00FFFF" cellspacing="0" cellpadding="5" border="0"
+ width="100%">
+<tr>
+ <td align="center">
+ Copyright 2004 <a href="http://www.bea.com">BEA Systems Inc.</a>
+ </td>
+</tr>
+</table>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/footer.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/header.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/header.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/header.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/header.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,8 @@
+<table bgcolor="#FFFF00" cellspacing="0" cellpadding="5" border="0"
+ width="100%">
+ <tr>
+ <td>
+ <H1>Header Tile</H1>
+ </td>
+ </tr>
+</table>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/header.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/mainBody.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/mainBody.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/mainBody.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/mainBody.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,22 @@
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
+
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr valign="top">
+ <td width="35%">
+ <!-- Begin panel1 -->
+ <tiles:insert attribute="panel1"/>
+ <!-- End panel1 -->
+ <br>
+ <!-- Begin panel2 -->
+ <tiles:insert attribute="panel2"/>
+ <!-- End panel2 -->
+ </td>
+ <td width="2%"> </td>
+ <td width="63%">
+ <!-- Begin body -->
+ <tiles:insert attribute="body"/>
+ <!-- End body -->
+ </td>
+ </tr>
+ </table>
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/mainBody.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/mainMenu.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/mainMenu.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/mainMenu.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/mainMenu.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,30 @@
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+
+<table bgcolor="#CD5C5C" cellspacing="0" cellpadding="5" border="0"
+ width="100%">
+<tr>
+ <td>
+ <netui:anchor action="home">
+ NetUI
+ </netui:anchor> |
+ <netui:anchor action="struts">
+ Struts
+ </netui:anchor> |
+ <netui:anchor action="blank">
+ Blank
+ </netui:anchor> |
+ <netui:anchor action="edit">
+ Edit
+ </netui:anchor> |
+ <netui:anchor action="reversePanels">
+ Panels
+ </netui:anchor> |
+ <netui:anchor action="changeBody">
+ Body
+ </netui:anchor> |
+ <netui:anchor action="alternate">
+ Alternate
+ </netui:anchor>
+ </td>
+</tr>
+</table>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/mainMenu.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/netui-body.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/netui-body.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/netui-body.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/netui-body.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,44 @@
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+
+<h1> Main Body Tile - NetUI HTML tags</h1>
+
+<netui:span value="${pageFlow.results}"/>
+
+<ul>
+ <li>
+ <netui:anchor action="home">
+ Default layout - using NetUI HTML tags
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="struts">
+ Default layout - using Struts HTML tags
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="blank">
+ Blank body
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="edit">
+ Change to edit menu
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="reversePanels">
+ Reverse side panels
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="changeBody">
+ Change the body layout
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="alternate">
+ Alternative Layout
+ </netui:anchor>
+ </li>
+</ul>
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/netui-body.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/panel1.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/panel1.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/panel1.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/panel1.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,24 @@
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"
%>
+<table bgcolor="#4169E1" cellspacing="0" cellpadding="10" border="1"
+ width="100%">
+<tr>
+ <td>
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr bgcolor="#696969">
+ <td align="center">
+ <font color="#FFFFFF">Panel 1 Tile: News</font>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><netui:anchor href="http://www.cnn.com/">CNN</netui:anchor></li>
+ <li><netui:anchor href="http://www.nytimes.com/">NY
Times</netui:anchor></li>
+ <li><netui:anchor
href="http://www.yahoo.com/">Yahoo!</netui:anchor></li>
+ </ul>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/panel1.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/panel2.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/panel2.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/panel2.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/panel2.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,21 @@
+<table bgcolor="#228B22" cellspacing="0" cellpadding="10" border="1"
+ width="100%">
+<tr>
+ <td>
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr bgcolor="#696969">
+ <td align="center">
+ <font color="#FFFFFF">Panel 2 Tile: Weather</font>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>Weather:</p>
+ <p>find extended weather forcast at...</p>
+ <a href="http://weather.yahoo.com">http://weather.yahoo.com</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/panel2.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/sideMenu.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/sideMenu.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/sideMenu.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/sideMenu.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,46 @@
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+
+<table cellspacing="0" cellpadding="5" border="0" width="100%">
+<tr>
+</tr>
+ <td>
+ <ul>
+ <li>
+ <netui:anchor action="home">
+ Default layout - NetUI tags
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="struts">
+ Default layout - Struts tags
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="blank">
+ Blank body
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="edit">
+ Change to edit menu
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="reversePanels">
+ Reverse side panels
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="changeBody">
+ Change the body layout
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="alternate">
+ Alternative Layout
+ </netui:anchor>
+ </li>
+ </ul>
+ </td>
+</tr>
+</table>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/sideMenu.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/struts-body.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/struts-body.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/struts-body.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/struts-body.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,42 @@
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
+
+<h1> Main Body Tile - Struts HTML tags</h1>
+
+<ul>
+ <li>
+ <html:link page="/home.do">
+ Default layout - using NetUI HTML tags
+ </html:link>
+ </li>
+ <li>
+ <html:link page="/struts.do">
+ Default layout - using Struts HTML tags
+ </html:link>
+ </li>
+ <li>
+ <html:link page="/blank.do">
+ Blank body
+ </html:link>
+ </li>
+ <li>
+ <html:link page="/edit.do">
+ Change to edit menu
+ </html:link>
+ </li>
+ <li>
+ <html:link page="/reversePanels.do">
+ Reverse side panels
+ </html:link>
+ </li>
+ <li>
+ <html:link page="/changeBody.do">
+ Change the body layout
+ </html:link>
+ </li>
+ <li>
+ <html:link page="/alternate.do">
+ Alternative Layout
+ </html:link>
+ </li>
+</ul>
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/struts-body.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/tiles-defs.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/tiles-defs.xml?view=diff&r1=157847&r2=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/tiles-defs.xml
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/tiles/tiles-defs.xml
Wed Mar 16 17:27:14 2005
@@ -1,49 +1,36 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <!DOCTYPE tiles-definitions PUBLIC
- "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
- "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
+<!DOCTYPE tiles-definitions PUBLIC
+ "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
+ "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
-
-<!--
- This is a blank Tiles definition file with a commented example.
--->
+<!-- This is test Tiles definition file. -->
<tiles-definitions>
- <definition name="defaultLayout" path="layout.default.jsp">
+ <definition name="defaultLayout" path="/miniTests/tiles/default.jsp">
<put name="titleString" value="Sample Page Title" />
- <put name="header" value="components.header.jsp" />
+ <put name="header" value="/miniTests/tiles/header.jsp" />
<put name="menu" value="mainMenu" />
<put name="content" value="mainBody" />
- <put name="footer" value="components.footer.jsp" />
+ <put name="footer" value="/miniTests/tiles/footer.jsp" />
+ </definition>
+
+ <definition name="mainMenu" path="/miniTests/tiles/mainMenu.jsp" >
</definition>
- <definition name="mainMenu" path="components.mainMenu.jsp" >
-<!--
- <putList name="list" >
- <add value="menu.links" />
- <add value="menu.taglib.references" />
- <add value="menu.printer.friendly" />
- <add value="menu.old.documents" />
- </putList>
--->
- </definition>
-
- <definition name="mainBody" path="layout.mainBody.jsp">
- <put name="panel1" value="components.panel1.jsp" />
- <put name="panel2" value="components.panel2.jsp" />
- <put name="body" value="components.netui-body.jsp" />
+ <definition name="mainBody" path="/miniTests/tiles/mainBody.jsp">
+ <put name="panel1" value="/miniTests/tiles/panel1.jsp" />
+ <put name="panel2" value="/miniTests/tiles/panel2.jsp" />
+ <put name="body" value="/miniTests/tiles/netui-body.jsp" />
</definition>
<definition name="defaultPage" extends="defaultLayout">
<put name="titleString" value="Default Layout Page - Tiles, NetUI
Tags" />
</definition>
- <definition name="strutsBody" path="layout.mainBody.jsp">
- <put name="panel1" value="components.panel1.jsp" />
- <put name="panel2" value="components.panel2.jsp" />
- <put name="body" value="components.struts-body.jsp" />
+ <definition name="strutsBody" extends="mainBody">
+ <put name="body" value="/miniTests/tiles/struts-body.jsp" />
</definition>
<definition name="defaultStrutsPage" extends="defaultLayout">
@@ -53,17 +40,17 @@
<definition name="blankPage" extends="defaultLayout">
<put name="titleString" value="Blank Body Page - Tiles" />
- <put name="content" value="components.blank.jsp" />
+ <put name="content" value="/miniTests/tiles/blank.jsp" />
</definition>
<definition name="editMenuPage" extends="defaultLayout">
<put name="titleString" value="Edit Menu Page - Tiles" />
- <put name="menu" value="components.editMenu.jsp" />
+ <put name="menu" value="/miniTests/tiles/editMenu.jsp" />
</definition>
<definition name="alternatePanels" extends="mainBody">
- <put name="panel1" value="components.panel2.jsp" />
- <put name="panel2" value="components.panel1.jsp" />
+ <put name="panel1" value="/miniTests/tiles/panel2.jsp" />
+ <put name="panel2" value="/miniTests/tiles/panel1.jsp" />
</definition>
<definition name="reversePanels" extends="defaultLayout">
@@ -71,10 +58,10 @@
<put name="content" value="alternatePanels" />
</definition>
- <definition name="alternateBody" path="layout.alternateBody.jsp">
- <put name="panel1" value="components.panel1.jsp" />
- <put name="panel2" value="components.panel2.jsp" />
- <put name="body" value="components.netui-body.jsp" />
+ <definition name="alternateBody" path="/miniTests/tiles/alternateBody.jsp">
+ <put name="panel1" value="/miniTests/tiles/panel1.jsp" />
+ <put name="panel2" value="/miniTests/tiles/panel2.jsp" />
+ <put name="body" value="/miniTests/tiles/netui-body.jsp" />
</definition>
<definition name="reverseBody" extends="defaultLayout">
@@ -82,14 +69,19 @@
<put name="content" value="alternateBody" />
</definition>
- <definition name="alternateLayout" path="layout.alternate.jsp">
+ <definition name="alternateLayout" path="/miniTests/tiles/alternate.jsp">
+ <put name="titleString" value="Alternate Layout" />
+ <put name="header" value="/miniTests/tiles/header.jsp" />
+ <put name="menu" value="/miniTests/tiles/sideMenu.jsp" />
+ <put name="panel1" value="/miniTests/tiles/panel1.jsp" />
+ <put name="panel2" value="/miniTests/tiles/panel2.jsp" />
+ <put name="body" value="/miniTests/tiles/netui-body.jsp" />
+ <put name="footer" value="/miniTests/tiles/footer.jsp" />
+ </definition>
+
+ <definition name="j158Page" path="/miniTests/tiles/j158.do">
<put name="titleString" value="Alternate Layout Page - Tiles" />
- <put name="header" value="components.header.jsp" />
- <put name="menu" value="components.sideMenu.jsp" />
- <put name="panel1" value="components.panel1.jsp" />
- <put name="panel2" value="components.panel2.jsp" />
- <put name="body" value="components.netui-body.jsp" />
- <put name="footer" value="components.footer.jsp" />
</definition>
+
</tiles-definitions>
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/defaultBody.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/defaultBody.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/defaultBody.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/defaultBody.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,5 @@
+
+<h1>Default Body Tile</h1>
+
+<p>place holder</p>
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/defaultBody.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/defaultMenu.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/defaultMenu.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/defaultMenu.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/defaultMenu.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,13 @@
+<table bgcolor="#CD5C5C" cellspacing="0" cellpadding="5" border="0"
+ width="100%">
+<tr>
+ <td>
+ |
+ <b>Undo</b> |
+ <u>Redo</u> |
+ <u>Cut</u> |
+ <u>Copy</u> |
+ <u>Paste</u> |
+ </td>
+</tr>
+</table>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/defaultMenu.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/footer.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/footer.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/footer.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/footer.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,8 @@
+<table bgcolor="#00FFFF" cellspacing="0" cellpadding="5" border="0"
+ width="100%">
+<tr>
+ <td align="center">
+ Copyright 2004 <a href="http://www.bea.com">BEA Systems Inc.</a>
+ </td>
+</tr>
+</table>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/footer.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/header.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/header.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/header.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/header.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,8 @@
+<table bgcolor="#FFFF00" cellspacing="0" cellpadding="5" border="0"
+ width="100%">
+ <tr>
+ <td>
+ <H1>Header Tile</H1>
+ </td>
+ </tr>
+</table>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/header.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/panel1.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/panel1.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/panel1.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/panel1.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,24 @@
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"
%>
+<table bgcolor="#4169E1" cellspacing="0" cellpadding="10" border="1"
+ width="100%">
+<tr>
+ <td>
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr bgcolor="#696969">
+ <td align="center">
+ <font color="#FFFFFF">Panel 1 Tile: News</font>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ul>
+ <li><netui:anchor href="http://www.cnn.com/">CNN</netui:anchor></li>
+ <li><netui:anchor href="http://www.nytimes.com/">NY
Times</netui:anchor></li>
+ <li><netui:anchor
href="http://www.yahoo.com/">Yahoo!</netui:anchor></li>
+ </ul>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/panel1.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/panel2.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/panel2.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/panel2.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/panel2.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,21 @@
+<table bgcolor="#228B22" cellspacing="0" cellpadding="10" border="1"
+ width="100%">
+<tr>
+ <td>
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr bgcolor="#696969">
+ <td align="center">
+ <font color="#FFFFFF">Panel 2 Tile: Weather</font>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>Weather:</p>
+ <p>find extended weather forcast at...</p>
+ <a href="http://weather.yahoo.com">http://weather.yahoo.com</a>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/components/panel2.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/layout/default.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/layout/default.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/layout/default.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/layout/default.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,54 @@
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
+<html>
+<head>
+ <%-- We rely on tiles-defs.xml to set the title --%>
+ <title><tiles:getAsString name="titleString"/></title>
+</head>
+<body>
+
+<table width="750" cellspacing="0" cellpadding="0" border="0">
+<tr>
+ <td>
+ <!-- Begin header -->
+ <tiles:insert attribute="header"/>
+ <!-- End header -->
+ </td>
+</tr>
+<tr>
+ <td>
+ <!-- Begin topMenu -->
+ <tiles:insert attribute="menu"/>
+ <!-- End topMenu -->
+ </td>
+</tr>
+<tr>
+ <td>
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr valign="top">
+ <td width="35%">
+ <!-- Begin content -->
+ <tiles:insert attribute="panel"/>
+ <!-- End content -->
+ </td>
+ <td width="2%"> </td>
+ <td width="63%">
+ <!-- Begin body -->
+ <tiles:insert attribute="body"/>
+ <!-- End body -->
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+<tr>
+ <td>
+ <!-- Begin footer -->
+ <tiles:insert attribute="footer"/>
+ <!-- End footer -->
+ </td>
+</tr>
+</table>
+
+</body>
+</html>
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/layout/default.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/layout/sidePanel.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/layout/sidePanel.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/layout/sidePanel.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/layout/sidePanel.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,9 @@
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
+
+ <!-- Begin panel1 -->
+ <tiles:insert attribute="panel1"/>
+ <!-- End panel1 -->
+ <!-- Begin panel2 -->
+ <tiles:insert attribute="panel2"/>
+ <!-- End panel2 -->
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/jsp/layout/sidePanel.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/Controller.jpf
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/Controller.jpf?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/Controller.jpf
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/Controller.jpf
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package tiles.pf;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionForward;
+
[EMAIL PROTECTED](
+ tilesDefinitionsConfigs = {
+ "/WEB-INF/tiles-defs-common.xml",
+ "/tiles/pf/tiles-defs.xml" },
+ simpleActions={
+ @Jpf.SimpleAction(name="begin", tilesDefinition="defaultPage")
+ }
+)
+public class Controller extends PageFlowController
+{
+ protected StringBuilder _sb = new StringBuilder();
+ public String getResults()
+ {
+ return _sb.toString();
+ }
+
+ @Jpf.Action(
+ forwards = {
+ @Jpf.Forward(
+ name = "continue",
+ tilesDefinition = "defaultPage")
+ })
+ public Forward home()
+ {
+ doWork("in action, home");
+ return new Forward("continue");
+ }
+
+ @Jpf.Action(
+ forwards = {
+ @Jpf.Forward(
+ name = "continue",
+ tilesDefinition = "blankPage")
+ })
+ public Forward blank()
+ {
+ doWork("in action, blank");
+ return new Forward("continue");
+ }
+
+ @Jpf.Action(
+ forwards = {
+ @Jpf.Forward(
+ name = "continue",
+ tilesDefinition = "anotherPage")
+ })
+ public Forward another()
+ {
+ doWork("in action, another");
+ return new Forward("continue");
+ }
+
+ protected void doWork(String msg)
+ {
+ _sb = new StringBuilder(msg);
+ _sb.append("\n");
+ HttpServletRequest req = getRequest();
+ _sb.append("Request URI: " + req.getRequestURI());
+ _sb.append("\n");
+ }
+}
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/Controller.jpf
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherBody.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherBody.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherBody.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherBody.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,19 @@
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+
+<h1> Another Main Body Tile</h1>
+
+<netui:span value="${pageFlow.results}"/>
+
+<ul>
+ <li>
+ <netui:anchor action="home">
+ Default layout
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="another">
+ Another body
+ </netui:anchor>
+ </li>
+</ul>
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherBody.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/Controller.jpf
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/Controller.jpf?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/Controller.jpf
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/Controller.jpf
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package tiles.pf.anotherInherit;
+
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
[EMAIL PROTECTED](
+ tilesDefinitionsConfigs = {
+ "/WEB-INF/tiles-defs-common.xml",
+ "/tiles/pf/tiles-defs.xml",
+ "/tiles/pf/anotherInherit/tiles-defs.xml"
+ },
+ simpleActions={
+ @Jpf.SimpleAction(
+ name="begin",
+ tilesDefinition = "localPage")
+ }
+)
+public class Controller extends tiles.pf.Controller
+{
+ // forward to a different tiles definition.
+ @Jpf.Action(
+ forwards = {
+ @Jpf.Forward(
+ name = "continue",
+ tilesDefinition = "overridePage")
+ })
+ public Forward another()
+ {
+ doWork("Overriding action, another");
+ return new Forward("continue");
+ }
+
+ // forward to a local tiles definition.
+ @Jpf.Action(
+ forwards = {
+ @Jpf.Forward(
+ name = "continue",
+ tilesDefinition = "localPage")
+ })
+ public Forward local()
+ {
+ doWork("new derived class action, local");
+ return new Forward("continue");
+ }
+}
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/Controller.jpf
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/localBody.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/localBody.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/localBody.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/localBody.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,29 @@
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+
+<h1> Local Main Body Tile </h1>
+
+<netui:span value="${pageFlow.results}"/>
+
+<ul>
+ <li>
+ <netui:anchor action="home">
+ Default layout
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="blank">
+ Blank body
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="another">
+ Change to another page
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="local">
+ Change to local page
+ </netui:anchor>
+ </li>
+</ul>
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/localBody.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/localMenu.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/localMenu.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/localMenu.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/localMenu.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,21 @@
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+
+<table bgcolor="#0F0F0F" cellspacing="0" cellpadding="5" border="0"
+ width="100%">
+<tr>
+ <td>
+ <netui:anchor action="home">
+ Default
+ </netui:anchor> |
+ <netui:anchor action="blank">
+ Blank
+ </netui:anchor> |
+ <netui:anchor action="another">
+ Another
+ </netui:anchor> |
+ <netui:anchor action="local">
+ Local
+ </netui:anchor> |
+ </td>
+</tr>
+</table>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/localMenu.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/overrideBody.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/overrideBody.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/overrideBody.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/overrideBody.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,29 @@
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+
+<h1> Another Main Body Tile </h1>
+
+<netui:span value="${pageFlow.results}"/>
+
+<ul>
+ <li>
+ <netui:anchor action="home">
+ Default layout
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="blank">
+ Blank body
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="another">
+ Change to another page
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="local">
+ Change to local page
+ </netui:anchor>
+ </li>
+</ul>
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/overrideBody.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/tiles-defs.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/tiles-defs.xml?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/tiles-defs.xml
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/tiles-defs.xml
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!DOCTYPE tiles-definitions PUBLIC
+ "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
+ "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
+
+
+<tiles-definitions>
+
+ <definition name="overridePage" extends="defaultLayout">
+ <put name="titleString" value="Override Action Page - Tiles"/>
+ <put name="menu" value="/tiles/pf/anotherInherit/localMenu.jsp"/>
+ <put name="body" value="/tiles/pf/anotherInherit/overrideBody.jsp"/>
+ </definition>
+
+ <definition name="localPage" extends="defaultLayout">
+ <put name="titleString" value="Local Page - Tiles"/>
+ <put name="menu" value="/tiles/pf/anotherInherit/localMenu.jsp"/>
+ <put name="body" value="/tiles/pf/anotherInherit/localBody.jsp"/>
+ </definition>
+
+</tiles-definitions>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/anotherInherit/tiles-defs.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/inherit/Controller.jpf
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/inherit/Controller.jpf?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/inherit/Controller.jpf
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/inherit/Controller.jpf
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package tiles.pf.inherit;
+
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
[EMAIL PROTECTED](
+ simpleActions={
+ @Jpf.SimpleAction(name="begin", path="index.jsp")
+ }
+)
+public class Controller extends tiles.pf.Controller
+{
+ // forward to a different tiles definition.
+ @Jpf.Action(
+ forwards = {
+ @Jpf.Forward(
+ name = "continue",
+ tilesDefinition = "defaultPage")
+ })
+ public Forward another()
+ {
+ doWork("Overriding action, another");
+ return new Forward("continue");
+ }
+
+ // forward to a local tiles definition.
+ @Jpf.Action(
+ forwards = {
+ @Jpf.Forward(
+ name = "continue",
+ tilesDefinition = "anotherPage")
+ })
+ public Forward local()
+ {
+ doWork("new derived class action, local");
+ return new Forward("continue");
+ }
+}
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/inherit/Controller.jpf
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/inherit/index.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/inherit/index.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/inherit/index.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/inherit/index.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,12 @@
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"
%>
+<html>
+<head>
+<title> Tiles Inheritance </title>
+</head>
+<body>
+<netui:anchor action="local">Local action</netui:anchor>
+<br/>
+<netui:anchor action="another">Overriding action</netui:anchor>
+<br/>
+</body>
+</html>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/inherit/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/mainBody.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/mainBody.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/mainBody.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/mainBody.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,42 @@
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+
+<h1> Main Body Tile </h1>
+
+<netui:span value="${pageFlow.results}"/>
+
+<ul>
+ <li>
+ <netui:anchor action="home">
+ Default layout
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="blank">
+ Blank body
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="another">
+ Change to another page
+ </netui:anchor>
+ </li>
+</ul>
+<p>Other tests:
+<ul>
+ <li>
+ <netui:anchor href="/coreWeb/tiles/pf/nested/Controller.jpf">
+ Nested
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor href="/coreWeb/tiles/pf/inherit/Controller.jpf">
+ Inherit
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor href="/coreWeb/tiles/pf/anotherInherit/Controller.jpf">
+ Another Inherit
+ </netui:anchor>
+ </li>
+</ul>
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/mainBody.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/mainMenu.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/mainMenu.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/mainMenu.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/mainMenu.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,18 @@
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+
+<table bgcolor="#FF00FF" cellspacing="0" cellpadding="5" border="0"
+ width="100%">
+<tr>
+ <td>
+ <netui:anchor action="home">
+ Default
+ </netui:anchor> |
+ <netui:anchor action="blank">
+ Blank
+ </netui:anchor> |
+ <netui:anchor action="another">
+ Another
+ </netui:anchor> |
+ </td>
+</tr>
+</table>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/mainMenu.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/Controller.jpf
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/Controller.jpf?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/Controller.jpf
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/Controller.jpf
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package tiles.pf.nested;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
[EMAIL PROTECTED](
+ nested = true,
+ tilesDefinitionsConfigs = {
+ "/WEB-INF/tiles-defs-common.xml",
+ "/tiles/pf/tiles-defs.xml",
+ "/tiles/pf/nested/tiles-defs.xml"
+ }
+)
+public class Controller extends PageFlowController
+{
+ StringBuilder _sb = new StringBuilder();
+ public String getResults()
+ {
+ return _sb.toString();
+ }
+
+ @Jpf.Action(
+ forwards = {
+ @Jpf.Forward(
+ name = "begin",
+ tilesDefinition = "nestedPage")
+ })
+ public Forward begin()
+ {
+ _sb = new StringBuilder();
+ return new Forward("begin");
+ }
+
+ @Jpf.Action(
+ forwards = {
+ @Jpf.Forward(
+ name = "return",
+ returnAction = "home")
+ })
+ public Forward backOne()
+ {
+ doWork("in backOne(), returnAction = home");
+ return new Forward("return");
+ }
+
+ @Jpf.Action(
+ forwards = {
+ @Jpf.Forward(
+ name = "return",
+ returnAction = "another")
+ })
+ public Forward backTwo()
+ {
+ doWork("in backOne(), returnAction = another");
+ return new Forward("return");
+ }
+
+ @Jpf.Action(
+ forwards = {
+ @Jpf.Forward(
+ name = "continue",
+ tilesDefinition = "nestedPage")
+ })
+ public Forward nestOne()
+ {
+ doWork("in nestOne(), go to local tiles def - nestedPage");
+ return new Forward("continue");
+ }
+
+ private void doWork(String msg)
+ {
+ _sb = new StringBuilder(msg);
+ _sb.append("\n");
+ HttpServletRequest req = getRequest();
+ _sb.append("Request URI: " + req.getRequestURI());
+ _sb.append("\n");
+ }
+}
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/Controller.jpf
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/nestedBody.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/nestedBody.jsp?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/nestedBody.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/nestedBody.jsp
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,21 @@
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"
%>
+
+<netui:span value="${pageFlow.results}"/>
+
+<ul>
+ <li>
+ <netui:anchor action="backOne" >
+ Nested Return to Home
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="backTwo" >
+ Nested Return to Another
+ </netui:anchor>
+ </li>
+ <li>
+ <netui:anchor action="nestOne" >
+ Local layout Home
+ </netui:anchor>
+ </li>
+</ul>
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/nestedBody.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/tiles-defs.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/tiles-defs.xml?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/tiles-defs.xml
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/tiles-defs.xml
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!DOCTYPE tiles-definitions PUBLIC
+ "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
+ "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
+
+<tiles-definitions>
+
+ <definition name="nestedPage" extends="defaultLayout">
+ <put name="titleString" value="Nested Page - Tiles"/>
+ <put name="body" value="/tiles/pf/nested/nestedBody.jsp"/>
+ </definition>
+
+</tiles-definitions>
+
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/nested/tiles-defs.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/tiles-defs.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/tiles-defs.xml?view=auto&rev=157848
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/tiles-defs.xml
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tiles/pf/tiles-defs.xml
Wed Mar 16 17:27:14 2005
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!DOCTYPE tiles-definitions PUBLIC
+ "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
+ "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
+
+<tiles-definitions>
+
+ <definition name="defaultPage" extends="defaultLayout">
+ <put name="titleString" value="Default Layout Page - Tiles" />
+ <put name="menu" value="/tiles/pf/mainMenu.jsp" />
+ <put name="body" value="/tiles/pf/mainBody.jsp" />
+ </definition>
+
+ <definition name="blankPage" extends="defaultLayout">
+ <put name="titleString" value="Blank Body Page - Tiles" />
+ <put name="menu" value="/tiles/pf/mainMenu.jsp" />
+ </definition>
+
+ <!-- using a relative path from the template for the includes -->
+ <definition name="anotherPage" extends="defaultLayout">
+ <put name="titleString" value="Another Layout Page - Tiles" />
+ <put name="menu" value="../../pf/mainMenu.jsp" />
+ <put name="body" value="../../pf/anotherBody.jsp" />
+ </definition>
+
+</tiles-definitions>