You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ri...@apache.org on 2005/09/04 23:02:13 UTC
svn commit: r278628 - in /beehive/trunk/samples/netui-samples: ./
basicNesting/ basicNesting/main/ basicNesting/nested/ nesting/
nesting/chooseairport/
Author: rich
Date: Sun Sep 4 14:01:58 2005
New Revision: 278628
URL: http://svn.apache.org/viewcvs?rev=278628&view=rev
Log:
Added a Basic Nesting sample. Also, fixed some template-tag attributes in the main nesting sample.
BB: self (linux)
Added:
beehive/trunk/samples/netui-samples/basicNesting/
beehive/trunk/samples/netui-samples/basicNesting/main/
beehive/trunk/samples/netui-samples/basicNesting/main/MainFlow.java (with props)
beehive/trunk/samples/netui-samples/basicNesting/main/index.jsp (with props)
beehive/trunk/samples/netui-samples/basicNesting/main/success.jsp (with props)
beehive/trunk/samples/netui-samples/basicNesting/nested/
beehive/trunk/samples/netui-samples/basicNesting/nested/NestedFlow.java (with props)
beehive/trunk/samples/netui-samples/basicNesting/nested/index.jsp (with props)
Modified:
beehive/trunk/samples/netui-samples/index.jsp
beehive/trunk/samples/netui-samples/nesting/Controller.java
beehive/trunk/samples/netui-samples/nesting/chooseairport/confirm.jsp
beehive/trunk/samples/netui-samples/nesting/chooseairport/findairport.jsp
beehive/trunk/samples/netui-samples/nesting/chooseairport/nonefound.jsp
beehive/trunk/samples/netui-samples/nesting/index.jsp
beehive/trunk/samples/netui-samples/nesting/results.jsp
Added: beehive/trunk/samples/netui-samples/basicNesting/main/MainFlow.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-samples/basicNesting/main/MainFlow.java?rev=278628&view=auto
==============================================================================
--- beehive/trunk/samples/netui-samples/basicNesting/main/MainFlow.java (added)
+++ beehive/trunk/samples/netui-samples/basicNesting/main/MainFlow.java Sun Sep 4 14:01:58 2005
@@ -0,0 +1,33 @@
+/*
+ * 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 basicNesting.main;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+@Jpf.Controller(
+ simpleActions={
+ @Jpf.SimpleAction(name="begin", path="index.jsp"),
+ @Jpf.SimpleAction(name="goNested", path="../nested/NestedFlow.jpf"),
+ @Jpf.SimpleAction(name="nestedDone", path="success.jsp")
+ }
+)
+public class MainFlow extends PageFlowController
+{
+}
Propchange: beehive/trunk/samples/netui-samples/basicNesting/main/MainFlow.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: beehive/trunk/samples/netui-samples/basicNesting/main/index.jsp
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-samples/basicNesting/main/index.jsp?rev=278628&view=auto
==============================================================================
--- beehive/trunk/samples/netui-samples/basicNesting/main/index.jsp (added)
+++ beehive/trunk/samples/netui-samples/basicNesting/main/index.jsp Sun Sep 4 14:01:58 2005
@@ -0,0 +1,35 @@
+<%--
+ 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:$
+--%>
+<%@ 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-template:template templatePage="/resources/template/template.jsp">
+
+ <netui-template:setAttribute name="sampleTitle" value="Basic Nesting"/>
+
+ <netui-template:section name="main">
+ <h3>Main Page Flow</h3>
+
+ Execute the <netui:anchor action="goNested">goNested</netui:anchor> action to enter the
+ nested page flow. The current page flow will be pushed aside. You will return to this
+ page flow later.
+ </netui-template:section>
+
+</netui-template:template>
Propchange: beehive/trunk/samples/netui-samples/basicNesting/main/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added: beehive/trunk/samples/netui-samples/basicNesting/main/success.jsp
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-samples/basicNesting/main/success.jsp?rev=278628&view=auto
==============================================================================
--- beehive/trunk/samples/netui-samples/basicNesting/main/success.jsp (added)
+++ beehive/trunk/samples/netui-samples/basicNesting/main/success.jsp Sun Sep 4 14:01:58 2005
@@ -0,0 +1,36 @@
+<%--
+ 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:$
+--%>
+<%@ 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-template:template templatePage="/resources/template/template.jsp">
+
+ <netui-template:setAttribute name="sampleTitle" value="Basic Nesting"/>
+
+ <netui-template:section name="main">
+ <h3>Main Page Flow</h3>
+
+ You have returned to the main page flow.
+ <br/>
+ <br/>
+ <netui:anchor action="begin">start over</netui:anchor>
+ </netui-template:section>
+
+</netui-template:template>
Propchange: beehive/trunk/samples/netui-samples/basicNesting/main/success.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added: beehive/trunk/samples/netui-samples/basicNesting/nested/NestedFlow.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-samples/basicNesting/nested/NestedFlow.java?rev=278628&view=auto
==============================================================================
--- beehive/trunk/samples/netui-samples/basicNesting/nested/NestedFlow.java (added)
+++ beehive/trunk/samples/netui-samples/basicNesting/nested/NestedFlow.java Sun Sep 4 14:01:58 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 basicNesting.nested;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+@Jpf.Controller(
+ nested=true,
+ simpleActions={
+ @Jpf.SimpleAction(name="begin", path="index.jsp"),
+ @Jpf.SimpleAction(name="done", returnAction="nestedDone")
+ }
+)
+public class NestedFlow extends PageFlowController
+{
+}
Propchange: beehive/trunk/samples/netui-samples/basicNesting/nested/NestedFlow.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: beehive/trunk/samples/netui-samples/basicNesting/nested/index.jsp
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-samples/basicNesting/nested/index.jsp?rev=278628&view=auto
==============================================================================
--- beehive/trunk/samples/netui-samples/basicNesting/nested/index.jsp (added)
+++ beehive/trunk/samples/netui-samples/basicNesting/nested/index.jsp Sun Sep 4 14:01:58 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:$
+--%>
+<%@ 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-template:template templatePage="/resources/template/template.jsp">
+
+ <netui-template:setAttribute name="sampleTitle" value="Basic Nesting"/>
+
+ <netui-template:section name="main">
+ <h3>Nested Page Flow</h3>
+
+ <p>
+ You are now in the nested page flow <b>${pageFlow.URI}</b>.
+ To return to the main page flow, execute the
+ <netui:anchor action="done">done</netui:anchor> action here.
+ This will in turn raise the <code>nestedDone</code> action on the main page flow.
+ <p>
+ The <code>done</code> action declaration looks like this:
+ <br/>
+ <blockquote>
+ <code>@Jpf.SimpleAction(name="done", returnAction="nestedDone")</code>
+ </blockquote>
+ </p>
+ </netui-template:section>
+
+</netui-template:template>
Propchange: beehive/trunk/samples/netui-samples/basicNesting/nested/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/samples/netui-samples/index.jsp
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-samples/index.jsp?rev=278628&r1=278627&r2=278628&view=diff
==============================================================================
--- beehive/trunk/samples/netui-samples/index.jsp (original)
+++ beehive/trunk/samples/netui-samples/index.jsp Sun Sep 4 14:01:58 2005
@@ -36,6 +36,10 @@
after all actions (or specific actions), and can change an action's destination.</dd>
</dl>
<dl>
+ <dt><netui:anchor href="basicNesting/main/MainFlow.jpf" value="Basic Nested Page Flow"/></dt>
+ <dd>Demonstrates the most basic nested page flow.</dd>
+ </dl>
+ <dl>
<dt><netui:anchor href="exceptions/Controller.jpf" value="Exception Handling"/></dt>
<dd>Demonstrates Page Flow declarative exception handling.</dd>
</dl>
Modified: beehive/trunk/samples/netui-samples/nesting/Controller.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-samples/nesting/Controller.java?rev=278628&r1=278627&r2=278628&view=diff
==============================================================================
--- beehive/trunk/samples/netui-samples/nesting/Controller.java (original)
+++ beehive/trunk/samples/netui-samples/nesting/Controller.java Sun Sep 4 14:01:58 2005
@@ -20,6 +20,7 @@
import org.apache.beehive.netui.pageflow.PageFlowController;
import org.apache.beehive.netui.pageflow.Forward;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import nesting.chooseairport.ChooseAirport;
/**
* Main page flow, which invokes a nested page flow and gets data back from it.
@@ -56,7 +57,7 @@
)
}
)
- protected Forward chooseAirportDone( nesting.chooseairport.ChooseAirport.Results results )
+ protected Forward chooseAirportDone( ChooseAirport.Results results )
{
Forward fwd = new Forward("results");
fwd.addActionOutput("airport", results.getAirport());
Modified: beehive/trunk/samples/netui-samples/nesting/chooseairport/confirm.jsp
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-samples/nesting/chooseairport/confirm.jsp?rev=278628&r1=278627&r2=278628&view=diff
==============================================================================
--- beehive/trunk/samples/netui-samples/nesting/chooseairport/confirm.jsp (original)
+++ beehive/trunk/samples/netui-samples/nesting/chooseairport/confirm.jsp Sun Sep 4 14:01:58 2005
@@ -22,7 +22,7 @@
<netui-template:template templatePage="/resources/template/template.jsp">
- <netui-template:setAttribute name="samTitle" value="Nesting"/>
+ <netui-template:setAttribute name="sampleTitle" value="Nesting"/>
<netui-template:section name="main">
<h3>Choose Airport (nested page flow)</h3>
Modified: beehive/trunk/samples/netui-samples/nesting/chooseairport/findairport.jsp
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-samples/nesting/chooseairport/findairport.jsp?rev=278628&r1=278627&r2=278628&view=diff
==============================================================================
--- beehive/trunk/samples/netui-samples/nesting/chooseairport/findairport.jsp (original)
+++ beehive/trunk/samples/netui-samples/nesting/chooseairport/findairport.jsp Sun Sep 4 14:01:58 2005
@@ -22,7 +22,7 @@
<netui-template:template templatePage="/resources/template/template.jsp">
- <netui-template:setAttribute name="samTitle" value="Nesting"/>
+ <netui-template:setAttribute name="sampleTitle" value="Nesting"/>
<netui-template:section name="main">
<h3>Choose Airport (nested page flow)</h3>
Modified: beehive/trunk/samples/netui-samples/nesting/chooseairport/nonefound.jsp
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-samples/nesting/chooseairport/nonefound.jsp?rev=278628&r1=278627&r2=278628&view=diff
==============================================================================
--- beehive/trunk/samples/netui-samples/nesting/chooseairport/nonefound.jsp (original)
+++ beehive/trunk/samples/netui-samples/nesting/chooseairport/nonefound.jsp Sun Sep 4 14:01:58 2005
@@ -22,7 +22,7 @@
<netui-template:template templatePage="/resources/template/template.jsp">
- <netui-template:setAttribute name="samTitle" value="Nesting"/>
+ <netui-template:setAttribute name="sampleTitle" value="Nesting"/>
<netui-template:section name="main">
<h3>Choose Airport (nested page flow)</h3>
Modified: beehive/trunk/samples/netui-samples/nesting/index.jsp
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-samples/nesting/index.jsp?rev=278628&r1=278627&r2=278628&view=diff
==============================================================================
--- beehive/trunk/samples/netui-samples/nesting/index.jsp (original)
+++ beehive/trunk/samples/netui-samples/nesting/index.jsp Sun Sep 4 14:01:58 2005
@@ -22,7 +22,7 @@
<netui-template:template templatePage="/resources/template/template.jsp">
- <netui-template:setAttribute name="samTitle" value="Nesting"/>
+ <netui-template:setAttribute name="sampleTitle" value="Nesting"/>
<netui-template:section name="main">
Clicking the link below launches the ChooseAirport nested page flow, which does one of two
Modified: beehive/trunk/samples/netui-samples/nesting/results.jsp
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-samples/nesting/results.jsp?rev=278628&r1=278627&r2=278628&view=diff
==============================================================================
--- beehive/trunk/samples/netui-samples/nesting/results.jsp (original)
+++ beehive/trunk/samples/netui-samples/nesting/results.jsp Sun Sep 4 14:01:58 2005
@@ -24,7 +24,7 @@
<netui-template:template templatePage="/resources/template/template.jsp">
- <netui-template:setAttribute name="samTitle" value="Nesting"/>
+ <netui-template:setAttribute name="sampleTitle" value="Nesting"/>
<netui-template:section name="main">
Hi, <b>${pageFlow.yourName}</b>. The airport you chose was <b>${pageInput.airport}</b>.