Author: rich
Date: Fri Sep 24 21:51:33 2004
New Revision: 47182
Added:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ActionOutputGrammar.java
(contents, props changed)
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/LocaleRulesGrammar.java
- copied, changed from rev 47030,
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidationLocaleRulesGrammar.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/RolesAllowedType.java
(contents, props changed)
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidatableBeanGrammar.java
- copied, changed from rev 47030,
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidationBeanGrammar.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidatablePropertyGrammar.java
- copied, changed from rev 47030,
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidationFieldGrammar.java
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/PageFlowBeanContext.java
(contents, props changed)
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/PageFlowServiceProvider.java
(contents, props changed)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/AnyBeanReturnController.jpf
(contents, props changed)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/SharedFlow.jpfs
(contents, props changed)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/index.jsp
(contents, props changed)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/nested/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/nested/NestedController.jpf
(contents, props changed)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/nested/index.jsp
(contents, props changed)
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/result.jsp
(contents, props changed)
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/AnyBeanReturn.xml
(contents, props changed)
Removed:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidationBeanGrammar.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidationFieldGrammar.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidationLocaleRulesGrammar.java
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/AnnotationGrammar.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/AnnotationMemberType.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/CompilerUtils.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FormBeanChecker.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/JpfLanguageConstants.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/diagnostics.properties
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/DefaultValidatorRuleFactory.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/AbsolutePathType.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ActionGrammar.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/BaseValidationRuleGrammar.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/CatchGrammar.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ControllerGrammar.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/DelegatingType.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/EnumType.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ExternalPathOrActionType.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ForwardGrammar.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ForwardToExternalPathType.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/JavaIdentifierType.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MemberFieldType.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MemberMethodType.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MessageKeyType.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MessageResourcesGrammar.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/RaiseActionGrammar.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/SimpleActionGrammar.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/TypeNameType.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/UniqueValueType.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidateRangeGrammar.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidateTypeGrammar.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WebappPathOrActionType.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WebappPathType.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WritableFieldType.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/validation/ValidatorRuleRange.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/internal/DefaultServerAdapter.java
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalConstants.java
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
Log:
- Fixed the page flow filename in the page flow URI to be case-sensitive; if
you request a page flow with a wrongly-cased filename, you'll get a descriptive
error in development mode and a 404 in production mode.
- Fixed to give an error when processing two @Jpf.ActionOutputs under the same
@Jpf.Forward with the same names.
- Fixed to give an error when processing a @Jpf.ActionOutput whose 'type'
attribute specifies a primitive type.
- Fixed an NPE when specifying a primitive type for 'type' on
@Jpf.ActionOutput, 'type' on @Jpf.Catch, or 'outputFormBeanType' on
@Jpf.Forward.
- Fixed to allow both 'loginRequired' and 'rolesAllowed' on @Jpf.Forward as
long as 'loginRequired' is set to true.
- Changed 'defaultMessageBundle' to 'messageBundle' on @Jpf.FormBean.
- Fixed to avoid an 'action not found' error when returning a
non-ActionForm-derived bean from a nested page flow to an overloaded action in
the nesting page flow.
- Fixed to avoid a 404 error when forwarding from a shared flow (.jpfs) to a
page in the same directory.
DRT: netui (WinXP)
BB: self (linux)
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/AnnotationGrammar.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/AnnotationGrammar.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/AnnotationGrammar.java
Fri Sep 24 21:51:33 2004
@@ -141,7 +141,7 @@
if ( memberType != null ) // it will be non-null unless
there are other, more basic, errors
{
- Object result = memberType.check( decl, value, annotation,
classMember );
+ Object result = memberType.check( decl, value,
parentsIncludingMe, classMember );
if ( result != null )
{
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/AnnotationMemberType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/AnnotationMemberType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/AnnotationMemberType.java
Fri Sep 24 21:51:33 2004
@@ -45,7 +45,7 @@
* @return a result (any Object) that will be passed back to the parent
checker. May be <code>null</code>.
*/
public final Object check( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue value,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
//
// First check to see if this attribute requires a particular runtime
version.
@@ -56,14 +56,14 @@
_requiredRuntimeVersion, value, diags,
"error.required-runtime-version-attribute", valueName,
PAGEFLOW_RUNTIME_JAR );
- return onCheck( valueDecl, value, parentAnnotation, classMember );
// for derived classes
+ return onCheck( valueDecl, value, parentAnnotations, classMember );
// for derived classes
}
/**
* @return a result (any Object) that will be passed back to the parent
checker. May be <code>null</code>.
*/
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue member,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
return null;
}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/CompilerUtils.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/CompilerUtils.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/CompilerUtils.java
Fri Sep 24 21:51:33 2004
@@ -182,7 +182,13 @@
public static Float getFloat( AnnotationMirror annotation, String
memberName, boolean defaultIsNull )
{
AnnotationValue value = getAnnotationValue( annotation, memberName,
defaultIsNull );
- return value != null ? ( Float ) value.getValue() : ( defaultIsNull ?
null : new Float ( 0 ) );
+ return value != null ? ( Float ) value.getValue() : ( defaultIsNull ?
null : new Float( 0 ) );
+ }
+
+ public static Double getDouble( AnnotationMirror annotation, String
memberName, boolean defaultIsNull )
+ {
+ AnnotationValue value = getAnnotationValue( annotation, memberName,
defaultIsNull );
+ return value != null ? ( Double ) value.getValue() : ( defaultIsNull ?
null : new Double( 0 ) );
}
public static Boolean getBoolean( AnnotationMirror annotation, String
memberName, boolean defaultIsNull )
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FormBeanChecker.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FormBeanChecker.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FormBeanChecker.java
Fri Sep 24 21:51:33 2004
@@ -28,9 +28,8 @@
import java.util.Collection;
import java.util.Map;
-import java.util.List;
-import org.apache.beehive.netui.compiler.grammar.ValidationFieldGrammar;
+import org.apache.beehive.netui.compiler.grammar.ValidatablePropertyGrammar;
import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.VALIDATABLE_PROPERTY_TAG_NAME;
import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.FORM_CLASS_NAME;
@@ -131,7 +130,7 @@
}
private class GetterValidatablePropertyGrammar
- extends ValidationFieldGrammar
+ extends ValidatablePropertyGrammar
{
public GetterValidatablePropertyGrammar()
{
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/JpfLanguageConstants.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/JpfLanguageConstants.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/JpfLanguageConstants.java
Fri Sep 24 21:51:33 2004
@@ -147,7 +147,7 @@
public static final String VALIDATE_VALID_WHEN_ATTR = "validateValidWhen";
public static final String VALIDATE_CUSTOM_ATTR = "validateCustom";
public static final String VALIDATABLE_PROPERTIES_ATTR =
"validatableProperties";
- public static final String DEFAULT_MESSAGE_RESOURCES_ATTR =
"defaultMessageBundle";
+ public static final String DEFAULT_MESSAGE_RESOURCES_ATTR =
"messageBundle";
public static final String APPLY_TO_UNHANDLED_LOCALES_ATTR =
"applyToUnhandledLocales";
public static final String VALIDATION_BEANS_ATTR = "validationBeans";
public static final String ACTION_ATTR = "action";
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java
Fri Sep 24 21:51:33 2004
@@ -296,7 +296,7 @@
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue value,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
boolean isSingleton = ( Boolean ) value.getValue();
if ( isSingleton && CompilerUtils.isInNestedPageFlow(
classMember ) )
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/diagnostics.properties
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/diagnostics.properties
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/diagnostics.properties
Fri Sep 24 21:51:33 2004
@@ -139,7 +139,7 @@
warning.no-such-action = There is no action "{0}" in page flow {1}.
warning.using-default-display-name = \
-This rule uses the default message and does not provide a first argument, and
the parent {0} annotation does not
+This rule uses the default message and does not provide a first argument, and
the parent {0} annotation does not \
specify a display name. A default display name will be used.
error.multiple-default-message-resources = \
@@ -150,3 +150,7 @@
warning.exception-handler-forward-to-external-page = \
Any error messages on external page "{0}" will not use message resources from
the current page flow.
+
+error.roles-with-no-login-required = The rolesAllowed attribute may not be
used when loginRequired is set to false.
+error.min-float = This value must be no less than {0}.
+error.max-float = This value must be no greater than {0}.
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/DefaultValidatorRuleFactory.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/DefaultValidatorRuleFactory.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/DefaultValidatorRuleFactory.java
Fri Sep 24 21:51:33 2004
@@ -60,11 +60,11 @@
else if ( annName.equals( VALIDATE_EMAIL_TAG_NAME ) ) rule = new
ValidatorRule( RULENAME_EMAIL );
else if ( annName.equals( VALIDATE_RANGE_TAG_NAME ) )
{
- Float minFloat = CompilerUtils.getFloat( ruleAnnotation,
MIN_FLOAT_ATTR, true );
+ Double minFloat = CompilerUtils.getDouble( ruleAnnotation,
MIN_FLOAT_ATTR, true );
if ( minFloat != null )
{
- Float maxFloat = CompilerUtils.getFloat( ruleAnnotation,
MAX_FLOAT_ATTR, true );
+ Double maxFloat = CompilerUtils.getDouble( ruleAnnotation,
MAX_FLOAT_ATTR, true );
assert maxFloat != null; // checker should catch this
rule = new ValidatorRuleRange( minFloat, maxFloat );
}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/AbsolutePathType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/AbsolutePathType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/AbsolutePathType.java
Fri Sep 24 21:51:33 2004
@@ -33,12 +33,14 @@
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue member,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember)
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember)
{
- String path = CompilerUtils.getString(parentAnnotation, PATH_ATTR,
false);
+ AnnotationMirror parentAnnotation = parentAnnotations[
parentAnnotations.length - 1 ];
+ String path = CompilerUtils.getString( parentAnnotation, PATH_ATTR,
false );
+
if ( ! path.startsWith("/") )
{
- addError(member,
"error.absolute-path-required-for-external-redirect");
+ addError( member,
"error.absolute-path-required-for-external-redirect" );
}
return null;
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ActionGrammar.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ActionGrammar.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ActionGrammar.java
Fri Sep 24 21:51:33 2004
@@ -30,29 +30,26 @@
public class ActionGrammar
extends BaseFlowControllerGrammar
{
- private static String[][] MUTUALLY_EXCLUSIVE_ATTRS = { {
ROLES_ALLOWED_ATTR, LOGIN_REQUIRED_ATTR } };
-
-
public ActionGrammar( AnnotationProcessorEnvironment env, Diagnostics
diags,
RuntimeVersionChecker rvc, FlowControllerInfo fcInfo
)
{
super( env, diags, null, rvc, fcInfo );
addMemberType( LOGIN_REQUIRED_ATTR, new AnnotationMemberType( null,
this ) );
- addMemberType( ROLES_ALLOWED_ATTR, new AnnotationMemberType( null,
this ) );
+ addMemberType( ROLES_ALLOWED_ATTR, new RolesAllowedType( this ) );
addMemberType( READONLY_ATTR, new AnnotationMemberType(
VERSION_8_SP2_STRING, this ) );
addMemberType( USE_FORM_BEAN_ATTR,
new WritableFieldType( OBJECT_CLASS_NAME,
USE_FORM_BEAN_ATTR, VERSION_8_SP2_STRING, this ) );
addMemberArrayGrammar( FORWARDS_ATTR, new ForwardGrammar( env, diags,
null, rvc, fcInfo ) );
addMemberArrayGrammar( CATCHES_ATTR, new CatchGrammar( env, diags,
null, rvc, ACTION_TAG_NAME, fcInfo ) );
- addMemberArrayGrammar( VALIDATABLE_PROPERTIES_ATTR, new
ValidationFieldGrammar( env, diags, rvc ) );
+ addMemberArrayGrammar( VALIDATABLE_PROPERTIES_ATTR, new
ValidatablePropertyGrammar( env, diags, rvc ) );
addMemberGrammar( VALIDATION_ERROR_FORWARD_ATTR, new
ActionForwardGrammar() );
}
public String[][] getMutuallyExclusiveAttrs()
{
- return MUTUALLY_EXCLUSIVE_ATTRS;
+ return null;
}
public String[][] getRequiredAttrs()
Added:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ActionOutputGrammar.java
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ActionOutputGrammar.java
Fri Sep 24 21:51:33 2004
@@ -0,0 +1,42 @@
+/*
+ * 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 org.apache.beehive.netui.compiler.grammar;
+
+import org.apache.beehive.netui.compiler.AnnotationGrammar;
+import org.apache.beehive.netui.compiler.Diagnostics;
+import org.apache.beehive.netui.compiler.RuntimeVersionChecker;
+import org.apache.beehive.netui.compiler.AnnotationMemberType;
+import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+import com.sun.mirror.declaration.AnnotationTypeElementDeclaration;
+import com.sun.mirror.declaration.AnnotationValue;
+import com.sun.mirror.declaration.AnnotationMirror;
+import com.sun.mirror.declaration.MemberDeclaration;
+
+import static org.apache.beehive.netui.compiler.JpfLanguageConstants.*;
+
+public class ActionOutputGrammar
+ extends AnnotationGrammar
+{
+ public ActionOutputGrammar( AnnotationProcessorEnvironment env,
Diagnostics diags, RuntimeVersionChecker rvc )
+ {
+ super( env, diags, null, rvc );
+
+ addMemberType( NAME_ATTR, new UniqueValueType( ACTION_OUTPUTS_ATTR,
false, false, null, this ) );
+ addMemberType( TYPE_ATTR, new TypeNameType( null, true, null, this ) );
+ }
+}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/BaseValidationRuleGrammar.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/BaseValidationRuleGrammar.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/BaseValidationRuleGrammar.java
Fri Sep 24 21:51:33 2004
@@ -80,15 +80,16 @@
// If none of these are true, output a warning.
//
assert parentAnnotations.length > 0;
+ AnnotationMirror immediateParent =
parentAnnotations[parentAnnotations.length - 1];
- if ( CompilerUtils.getString( parentAnnotations[0], DISPLAY_NAME_ATTR,
true ) == null
+ if ( CompilerUtils.getString( immediateParent, DISPLAY_NAME_ATTR, true
) == null
&& CompilerUtils.getString( annotation, ARG0_ATTR, true ) == null
&& CompilerUtils.getString( annotation, ARG0_KEY_ATTR, true ) ==
null
&& CompilerUtils.getString( annotation, MESSAGE_KEY_ATTR, true )
== null
&& CompilerUtils.getString( annotation, MESSAGE_ATTR, true ) ==
null )
{
addWarning( annotation, "warning.using-default-display-name",
- CompilerUtils.getDeclaration(
parentAnnotations[0].getAnnotationType() ).getSimpleName() );
+ CompilerUtils.getDeclaration(
immediateParent.getAnnotationType() ).getSimpleName() );
}
return super.onBeginCheck( annotation, parentAnnotations, classMember
);
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/CatchGrammar.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/CatchGrammar.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/CatchGrammar.java
Fri Sep 24 21:51:33 2004
@@ -126,8 +126,8 @@
/**
* Derived classes can plug in here to do additional checks.
*/
- protected void checkMethod( MethodDeclaration methodBeingChecked,
AnnotationValue value, AnnotationMirror parentAnnotation,
- MemberDeclaration classMember )
+ protected void checkMethod( MethodDeclaration methodBeingChecked,
AnnotationValue value,
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
//
// Make sure the current entity (class or action method) doesn't
have two @jpf:catch annotations
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ControllerGrammar.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ControllerGrammar.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ControllerGrammar.java
Fri Sep 24 21:51:33 2004
@@ -31,15 +31,13 @@
public class ControllerGrammar
extends BaseFlowControllerGrammar
{
- private static String[][] MUTUALLY_EXCLUSIVE_ATTRS = { {
ROLES_ALLOWED_ATTR, LOGIN_REQUIRED_ATTR } };
-
public ControllerGrammar( AnnotationProcessorEnvironment env, Diagnostics
diags, RuntimeVersionChecker rvc,
FlowControllerInfo fcInfo )
{
super( env, diags, null, rvc, fcInfo );
addMemberType( LOGIN_REQUIRED_ATTR, new AnnotationMemberType( null,
this ) );
- addMemberType( ROLES_ALLOWED_ATTR, new AnnotationMemberType( null,
this ) );
+ addMemberType( ROLES_ALLOWED_ATTR, new RolesAllowedType( this ) );
addMemberType( READONLY_ATTR, new AnnotationMemberType( null, this ) );
addMemberType( STRUTSMERGE_ATTR, new ValidXmlFileType(
StrutsConfigDocument.type, null, this, fcInfo ) );
addMemberType( VALIDATOR_MERGE_ATTR, new ValidXmlFileType(
FormValidationDocument.type, null, this, fcInfo ) );
@@ -48,13 +46,13 @@
addMemberArrayGrammar( FORWARDS_ATTR, new ForwardGrammar( env, diags,
null, rvc, fcInfo ) );
addMemberArrayGrammar( CATCHES_ATTR, new CatchGrammar( env, diags,
null, rvc, CONTROLLER_TAG_NAME, fcInfo ) );
addMemberArrayGrammar( MESSAGE_RESOURCES_ATTR, new
MessageResourcesGrammar( env, diags, null, rvc, fcInfo ) );
- addMemberArrayGrammar( VALIDATABLE_BEANS_ATTR, new
ValidationBeanGrammar( env, diags, rvc ) );
+ addMemberArrayGrammar( VALIDATABLE_BEANS_ATTR, new
ValidatableBeanGrammar( env, diags, rvc ) );
addMemberArrayGrammar( SIMPLE_ACTIONS_ATTR, new SimpleActionGrammar(
env, diags, rvc, fcInfo ) );
}
public String[][] getMutuallyExclusiveAttrs()
{
- return MUTUALLY_EXCLUSIVE_ATTRS;
+ return null;
}
public String[][] getRequiredAttrs()
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/DelegatingType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/DelegatingType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/DelegatingType.java
Fri Sep 24 21:51:33 2004
@@ -38,8 +38,8 @@
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue member,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
- return _baseType.onCheck( valueDecl, member, parentAnnotation,
classMember );
+ return _baseType.onCheck( valueDecl, member, parentAnnotations,
classMember );
}
}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/EnumType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/EnumType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/EnumType.java
Fri Sep 24 21:51:33 2004
@@ -81,7 +81,7 @@
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue member,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
//
// Check deprecated values.
@@ -106,7 +106,7 @@
PAGEFLOW_RUNTIME_JAR );
}
- return super.onCheck( valueDecl, member, parentAnnotation, classMember
);
+ return super.onCheck( valueDecl, member, parentAnnotations,
classMember );
}
}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ExternalPathOrActionType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ExternalPathOrActionType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ExternalPathOrActionType.java
Fri Sep 24 21:51:33 2004
@@ -34,14 +34,16 @@
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue value,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
+ AnnotationMirror parentAnnotation = parentAnnotations[
parentAnnotations.length - 1 ];
+
// if we have an external redirect just bail
if ( CompilerUtils.getBoolean( parentAnnotation,
EXTERNAL_REDIRECT_ATTR, false ) )
{
return null;
}
- return super.onCheck( valueDecl, value, parentAnnotation, classMember
);
+ return super.onCheck( valueDecl, value, parentAnnotations, classMember
);
}
}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ForwardGrammar.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ForwardGrammar.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ForwardGrammar.java
Fri Sep 24 21:51:33 2004
@@ -92,6 +92,8 @@
addMemberType( EXTERNAL_REDIRECT_ATTR, new AbsolutePathType( null ,
this ) );
addMemberType( NAVIGATE_TO_ATTR, new EnumType( NAVIGATE_TO_VALS,
DEPRECATED_NAVIGATE_TO_VALS, null, this ) );
addMemberType( RESTORE_QUERY_STRING_ATTR, new AnnotationMemberType(
VERSION_9_0_STRING, this ) );
+
+ addMemberArrayGrammar( ACTION_OUTPUTS_ATTR, new ActionOutputGrammar(
env, diags, runtimeVersionChecker ) );
}
protected AnnotationMemberType getNameType()
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ForwardToExternalPathType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ForwardToExternalPathType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ForwardToExternalPathType.java
Fri Sep 24 21:51:33 2004
@@ -40,7 +40,7 @@
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue value,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
String stringValue = ( String ) value.getValue();
@@ -60,6 +60,6 @@
}
}
- return super.onCheck( valueDecl, value, parentAnnotation, classMember
);
+ return super.onCheck( valueDecl, value, parentAnnotations, classMember
);
}
}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/JavaIdentifierType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/JavaIdentifierType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/JavaIdentifierType.java
Fri Sep 24 21:51:33 2004
@@ -33,7 +33,7 @@
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue value,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
String val = ( String ) value.getValue();
Copied:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/LocaleRulesGrammar.java
(from rev 47030,
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidationLocaleRulesGrammar.java)
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidationLocaleRulesGrammar.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/LocaleRulesGrammar.java
Fri Sep 24 21:51:33 2004
@@ -46,7 +46,7 @@
import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.APPLY_TO_UNHANDLED_LOCALES_ATTR;
-public class ValidationLocaleRulesGrammar
+public class LocaleRulesGrammar
extends AnnotationGrammar
{
private static final String[][] REQUIRED_ATTRS =
@@ -60,7 +60,7 @@
{ VARIANT_ATTR, LANGUAGE_ATTR }
};
- public ValidationLocaleRulesGrammar( AnnotationProcessorEnvironment env,
Diagnostics diags,
+ public LocaleRulesGrammar( AnnotationProcessorEnvironment env, Diagnostics
diags,
RuntimeVersionChecker rvc )
{
super( env, diags, VERSION_9_0_STRING, rvc );
@@ -99,12 +99,13 @@
{
public ApplyToUnhandledLocalesType()
{
- super( null, ValidationLocaleRulesGrammar.this );
+ super( null, LocaleRulesGrammar.this );
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue member,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
+ AnnotationMirror parentAnnotation = parentAnnotations[
parentAnnotations.length - 1 ];
String language = CompilerUtils.getString( parentAnnotation,
LANGUAGE_ATTR, true );
if ( ( ( Boolean ) member.getValue() ).booleanValue() )
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MemberFieldType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MemberFieldType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MemberFieldType.java
Fri Sep 24 21:51:33 2004
@@ -43,7 +43,7 @@
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue member,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
String fieldName = ( String ) member.getValue();
Collection< FieldDeclaration > fields =
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MemberMethodType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MemberMethodType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MemberMethodType.java
Fri Sep 24 21:51:33 2004
@@ -44,7 +44,7 @@
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue value,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
//
// Look through all the methods to see if there is one whose name
matches the given value.
@@ -60,7 +60,7 @@
if ( _requiredMethodAnnotation == null
|| CompilerUtils.getAnnotation( method,
_requiredMethodAnnotation ) != null )
{
- checkMethod( method, value, parentAnnotation, classMember
);
+ checkMethod( method, value, parentAnnotations, classMember
);
return method;
}
}
@@ -92,7 +92,7 @@
/**
* Derived classes can plug in here to do additional checks.
*/
- protected void checkMethod( MethodDeclaration method, AnnotationValue
member, AnnotationMirror parentAnnotation,
+ protected void checkMethod( MethodDeclaration method, AnnotationValue
member, AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MessageKeyType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MessageKeyType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MessageKeyType.java
Fri Sep 24 21:51:33 2004
@@ -35,7 +35,7 @@
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue member,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
// We're not currently supporting generation of validation messages.
/*
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MessageResourcesGrammar.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MessageResourcesGrammar.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/MessageResourcesGrammar.java
Fri Sep 24 21:51:33 2004
@@ -17,7 +17,6 @@
*/
package org.apache.beehive.netui.compiler.grammar;
-import org.apache.beehive.netui.compiler.AnnotationGrammar;
import org.apache.beehive.netui.compiler.RuntimeVersionChecker;
import org.apache.beehive.netui.compiler.Diagnostics;
import org.apache.beehive.netui.compiler.CompilerUtils;
@@ -73,8 +72,9 @@
if ( bundleKey.length() == 0 )
{
+ AnnotationMirror immediateParent =
parentAnnotations[parentAnnotations.length - 1];
List< AnnotationMirror > peerAnnotations =
- CompilerUtils.getAnnotationArray( parentAnnotations[0],
MESSAGE_RESOURCES_ATTR, false );
+ CompilerUtils.getAnnotationArray( immediateParent,
MESSAGE_RESOURCES_ATTR, false );
for ( AnnotationMirror peerAnnotation : peerAnnotations )
{
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/RaiseActionGrammar.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/RaiseActionGrammar.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/RaiseActionGrammar.java
Fri Sep 24 21:51:33 2004
@@ -56,7 +56,7 @@
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue member,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
String action = ( String ) member.getValue();
Added:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/RolesAllowedType.java
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/RolesAllowedType.java
Fri Sep 24 21:51:33 2004
@@ -0,0 +1,53 @@
+/*
+ * 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 org.apache.beehive.netui.compiler.grammar;
+
+import org.apache.beehive.netui.compiler.AnnotationMemberType;
+import org.apache.beehive.netui.compiler.AnnotationGrammar;
+import org.apache.beehive.netui.compiler.CompilerUtils;
+import com.sun.mirror.declaration.AnnotationTypeElementDeclaration;
+import com.sun.mirror.declaration.AnnotationValue;
+import com.sun.mirror.declaration.AnnotationMirror;
+import com.sun.mirror.declaration.MemberDeclaration;
+
+
+/**
+ * String type that ensures a peer loginRequired attribute is not set to false.
+ */
+public class RolesAllowedType
+ extends AnnotationMemberType
+{
+ public RolesAllowedType( AnnotationGrammar parentGrammar )
+ {
+ super( null, parentGrammar );
+ }
+
+ public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue member,
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
+ {
+ AnnotationMirror parentAnnotation = parentAnnotations[
parentAnnotations.length - 1 ];
+ Boolean loginRequired = CompilerUtils.getBoolean( parentAnnotation,
LOGIN_REQUIRED_ATTR, true );
+
+ if ( loginRequired != null && ! loginRequired )
+ {
+ addError( member, "error.roles-with-no-login-required" );
+ }
+
+ return null;
+ }
+}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/SimpleActionGrammar.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/SimpleActionGrammar.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/SimpleActionGrammar.java
Fri Sep 24 21:51:33 2004
@@ -37,7 +37,6 @@
{
private static String[][] MUTUALLY_EXCLUSIVE_ATTRS =
{
- { ROLES_ALLOWED_ATTR, LOGIN_REQUIRED_ATTR },
{ REDIRECT_ATTR, EXTERNAL_REDIRECT_ATTR }
};
@@ -50,7 +49,7 @@
super( env, diags, VERSION_9_0_STRING, rvc, fcInfo );
addMemberType( LOGIN_REQUIRED_ATTR, new AnnotationMemberType( null,
this ) );
- addMemberType( ROLES_ALLOWED_ATTR, new AnnotationMemberType( null,
this ) );
+ addMemberType( ROLES_ALLOWED_ATTR, new RolesAllowedType( this ) );
addMemberType( READONLY_ATTR, new AnnotationMemberType(
VERSION_8_SP2_STRING, this ) );
addMemberType( USE_FORM_BEAN_ATTR,
new WritableFieldType( OBJECT_CLASS_NAME,
USE_FORM_BEAN_ATTR, VERSION_8_SP2_STRING, this ) );
@@ -61,7 +60,7 @@
addMemberArrayGrammar( CONDITIONAL_FORWARDS_ATTR,
new SimpleActionForwardGrammar( env, diags,
null, rvc, fcInfo ) );
addMemberArrayGrammar( CATCHES_ATTR, new CatchGrammar( env, diags,
null, rvc, ACTION_TAG_NAME, fcInfo ) );
- addMemberArrayGrammar( VALIDATABLE_PROPERTIES_ATTR, new
ValidationFieldGrammar( env, diags, rvc ) );
+ addMemberArrayGrammar( VALIDATABLE_PROPERTIES_ATTR, new
ValidatablePropertyGrammar( env, diags, rvc ) );
addMemberGrammar( VALIDATION_ERROR_FORWARD_ATTR, new ForwardGrammar(
env, diags, null, rvc, fcInfo ) );
_forwardGrammar = new ForwardGrammar( env, diags, null, rvc, fcInfo );
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/TypeNameType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/TypeNameType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/TypeNameType.java
Fri Sep 24 21:51:33 2004
@@ -47,13 +47,14 @@
* @return the fully-qualified type (ClassDeclaration)
*/
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue value,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
Object val = value.getValue();
if ( val instanceof PrimitiveType )
{
addError( value, "error.primitive-type-not-allowed" );
+ return null;
}
assert val instanceof ReferenceType : val.getClass().getName();
@@ -62,6 +63,7 @@
if ( ! _allowArrayType && type instanceof ArrayType )
{
addError( value, "error.array-type-not-allowed" );
+ return null;
}
if ( _requiredSuperclassName != null )
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/UniqueValueType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/UniqueValueType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/UniqueValueType.java
Fri Sep 24 21:51:33 2004
@@ -53,44 +53,18 @@
* @return a result (any Object) that will be passed back to the parent
checker. May be <code>null</code>.
*/
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue value,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
String val = ( String ) value.getValue();
if ( ! _allowEmptyString && val.length() == 0 )
{
addError( value, "error.empty-string-not-allowed" );
+ return null;
}
-
- // TODO: begin hack workaround for CR173674.
- AnnotationMirror parentElement = CompilerUtils.getAnnotation(
classMember, CONTROLLER_TAG_NAME );
- if ( _memberGroupName.equals( CONDITIONAL_FORWARDS_ATTR ) )
- {
- Collection< AnnotationMirror > simpleActions =
CompilerUtils.getAnnotationArray(
- ( AnnotationMirror ) parentElement, SIMPLE_ACTIONS_ATTR,
false );
-
- for ( AnnotationMirror simpleAction : simpleActions )
- {
- Collection< AnnotationMirror > conditionalForwards =
- CompilerUtils.getAnnotationArray( simpleAction,
CONDITIONAL_FORWARDS_ATTR, false );
-
- for ( AnnotationMirror conditionalForward :
conditionalForwards )
- {
- if ( conditionalForward.equals( parentAnnotation ) )
- {
- parentElement = simpleAction;
- break;
- }
- }
- }
- }
- if ( parentElement == null ) parentElement =
CompilerUtils.getAnnotation( classMember, ACTION_TAG_NAME );
- if ( parentElement == null ) parentElement =
CompilerUtils.getAnnotation( classMember, EXCEPTION_HANDLER_TAG_NAME );
- // TODO: end hack workaround for CR173674. Delete the above lines and
uncomment the line below.
- //Declaration parentElement = parentAnnotation.getParent();
- assert parentElement != null;
- assert parentElement instanceof AnnotationMirror;
+ if ( parentAnnotations.length < 2 ) return null; // invalid parents
-- will be caught elsewhere
+ AnnotationMirror parentElement = parentAnnotations[
parentAnnotations.length - 2 ];
Collection< AnnotationMirror > memberGroup =
CompilerUtils.getAnnotationArray( parentElement,
_memberGroupName, true );
@@ -100,6 +74,7 @@
if ( memberGroup != null )
{
String valueName = valueDecl.getSimpleName();
+ AnnotationMirror parentAnnotation = parentAnnotations[
parentAnnotations.length - 1 ];
checkForDuplicates( value, valueName, parentAnnotation,
classMember, memberGroup, false );
List< AnnotationMirror > additionalAnnsToCheck =
getAdditionalAnnotationsToCheck( classMember );
Copied:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidatableBeanGrammar.java
(from rev 47030,
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidationBeanGrammar.java)
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidationBeanGrammar.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidatableBeanGrammar.java
Fri Sep 24 21:51:33 2004
@@ -26,14 +26,14 @@
import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.VALIDATABLE_PROPERTIES_ATTR;
-public class ValidationBeanGrammar
+public class ValidatableBeanGrammar
extends AnnotationGrammar
{
- public ValidationBeanGrammar( AnnotationProcessorEnvironment env,
Diagnostics diags, RuntimeVersionChecker rvc )
+ public ValidatableBeanGrammar( AnnotationProcessorEnvironment env,
Diagnostics diags, RuntimeVersionChecker rvc )
{
super( env, diags, VERSION_9_0_STRING, rvc );
- addMemberArrayGrammar( VALIDATABLE_PROPERTIES_ATTR, new
ValidationFieldGrammar( env, diags, rvc ) );
+ addMemberArrayGrammar( VALIDATABLE_PROPERTIES_ATTR, new
ValidatablePropertyGrammar( env, diags, rvc ) );
// TYPE_ATTR does not need a custom type
}
}
Copied:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidatablePropertyGrammar.java
(from rev 47030,
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidationFieldGrammar.java)
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidationFieldGrammar.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidatablePropertyGrammar.java
Fri Sep 24 21:51:33 2004
@@ -29,21 +29,21 @@
import static org.apache.beehive.netui.compiler.JpfLanguageConstants.*;
-public class ValidationFieldGrammar
+public class ValidatablePropertyGrammar
extends AnnotationGrammar
{
private static String[][] REQUIRED_ATTRS = { { PROPERTY_NAME_ATTR } };
private static String[][] MUTUALLY_EXCLUSIVE_ATTRS = { {
DISPLAY_NAME_ATTR, DISPLAY_NAME_KEY_ATTR } };
- public ValidationFieldGrammar( AnnotationProcessorEnvironment env,
Diagnostics diags, RuntimeVersionChecker rvc )
+ public ValidatablePropertyGrammar( AnnotationProcessorEnvironment env,
Diagnostics diags, RuntimeVersionChecker rvc )
{
super( env, diags, VERSION_9_0_STRING, rvc );
addMemberType( PROPERTY_NAME_ATTR, new AnnotationMemberType( null,
this ) );
addMemberType( DISPLAY_NAME_ATTR, new AnnotationMemberType( null, this
) );
addMemberType( DISPLAY_NAME_KEY_ATTR, new AnnotationMemberType( null,
this ) );
- addMemberArrayGrammar( LOCALE_RULES_ATTR, new
ValidationLocaleRulesGrammar( env, diags, rvc ) );
+ addMemberArrayGrammar( LOCALE_RULES_ATTR, new LocaleRulesGrammar( env,
diags, rvc ) );
addMemberGrammar( VALIDATE_REQUIRED_ATTR, new
BaseValidationRuleGrammar( env, diags, rvc ) );
addMemberGrammar( VALIDATE_RANGE_ATTR, new ValidateRangeGrammar( env,
diags, rvc ) );
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidateRangeGrammar.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidateRangeGrammar.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidateRangeGrammar.java
Fri Sep 24 21:51:33 2004
@@ -19,7 +19,12 @@
import org.apache.beehive.netui.compiler.RuntimeVersionChecker;
import org.apache.beehive.netui.compiler.Diagnostics;
+import org.apache.beehive.netui.compiler.AnnotationMemberType;
import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+import com.sun.mirror.declaration.AnnotationTypeElementDeclaration;
+import com.sun.mirror.declaration.AnnotationValue;
+import com.sun.mirror.declaration.AnnotationMirror;
+import com.sun.mirror.declaration.MemberDeclaration;
import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.MIN_INT_ATTR;
import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.MIN_FLOAT_ATTR;
@@ -46,7 +51,11 @@
{
super( env, diags, runtimeVersionChecker );
- // No members need custom types/grammars.
+ // The annotation defines these as doubles to avoid forcing us to type
'f' after every initialization value.
+ addMemberType( MIN_FLOAT_ATTR, new FloatType() );
+ addMemberType( MAX_FLOAT_ATTR, new FloatType() );
+
+ // no custom types needed for minInt, maxInt
}
public String[][] getMutuallyExclusiveAttrs()
@@ -62,5 +71,25 @@
public String[][] getAttrDependencies()
{
return ATTR_DEPENDENCIES;
+ }
+
+ private class FloatType
+ extends AnnotationMemberType
+ {
+ public FloatType()
+ {
+ super( ValidateRangeGrammar.this.getRequiredRuntimeVersion(),
ValidateRangeGrammar.this );
+ }
+
+ public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue member,
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
+ {
+ Double d = ( Double ) member.getValue();
+
+ if ( d < -Float.MAX_VALUE ) addError( member, "error.min-float",
-Float.MAX_VALUE );
+ else if ( d > Float.MAX_VALUE ) addError( member,
"error.max-float", Float.MAX_VALUE );
+
+ return null;
+ }
}
}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidateTypeGrammar.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidateTypeGrammar.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/ValidateTypeGrammar.java
Fri Sep 24 21:51:33 2004
@@ -50,7 +50,7 @@
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue value,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
Object val = value.getValue();
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WebappPathOrActionType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WebappPathOrActionType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WebappPathOrActionType.java
Fri Sep 24 21:51:33 2004
@@ -40,7 +40,7 @@
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue value,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
String stringValue = ( String ) value.getValue();
if ( stringValue.endsWith( ACTION_EXTENSION_DOT ) &&
stringValue.indexOf( '/' ) == -1 )
@@ -71,7 +71,7 @@
}
}
- return super.onCheck( valueDecl, value, parentAnnotation, classMember
);
+ return super.onCheck( valueDecl, value, parentAnnotations, classMember
);
}
public static boolean actionExists( String actionName, TypeDeclaration
type, AnnotationMirror annotationToIgnore )
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WebappPathType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WebappPathType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WebappPathType.java
Fri Sep 24 21:51:33 2004
@@ -61,7 +61,7 @@
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue value,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
String filePath = ( String ) value.getValue();
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WritableFieldType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WritableFieldType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WritableFieldType.java
Fri Sep 24 21:51:33 2004
@@ -42,7 +42,7 @@
}
public Object onCheck( AnnotationTypeElementDeclaration valueDecl,
AnnotationValue value,
- AnnotationMirror parentAnnotation,
MemberDeclaration classMember )
+ AnnotationMirror[] parentAnnotations,
MemberDeclaration classMember )
{
//
// Look for the "readOnly" attribute on the current action method or
the current class. If it's there,
@@ -66,6 +66,6 @@
addError( value, "error.readonly-writable-field-value", _attrName
);
}
- return super.onCheck( valueDecl, value, parentAnnotation, classMember
);
+ return super.onCheck( valueDecl, value, parentAnnotations, classMember
);
}
}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/validation/ValidatorRuleRange.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/validation/ValidatorRuleRange.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/validation/ValidatorRuleRange.java
Fri Sep 24 21:51:33 2004
@@ -21,7 +21,7 @@
extends ValidatorRule
implements ValidatorConstants
{
- public ValidatorRuleRange( Float min, Float max )
+ public ValidatorRuleRange( Double min, Double max )
{
super( RULENAME_FLOAT_RANGE );
setVar( VARNAME_MIN, min.toString() );
Modified:
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java
==============================================================================
---
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
Fri Sep 24 21:51:33 2004
@@ -27,6 +27,7 @@
import org.apache.struts.config.ActionConfig;
import org.apache.struts.config.ForwardConfig;
import org.apache.struts.config.FormBeanConfig;
+import org.apache.struts.config.ModuleConfig;
import org.apache.struts.Globals;
import org.apache.struts.upload.MultipartRequestWrapper;
import org.apache.struts.upload.MultipartRequestHandler;
@@ -62,6 +63,7 @@
import org.apache.beehive.netui.pageflow.internal.RequestValues;
import org.apache.beehive.netui.pageflow.internal.InternalUtils;
import org.apache.beehive.netui.pageflow.internal.FlowControllerAction;
+import org.apache.beehive.netui.pageflow.internal.InternalConstants;
import org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils;
import org.apache.beehive.netui.pageflow.scoping.ScopedRequest;
import org.apache.beehive.netui.pageflow.handler.ForwardRedirectHandler;
@@ -200,7 +202,7 @@
if ( _log.isDebugEnabled() )
{
- _log.debug( " Creating new ActionForm instance " + "of
type '" + config.getType() + "'" );
+ _log.debug( " Creating new ActionForm instance " + "of
type '" + config.getType() + '\'' );
}
}
catch ( Exception e )
@@ -464,8 +466,7 @@
//
// Allow weblogic to do a security check on forwarded requests, if
that feature is enabled.
//
- if ( ContextCache.get( servletContext ).shouldDoSecureForwards()
- && RequestValues.isForwardedRequest( request ) )
+ if ( ContextCache.get( servletContext ).shouldDoSecureForwards() &&
RequestValues.isForwardedRequest( request ) )
{
//
// In some situations (namely, in scoped requests under portal),
the initial weblogic
@@ -577,7 +578,7 @@
// EAR where the jpf-struts-config.xml wasn't included because of
a compilation error.
//
String modulePath = PageFlowUtils.getModulePath( request );
- if ( ! FileUtils.osSensitiveEquals( moduleConfig.getPrefix(),
modulePath ) )
+ if ( ! moduleConfig.getPrefix().equals( modulePath ) )
{
if ( _log.isErrorEnabled() )
{
@@ -602,7 +603,7 @@
String requestedType = InternalUtils.decodeURI( request );
requestedType = requestedType.substring(
requestedType.lastIndexOf( '/' ) + 1 );
- if ( ! FileUtils.osSensitiveEquals( requestedType, desiredType
) )
+ if ( ! requestedType.equals( desiredType ) )
{
if ( _log.isDebugEnabled() )
{
@@ -788,45 +789,6 @@
/**
* Used by [EMAIL PROTECTED] PageFlowRequestProcessor#processMapping}.
Its main job is to return
- * [EMAIL PROTECTED] SharedFlowForwardAction} as the type.
- */
- protected static class SharedFlowActionMapping extends ActionMapping
- {
- public SharedFlowActionMapping( String actionPath, String
sharedFlowModulePath )
- {
- setPath( sharedFlowModulePath + actionPath );
- }
-
- public String getType()
- {
- return SharedFlowForwardAction.class.getName();
- }
-
- public boolean getValidate()
- {
- return false;
- }
- }
-
- /**
- * Used by [EMAIL PROTECTED] PageFlowRequestProcessor#processMapping}.
This action simply forwards to the stored action-path,
- * but within the Struts module associated with Global.app.
- */
- public static class SharedFlowForwardAction extends Action
- {
- public ActionForward execute( ActionMapping mapping, ActionForm form,
HttpServletRequest request,
- HttpServletResponse response )
- {
- assert mapping instanceof SharedFlowActionMapping :
mapping.getClass().getName();
- String actionPath = mapping.getPath() +
PageFlowConstants.ACTION_EXTENSION;
- ActionForward retval = new ActionForward( actionPath, false );
- retval.setContextRelative( true );
- return retval;
- }
- }
-
- /**
- * Used by [EMAIL PROTECTED] PageFlowRequestProcessor#processMapping}.
Its main job is to return
* [EMAIL PROTECTED] ExceptionHandledAction} as the type.
*/
protected static class ExceptionHandledActionMapping extends ActionMapping
@@ -870,6 +832,32 @@
}
}
+ /**
+ * Same as makeFullyQualifiedBeanName in StrutsApp.java (compiler-side,
can't share code).
+ */
+ private static String makeFullyQualifiedBeanName( String formType )
+ {
+ return formType.replace( '.', '_' ).replace( '$', '_' );
+ }
+
+ private boolean isCorrectFormType( String formClassName, ActionMapping
mapping )
+ {
+ FormBeanConfig mappingFormBean = moduleConfig.findFormBeanConfig(
mapping.getName() );
+
+ if ( mappingFormBean != null && mappingFormBean.getType().equals(
formClassName ) ) return true;
+
+ //
+ // Check to see if this is a non-ActionForm-derived type, and if so,
if the typename is correct.
+ //
+ if ( mapping instanceof PageFlowActionMapping )
+ {
+ String desiredType = ( ( PageFlowActionMapping ) mapping
).getFormClass();
+ if ( formClassName.equals( desiredType ) ) return true;
+ }
+
+ return false;
+ }
+
public ActionMapping processMapping( HttpServletRequest request,
HttpServletResponse response,
String path )
throws IOException
@@ -878,14 +866,15 @@
// Look for a form-specific action path. This is used when there are
two actions with the same
// name, but different forms (in nesting).
//
- ActionForm returningForm = RequestValues.getReturningForm( request );
+ Object returningForm = InternalUtils.unwrapFormBean(
RequestValues.getReturningForm( request ) );
+ String returningFormClassName = null;
if ( returningForm != null )
{
- String qualifiedPath =
- path + '_' + returningForm.getClass().getName().replace(
'.', '_' ).replace( '$', '_' );
-
+ returningFormClassName = returningForm.getClass().getName();
+ String qualifiedPath = path + '_' + makeFullyQualifiedBeanName(
returningFormClassName );
ActionMapping mapping = ( ActionMapping )
moduleConfig.findActionConfig( qualifiedPath );
+
if ( mapping != null )
{
request.setAttribute( Globals.MAPPING_KEY, mapping );
@@ -893,7 +882,7 @@
if ( _log.isDebugEnabled() )
{
_log.debug( "Found form-specific action mapping " +
qualifiedPath + " for " + path
- + ", form " + returningForm.getClass() );
+ + ", form " + returningFormClassName );
}
return mapping;
@@ -917,20 +906,10 @@
{
String mappingFormName = mapping.getName();
- if ( mappingFormName == null )
+ if ( mappingFormName == null || ! isCorrectFormType(
returningFormClassName, mapping ) )
{
wrongForm = true;
}
- else
- {
- FormBeanConfig mappingFormBean =
moduleConfig.findFormBeanConfig( mapping.getName() );
- String returningFormType =
returningForm.getClass().getName();
-
- if ( mappingFormBean == null || !
mappingFormBean.getType().equals( returningFormType ) )
- {
- wrongForm = true;
- }
- }
}
if ( ! wrongForm )
@@ -1016,7 +995,7 @@
protected ActionMapping processUnresolvedAction( String actionPath, String
originalRequestURI,
HttpServletRequest
request, HttpServletResponse response,
- ActionForm returningForm )
+ Object returningForm )
throws IOException
{
if ( _log.isInfoEnabled() )
@@ -1201,6 +1180,17 @@
else
{
fwdURI = RequestUtils.forwardURL( request, fwd );
+
+ //
+ // First, see if the current module is a Shared Flow
module. If so, we need to translate the local
+ // path so it makes sense (strip off the shared flow
module prefix "/-" and replace it with "/").
+ //
+ ModuleConfig moduleConfig = ( ModuleConfig )
request.getAttribute( Globals.MODULE_KEY );
+ if ( InternalUtils.isSharedFlowModule( moduleConfig )
+ && fwdURI.startsWith( SHARED_FLOW_MODULE_PREFIX ) )
+ {
+ fwdURI = '/' + fwdURI.substring(
SHARED_FLOW_MODULE_PREFIX_LEN );
+ }
}
doForward( fwdURI, request, response );
Modified:
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/annotations/Jpf.java
(original)
+++
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/annotations/Jpf.java
Fri Sep 24 21:51:33 2004
@@ -564,8 +564,8 @@
boolean enabled() default true;
int minInt() default 0;
int maxInt() default -1;
- float minFloat() default 0;
- float maxFloat() default -1;
+ double minFloat() default 0;
+ double maxFloat() default -1;
String message() default "";
String messageKey() default "";
String arg0() default "";
Modified:
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/DefaultServerAdapter.java
==============================================================================
---
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/DefaultServerAdapter.java
(original)
+++
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/DefaultServerAdapter.java
Fri Sep 24 21:51:33 2004
@@ -110,7 +110,7 @@
public ControlBeanContext createControlBeanContext( HttpServletRequest
request, HttpServletResponse response )
{
- return new ServletBeanContext();
+ return new PageFlowBeanContext();
}
public File[] getReloadableClassDirs( ServletContext servletContext )
Modified:
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalConstants.java
==============================================================================
---
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalConstants.java
(original)
+++
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalConstants.java
Fri Sep 24 21:51:33 2004
@@ -35,6 +35,7 @@
public static final String BACKING_CLASS_IMPLICIT_OBJECT = "backing";
public static final String SHARED_FLOW_MODULE_PREFIX = "/-";
+ public static final int SHARED_FLOW_MODULE_PREFIX_LEN =
SHARED_FLOW_MODULE_PREFIX.length();
public static final String SHARED_FLOW_ROOT_MODULE = "/-webappRoot";
public static final String FACES_EXTENSION = "faces";
Added:
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/PageFlowBeanContext.java
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/PageFlowBeanContext.java
Fri Sep 24 21:51:33 2004
@@ -0,0 +1,47 @@
+/*
+ * 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 org.apache.beehive.netui.pageflow.internal;
+
+import org.apache.beehive.controls.runtime.servlet.ServletBeanContext;
+import org.apache.beehive.netui.pageflow.ActionResolver;
+
+import javax.servlet.ServletRequest;
+
+/**
+ * Specialization of the base ServletBeanContext that adds a Page Flow service
provider to offer
+ * initialization for PageFlowController and SharedFlowControler members in a
Control.
+ */
+public class PageFlowBeanContext
+ extends ServletBeanContext
+ implements PageFlowServiceProvider.HasServletRequest
+{
+ public ServletRequest getServletRequest()
+ {
+ return super.getServletRequest();
+ }
+
+ /**
+ * Called by BeanContextSupport superclass during construction and
deserialization to
+ * initialize subclass transient state
+ */
+ public void initialize()
+ {
+ super.initialize();
+ addService( ActionResolver.class,
PageFlowServiceProvider.getProvider() );
+ }
+}
Added:
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/PageFlowServiceProvider.java
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/PageFlowServiceProvider.java
Fri Sep 24 21:51:33 2004
@@ -0,0 +1,77 @@
+/*
+ * 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 org.apache.beehive.netui.pageflow.internal;
+
+import org.apache.beehive.netui.pageflow.PageFlowUtils;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.SharedFlowController;
+import org.apache.beehive.controls.runtime.servlet.ServletBeanContext;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.ServletRequest;
+import java.beans.beancontext.BeanContextServiceProvider;
+import java.beans.beancontext.BeanContextServices;
+import java.util.Iterator;
+
+
+/**
+ * Service provider that offers initialization for PageFlowController and
SharedFlowControler members in a Control.
+ */
+public class PageFlowServiceProvider implements BeanContextServiceProvider
+{
+ private static final PageFlowServiceProvider _provider = new
PageFlowServiceProvider();
+
+ public static final PageFlowServiceProvider getProvider() { return
_provider; }
+
+ private PageFlowServiceProvider()
+ {
+ }
+
+ public static interface HasServletRequest
+ {
+ ServletRequest getServletRequest();
+ }
+
+ public Object getService( BeanContextServices bcs, Object requestor, Class
serviceClass,
+ Object serviceSelector )
+ {
+ //
+ // These services are only available to controls running within the
scope of a PageFlowBeanContext
+ //
+ if ( ! ( bcs instanceof HasServletRequest ) ) return null;
+
+ if ( PageFlowController.class.equals( serviceClass ) )
+ {
+ ServletRequest request = ( ( HasServletRequest ) bcs
).getServletRequest();
+ if ( ! ( request instanceof HttpServletRequest ) ) return null;
+ return PageFlowUtils.getCurrentPageFlow( ( HttpServletRequest )
request );
+ }
+ // TODO: add Shared Flow initialization
+
+ return null;
+ }
+
+ public void releaseService( BeanContextServices bcs, Object requestor,
Object service )
+ {
+ }
+
+ public Iterator getCurrentServiceSelectors( BeanContextServices bcs, Class
serviceClass )
+ {
+ return null;
+ }
+}
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/AnyBeanReturnController.jpf
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/AnyBeanReturnController.jpf
Fri Sep 24 21:51:33 2004
@@ -0,0 +1,14 @@
+package pageFlowCore.anyBeanReturn;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
[EMAIL PROTECTED](
+ simpleActions={
+ @Jpf.SimpleAction(name="begin", path="index.jsp"),
+ @Jpf.SimpleAction(name="goNested", path="nested/NestedController.jpf")
+ }
+)
+public class AnyBeanReturnController extends PageFlowController
+{
+}
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/SharedFlow.jpfs
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/SharedFlow.jpfs
Fri Sep 24 21:51:33 2004
@@ -0,0 +1,32 @@
+package pageFlowCore.anyBeanReturn;
+
+import javax.servlet.http.HttpSession;
+import org.apache.beehive.netui.pageflow.SharedFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+
[EMAIL PROTECTED]
+public class SharedFlow extends SharedFlowController
+{
+ @Jpf.Action(
+ forwards={
+ @Jpf.Forward( name="resultPage", path="result.jsp" )
+ }
+ )
+ protected Forward sharedFlowAction( String form )
+ {
+ return new Forward( "resultPage", "result", form );
+ }
+
+ @Jpf.Action(
+ forwards={
+ @Jpf.Forward( name="resultPage", path="result.jsp" )
+ }
+ )
+ protected Forward sharedFlowAction()
+ {
+ throw new IllegalStateException( "should never get here" );
+ }
+
+}
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/index.jsp
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/index.jsp
Fri Sep 24 21:51:33 2004
@@ -0,0 +1,17 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib prefix="netui" uri="http://beehive.apache.org/netui/tags-html-1.0"%>
+<%@ taglib prefix="netui-data"
uri="http://beehive.apache.org/netui/tags-databinding-1.0"%>
+<%@ taglib prefix="netui-template"
uri="http://beehive.apache.org/netui/tags-template-1.0"%>
+
+
+<netui:html>
+ <head>
+ <netui:base/>
+ </head>
+ <netui:body>
+
+ <netui:anchor action="goNested">goNested</netui:anchor>
+ </netui:body>
+</netui:html>
+
+
\ No newline at end of file
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/nested/NestedController.jpf
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/nested/NestedController.jpf
Fri Sep 24 21:51:33 2004
@@ -0,0 +1,27 @@
+package pageFlowCore.anyBeanReturn.nested;
+
+import javax.servlet.http.HttpSession;
+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,
+ simpleActions={
+ @Jpf.SimpleAction(name="begin", path="index.jsp")
+ }
+)
+public class NestedController extends PageFlowController
+{
+ @Jpf.Action(
+ forwards={
+ @Jpf.Forward(name="done", returnAction="sharedFlowAction",
outputFormBeanType=String.class)
+ }
+ )
+ protected Forward done()
+ {
+ return new Forward( "done", "Hello from Nested" );
+ }
+
+}
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/nested/index.jsp
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/nested/index.jsp
Fri Sep 24 21:51:33 2004
@@ -0,0 +1,20 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib prefix="netui" uri="http://beehive.apache.org/netui/tags-html-1.0"%>
+<%@ taglib prefix="netui-data"
uri="http://beehive.apache.org/netui/tags-databinding-1.0"%>
+<%@ taglib prefix="netui-template"
uri="http://beehive.apache.org/netui/tags-template-1.0"%>
+
+
+<netui:html>
+ <head>
+ <netui:base/>
+ </head>
+ <netui:body>
+
+
+<netui:anchor action="done">done</netui:anchor>
+
+
+ </netui:body>
+</netui:html>
+
+
\ No newline at end of file
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/result.jsp
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/anyBeanReturn/result.jsp
Fri Sep 24 21:51:33 2004
@@ -0,0 +1,11 @@
+<[EMAIL PROTECTED] contentType="text/html;charset=UTF-8" language="java"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0"
prefix="netui-data"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+
+<netui-data:declarePageInput name="result" type="java.lang.String"/><html>
+ <head>
+ </head>
+ <body>
+ The form (String) was: <b><netui:span value="${pageInput.result}"/></b>
+ </body>
+</html>
\ No newline at end of file
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
Fri Sep 24 21:51:33 2004
@@ -231,6 +231,21 @@
</features>
</test>
<test>
+ <name>AnyBeanReturn</name>
+ <description>Tests returning a non-ActionForm-derived bean from a
nested page flow to an overloaded action in a shared flow.</description>
+ <webapp>coreWeb</webapp>
+ <categories>
+ <category>bvt</category>
+ <category>corePageFlow</category>
+ </categories>
+ <features>
+ <feature>PageFlow</feature>
+ <feature>Any Bean</feature>
+ <feature>Overloaded Actions</feature>
+ <feature>SharedFlow</feature>
+ </features>
+ </test>
+ <test>
<name>AppState</name>
<description>Binding to the global app state, both directly on a page
and through the page flow.</description>
<webapp>coreWeb</webapp>
Added:
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/AnyBeanReturn.xml
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/AnyBeanReturn.xml
Fri Sep 24 21:51:33 2004
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession
xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session">
+ <ses:sessionName>AnyBeanReturn</ses:sessionName>
+ <ses:tester>rich</ses:tester>
+ <ses:startDate>24 Sep 2004, 06:49:05.564 PM MDT</ses:startDate>
+ <ses:description>Tests returning a non-ActionForm-derived bean from a
nested page flow to an overloaded action in a shared flow.</ses:description>
+ <ses:tests>
+ <ses:test>
+ <ses:testNumber>1</ses:testNumber>
+ <ses:request>
+ <ses:protocol>HTTP</ses:protocol>
+ <ses:protocolVersion>1.1</ses:protocolVersion>
+ <ses:host>localhost</ses:host>
+ <ses:port>8080</ses:port>
+
<ses:uri>/coreWeb/pageFlowCore/anyBeanReturn/AnyBeanReturnController.jpf</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>03575C3DA8BBAC2C3B781E8C29051BF1</ses:value>
+ </ses:cookie>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+
<ses:value>BU9uanbEhLf1tmGo8kVyuEivy4SH20tFDuOh1I5LOwPTLKon7W01!-1711921832</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+
<ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-charset</ses:name>
+ <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-encoding</ses:name>
+ <ses:value>gzip,deflate</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-language</ses:name>
+ <ses:value>en-us,en;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>keep-alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+ <ses:value>JSESSIONID=03575C3DA8BBAC2C3B781E8C29051BF1;
JSESSIONID=BU9uanbEhLf1tmGo8kVyuEivy4SH20tFDuOh1I5LOwPTLKon7W01!-1711921832</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>keep-alive</ses:name>
+ <ses:value>300</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.7) Gecko/20040803 Firefox/0.9.3</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<!DOCTYPE HTML PUBLIC "//W3C//DTD HTML
4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+ <base
href="http://localhost:8080/coreWeb/pageFlowCore/anyBeanReturn/index.jsp">
+ </head>
+ <body>
+
+ <a href="/coreWeb/pageFlowCore/anyBeanReturn/goNested.do">goNested</a>
+ </body>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ <ses:test>
+ <ses:testNumber>2</ses:testNumber>
+ <ses:request>
+ <ses:protocol>HTTP</ses:protocol>
+ <ses:protocolVersion>1.1</ses:protocolVersion>
+ <ses:host>localhost</ses:host>
+ <ses:port>8080</ses:port>
+ <ses:uri>/coreWeb/pageFlowCore/anyBeanReturn/goNested.do</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>03575C3DA8BBAC2C3B781E8C29051BF1</ses:value>
+ </ses:cookie>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+
<ses:value>BU9uanbEhLf1tmGo8kVyuEivy4SH20tFDuOh1I5LOwPTLKon7W01!-1711921832</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+
<ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-charset</ses:name>
+ <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-encoding</ses:name>
+ <ses:value>gzip,deflate</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-language</ses:name>
+ <ses:value>en-us,en;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>keep-alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+ <ses:value>JSESSIONID=03575C3DA8BBAC2C3B781E8C29051BF1;
JSESSIONID=BU9uanbEhLf1tmGo8kVyuEivy4SH20tFDuOh1I5LOwPTLKon7W01!-1711921832</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>keep-alive</ses:name>
+ <ses:value>300</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+
<ses:value>http://localhost:8080/coreWeb/pageFlowCore/anyBeanReturn/AnyBeanReturnController.jpf</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.7) Gecko/20040803 Firefox/0.9.3</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<!DOCTYPE HTML PUBLIC "//W3C//DTD HTML
4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+ <base
href="http://localhost:8080/coreWeb/pageFlowCore/anyBeanReturn/nested/index.jsp">
+ </head>
+ <body>
+
+
+<a href="/coreWeb/pageFlowCore/anyBeanReturn/nested/done.do">done</a>
+
+
+ </body>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ <ses:test>
+ <ses:testNumber>3</ses:testNumber>
+ <ses:request>
+ <ses:protocol>HTTP</ses:protocol>
+ <ses:protocolVersion>1.1</ses:protocolVersion>
+ <ses:host>localhost</ses:host>
+ <ses:port>8080</ses:port>
+
<ses:uri>/coreWeb/pageFlowCore/anyBeanReturn/nested/done.do</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>03575C3DA8BBAC2C3B781E8C29051BF1</ses:value>
+ </ses:cookie>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+
<ses:value>BU9uanbEhLf1tmGo8kVyuEivy4SH20tFDuOh1I5LOwPTLKon7W01!-1711921832</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+
<ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-charset</ses:name>
+ <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-encoding</ses:name>
+ <ses:value>gzip,deflate</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-language</ses:name>
+ <ses:value>en-us,en;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>keep-alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+ <ses:value>JSESSIONID=03575C3DA8BBAC2C3B781E8C29051BF1;
JSESSIONID=BU9uanbEhLf1tmGo8kVyuEivy4SH20tFDuOh1I5LOwPTLKon7W01!-1711921832</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>keep-alive</ses:name>
+ <ses:value>300</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+
<ses:value>http://localhost:8080/coreWeb/pageFlowCore/anyBeanReturn/goNested.do</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.7) Gecko/20040803 Firefox/0.9.3</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<html>
+ <head>
+ </head>
+ <body>
+ The form (String) was: <b><span>Hello from Nested</span></b>
+ </body>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ </ses:tests>
+ <ses:endDate>24 Sep 2004, 06:49:15.999 PM MDT</ses:endDate>
+ <ses:testCount>3</ses:testCount>
+</ses:recorderSession>