You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2008/05/15 17:48:15 UTC

svn commit: r656710 - in /myfaces/tobago/branches/tobago-1.0.x: example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/ example/sandbox/src/main/webapp/ example/sandbox/src/main/webapp/WEB-INF/ example/sandbox/src/main/webapp/WEB-INF/t...

Author: lofwyr
Date: Thu May 15 08:48:15 2008
New Revision: 656710

URL: http://svn.apache.org/viewvc?rev=656710&view=rev
Log:
 TOBAGO-518: Simplifying and cleanup

Added:
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/WEB-INF/tags/
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/WEB-INF/tags/layout/
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/WEB-INF/tags/layout/wizard.tag
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/bean/
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/bean/single.jsp   (contents, props changed)
      - copied, changed from r655885, myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard.jsp
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/bean/snip-0.jsp   (contents, props changed)
      - copied, changed from r655885, myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/snip-0.jsp
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/bean/snip-1.jsp
      - copied unchanged from r655885, myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/snip-1.jsp
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/bean/snip-2.jsp
      - copied unchanged from r655885, myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/snip-2.jsp
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/fileIntoCondition.jsp
      - copied, changed from r655885, myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/fileIntoCondition.jsp
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/filter.jsp   (contents, props changed)
      - copied, changed from r655885, myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/filter.jsp
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/finish.jsp
      - copied, changed from r655885, myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/finish.jsp
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/forwardCondition.jsp
      - copied, changed from r655885, myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/forwardCondition.jsp
    myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/WizardImpl.java
      - copied, changed from r655885, myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/AbstractWizardController.java
    myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/WizardStep.java
Removed:
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/SampleWizard.java
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/snip-0.jsp
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/snip-1.jsp
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/snip-2.jsp
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard.jsp
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/fileIntoCondition.jsp
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/filter.jsp
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/finish.jsp
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/forwardCondition.jsp
    myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/application/WizardNavigationHandler.java
    myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/AbstractWizardController.java
    myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/UIWizard.java
Modified:
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/Controller.java
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/navigation.jsp
    myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/Wizard.java
    myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/WizardTag.java

Modified: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/Controller.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/Controller.java?rev=656710&r1=656709&r2=656710&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/Controller.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/java/org/apache/myfaces/tobago/example/sandbox/Controller.java Thu May 15 08:48:15 2008
@@ -21,6 +21,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.tobago.model.TreeState;
 import org.apache.myfaces.tobago.model.Wizard;
+import org.apache.myfaces.tobago.model.WizardImpl;
 
 import javax.swing.tree.DefaultMutableTreeNode;
 import java.text.SimpleDateFormat;
@@ -80,7 +81,7 @@
 
     // wizard
 
-    wizard = new SampleWizard();
+    wizard = new WizardImpl();
   }
 
   public String action1() {

Modified: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/WEB-INF/faces-config.xml?rev=656710&r1=656709&r2=656710&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/WEB-INF/faces-config.xml Thu May 15 08:48:15 2008
@@ -39,10 +39,10 @@
   </managed-bean>
 
   <navigation-rule>
-    <from-view-id>/wizard.jsp</from-view-id>
+    <from-view-id>/wizard/bean/single.jsp</from-view-id>
     <navigation-case>
       <from-outcome>wizard</from-outcome>
-      <to-view-id>/wizard.jsp</to-view-id>
+      <to-view-id>/wizard/bean/single.jsp</to-view-id>
     </navigation-case>
   </navigation-rule>
 
@@ -55,75 +55,75 @@
   </navigation-rule>
 
   <navigation-rule>
-    <from-view-id>/wizard/*</from-view-id>
+    <from-view-id>/wizard/navi/*</from-view-id>
     <navigation-case>
       <from-outcome>fileIntoCondition</from-outcome>
-      <to-view-id>/wizard/fileIntoCondition.jsp</to-view-id>
+      <to-view-id>/wizard/navi/fileIntoCondition.jsp</to-view-id>
     </navigation-case>
     <navigation-case>
       <from-outcome>forwardCondition</from-outcome>
-      <to-view-id>/wizard/forwardCondition.jsp</to-view-id>
+      <to-view-id>/wizard/navi/forwardCondition.jsp</to-view-id>
     </navigation-case>
     <navigation-case>
       <from-outcome>finish</from-outcome>
-      <to-view-id>/wizard/finish.jsp</to-view-id>
+      <to-view-id>/wizard/navi/finish.jsp</to-view-id>
     </navigation-case>
     <navigation-case>
       <from-outcome>filter</from-outcome>
-      <to-view-id>/wizard/filter.jsp</to-view-id>
+      <to-view-id>/wizard/navi/filter.jsp</to-view-id>
     </navigation-case>
   </navigation-rule>
 
   <navigation-rule>
-    <from-view-id>/wizard/filter.jsp</from-view-id>
+    <from-view-id>/wizard/navi/filter.jsp</from-view-id>
     <navigation-case>
       <from-outcome>fileIntoCondition</from-outcome>
-      <to-view-id>/wizard/fileIntoCondition.jsp</to-view-id>
+      <to-view-id>/wizard/navi/fileIntoCondition.jsp</to-view-id>
     </navigation-case>
     <navigation-case>
       <from-outcome>forwardCondition</from-outcome>
-      <to-view-id>/wizard/forwardCondition.jsp</to-view-id>
+      <to-view-id>/wizard/navi/forwardCondition.jsp</to-view-id>
     </navigation-case>
   </navigation-rule>
 
   <navigation-rule>
-    <from-view-id>/wizard/fileIntoCondition.jsp</from-view-id>
+    <from-view-id>/wizard/navi/fileIntoCondition.jsp</from-view-id>
     <navigation-case>
       <from-outcome>next</from-outcome>
-      <to-view-id>/wizard/finish.jsp</to-view-id>
+      <to-view-id>/wizard/navi/finish.jsp</to-view-id>
     </navigation-case>
 <!--
     <navigation-case>
       <from-outcome>previous</from-outcome>
-      <to-view-id>/wizard/filter.jsp</to-view-id>
+      <to-view-id>/wizard/navi/filter.jsp</to-view-id>
     </navigation-case>
 -->
   </navigation-rule>
 
   <navigation-rule>
-    <from-view-id>/wizard/forwardCondition.jsp</from-view-id>
+    <from-view-id>/wizard/navi/forwardCondition.jsp</from-view-id>
     <navigation-case>
       <from-outcome>next</from-outcome>
-      <to-view-id>/wizard/finish.jsp</to-view-id>
+      <to-view-id>/wizard/navi/finish.jsp</to-view-id>
     </navigation-case>
 <!--
     <navigation-case>
       <from-outcome>previous</from-outcome>
-      <to-view-id>/wizard/filter.jsp</to-view-id>
+      <to-view-id>/wizard/navi/filter.jsp</to-view-id>
     </navigation-case>
 -->
   </navigation-rule>
 
   <navigation-rule>
-    <from-view-id>/wizard/finish.jsp</from-view-id>
+    <from-view-id>/wizard/navi/finish.jsp</from-view-id>
 <!--
     <navigation-case>
       <from-outcome>forwardCondition</from-outcome>
-      <to-view-id>/wizard/fileIntoCondition.jsp</to-view-id>
+      <to-view-id>/wizard/navi/fileIntoCondition.jsp</to-view-id>
     </navigation-case>
     <navigation-case>
       <from-outcome>forwardCondition</from-outcome>
-      <to-view-id>/wizard/forwardCondition.jsp</to-view-id>
+      <to-view-id>/wizard/navi/forwardCondition.jsp</to-view-id>
     </navigation-case>
 -->
   </navigation-rule>

Added: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/WEB-INF/tags/layout/wizard.tag
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/WEB-INF/tags/layout/wizard.tag?rev=656710&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/WEB-INF/tags/layout/wizard.tag (added)
+++ myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/WEB-INF/tags/layout/wizard.tag Thu May 15 08:48:15 2008
@@ -0,0 +1,38 @@
+<%--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+--%>
+
+<%@ taglib uri="http://myfaces.apache.org/tobago/sandbox" prefix="tcs" %>
+<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+
+<f:view>
+  <tc:loadBundle basename="demo" var="bundle"/>
+
+  <tc:page label="Sandbox - Wizard" id="page" width="500px" height="300px">
+    <f:facet name="layout">
+      <tc:gridLayout margin="10px" rows="fixed;*"/>
+    </f:facet>
+
+    <tc:messages/>
+    
+    <tc:cell>
+      <jsp:doBody/>
+    </tc:cell>
+
+
+  </tc:page>
+</f:view>

Modified: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/navigation.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/navigation.jsp?rev=656710&r1=656709&r2=656710&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/navigation.jsp (original)
+++ myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/navigation.jsp Thu May 15 08:48:15 2008
@@ -40,9 +40,9 @@
 
     <tc:link link="inputSlider.jsp" label="inputSlider.jsp" target="View"/>
 
-    <tc:link link="wizard.jsp" label="wizard.jsp" target="View"/>
+    <tc:link link="wizard/bean/single.jsp" label="Wizard with navigation from model" target="View"/>
 
-    <tc:link link="wizard/filter.jsp" label="wizard/filter.jsp" target="View"/>
+    <tc:link link="wizard/navi/filter.jsp" label="Wizard with navigation tree" target="View"/>
 
     <tc:link link="wizard.xml" label="wizard.xml" target="View"/>
 

Copied: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/bean/single.jsp (from r655885, myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/bean/single.jsp?p2=myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/bean/single.jsp&p1=myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard.jsp&r1=655885&r2=656710&rev=656710&view=diff
==============================================================================
    (empty)

Propchange: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/bean/single.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/bean/single.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/bean/snip-0.jsp (from r655885, myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/snip-0.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/bean/snip-0.jsp?p2=myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/bean/snip-0.jsp&p1=myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/snip-0.jsp&r1=655885&r2=656710&rev=656710&view=diff
==============================================================================
    (empty)

Propchange: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/bean/snip-0.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/bean/snip-0.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/fileIntoCondition.jsp (from r655885, myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/fileIntoCondition.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/fileIntoCondition.jsp?p2=myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/fileIntoCondition.jsp&p1=myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/fileIntoCondition.jsp&r1=655885&r2=656710&rev=656710&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/fileIntoCondition.jsp (original)
+++ myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/fileIntoCondition.jsp Thu May 15 08:48:15 2008
@@ -18,14 +18,10 @@
 <%@ taglib uri="http://myfaces.apache.org/tobago/sandbox" prefix="tcs" %>
 <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
 
-<f:view>
-  <tc:loadBundle basename="demo" var="bundle"/>
-
-  <tc:page label="Sandbox - Wizard" id="page" width="500px" height="300px">
-    <f:facet name="layout">
-      <tc:gridLayout margin="10px"/>
-    </f:facet>
+<layout:wizard>
+  <jsp:body>
 
     <tcs:wizard controller="#{controller.wizard}" title="File Into Condition" outcome="fileIntoCondition" next="next">
       <tc:panel>
@@ -50,5 +46,5 @@
       </tc:panel>
     </tcs:wizard>
 
-  </tc:page>
-</f:view>
+  </jsp:body>
+</layout:wizard>

Copied: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/filter.jsp (from r655885, myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/filter.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/filter.jsp?p2=myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/filter.jsp&p1=myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/filter.jsp&r1=655885&r2=656710&rev=656710&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/filter.jsp (original)
+++ myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/filter.jsp Thu May 15 08:48:15 2008
@@ -18,24 +18,19 @@
 <%@ taglib uri="http://myfaces.apache.org/tobago/sandbox" prefix="tcs" %>
 <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
 
-<f:view>
-  <tc:loadBundle basename="demo" var="bundle"/>
-
-  <tc:page label="Sandbox - Wizard" id="page"
-           width="500px" height="300px">
-    <f:facet name="layout">
-      <tc:gridLayout margin="10px" />
-    </f:facet>
+<layout:wizard>
+  <jsp:body>
 
     <tcs:wizard controller="#{controller.wizard}" title="New Filter" outcome="filter" next="#{controller.createFilter}">
 
-      <tc:selectOneRadio value="#{controller.filterType}">
-        <tc:selectItem itemLabel="File Into" itemValue="fileInto" />
-        <tc:selectItem itemLabel="Forward" itemValue="forward" />
+      <tc:selectOneRadio value="#{controller.filterType}" required="true">
+        <tc:selectItem itemLabel="File Into" itemValue="fileInto"/>
+        <tc:selectItem itemLabel="Forward" itemValue="forward"/>
       </tc:selectOneRadio>
 
     </tcs:wizard>
 
-  </tc:page>
-</f:view>
+  </jsp:body>
+</layout:wizard>

Propchange: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/filter.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/filter.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/finish.jsp (from r655885, myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/finish.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/finish.jsp?p2=myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/finish.jsp&p1=myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/finish.jsp&r1=655885&r2=656710&rev=656710&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/finish.jsp (original)
+++ myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/finish.jsp Thu May 15 08:48:15 2008
@@ -18,15 +18,10 @@
 <%@ taglib uri="http://myfaces.apache.org/tobago/sandbox" prefix="tcs" %>
 <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
 
-<f:view>
-  <tc:loadBundle basename="demo" var="bundle"/>
-
-  <tc:page label="Sandbox - Wizard" id="page"
-           width="500px" height="300px">
-    <f:facet name="layout">
-      <tc:gridLayout margin="10px" />
-    </f:facet>
+<layout:wizard>
+  <jsp:body>
 
     <tcs:wizard controller="#{controller.wizard}" title="Finish" outcome="finish">
 
@@ -34,5 +29,5 @@
 
     </tcs:wizard>
 
-  </tc:page>
-</f:view>
+  </jsp:body>
+</layout:wizard>

Copied: myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/forwardCondition.jsp (from r655885, myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/forwardCondition.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/forwardCondition.jsp?p2=myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/forwardCondition.jsp&p1=myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/forwardCondition.jsp&r1=655885&r2=656710&rev=656710&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/forwardCondition.jsp (original)
+++ myfaces/tobago/branches/tobago-1.0.x/example/sandbox/src/main/webapp/wizard/navi/forwardCondition.jsp Thu May 15 08:48:15 2008
@@ -18,21 +18,16 @@
 <%@ taglib uri="http://myfaces.apache.org/tobago/sandbox" prefix="tcs" %>
 <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
 
-<f:view>
-  <tc:loadBundle basename="demo" var="bundle"/>
-
-  <tc:page label="Sandbox - Wizard" id="page"
-           width="500px" height="300px">
-    <f:facet name="layout">
-      <tc:gridLayout margin="10px" />
-    </f:facet>
+<layout:wizard>
+  <jsp:body>
 
     <tcs:wizard controller="#{controller.wizard}" title="Forward Condition" outcome="forwardCondition" next="next">
 
-      <tc:out value="Forward Condition" />
+      <tc:out value="Forward Condition"/>
 
     </tcs:wizard>
 
-  </tc:page>
-</f:view>
+  </jsp:body>
+</layout:wizard>

Modified: myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/Wizard.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/Wizard.java?rev=656710&r1=656709&r2=656710&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/Wizard.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/Wizard.java Thu May 15 08:48:15 2008
@@ -60,10 +60,8 @@
   /**
    * Managed bean (controller) method to execute to show the next view of the
    * wizard.
-   * 
-   * @return The outcome after the method was executed
    */
-  String next();
+  void next(ActionEvent event);
 
   /**
    * Indicates if the action next is available.
@@ -138,7 +136,7 @@
    * 
    * @param actionEvent
    */
-  void gotoClicked(ActionEvent actionEvent);
+//  void gotoClicked(ActionEvent actionEvent);
 
   /**
    * Managed bean (controller) method to execute to navigate between the wizards
@@ -146,16 +144,7 @@
    * 
    * @return The outcome after the method was executed
    */
-  String gotoStep();
-
-  /**
-   * Returns the outcome after the wizard stand actions where executed, which
-   * will not leave the wizards view Id (except in case of errors).
-   * 
-   * @return The outcome after the wizard actions where executed, except actions
-   *         which leave the view (viewId) where the wizard is shown
-   */
-  String getDefaultOutcome();
+//  String gotoStep();
 
   /**
    * Sets the strategy to use for backward navigation
@@ -165,9 +154,7 @@
    */
   void setBackwardNavigationStrategy(String strategy);
 
-  String getViewId();
-
-  List<AbstractWizardController.Info> getCourse();
+  List<WizardStep> getCourse();
 
   void registerOutcome(String outcome, String title);
 }

Copied: myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/WizardImpl.java (from r655885, myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/AbstractWizardController.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/WizardImpl.java?p2=myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/WizardImpl.java&p1=myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/AbstractWizardController.java&r1=655885&r2=656710&rev=656710&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/AbstractWizardController.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/WizardImpl.java Thu May 15 08:48:15 2008
@@ -17,28 +17,21 @@
  * limitations under the License.
  */
 
-import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.tobago.component.UICommand;
 
-import javax.faces.application.FacesMessage;
-import javax.faces.context.FacesContext;
 import javax.faces.event.ActionEvent;
 import java.util.ArrayList;
 import java.util.List;
 
-public abstract class AbstractWizardController implements Wizard {
+public class WizardImpl implements Wizard {
 
-  private static final Log LOG = LogFactory
-      .getLog(AbstractWizardController.class);
+  private static final Log LOG = LogFactory.getLog(WizardImpl.class);
 
   private static final String WIZARD_FINISH_OUTCOME = "wizard-finish";
 
   private static final String WIZARD_CANCEL_OUTCOME = "wizard-cancel";
 
-  private String defaultOutcome;
-
   private int index;
 
   private int size;
@@ -54,63 +47,39 @@
 
   private WizardBackwardNavigationStrategy backNavStrategy = WizardBackwardNavigationStrategy.NOT_ALLOWED;
 
-  private String viewId;
-
-  private List<Info> course;
+  private List<WizardStep> course;
 
-  /* Constructor */
-
-  protected AbstractWizardController() {
+  public WizardImpl() {
     reset();
   }
 
-  /* Methods */
-
-  /**
-   * @see Wizard#next()
-   */
-  public final String next() {
-    LOG.debug("next");
-
-    boolean success = doNext();
-    if (success) {
-      index++;
+  public void next(ActionEvent event) {
+    LOG.debug("next: " + event);
 
-      if (!sizeSet && (size < index)) {
-        size++;
-      }
+    index++;
 
+    if (!sizeSet && (size < index)) {
+      size++;
     }
-
-    // makeContentDecision(index);
-
-    // return getDefaultOutcome();
-
-    return getOutcome(index);
   }
 
-  /**
-   * <p>
-   * Hook for the implementation of business logic, after invoking the action
-   * {@link org.apache.myfaces.tobago.model.AbstractWizardController#next()}.
-   * If the execution of the business logic completed successfully, the method
-   * has to return <i>true</i>. Otherwise the method has to return <i>false</i>.
-   * </p>
-   * 
-   * @return true if the method completed sucessfully, false if not
-   */
-  protected abstract boolean doNext();
+  public void gotoStep(ActionEvent event) {
+    index = Integer.parseInt((String) (event.getComponent().getAttributes().get("step")));
 
-  // XXX simplify
-  public void next(ActionEvent event) {
-    next();
-  }
+    LOG.debug("gotoStep: " + index);
 
-  // TODO : javadoc
-  public void gotoStep(ActionEvent event) {
-    int step = Integer.parseInt((String) (event.getComponent().getAttributes()
-        .get("step")));
-    index = step;
+    preparedForFinishing = false;
+    index = requestedIndex;
+
+    switch (backNavStrategy) {
+      case DELETE:
+        if (!isSizeSet()) {
+          size = index;
+        }
+        break;
+      default:
+        break;
+    }
   }
 
   /**
@@ -143,13 +112,13 @@
       }
 
       switch (backNavStrategy) {
-      case DELETE:
-        if (!sizeSet) {
-          size = index;
-        }
-        break;
-      default:
-        break;
+        case DELETE:
+          if (!sizeSet) {
+            size = index;
+          }
+          break;
+        default:
+          break;
       }
     }
 
@@ -162,7 +131,7 @@
   /**
    * <p>
    * Hook for the implementation of business logic, after invoking the action
-   * {@link org.apache.myfaces.tobago.model.AbstractWizardController#previous()}.
+   * {@link WizardImpl#previous()}.
    * If the execution of the business logic completed successfully, the method
    * has to return <i>true</i>. Otherwise the method has to return <i>false</i>.
    * </p>
@@ -171,10 +140,12 @@
    * business logic is <i>immediate</i>, the same view will be showed again if
    * the business logic returned <i>false</i>.
    * </p>
-   * 
+   *
    * @return true if the method completed sucessfully, false if not
    */
-  protected abstract boolean doPrevious();
+  protected boolean doPrevious() {
+    return true; // fixme
+  }
 
   /**
    * @see Wizard#isPreviousAvailable()
@@ -199,9 +170,8 @@
 
   /**
    * Sets the indicator for immediate backward navigation.
-   * 
-   * @param immediate
-   *          True if backward navigation is immediate, otherwise false
+   *
+   * @param immediate True if backward navigation is immediate, otherwise false
    */
   public void setBackwardNavigationImmediate(boolean immediate) {
     this.backNavImmediate = immediate;
@@ -225,7 +195,7 @@
     boolean success = doFinish();
     if (!success) {
       // makeContentDecision(index);
-      return getDefaultOutcome();
+      return "fixme"; // fixme
     }
 
     reset();
@@ -235,14 +205,16 @@
   /**
    * <p>
    * Hook for the implementation of business logic, after invoking the action
-   * {@link org.apache.myfaces.tobago.model.AbstractWizardController#finish()}.
+   * {@link WizardImpl#finish()}.
    * If the execution of the business logic completed successfully, the method
    * has to return <i>true</i>. Otherwise the method has to return <i>false</i>.
    * </p>
-   * 
+   *
    * @return true if the method completed sucessfully, false if not
    */
-  protected abstract boolean doFinish();
+  protected boolean doFinish() {
+    return true;
+  }
 
   /**
    * @see Wizard#isFinishAvailable()
@@ -261,7 +233,7 @@
     boolean success = doCancel();
     if (!success) {
       // makeContentDecision(index);
-      return getDefaultOutcome();
+      return "fixme"; // fixme
     }
     reset();
     return WIZARD_CANCEL_OUTCOME;
@@ -270,19 +242,21 @@
   /**
    * <p>
    * Hook for the implementation of business logic, after invoking the action
-   * {@link org.apache.myfaces.tobago.model.AbstractWizardController#cancel()}.
+   * {@link WizardImpl#cancel()}.
    * If the execution of the business logic completed successfully, the method
    * has to return <i>true</i>. Otherwise the method has to return <i>false</i>.
    * </p>
-   * 
+   *
    * @return true if the method completed sucessfully, false if not
    */
-  protected abstract boolean doCancel();
+  protected boolean doCancel() {
+    return true; // fixme
+  }
 
   /**
    * @see Wizard#gotoClicked(ActionEvent)
    */
-  public final void gotoClicked(ActionEvent actionEvent) {
+/*  public final void gotoClicked(ActionEvent actionEvent) {
     if (LOG.isDebugEnabled()) {
       LOG.debug("gotoClicked");
     }
@@ -301,54 +275,7 @@
               "Step index unknown: " + stepIndex));
     }
   }
-
-  /**
-   * @see Wizard#gotoStep()
-   */
-  public final String gotoStep() {
-    LOG.debug("gotoStep: " + requestedIndex);
-
-    boolean success = doGotoStep(requestedIndex);
-    if (success) {
-      preparedForFinishing = false;
-      index = requestedIndex;
-
-      switch (backNavStrategy) {
-      case DELETE:
-        if (!isSizeSet()) {
-          size = index;
-        }
-        break;
-      default:
-        break;
-      }
-    }
-
-    // makeContentDecision(index);
-    // reset requestIndex
-    requestedIndex = 0;
-    // return getDefaultOutcome();
-    return getOutcome(index);
-  }
-
-  /**
-   * <p>
-   * Hook for the implementation of business logic, after invoking the action
-   * {@link org.apache.myfaces.tobago.model.AbstractWizardController#gotoStep()}.
-   * If the execution of the business logic completed successfully, the method
-   * has to return <i>true</i>. Otherwise the method has to return <i>false</i>.
-   * </p>
-   * <p>
-   * <b>Note: </b>Even if the action which triggerd the execution of the
-   * business logic is <i>immediate</i>, the same view will be showed again if
-   * the business logic returned <i>false</i>.
-   * </p>
-   * 
-   * @param indexToShow
-   *          The view index to show next
-   * @return true if the method completed sucessfully, false if not
-   */
-  protected abstract boolean doGotoStep(int indexToShow);
+*/
 
   /**
    * @see Wizard#getIndex()
@@ -360,7 +287,7 @@
   /**
    * Returns an indicator to distinguish if the number (size) of the wizard
    * views is known or is configured.
-   * 
+   *
    * @return True if the size of the wizards views is set otherwise false
    */
   public final boolean isSizeSet() {
@@ -384,11 +311,9 @@
   /**
    * Sets the size (number) of the wizards views and a flag indicating that the
    * set/configured size has to be reset.
-   * 
-   * @param size
-   *          The number of the wizards views
-   * @param reset
-   *          Flag indication if the already size set, has to be reset
+   *
+   * @param size  The number of the wizards views
+   * @param reset Flag indication if the already size set, has to be reset
    */
   public final void setSize(int size, boolean reset) {
     if (reset) {
@@ -415,30 +340,12 @@
     if (!sizeSet) {
       size = 0;
     }
-    course = new ArrayList<Info>();
-  }
-
-  /**
-   * @see Wizard#getDefaultOutcome()
-   */
-  public final String getDefaultOutcome() {
-    return defaultOutcome;
-  }
-
-  /**
-   * Sets the outcome after the wizard stand actions where executed, which will
-   * not leave the wizards view Id (except in case of errors).
-   * 
-   * @param defaultOutcome
-   *          The outcome of the wizards standard actions
-   */
-  public final void setDefaultOutcome(String defaultOutcome) {
-    this.defaultOutcome = defaultOutcome;
+    course = new ArrayList<WizardStep>();
   }
 
   /**
    * Return the set backward navigation strategy.
-   * 
+   *
    * @return The actual backward navigation strategy.
    */
   public final WizardBackwardNavigationStrategy getWizardBackwardNavigationStrategy() {
@@ -448,7 +355,7 @@
   /**
    * Return the set backward navigation strategy as a String. For possible
    * parameter values see {@link Wizard}.
-   * 
+   *
    * @return The actual backward navigation strategy as a String.
    */
   public final String getBackwardNavigationStrategy() {
@@ -467,9 +374,8 @@
    * {@link org.apache.myfaces.tobago.model.WizardBackwardNavigationStrategy#NOT_ALLOWED}
    * will be applied.
    * </p>
-   * 
-   * @param strategy
-   *          The strategy to use for backward navigation
+   *
+   * @param strategy The strategy to use for backward navigation
    */
   public final void setBackwardNavigationStrategy(String strategy) {
     try {
@@ -484,17 +390,10 @@
     }
   }
 
-  // todo
-  public String getViewId() {
-    viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();
-    return viewId; // To change body of implemented methods use File | Settings
-    // | File Templates.
-  }
-
   /**
    * @see Wizard#getCourse()
    */
-  public List<Info> getCourse() {
+  public List<WizardStep> getCourse() {
     return course;
   }
 
@@ -504,9 +403,9 @@
   public void registerOutcome(String outcome, String title) {
 
     if (index == course.size()) { // this is a new page
-      course.add(new Info(outcome, title, index));
+      course.add(new WizardStep(outcome, title, index));
     } else if (index < course.size()) {
-      course.set(index, new Info(outcome, title, index));
+      course.set(index, new WizardStep(outcome, title, index));
     } else {
       throw new IllegalStateException("Index too large for course: index="
           + index + " course.size()=" + course.size());
@@ -516,61 +415,24 @@
     }
   }
 
-  public void registerOutcome(String outcome, String title, int index) {
+  /*
+    public void registerOutcome(String outcome, String title, int index) {
 
-    if (index == course.size()) { // this is a new page
-      course.add(new Info(outcome, title, index));
-    } else {
-      registerOutcome(outcome, title);
+      if (index == course.size()) { // this is a new page
+        course.add(new Info(outcome, title, index));
+      } else {
+        registerOutcome(outcome, title);
+      }
     }
-  }
-
+  */
   /**
    * Returns the outcome for the requested wizard view
-   * 
-   * @param forIndex
-   *          The index of the requested wizard view
+   *
+   * @param forIndex The index of the requested wizard view
    * @return The outcome for the view index
    */
   public final String getOutcome(int forIndex) {
-    return course.get(index).getOutcome();
-  }
-
-  // XXX
-  public static class Info {
-    private String outcome;
-    private String title;
-    private int index;
-
-    public Info(String outcome, String title, int index) {
-      this.outcome = outcome;
-      this.title = title;
-      this.index = index;
-    }
-
-    public String getOutcome() {
-      return outcome;
-    }
-
-    public void setOutcome(String outcome) {
-      this.outcome = outcome;
-    }
-
-    public String getTitle() {
-      return title;
-    }
-
-    public void setTitle(String title) {
-      this.title = title;
-    }
-
-    public int getIndex() {
-      return index;
-    }
-
-    public void setIndex(int index) {
-      this.index = index;
-    }
+    return course.get(forIndex).getOutcome();
   }
 
 }

Added: myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/WizardStep.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/WizardStep.java?rev=656710&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/WizardStep.java (added)
+++ myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/model/WizardStep.java Thu May 15 08:48:15 2008
@@ -0,0 +1,60 @@
+package org.apache.myfaces.tobago.model;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+/**
+ * User: lofwyr
+ * Date: 15.05.2008 09:33:43
+ */
+
+public class WizardStep {
+
+  private String outcome;
+  private String title;
+  private int index;
+
+  public WizardStep(String outcome, String title, int index) {
+    this.outcome = outcome;
+    this.title = title;
+    this.index = index;
+  }
+
+  public String getOutcome() {
+    return outcome;
+  }
+
+  public void setOutcome(String outcome) {
+    this.outcome = outcome;
+  }
+
+  public String getTitle() {
+    return title;
+  }
+
+  public void setTitle(String title) {
+    this.title = title;
+  }
+
+  public int getIndex() {
+    return index;
+  }
+
+  public void setIndex(int index) {
+    this.index = index;
+  }
+}

Modified: myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/WizardTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/WizardTag.java?rev=656710&r1=656709&r2=656710&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/WizardTag.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/WizardTag.java Thu May 15 08:48:15 2008
@@ -25,8 +25,8 @@
 import org.apache.myfaces.tobago.apt.annotation.Tag;
 import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
-import org.apache.myfaces.tobago.model.AbstractWizardController;
 import org.apache.myfaces.tobago.model.Wizard;
+import org.apache.myfaces.tobago.model.WizardStep;
 import org.apache.myfaces.tobago.taglib.component.AttributeTag;
 import org.apache.myfaces.tobago.taglib.component.ButtonTag;
 import org.apache.myfaces.tobago.taglib.component.CellTag;
@@ -90,7 +90,7 @@
 
   private void processTrain() throws JspException {
 
-    List<AbstractWizardController.Info> course = null;
+    List<WizardStep> course = null;
     try {
       Object bean = VariableResolverUtil.resolveVariable(FacesContext.getCurrentInstance(), "controller");
       Wizard wizard = (Wizard) PropertyUtils.getProperty(bean, "wizard");
@@ -115,7 +115,7 @@
     gridLayoutTag.setPageContext(pageContext);
 //    gridLayoutTag.setColumns("*");
     StringBuilder columns = new StringBuilder();
-    for (AbstractWizardController.Info info : course) {
+    for (WizardStep info : course) {
       columns.append("fixed;");
     }
     gridLayoutTag.setColumns(columns + "*");
@@ -125,7 +125,7 @@
 
     facetTag.doEndTag();
 
-    for (AbstractWizardController.Info info : course) {
+    for (WizardStep info : course) {
       ButtonTag button = new ButtonTag();
       button.setPageContext(pageContext);
       button.setParent(p);