You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by mr...@apache.org on 2005/09/14 18:21:05 UTC
svn commit: r280879 [13/16] - in /struts/sandbox/trunk/ti: ./
jars/compiler-apt/ jars/compiler-apt/src/ jars/compiler-apt/src/java/
jars/compiler-apt/src/java/org/ jars/compiler-apt/src/java/org/apache/
jars/compiler-apt/src/java/org/apache/ti/ jars/co...
Added: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/AnnotationType.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/AnnotationType.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/AnnotationType.java (added)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/AnnotationType.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,26 @@
+/*
+ * 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.ti.compiler.internal.typesystem.type;
+
+import org.apache.ti.compiler.internal.typesystem.declaration.AnnotationTypeDeclaration;
+
+public interface AnnotationType
+ extends InterfaceType {
+
+ AnnotationTypeDeclaration getAnnotationTypeDeclaration();
+}
Added: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/ArrayType.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/ArrayType.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/ArrayType.java (added)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/ArrayType.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,24 @@
+/*
+ * 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.ti.compiler.internal.typesystem.type;
+
+public interface ArrayType
+ extends ReferenceType {
+
+ TypeInstance getComponentType();
+}
Added: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/ClassType.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/ClassType.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/ClassType.java (added)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/ClassType.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,28 @@
+/*
+ * 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.ti.compiler.internal.typesystem.type;
+
+import org.apache.ti.compiler.internal.typesystem.declaration.ClassDeclaration;
+
+public interface ClassType
+ extends DeclaredType {
+
+ ClassDeclaration getClassTypeDeclaration();
+
+ ClassType getSuperclass();
+}
Added: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/DeclaredType.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/DeclaredType.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/DeclaredType.java (added)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/DeclaredType.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,32 @@
+/*
+ * 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.ti.compiler.internal.typesystem.type;
+
+import org.apache.ti.compiler.internal.typesystem.declaration.TypeDeclaration;
+
+public interface DeclaredType
+ extends ReferenceType {
+
+ TypeDeclaration getDeclaration();
+
+ DeclaredType getContainingType();
+
+ //TypeInstance[] getActualTypeArguments();
+
+ InterfaceType[] getSuperinterfaces();
+}
Added: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/InterfaceType.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/InterfaceType.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/InterfaceType.java (added)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/InterfaceType.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,26 @@
+/*
+ * 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.ti.compiler.internal.typesystem.type;
+
+import org.apache.ti.compiler.internal.typesystem.declaration.InterfaceDeclaration;
+
+public interface InterfaceType
+ extends DeclaredType {
+
+ InterfaceDeclaration getInterfaceTypeDeclaration();
+}
Added: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/PrimitiveType.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/PrimitiveType.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/PrimitiveType.java (added)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/PrimitiveType.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,98 @@
+/*
+ * 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.ti.compiler.internal.typesystem.type;
+
+public interface PrimitiveType
+ extends TypeInstance {
+
+ Kind getKind();
+
+ public class Kind {
+
+ public static final int INT_BOOLEAN = 0;
+ public static final int INT_BYTE = 1;
+ public static final int INT_SHORT = 2;
+ public static final int INT_INT = 3;
+ public static final int INT_LONG = 4;
+ public static final int INT_CHAR = 5;
+ public static final int INT_FLOAT = 6;
+ public static final int INT_DOUBLE = 7;
+
+ public static final Kind BOOLEAN = new Kind(INT_BOOLEAN);
+ public static final Kind BYTE = new Kind(INT_BYTE);
+ public static final Kind SHORT = new Kind(INT_SHORT);
+ public static final Kind INT = new Kind(INT_INT);
+ public static final Kind LONG = new Kind(INT_LONG);
+ public static final Kind CHAR = new Kind(INT_CHAR);
+ public static final Kind FLOAT = new Kind(INT_FLOAT);
+ public static final Kind DOUBLE = new Kind(INT_DOUBLE);
+
+ private int _val;
+
+ private Kind(int val) {
+ _val = val;
+ }
+
+ public String toString() {
+ switch (_val) {
+ case INT_BOOLEAN:
+ return "boolean";
+ case INT_BYTE:
+ return "byte";
+ case INT_SHORT:
+ return "short";
+ case INT_INT:
+ return "int";
+ case INT_LONG:
+ return "long";
+ case INT_CHAR:
+ return "char";
+ case INT_FLOAT:
+ return "float";
+ case INT_DOUBLE:
+ return "double";
+ }
+
+ assert false : _val;
+ return "<unknown Kind>";
+ }
+
+ public boolean equals(Object o) {
+ if (o == null) return false;
+ if (o == this) return true;
+ if (! (o instanceof Kind)) return false;
+ return ((Kind) o)._val == _val;
+ }
+
+ public final int asInt() {
+ return _val;
+ }
+
+ public final int hashCode() {
+ return _val;
+ }
+
+ protected Kind() {
+ _val = -1;
+ }
+
+ protected void setVal(int val) {
+ _val = val;
+ }
+ }
+}
Added: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/ReferenceType.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/ReferenceType.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/ReferenceType.java (added)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/ReferenceType.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,23 @@
+/*
+ * 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.ti.compiler.internal.typesystem.type;
+
+public interface ReferenceType
+ extends TypeInstance {
+
+}
Added: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/TypeInstance.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/TypeInstance.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/TypeInstance.java (added)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/TypeInstance.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,27 @@
+/*
+ * 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.ti.compiler.internal.typesystem.type;
+
+public interface TypeInstance {
+
+ String toString();
+
+ boolean equals(Object o);
+
+ //void accept( TypeVisitor typeVisitor );
+}
Added: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/TypeVariable.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/TypeVariable.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/TypeVariable.java (added)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/TypeVariable.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,26 @@
+/*
+ * 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.ti.compiler.internal.typesystem.type;
+
+import org.apache.ti.compiler.internal.typesystem.declaration.TypeParameterDeclaration;
+
+public interface TypeVariable
+ extends ReferenceType {
+
+ TypeParameterDeclaration getDeclaration();
+}
Added: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/VoidType.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/VoidType.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/VoidType.java (added)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/type/VoidType.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,23 @@
+/*
+ * 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.ti.compiler.internal.typesystem.type;
+
+public interface VoidType
+ extends TypeInstance {
+
+}
Added: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/util/SourcePosition.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/util/SourcePosition.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/util/SourcePosition.java (added)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/compiler/internal/typesystem/util/SourcePosition.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,29 @@
+/*
+ * 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.ti.compiler.internal.typesystem.util;
+
+import java.io.File;
+
+public interface SourcePosition {
+
+ File file();
+
+ int line();
+
+ int column();
+}
Modified: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/FlowController.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/FlowController.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/FlowController.java (original)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/FlowController.java Wed Sep 14 09:20:05 2005
@@ -819,7 +819,7 @@
* method that should not normally be called directly.
*/
public Object getFormBean(PageFlowAction action) {
- String formMember = action.getFormMember();
+ String formMember = action.getFormBeanMember();
try {
if (formMember != null) {
Modified: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowActionServlet.java.disabled
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowActionServlet.java.disabled?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowActionServlet.java.disabled (original)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowActionServlet.java.disabled Wed Sep 14 09:20:05 2005
@@ -250,10 +250,6 @@
throw new ServletException( e );
}
}
- else
- {
- sharedFlowToTry = FlowControllerFactory.getGlobalApp( request, response, getServletContext() );
- }
//
// If we couldn't find an appropriate module, try raising the action on the (deprecated) Global.app.
@@ -524,10 +520,6 @@
{
throw new ServletException( e );
}
- }
- else
- {
- sharedFlowToTry = FlowControllerFactory.getGlobalApp( request, response, getServletContext() );
}
//
Modified: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowConstants.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowConstants.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowConstants.java (original)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowConstants.java Wed Sep 14 09:20:05 2005
@@ -53,7 +53,7 @@
/**
* The default webapp-relative directory for Struts module configuration files generated by the Page Flow compiler.
*/
- public static final String PAGEFLOW_MODULE_CONFIG_GEN_DIR = "_pageflow-config";
+ public static final String PAGEFLOW_MODULE_CONFIG_GEN_DIR = "_pageflow";
/**
* The name of an automatically-generated forward that can be used from <i>any</i> Page Flow action, in situations
Modified: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowController.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowController.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowController.java (original)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowController.java Wed Sep 14 09:20:05 2005
@@ -32,7 +32,6 @@
import org.apache.ti.util.internal.cache.ClassLevelCache;
import org.apache.ti.util.logging.Logger;
-import javax.servlet.http.HttpSessionBindingEvent;
import java.lang.reflect.Field;
import java.util.Map;
@@ -681,6 +680,7 @@
* Callback when this object is removed from the user session. Causes {@link #onDestroy} to be called. This is a
* framework-invoked method that should not normally be called indirectly.
*/
+ /* TODO: re-enable this, through an abstraction
public void valueUnbound(HttpSessionBindingEvent event) {
//
// Unless this pageflow has been pushed onto the nesting stack, do the onDestroy() callback.
@@ -689,6 +689,7 @@
super.valueUnbound(event);
}
}
+ */
void setIsOnNestingStack(boolean isOnNestingStack) {
_isOnNestingStack = isOnNestingStack;
Modified: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowManagedObject.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowManagedObject.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowManagedObject.java (original)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/PageFlowManagedObject.java Wed Sep 14 09:20:05 2005
@@ -22,7 +22,6 @@
import org.apache.ti.pageflow.xwork.PageFlowActionContext;
import org.apache.ti.util.logging.Logger;
-import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;
import java.io.Serializable;
import java.lang.reflect.Field;
@@ -32,7 +31,7 @@
* Base class for Page Flow managed objects (like page flows and JavaServer Faces backing beans).
*/
public abstract class PageFlowManagedObject
- implements Serializable, HttpSessionBindingListener {
+ implements Serializable /* TODO: re-enable through an abstraction: , HttpSessionBindingListener */ {
private static final long serialVersionUID = 1;
private static final Logger _log = Logger.getInstance(PageFlowManagedObject.class);
@@ -91,22 +90,26 @@
/**
* Callback when this object is added to the user session.
*/
+ /* TODO: re-enable this through an abstraction
public void valueBound(HttpSessionBindingEvent event) {
}
+ */
/**
* Callback when this object is removed from the user session. Causes {@link #onDestroy} to be called. This is a
* framework-invoked method that should not normally be called indirectly.
*/
+ /* TODO: re-enable this through an abstraction
public void valueUnbound(HttpSessionBindingEvent event) {
if (Handlers.get().getStorageHandler().allowBindingEvent(event)) {
destroy();
}
}
+ */
- /**
- * Remove this instance from the session.
- */
+ /**
+ * Remove this instance from the session.
+ */
protected abstract void removeFromSession();
/**
Modified: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/AnnotationReader.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/AnnotationReader.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/AnnotationReader.java (original)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/AnnotationReader.java Wed Sep 14 09:20:05 2005
@@ -25,6 +25,7 @@
import org.apache.ti.schema.annotations.ProcessedAnnotation;
import org.apache.ti.schema.annotations.ProcessedAnnotationsDocument;
import org.apache.ti.util.SourceResolver;
+import org.apache.ti.util.internal.InternalStringBuilder;
import org.apache.ti.util.logging.Logger;
import org.apache.xmlbeans.XmlException;
@@ -44,9 +45,17 @@
private ProcessedAnnotationsDocument.ProcessedAnnotations _annotations;
public AnnotationReader(Class type, SourceResolver sourceResolver) {
- String annotationsXml =
- PageFlowConstants.PAGEFLOW_MODULE_CONFIG_GEN_DIR + "/jpf-annotations-"
- + type.getName().replace('.', '-') + ".xml";
+ String typeName = type.getName();
+ InternalStringBuilder buf = new InternalStringBuilder(PageFlowConstants.PAGEFLOW_MODULE_CONFIG_GEN_DIR);
+ buf.append('/');
+ int lastDot = typeName.lastIndexOf('.');
+ if (lastDot != -1) {
+ buf.append(typeName.substring(0, lastDot + 1).replace('.', '/'));
+ }
+ buf.append("annotations-");
+ buf.append(typeName.substring(lastDot + 1));
+ buf.append(".xml");
+ String annotationsXml = buf.toString();
try {
WebContext webContext = PageFlowActionContext.get().getWebContext();
Modified: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/DefaultModuleRegistrationHandler.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/DefaultModuleRegistrationHandler.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/DefaultModuleRegistrationHandler.java (original)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/DefaultModuleRegistrationHandler.java Wed Sep 14 09:20:05 2005
@@ -25,6 +25,7 @@
import org.apache.ti.pageflow.ModuleConfig;
import org.apache.ti.pageflow.ModuleConfigLocator;
import org.apache.ti.pageflow.PageFlowEventReporter;
+import org.apache.ti.pageflow.PageFlowConstants;
import org.apache.ti.pageflow.handler.Handler;
import org.apache.ti.pageflow.handler.HandlerConfig;
import org.apache.ti.pageflow.handler.ModuleRegistrationHandler;
@@ -71,7 +72,7 @@
public String getModuleResourcePath(String moduleName) {
assert moduleName.startsWith("/") : moduleName;
- return "_pageflow-config" + moduleName + "/xwork.xml";
+ return PageFlowConstants.PAGEFLOW_MODULE_CONFIG_GEN_DIR + moduleName + "/pageflow.xml";
}
}
Modified: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/InternalExpressionUtils.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/InternalExpressionUtils.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/InternalExpressionUtils.java (original)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/InternalExpressionUtils.java Wed Sep 14 09:20:05 2005
@@ -94,7 +94,7 @@
return buildInitParamMap();
*/
// chain up the request > session (if exists) > application
- // note, this should handle pageFlow, globalApp, sharedFlow, and bundle if they're in the request
+ // note, this should handle pageFlow, sharedFlow, and bundle if they're in the request
// attribute map already
else {
Object val;
Modified: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/ProcessPopulate.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/ProcessPopulate.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/ProcessPopulate.java (original)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/internal/ProcessPopulate.java Wed Sep 14 09:20:05 2005
@@ -55,7 +55,6 @@
// these must be kept in sync with the context names specified in the scripting languages
private static final String PAGE_FLOW_CONTEXT = "pageFlow";
- private static final String GLOBAL_APP_CONTEXT = "globalApp";
private static final String WLW_TAG_HANDLER_PREFIX = "wlw-";
private static final String WLW_TAG_HANDLER_SUFFIX = ":";
@@ -217,11 +216,11 @@
// common case, make this fast
if (!requestHasPopulated)
ee.update(expr, updateValue, variableResolver, true);
- // must check the expression to make sure pageFlow. and globalApp. don't get executed more than once
+ // must check the expression to make sure pageFlow. doesn't get executed more than once
else {
Expression pe = ee.parseExpression(expr);
String contextName = pe.getContext();
- if (!contextName.equals(PAGE_FLOW_CONTEXT) && !contextName.equals(GLOBAL_APP_CONTEXT))
+ if (!contextName.equals(PAGE_FLOW_CONTEXT))
ee.update(expr, updateValue, variableResolver, true);
}
}
Modified: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/xwork/PageFlowAction.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/xwork/PageFlowAction.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/xwork/PageFlowAction.java (original)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/xwork/PageFlowAction.java Wed Sep 14 09:20:05 2005
@@ -59,12 +59,12 @@
private static final long serialVersionUID = 1;
private static final Logger _log = Logger.getInstance(PageFlowAction.class);
- private String _unqualifiedActionPath;
+ private String _unqualifiedName;
private boolean _loginRequired = false;
private boolean _preventDoubleSubmit = false;
private boolean _simpleAction = false;
private boolean _isOverloaded = false;
- private String _formMember;
+ private String _formBeanMember;
private String _formBeanType;
private String _formBeanAttribute; // the attribute under which the form bean will be stored
private boolean _readonly = false;
@@ -73,12 +73,12 @@
private String _defaultForward;
private String _validationErrorForward;
- public String getUnqualifiedActionPath() {
- return _unqualifiedActionPath;
+ public String getUnqualifiedName() {
+ return _unqualifiedName;
}
- public final void setUnqualifiedActionPath(String unqualifiedActionPath) {
- _unqualifiedActionPath = unqualifiedActionPath;
+ public final void setUnqualifiedName(String unqualifiedName) {
+ _unqualifiedName = unqualifiedName;
}
public final boolean isLoginRequired() {
@@ -113,12 +113,12 @@
_isOverloaded = overloaded;
}
- public String getFormMember() {
- return _formMember;
+ public String getFormBeanMember() {
+ return _formBeanMember;
}
- public void setFormMember(String formMember) {
- _formMember = formMember;
+ public void setFormBeanMember(String formBeanMember) {
+ _formBeanMember = formBeanMember;
}
public String getFormBeanType() {
Modified: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/xwork/PageFlowResult.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/xwork/PageFlowResult.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/xwork/PageFlowResult.java (original)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/pageflow/xwork/PageFlowResult.java Wed Sep 14 09:20:05 2005
@@ -57,7 +57,6 @@
private String _name;
private String _location;
- private boolean _isNestedReturn = false;
private boolean _isReturnToPage = false;
private boolean _isReturnToAction = false;
private String _outputFormBeanType;
@@ -90,14 +89,6 @@
public void setLocation(String location) {
_location = location;
- }
-
- public boolean isNestedReturn() {
- return _isNestedReturn;
- }
-
- public void setNestedReturn(boolean nestedReturn) {
- _isNestedReturn = nestedReturn;
}
public boolean isReturnToPage() {
Modified: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/processor/chain/pageflow/ChooseFormBean.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/processor/chain/pageflow/ChooseFormBean.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/processor/chain/pageflow/ChooseFormBean.java (original)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/processor/chain/pageflow/ChooseFormBean.java Wed Sep 14 09:20:05 2005
@@ -164,7 +164,7 @@
private Field getPageFlowScopedFormMember(PageFlowAction action)
{
- String formMember = action.getFormMember();
+ String formMember = action.getFormBeanMember();
try
{
Modified: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/script/el/NetUIReadVariableResolver.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/script/el/NetUIReadVariableResolver.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/script/el/NetUIReadVariableResolver.java (original)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/script/el/NetUIReadVariableResolver.java Wed Sep 14 09:20:05 2005
@@ -52,6 +52,6 @@
}
public String[] getAvailableVariables() {
- return new String[]{"actionForm", "pageFlow", "globalApp", "request", "session", "application", "pageContext", "bundle", "container", "url", "pageInput"};
+ return new String[]{"actionForm", "pageFlow", "request", "session", "application", "pageContext", "bundle", "container", "url", "pageInput"};
}
}
Modified: struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/script/el/NetUIUpdateVariableResolver.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/script/el/NetUIUpdateVariableResolver.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/script/el/NetUIUpdateVariableResolver.java (original)
+++ struts/sandbox/trunk/ti/jars/core/src/java/org/apache/ti/script/el/NetUIUpdateVariableResolver.java Wed Sep 14 09:20:05 2005
@@ -76,9 +76,9 @@
public String[] getAvailableVariables() {
if (_requestParameter)
- return new String[]{"actionForm", "pageFlow", "globalApp"};
+ return new String[]{"actionForm", "pageFlow"};
else
- return new String[]{"actionForm", "pageFlow", "globalApp", "request", "session", "application"};
+ return new String[]{"actionForm", "pageFlow", "request", "session", "application"};
}
private static final Map/*<String, SharedFlowController>*/ getSharedFlow() {
Modified: struts/sandbox/trunk/ti/maven.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/maven.xml?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/maven.xml (original)
+++ struts/sandbox/trunk/ti/maven.xml Wed Sep 14 09:20:05 2005
@@ -54,7 +54,48 @@
</echo>
</goal>
+
+ <goal name="build-pageflows-apt">
+ <echo>build-pageflows-apt for ${maven.war.webapp.dir}</echo>
+
+ <property name="webinf.classes.dir" location="${maven.war.webapp.dir}/WEB-INF/classes"/>
+
+ <path id="webapp.classpath">
+ <pathelement location="${webinf.classes.dir}"/>
+ <fileset dir="${maven.war.webapp.dir}/WEB-INF/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <taskdef
+ name="build-pageflows-apt-task"
+ classname="org.apache.ti.compiler.apt.PageFlowAptTask"
+ classpathref="maven.dependency.classpath"/>
+
+ <build-pageflows-apt-task
+ srcdir="${maven.src.dir}/java"
+ destdir="${webinf.classes.dir}"
+ webcontentdir="${maven.war.src}"
+ classpathref="webapp.classpath"
+ factorypathref="maven.dependency.classpath"/>
+ </goal>
+ <goal name="build-pageflows-xdoclet">
+ <echo>build-pageflows-xdoclet for ${maven.war.webapp.dir}</echo>
+
+ <taskdef
+ name="build-pageflows-xdoclet-task"
+ classname="org.apache.ti.compiler.xdoclet.PageFlowDocletTask"
+ classpathRef="maven.dependency.classpath"/>
+
+ <build-pageflows-xdoclet-task
+ excludedtags="@version,@author,@todo"
+ force="true"
+ srcdir="${maven.src.dir}/java"
+ destdir="${maven.war.webapp.dir}/WEB-INF/classes"
+ webcontentdir="${maven.war.src}"/>
+ </goal>
+
<goal name="dist">
<attainGoal name="jar-all"/>
<attainGoal name="war-all"/>
Modified: struts/sandbox/trunk/ti/project.properties
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/project.properties?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/project.properties (original)
+++ struts/sandbox/trunk/ti/project.properties Wed Sep 14 09:20:05 2005
@@ -32,3 +32,7 @@
maven.multiproject.jar.includes=jars/*/project.xml
maven.multiproject.war.includes=wars/*/project.xml
maven.multiproject.war.excludes=wars/example/project.xml
+
+# Sun's tools.jar
+maven.jar.override=true
+maven.jar.tools=${tools.jar}
Modified: struts/sandbox/trunk/ti/project.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/project.xml?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/project.xml (original)
+++ struts/sandbox/trunk/ti/project.xml Wed Sep 14 09:20:05 2005
@@ -365,7 +365,7 @@
</properties>
</dependency>
- <!-- xjavadoc -->
+ <!-- xjavadoc and xdoclet -->
<dependency>
<groupId>xjavadoc</groupId>
<artifactId>xjavadoc</artifactId>
@@ -375,6 +375,15 @@
<war.bundle>true</war.bundle>
</properties>
</dependency>
+ <dependency>
+ <groupId>xdoclet</groupId>
+ <artifactId>xdoclet</artifactId>
+ <version>1.2</version>
+ <url>http://xdoclet.sourceforge.net/xdoclet/</url>
+ <properties>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
<!-- Spring -->
<dependency>
@@ -509,6 +518,28 @@
</properties>
</dependency>
+ <dependency>
+ <groupId>pageflow</groupId>
+ <artifactId>schema-commons-validator</artifactId>
+ <version>1.1</version>
+ <properties>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>sun</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.5</version>
+ <type>jar</type>
+ <url>http://java.sun.com/j2se/1.5.0/download.html</url>
+ <properties>
+ <comment>
+ Needed to run Sun's annotation processing tool (apt). This is the tools.jar from the Sun JDK.
+ It's specified in project.properties.
+ </comment>
+ </properties>
+ </dependency>
<!-- for unit tests -->
<dependency>
Added: struts/sandbox/trunk/ti/wars/samples-jsf/maven.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/maven.xml?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/maven.xml (added)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/maven.xml Wed Sep 14 09:20:05 2005
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xmlns:j="jelly:core"
+ xmlns:ant="jelly:ant"
+ xmlns:maven="jelly:maven"
+ default="war">
+
+ <postGoal name="war:webapp">
+ <attainGoal name="build-pageflows-apt"/>
+ </postGoal>
+</project>
+
Modified: struts/sandbox/trunk/ti/wars/samples-jsf/project.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/project.xml?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/project.xml (original)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/project.xml Wed Sep 14 09:20:05 2005
@@ -54,6 +54,11 @@
</properties>
</dependency>
<dependency>
+ <groupId>struts</groupId>
+ <artifactId>struts-ti-compiler-apt</artifactId>
+ <version>${pom.currentVersion}</version>
+ </dependency>
+ <dependency>
<groupId>myfaces</groupId>
<artifactId>myfaces</artifactId>
<version>1.0.9</version>
Modified: struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/Controller.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/Controller.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/Controller.java (original)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/Controller.java Wed Sep 14 09:20:05 2005
@@ -17,8 +17,6 @@
*/
package jsf;
-import javax.servlet.http.HttpSession;
-
import org.apache.ti.pageflow.Forward;
import org.apache.ti.pageflow.PageFlowController;
import org.apache.ti.pageflow.annotations.ti;
@@ -29,7 +27,7 @@
@ti.simpleAction(name="locatePhysician", path="/jsf/physiciansFlow/Controller.jpf")
},
sharedFlowRefs={
- @ti.sharedFlowRef(name="shared", type=org.apache.beehive.samples.netui.jsf.SharedFlow.class)
+ @ti.sharedFlowRef(name="shared", type=org.apache.ti.samples.jsf.SharedFlow.class)
}
)
public class Controller
Modified: struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/home.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/home.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/home.java (original)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/home.java Wed Sep 14 09:20:05 2005
@@ -25,7 +25,7 @@
import javax.faces.model.SelectItem;
import javax.faces.event.ValueChangeEvent;
-import org.apache.beehive.samples.netui.jsf.SharedFlow;
+import org.apache.ti.samples.jsf.SharedFlow;
/**
Modified: struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/physiciansFlow/Controller.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/physiciansFlow/Controller.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/physiciansFlow/Controller.java (original)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/src/java/jsf/physiciansFlow/Controller.java Wed Sep 14 09:20:05 2005
@@ -20,8 +20,6 @@
import java.io.Serializable;
import javax.faces.model.DataModel;
-import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpServletRequest;
import org.apache.ti.pageflow.FormData;
import org.apache.ti.pageflow.Forward;
@@ -41,7 +39,7 @@
@ti.simpleAction(name="physicianSearch", path="search.faces")
},
sharedFlowRefs={
- @ti.sharedFlowRef(name="shared", type=org.apache.beehive.samples.netui.jsf.SharedFlow.class)
+ @ti.sharedFlowRef(name="shared", type=org.apache.ti.samples.jsf.SharedFlow.class)
}
)
public class Controller
@@ -101,13 +99,6 @@
this.physicianSession = new PhysicianSession();
}
- /**
- * Callback that is invoked when this controller instance is destroyed.
- */
- protected void onDestroy(HttpSession session)
- {
- }
-
//
// Page Flow Actions
//
Modified: struts/sandbox/trunk/ti/wars/samples-jsf/src/java/org/apache/beehive/samples/netui/jsf/SharedFlow.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/java/org/apache/beehive/samples/netui/jsf/SharedFlow.java?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/src/java/org/apache/beehive/samples/netui/jsf/SharedFlow.java (original)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/src/java/org/apache/beehive/samples/netui/jsf/SharedFlow.java Wed Sep 14 09:20:05 2005
@@ -1,47 +0,0 @@
-/*
- * Copyright 2004-2005 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.samples.netui.jsf;
-
-import java.io.IOException;
-
-import org.apache.ti.pageflow.Forward;
-import org.apache.ti.pageflow.PageFlowException;
-import org.apache.ti.pageflow.SharedFlowController;
-import org.apache.ti.pageflow.annotations.ti;
-
-@ti.controller(
- simpleActions={
- @ti.simpleAction(name="home", path="/jsf/Controller.jpf")
- }
-)
-
-public class SharedFlow
- extends SharedFlowController
-{
- private boolean notesPreference = true;
-
- public void setNotesPreference(boolean value)
- {
- this.notesPreference = value;
- }
-
- public boolean getNotesPreference()
- {
- return this.notesPreference;
- }
-}
Added: struts/sandbox/trunk/ti/wars/samples-jsf/src/java/org/apache/ti/samples/jsf/SharedFlow.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/java/org/apache/ti/samples/jsf/SharedFlow.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/src/java/org/apache/ti/samples/jsf/SharedFlow.java (added)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/src/java/org/apache/ti/samples/jsf/SharedFlow.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2004-2005 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.ti.samples.jsf;
+
+import java.io.IOException;
+
+import org.apache.ti.pageflow.Forward;
+import org.apache.ti.pageflow.PageFlowException;
+import org.apache.ti.pageflow.SharedFlowController;
+import org.apache.ti.pageflow.annotations.ti;
+
+@ti.controller(
+ simpleActions={
+ @ti.simpleAction(name="home", path="/jsf/Controller.jpf")
+ }
+)
+
+public class SharedFlow
+ extends SharedFlowController
+{
+ private boolean notesPreference = true;
+
+ public void setNotesPreference(boolean value)
+ {
+ this.notesPreference = value;
+ }
+
+ public boolean getNotesPreference()
+ {
+ return this.notesPreference;
+ }
+}
Modified: struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-Controller.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-Controller.xml?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-Controller.xml (original)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-Controller.xml Wed Sep 14 09:20:05 2005
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<processed-annotations>
- <type-name>Controller</type-name>
- <annotated-element>
- <element-name>sharedFlow</element-name>
- <annotation>
- <annotation-name>org.apache.ti.pageflow.annotations.ti.sharedFlowField</annotation-name>
- <annotation-attribute>
- <attribute-name>name</attribute-name>
- <string-value>shared</string-value>
- </annotation-attribute>
- </annotation>
- </annotated-element>
-</processed-annotations>
Modified: struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-home.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-home.xml?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-home.xml (original)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-home.xml Wed Sep 14 09:20:05 2005
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<processed-annotations>
- <type-name>jsf.home</type-name>
- <annotated-element>
- <element-name>jsf.home</element-name>
- <annotation>
- <annotation-name>org.apache.ti.pageflow.annotations.ti.facesBacking</annotation-name>
- </annotation>
- </annotated-element>
- <annotated-element>
- <element-name>sharedFlow</element-name>
- <annotation>
- <annotation-name>org.apache.ti.pageflow.annotations.ti.sharedFlowField</annotation-name>
- <annotation-attribute>
- <attribute-name>name</attribute-name>
- <string-value>shared</string-value>
- </annotation-attribute>
- </annotation>
- </annotated-element>
-</processed-annotations>
Modified: struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-physiciansFlow-physicianDetail.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-physiciansFlow-physicianDetail.xml?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-physiciansFlow-physicianDetail.xml (original)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-physiciansFlow-physicianDetail.xml Wed Sep 14 09:20:05 2005
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<processed-annotations>
- <type-name>jsf.physiciansFlow.physicianDetail</type-name>
- <annotated-element>
- <element-name>jsf.physiciansFlow.physicianDetail</element-name>
- <annotation>
- <annotation-name>org.apache.ti.pageflow.annotations.ti.facesBacking</annotation-name>
- </annotation>
- </annotated-element>
-</processed-annotations>
Modified: struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-physiciansFlow-physicianResultsWithDetail.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-physiciansFlow-physicianResultsWithDetail.xml?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-physiciansFlow-physicianResultsWithDetail.xml (original)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-physiciansFlow-physicianResultsWithDetail.xml Wed Sep 14 09:20:05 2005
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<processed-annotations>
- <type-name>jsf.physiciansFlow.physicianResultsWithDetail</type-name>
- <annotated-element>
- <element-name>jsf.physiciansFlow.physicianResultsWithDetail</element-name>
- <annotation>
- <annotation-name>org.apache.ti.pageflow.annotations.ti.facesBacking</annotation-name>
- </annotation>
- </annotated-element>
-</processed-annotations>
Modified: struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-physiciansFlow-search.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-physiciansFlow-search.xml?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-physiciansFlow-search.xml (original)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jpf-annotations-jsf-physiciansFlow-search.xml Wed Sep 14 09:20:05 2005
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<processed-annotations>
- <type-name>jsf.physiciansFlow.search</type-name>
- <annotated-element>
- <element-name>jsf.physiciansFlow.search</element-name>
- <annotation>
- <annotation-name>org.apache.ti.pageflow.annotations.ti.facesBacking</annotation-name>
- </annotation>
- </annotated-element>
- <annotated-element>
- <element-name>execute</element-name>
- <annotation>
- <annotation-name>org.apache.ti.pageflow.annotations.ti.commandHandler</annotation-name>
- <annotation-attribute>
- <attribute-name>raiseActions</attribute-name>
- <annotation-value>
- <annotation-name>org.apache.ti.pageflow.annotations.ti.raiseAction</annotation-name>
- <annotation-attribute>
- <attribute-name>outputFormBean</attribute-name>
- <string-value>searchForm</string-value>
- </annotation-attribute>
- <annotation-attribute>
- <attribute-name>action</attribute-name>
- <string-value>displayPhysiciansWithDetail</string-value>
- </annotation-attribute>
- </annotation-value>
- <annotation-value>
- <annotation-name>org.apache.ti.pageflow.annotations.ti.raiseAction</annotation-name>
- <annotation-attribute>
- <attribute-name>outputFormBean</attribute-name>
- <string-value>searchForm</string-value>
- </annotation-attribute>
- <annotation-attribute>
- <attribute-name>action</attribute-name>
- <string-value>displayPhysiciansAbbreviated</string-value>
- </annotation-attribute>
- </annotation-value>
- </annotation-attribute>
- </annotation>
- </annotated-element>
- <annotated-element>
- <element-name>pageFlow</element-name>
- <annotation>
- <annotation-name>org.apache.ti.pageflow.annotations.ti.pageFlowField</annotation-name>
- </annotation>
- </annotated-element>
-</processed-annotations>
Modified: struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jsf/physiciansFlow/xwork.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jsf/physiciansFlow/xwork.xml?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jsf/physiciansFlow/xwork.xml (original)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jsf/physiciansFlow/xwork.xml Wed Sep 14 09:20:05 2005
@@ -1,104 +0,0 @@
-<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN"
- "http://www.opensymphony.com/xwork/xwork-1.0.dtd">
-
-<!-- Generated from /jsf/physiciansFlow/Controller.java. -->
-<xwork>
- <package name="/jsf/physiciansFlow" namespace="/jsf/physiciansFlow">
- <result-types>
- <result-type name="pathResult" class="org.apache.ti.pageflow.xwork.PageFlowPathResult"/>
- <result-type name="navigateToPageResult" class="org.apache.ti.pageflow.xwork.NavigateToPageResult"/>
- <result-type name="navigateToActionResult" class="org.apache.ti.pageflow.xwork.NavigateToActionResult"/>
- <result-type name="returnActionResult" class="org.apache.ti.pageflow.xwork.ReturnActionResult"/>
- </result-types>
-
- <!--
- This is (hopefully) temporary. It's a dummy action that only contains metadata
- (parameters) about this module.
- -->
- <action name="_moduleMetadata">
- <param name="controllerClassName">jsf.physiciansFlow.Controller</param>
- </action>
-
- <!-- Generated from simple action "begin". -->
- <action name="begin" class="org.apache.ti.pageflow.xwork.PageFlowAction">
- <param name="simpleAction">true</param>
- <param name="defaultForward">success</param>
- <result name="success" type="pathResult">
- <param name="location">physicianSearch.do</param>
- </result>
- </action>
-
- <!-- Generated from simple action "physicianSearch". -->
- <action name="physicianSearch" class="org.apache.ti.pageflow.xwork.PageFlowAction">
- <param name="simpleAction">true</param>
- <param name="defaultForward">success</param>
- <result name="success" type="pathResult">
- <param name="location">search.faces</param>
- </result>
- </action>
-
- <!-- Generated from simple action "returnToPreviousPage". -->
- <action name="returnToPreviousPage" class="org.apache.ti.pageflow.xwork.PageFlowAction">
- <param name="simpleAction">true</param>
- <param name="defaultForward">success</param>
- <result name="success" type="navigateToPageResult">
- <param name="previousPageIndex">1</param>
- </result>
- </action>
-
- <!-- Generated from action method "physicianDetail". -->
- <action name="physicianDetail" class="org.apache.ti.pageflow.xwork.PageFlowAction">
- <result name="success" type="pathResult">
- <param name="location">physicianDetail.faces</param>
- </result>
- </action>
-
- <!-- Generated from action method "physicianDetailJSFStyle". -->
- <action name="physicianDetailJSFStyle" class="org.apache.ti.pageflow.xwork.PageFlowAction">
- <result name="success" type="pathResult">
- <param name="location">physicianDetail.faces</param>
- </result>
- </action>
-
- <!-- Generated from action method "displayPhysciansAbbreviated". -->
- <action name="displayPhysiciansAbbreviated" class="org.apache.ti.pageflow.xwork.PageFlowAction">
- <param name="formBeanType">jsf.physiciansFlow.Controller$PhysicianSearchForm</param>
- <param name="formBeanAttribute">physicianSearchForm</param>
- <result name="success" type="navigateToPageResult">
- <param name="previousPageIndex">0</param>
- </result>
- </action>
-
- <!-- Generated from action method "displayPhysiciansWithDetail". -->
- <action name="displayPhysiciansWithDetail" class="org.apache.ti.pageflow.xwork.PageFlowAction">
- <param name="formBeanType">jsf.physiciansFlow.Controller$PhysicianSearchForm</param>
- <param name="formBeanAttribute">physicianSearchForm</param>
- <result name="success" type="pathResult">
- <param name="location">physicianResultsWithDetail.faces</param>
- </result>
- </action>
-
- <!-- Generated from action method "submitMailMessage". -->
- <action name="submitMailMessage" class="org.apache.ti.pageflow.xwork.PageFlowAction">
- <param name="formBeanType">jsf.physiciansFlow.Controller$MailMessageForm</param>
- <param name="formBeanAttribute">mailMessageForm</param>
- <result name="success" type="pathResult">
- <param name="location">confirmMailSent.faces</param>
- </result>
- </action>
-
- <!--
- Action "home" in shared flow org.apache.beehive.samples.netui.jsf.SharedFlow. Note that
- this is just a mockup - shared flow actions won't necessarily be generated into
- referencing page flow configs.
- -->
- <action name="shared.home" class="org.apache.ti.pageflow.xwork.PageFlowAction">
- <param name="simpleAction">true</param>
- <param name="defaultForward">success</param>
- <result name="success" type="pathResult">
- <param name="location">/jsf/Controller.jpf</param>
- </result>
- </action>
-
- </package>
-</xwork>
Modified: struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jsf/xwork.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jsf/xwork.xml?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jsf/xwork.xml (original)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/jsf/xwork.xml Wed Sep 14 09:20:05 2005
@@ -1,53 +0,0 @@
-<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN"
- "http://www.opensymphony.com/xwork/xwork-1.0.dtd">
-
-<!-- Generated from /jsf/Controller.java. -->
-<xwork>
- <package name="/jsf" namespace="/jsf">
- <result-types>
- <result-type name="pathResult" class="org.apache.ti.pageflow.xwork.PageFlowPathResult"/>
- <result-type name="navigateToPageResult" class="org.apache.ti.pageflow.xwork.NavigateToPageResult"/>
- <result-type name="navigateToActionResult" class="org.apache.ti.pageflow.xwork.NavigateToActionResult"/>
- <result-type name="returnActionResult" class="org.apache.ti.pageflow.xwork.ReturnActionResult"/>
- </result-types>
-
- <!--
- This is (hopefully) temporary. It's a dummy action that only contains metadata
- (parameters) about this module.
- -->
- <action name="_moduleMetadata">
- <param name="controllerClassName">jsf.Controller</param>
- </action>
-
- <!-- Generated from simple action "begin". -->
- <action name="begin" class="org.apache.ti.pageflow.xwork.PageFlowAction">
- <param name="simpleAction">true</param>
- <param name="defaultForward">success</param>
- <result name="success" type="pathResult">
- <param name="location">home.faces</param>
- </result>
- </action>
-
- <!-- Generated from simple action "locatePhysician". -->
- <action name="locatePhysician" class="org.apache.ti.pageflow.xwork.PageFlowAction">
- <param name="simpleAction">true</param>
- <param name="defaultForward">success</param>
- <result name="success" type="pathResult">
- <param name="location">/jsf/physiciansFlow/Controller.jpf</param>
- </result>
- </action>
-
- <!--
- Action "home" in shared flow org.apache.beehive.samples.netui.jsf.SharedFlow. Note that
- this is just a mockup - shared flow actions won't necessarily be generated into
- referencing page flow configs.
- -->
- <action name="shared.home" class="org.apache.ti.pageflow.xwork.PageFlowAction">
- <param name="simpleAction">true</param>
- <param name="defaultForward">success</param>
- <result name="success" type="pathResult">
- <param name="location">/jsf/Controller.jpf</param>
- </result>
- </action>
- </package>
-</xwork>
Modified: struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/org/apache/beehive/samples/netui/jsf/xwork.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/org/apache/beehive/samples/netui/jsf/xwork.xml?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/org/apache/beehive/samples/netui/jsf/xwork.xml (original)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/src/resources/_pageflow-config/org/apache/beehive/samples/netui/jsf/xwork.xml Wed Sep 14 09:20:05 2005
@@ -1,32 +0,0 @@
-<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN"
- "http://www.opensymphony.com/xwork/xwork-1.0.dtd">
-
-<!-- Generated from /org/apache/beehive/samples/netui/jsf/SharedFlow.java. -->
-<xwork>
- <package name="/-org/apache/beehive/samples/netui/jsf" namespace="/-org/apache/beehive/samples/netui/jsf">
- <result-types>
- <result-type name="pathResult" class="org.apache.ti.pageflow.xwork.PageFlowPathResult"/>
- <result-type name="navigateToPageResult" class="org.apache.ti.pageflow.xwork.NavigateToPageResult"/>
- <result-type name="navigateToActionResult" class="org.apache.ti.pageflow.xwork.NavigateToActionResult"/>
- <result-type name="returnActionResult" class="org.apache.ti.pageflow.xwork.ReturnActionResult"/>
- </result-types>
-
- <!--
- This is (hopefully) temporary. It's a dummy action that only contains metadata
- (parameters) about this module.
- -->
- <action name="_moduleMetadata">
- <param name="controllerClassName">org.apache.beehive.samples.netui.jsf.SharedFlow</param>
- <param name="sharedFlow">true</param>
- </action>
-
- <!-- Generated from simple action "home" -->
- <action name="begin" class="org.apache.ti.pageflow.xwork.PageFlowAction">
- <param name="simpleAction">true</param>
- <param name="defaultForward">success</param>
- <result name="success" type="pathResult">
- <param name="location">/jsf/Controller.jpf</param>
- </result>
- </action>
- </package>
-</xwork>
Modified: struts/sandbox/trunk/ti/wars/samples-jsf/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/webapp/WEB-INF/web.xml?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/src/webapp/WEB-INF/web.xml (original)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/src/webapp/WEB-INF/web.xml Wed Sep 14 09:20:05 2005
@@ -5,7 +5,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
- <display-name>Beehive NetUI Samples Web Application</display-name>
+ <display-name>Struts Ti / JSF Samples Web Application</display-name>
<!-- Filter to perform Page Flow operations when JSPs are hit directly. -->
<filter>
Modified: struts/sandbox/trunk/ti/wars/samples-jsf/src/webapp/WEB-INF/web.xml.jsf-ri
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-jsf/src/webapp/WEB-INF/web.xml.jsf-ri?rev=280879&r1=280878&r2=280879&view=diff
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-jsf/src/webapp/WEB-INF/web.xml.jsf-ri (original)
+++ struts/sandbox/trunk/ti/wars/samples-jsf/src/webapp/WEB-INF/web.xml.jsf-ri Wed Sep 14 09:20:05 2005
@@ -5,7 +5,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
- <display-name>Beehive NetUI Samples Web Application</display-name>
+ <display-name>Struts Ti / JSF Samples Web Application</display-name>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
@@ -33,13 +33,13 @@
<!-- Filter to perform Page Flow operations when JSPs are hit directly. -->
<filter>
<filter-name>PageFlowJspFilter</filter-name>
- <filter-class>org.apache.beehive.netui.pageflow.PageFlowJspFilter</filter-class>
+ <filter-class>org.apache.ti.servlet.PageFlowJspFilter</filter-class>
</filter>
<!-- Filter to perform Page Flow operations when JavaServer Faces pages are hit directly. -->
<filter>
<filter-name>PageFlowFacesFilter</filter-name>
- <filter-class>org.apache.beehive.netui.pageflow.PageFlowFacesFilter</filter-class>
+ <filter-class>org.apache.ti.servlet.PageFlowFacesFilter</filter-class>
</filter>
<!--
@@ -51,7 +51,7 @@
-->
<filter>
<filter-name>PageFlowForbiddenFilter</filter-name>
- <filter-class>org.apache.beehive.netui.pageflow.PageFlowForbiddenFilter</filter-class>
+ <filter-class>org.apache.ti.servlet.PageFlowForbiddenFilter</filter-class>
<init-param>
<param-name>response-code</param-name>
<param-value>404</param-value>
@@ -119,26 +119,8 @@
<!-- Action Servlet Configuration (with debugging) -->
<servlet>
<servlet-name>action</servlet-name>
- <servlet-class>org.apache.beehive.netui.pageflow.PageFlowActionServlet</servlet-class>
- <init-param>
- <param-name>config</param-name>
- <param-value>/WEB-INF/.pageflow-struts-generated/jpf-struts-config.xml</param-value>
- </init-param>
- <init-param>
- <param-name>debug</param-name>
- <param-value>2</param-value>
- </init-param>
- <init-param>
- <param-name>detail</param-name>
- <param-value>2</param-value>
- </init-param>
+ <servlet-class>org.apache.ti.servlet.StrutsTiServlet</servlet-class>
<load-on-startup>2</load-on-startup>
- </servlet>
-
- <!-- The XmlHttpRequest handler Servlet -->
- <servlet>
- <servlet-name>XmlHttpRequestServlet</servlet-name>
- <servlet-class>org.apache.beehive.netui.pageflow.xmlhttprequest.XmlHttpRequestServlet</servlet-class>
</servlet>
<!-- Faces Servlet -->
Added: struts/sandbox/trunk/ti/wars/samples-xdoclet/maven.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-xdoclet/maven.xml?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-xdoclet/maven.xml (added)
+++ struts/sandbox/trunk/ti/wars/samples-xdoclet/maven.xml Wed Sep 14 09:20:05 2005
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xmlns:j="jelly:core"
+ xmlns:ant="jelly:ant"
+ xmlns:maven="jelly:maven"
+ default="war">
+
+ <postGoal name="war:webapp">
+ <attainGoal name="build-pageflows-xdoclet"/>
+ </postGoal>
+</project>
Added: struts/sandbox/trunk/ti/wars/samples-xdoclet/project.properties
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-xdoclet/project.properties?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-xdoclet/project.properties (added)
+++ struts/sandbox/trunk/ti/wars/samples-xdoclet/project.properties Wed Sep 14 09:20:05 2005
@@ -0,0 +1 @@
+maven.compile.source=1.4
Added: struts/sandbox/trunk/ti/wars/samples-xdoclet/project.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-xdoclet/project.xml?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-xdoclet/project.xml (added)
+++ struts/sandbox/trunk/ti/wars/samples-xdoclet/project.xml Wed Sep 14 09:20:05 2005
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<!--
+/*
+ * Copyright 2001-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.
+ */
+ -->
+
+
+<project>
+
+ <extend>../../project.xml</extend>
+ <groupId>struts</groupId>
+ <artifactId>struts-ti-xdoclet</artifactId>
+ <name>Struts Ti XDoclet-based Sample Application</name>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>${maven.src.dir}/resources</directory>
+ <includes>
+ <include>**/*.properties</include>
+ <include>**/*.xml</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>struts</groupId>
+ <artifactId>struts-ti-core</artifactId>
+ <version>${pom.currentVersion}</version>
+ <properties>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+ <dependency>
+ <groupId>struts</groupId>
+ <artifactId>struts-ti-java5</artifactId>
+ <version>${pom.currentVersion}</version>
+ <properties>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+ <dependency>
+ <groupId>struts</groupId>
+ <artifactId>struts-ti-compiler-xdoclet</artifactId>
+ <version>${pom.currentVersion}</version>
+ </dependency>
+ </dependencies>
+</project>
Added: struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/org/apache/ti/samples/pageflow/loginexample/BaseFlow.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/org/apache/ti/samples/pageflow/loginexample/BaseFlow.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/org/apache/ti/samples/pageflow/loginexample/BaseFlow.java (added)
+++ struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/org/apache/ti/samples/pageflow/loginexample/BaseFlow.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2004-2005 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.ti.samples.pageflow.loginexample ;
+
+import org.apache.ti.pageflow.PageFlowController ;
+import org.apache.ti.pageflow.Forward ;
+import org.apache.ti.pageflow.NotLoggedInException ;
+
+
+/**
+ * @ti.controller
+ * @ti.simpleAction name="loginCancel" navigateTo="currentPage"
+ * @ti.simpleAction name="loginSuccess" navigateTo="previousAction"
+ // This sends control to the loginflow nested page flow upon any NotLoggedInException.
+ * @ti.handleException type="NotLoggedInException" path="/pageflow/loginexample/loginflow/Controller.jpf"
+ */
+public abstract class BaseFlow
+ extends PageFlowController
+{
+ /**
+ * @ti.action
+ * @ti.forward name="success" navigateTo="currentPage"
+ */
+ public Forward logout ()
+ {
+ logout (false );
+ return new Forward ("success" );
+ }
+}
Added: struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/org/apache/ti/samples/pageflow/loginexample/ExampleLoginHandler.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/org/apache/ti/samples/pageflow/loginexample/ExampleLoginHandler.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/org/apache/ti/samples/pageflow/loginexample/ExampleLoginHandler.java (added)
+++ struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/org/apache/ti/samples/pageflow/loginexample/ExampleLoginHandler.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2004-2005 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.ti.samples.pageflow.loginexample;
+
+import javax.security.auth.login.LoginException;
+import java.security.Principal;
+import java.util.Map;
+
+import org.apache.ti.pageflow.handler.BaseHandler;
+import org.apache.ti.pageflow.handler.LoginHandler;
+import org.apache.ti.pageflow.xwork.PageFlowActionContext;
+
+public class ExampleLoginHandler
+ extends BaseHandler
+ implements LoginHandler
+{
+ private static class UserPrincipal
+ implements Principal
+ {
+ public String getName()
+ {
+ return "good";
+ }
+ }
+
+ public void login( String username, String password )
+ throws LoginException
+ {
+ if ( username.equals("good") && password.equals("good") )
+ {
+ Map sessionScope = PageFlowActionContext.get().getSessionScope();
+ sessionScope.put("_principal", new UserPrincipal());
+ }
+ else
+ {
+ throw new LoginException( username );
+ }
+ }
+
+ public void logout( boolean invalidateSessions )
+ {
+ PageFlowActionContext.get().getSessionScope().remove("_principal");
+ }
+
+ public boolean isUserInRole(String roleName)
+ {
+ return false;
+ }
+
+ public Principal getUserPrincipal()
+ {
+ return (Principal) PageFlowActionContext.get().getSessionScope().get("_principal");
+ }
+}
Added: struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/pageflow/basic/Controller.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/pageflow/basic/Controller.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/pageflow/basic/Controller.java (added)
+++ struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/pageflow/basic/Controller.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,37 @@
+package pageflow.basic;
+
+import org.apache.ti.pageflow.annotations.ti;
+import org.apache.ti.pageflow.PageFlowController;
+import org.apache.ti.pageflow.Forward;
+import com.opensymphony.xwork.Action;
+
+/**
+ * @ti.controller
+ * @ti.handleException type="Controller.CustomException" path="error.jsp"
+ * @ti.handleException type="ArithmeticException" method="handleArithmeticException"
+ */
+public class Controller extends PageFlowController {
+
+ /** @ti.action */
+ public String someAction() {
+ return Action.SUCCESS;
+ }
+
+ static class CustomException extends Exception {}
+ static class IntentionalException extends CustomException {}
+
+ /** @ti.action */
+ public String throw1() throws IntentionalException {
+ throw new IntentionalException(); // caught by the @ti.handleException for CustomException
+ }
+
+ /** @ti.action */
+ public String throw2() {
+ throw new ArithmeticException("intentional");
+ }
+
+ /** @ti.exceptionHandler */
+ public String handleArithmeticException(ArithmeticException e, String message) {
+ return Action.SUCCESS;
+ }
+}
Added: struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/pageflow/formBean/Controller.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/pageflow/formBean/Controller.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/pageflow/formBean/Controller.java (added)
+++ struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/pageflow/formBean/Controller.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,24 @@
+package pageflow.formBean ;
+
+
+import org.apache.ti.pageflow.PageFlowController ;
+import org.apache.ti.pageflow.Forward ;
+import com.opensymphony.xwork.Action ;
+import java.io.Serializable ;
+
+/**
+ * @ti.controller
+ */
+public class Controller extends PageFlowController {
+
+ public static class MyBean implements Serializable {
+ private String _foo ;
+ public void setFoo (String foo ) { _foo = foo ; }
+ public String getFoo () { return _foo ; }
+ }
+
+ /** @ti.action */
+ public Forward submit (MyBean bean ) {
+ return new Forward (Action.SUCCESS , "result" , bean.getFoo ());
+ }
+}
Added: struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/pageflow/loginexample/loginflow/Controller.java
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/pageflow/loginexample/loginflow/Controller.java?rev=280879&view=auto
==============================================================================
--- struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/pageflow/loginexample/loginflow/Controller.java (added)
+++ struts/sandbox/trunk/ti/wars/samples-xdoclet/src/java/pageflow/loginexample/loginflow/Controller.java Wed Sep 14 09:20:05 2005
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2004-2005 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 pageflow.loginexample.loginflow ;
+
+import javax.security.auth.login.LoginException ;
+
+
+import org.apache.ti.pageflow.PageFlowController ;
+import org.apache.ti.pageflow.Forward ;
+
+/**
+ * @ti.controller nested="true"
+ * @ti.simpleAction name="cancel" returnAction="loginCancel"
+ * @ti.handleException type="LoginException" path="begin.jsp"
+ * @ti.messageBundle bundlePath="org.apache.beehive.samples.netui.resources.loginexample.messages"
+ */
+public class Controller extends PageFlowController
+{
+ /**
+ * @ti.action
+ * @ti.forward name="success" returnAction="loginSuccess"
+ * @ti.validationErrorForward name="failure" path="begin.jsp"
+ */
+ public Forward login ( LoginForm form )
+ throws LoginException
+ {
+ // This ultimately calls login on org.apache.beehive.samples.netui.login.ExampleLoginHandler.
+ login ( form.getUsername (), form.getPassword () );
+ return new Forward ( "success" );
+ }
+
+ public static class LoginForm implements java.io.Serializable
+ {
+ private String _username ;
+ private String _password ;
+
+ /**
+ // We could have also used the 'displayName' attribute -- a hardcoded string or a
+ // JSP 2.0-style expression.
+ * @ti.validatableProperty displayNameKey="displaynames.username"
+ * @ti.validateRequired
+ * @ti.validateMinLength chars="4"
+ */
+ public String getUsername ()
+ {
+ return _username ;
+ }
+
+ public void setUsername ( String username )
+ {
+ _username = username ;
+ }
+
+ /**
+ * @ti.validatableProperty displayNameKey="displaynames.password"
+ * @ti.validateRequired
+ * @ti.validateMinLength chars="4"
+ */
+ public String getPassword ()
+ {
+ return _password ;
+ }
+
+ public void setPassword ( String password )
+ {
+ _password = password ;
+ }
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org