Author: werpu
Date: Fri Oct 7 15:38:44 2005
New Revision: 307205
URL: http://svn.apache.org/viewcvs?rev=307205&view=rev
Log:
added the scope shop
Added:
myfaces/examples/trunk/sandbox/scopeshop/
myfaces/examples/trunk/sandbox/scopeshop/page1.jsp
myfaces/examples/trunk/sandbox/scopeshop/page2.jsp
myfaces/examples/trunk/sandbox/scopeshop/page3.jsp
myfaces/examples/trunk/sandbox/scopeshop/resetscope.jsp
Modified:
myfaces/examples/trunk/sandbox/WEB-INF/examples-config.xml
Modified: myfaces/examples/trunk/sandbox/WEB-INF/examples-config.xml
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/sandbox/WEB-INF/examples-config.xml?rev=307205&r1=307204&r2=307205&view=diff
==============================================================================
--- myfaces/examples/trunk/sandbox/WEB-INF/examples-config.xml (original)
+++ myfaces/examples/trunk/sandbox/WEB-INF/examples-config.xml Fri Oct 7 15:38:44 2005
@@ -256,9 +256,9 @@
</map-entries>
</managed-bean>
-
+
<!-- Managed Beans for schedule.jsp -->
-
+
<managed-bean>
<managed-bean-name>scheduleBean</managed-bean-name>
<managed-bean-class>org.apache.myfaces.examples.schedule.ScheduleBean</managed-bean-class>
@@ -280,7 +280,7 @@
<value>true</value>
</managed-property>
</managed-bean>
-
+
<managed-bean>
<managed-bean-name>appointmentBean</managed-bean-name>
<managed-bean-class>org.apache.myfaces.examples.schedule.AppointmentBean</managed-bean-class>
@@ -290,7 +290,7 @@
<value>#{scheduleBean}</value>
</managed-property>
</managed-bean>
-
+
<!-- managed bean for graphicImageAjax-->
<managed-bean>
@@ -299,4 +299,127 @@
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
+ <!-- Managed beans for the scope shop -->
+ <managed-bean>
+ <managed-bean-name>ScopeBean</managed-bean-name>
+ <managed-bean-class>
+ org.apache.myfaces.examples.scope.ScopeBean
+ </managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>firstname</property-name>
+ <property-class>java.lang.String</property-class>
+ <value />
+ </managed-property>
+ <managed-property>
+ <property-name>lastname</property-name>
+ <property-class>java.lang.String</property-class>
+ <value />
+ </managed-property>
+ <managed-property>
+ <property-name>street</property-name>
+ <property-class>java.lang.String</property-class>
+ <value />
+ </managed-property>
+ <managed-property>
+ <property-name>number</property-name>
+ <property-class>java.lang.String</property-class>
+ <value />
+ </managed-property>
+ <managed-property>
+ <property-name>country</property-name>
+ <property-class>java.lang.String</property-class>
+ <value />
+ </managed-property>
+ <managed-property>
+ <property-name>selectedproduct1</property-name>
+ <property-class>java.lang.String</property-class>
+ <value />
+ </managed-property>
+ <managed-property>
+ <property-name>selectedproduct2</property-name>
+ <property-class>java.lang.String</property-class>
+ <value />
+ </managed-property>
+ <managed-property>
+ <property-name>selectedproduct3</property-name>
+ <property-class>java.lang.String</property-class>
+ <value />
+ </managed-property>
+ <managed-property>
+ <property-name>selectedproduct4</property-name>
+ <property-class>java.lang.String</property-class>
+ <value />
+ </managed-property>
+ <managed-property>
+ <property-name>selectedproduct5</property-name>
+ <property-class>java.lang.String</property-class>
+ <value />
+ </managed-property>
+ <managed-property>
+ <property-name>zipcode</property-name>
+ <property-class>java.lang.String</property-class>
+ <value />
+ </managed-property>
+ <managed-property>
+ <property-name>city</property-name>
+ <property-class>java.lang.String</property-class>
+ <value />
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>catalog</managed-bean-name>
+ <managed-bean-class>
+ org.apache.myfaces.examples.scope.Catalog
+ </managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+
+
+
+ <!-- navigational rules for the wizard -->
+ <navigation-rule>
+ <from-view-id>/*</from-view-id>
+ <navigation-case>
+ <from-outcome>go_scope_shop</from-outcome>
+ <to-view-id>/scopeshop/page1.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/scopeshop/page1.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>go_next</from-outcome>
+ <to-view-id>/scopeshop/page2.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/scopeshop/page2.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>go_next</from-outcome>
+ <to-view-id>/scopeshop/page3.jsp</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>go_reset</from-outcome>
+ <to-view-id>/scopeshop/resetscope.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/scopeshop/page3.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>go_previous</from-outcome>
+ <to-view-id>/scopeshop/page2.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/scopeshop/*</from-view-id>
+ <navigation-case>
+ <from-outcome>go_first</from-outcome>
+ <to-view-id>/scopeshop/page1.jsp</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>go_home</from-outcome>
+ <to-view-id>/home.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <!-- navigational rules for the wizard end -->
</faces-config>
Added: myfaces/examples/trunk/sandbox/scopeshop/page1.jsp
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/sandbox/scopeshop/page1.jsp?rev=307205&view=auto
==============================================================================
--- myfaces/examples/trunk/sandbox/scopeshop/page1.jsp (added)
+++ myfaces/examples/trunk/sandbox/scopeshop/page1.jsp Fri Oct 7 15:38:44 2005
@@ -0,0 +1,68 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+<%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
+
+<html>
+
+<%@include file="../inc/head.inc" %>
+
+<body>
+<f:view>
+ <h:panelGroup>
+
+ <t:div id="Header">
+ <f:subview id="head">
+ <jsp:include page="../inc/head.jsp" />
+ </f:subview>
+ </t:div>
+ <t:div id="Menu">
+ <f:subview id="nav">
+ <jsp:include page="../inc/navigation.jsp" />
+ </f:subview>
+ </t:div>
+
+ <t:div id="Content">
+ <h:form id="theselectForm">
+ <s:scope id="thescope" value="#{ScopeBean}" />
+ <h:panelGrid columns="1">
+ <h:outputFormat value="Frobozz Industrial Magic Order Form" />
+ <h:outputFormat value="Product order form"/>
+ </h:panelGrid>
+
+ <h:panelGrid columns="2" >
+ <h:outputFormat value="product1"/>
+ <h:selectOneMenu value="#{ScopeBean.selectedproduct1}">
+ <f:selectItems value="#{catalog.items}"/>
+ </h:selectOneMenu>
+ <h:outputFormat value="product2"/>
+ <h:selectOneMenu value="#{ScopeBean.selectedproduct2}">
+ <f:selectItems value="#{catalog.items}"/>
+ </h:selectOneMenu>
+ <h:outputFormat value="product3"/>
+ <h:selectOneMenu value="#{ScopeBean.selectedproduct3}">
+ <f:selectItems value="#{catalog.items}"/>
+ </h:selectOneMenu>
+ <h:outputFormat value="product4"/>
+ <h:selectOneMenu value="#{ScopeBean.selectedproduct4}">
+ <f:selectItems value="#{catalog.items}"/>
+ </h:selectOneMenu>
+ <h:outputFormat value="product5"/>
+ <h:selectOneMenu value="#{ScopeBean.selectedproduct5}">
+ <f:selectItems value="#{catalog.items}"/>
+ </h:selectOneMenu>
+ </h:panelGrid>
+
+ <h:panelGrid columns="3">
+ <h:commandLink value="[Main Page]" action="go_home"/>
+ <h:commandLink value="[Next >>>]" action="go_next"/>
+ </h:panelGrid>
+ </h:form>
+ </t:div>
+ </h:panelGroup>
+</f:view>
+</body>
+
+<%@include file="../inc/page_footer.jsp" %>
+
+</html>
Added: myfaces/examples/trunk/sandbox/scopeshop/page2.jsp
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/sandbox/scopeshop/page2.jsp?rev=307205&view=auto
==============================================================================
--- myfaces/examples/trunk/sandbox/scopeshop/page2.jsp (added)
+++ myfaces/examples/trunk/sandbox/scopeshop/page2.jsp Fri Oct 7 15:38:44 2005
@@ -0,0 +1,60 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+<%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
+
+<html>
+<%@include file="../inc/head.inc" %><body>
+<f:view>
+ <h:panelGroup>
+
+ <t:div id="Header">
+ <f:subview id="head">
+ <jsp:include page="../inc/head.jsp" />
+ </f:subview>
+ </t:div>
+ <t:div id="Menu">
+ <f:subview id="nav">
+ <jsp:include page="../inc/navigation.jsp" />
+ </f:subview>
+ </t:div>
+
+ <t:div id="Content">
+ <h:form id="scopeForm">
+ <s:scope id="thescope" value="#{ScopeBean}" />
+ <h:panelGrid columns="1">
+ <h:outputFormat value="Frobozz Industrial Magic Order Form" />
+ <h:outputFormat value="Customer data" />
+ </h:panelGrid>
+
+ <h:panelGrid columns="2">
+ <h:outputFormat value="First Name" />
+ <h:inputText id="firstname" value="#{ScopeBean.firstname}" />
+ <h:outputFormat value="Last Name" />
+ <h:inputText id="lastname" value="#{ScopeBean.lastname}" />
+ <h:outputFormat value="Street" />
+ <h:inputText id="street" value="#{ScopeBean.street}" />
+ <h:outputFormat value="Number" />
+ <h:inputText id="strno" value="#{ScopeBean.number}" />
+ <h:outputFormat value="Zip/Area Code" />
+ <h:inputText id="zip" value="#{ScopeBean.zipcode}" />
+ <h:outputFormat value="City" />
+ <h:inputText id="city" value="#{ScopeBean.city}" />
+ <h:outputFormat value="Country" />
+ <h:inputText id="country" value="#{ScopeBean.country}" />
+
+ </h:panelGrid>
+
+ <h:panelGrid columns="4">
+ <h:commandLink value="[Main Page]" action="go_home" />
+ <h:commandLink value="[Reset Order]" action="go_reset" />
+ <h:commandLink value="[<<< Previous]" action="go_first" />
+ <h:commandLink value="[Next >>>]" action="go_next" />
+ </h:panelGrid>
+ </h:form>
+ </t:div>
+ </h:panelGroup>
+</f:view>
+</body>
+<%@include file="../inc/page_footer.jsp" %>
+</html>
Added: myfaces/examples/trunk/sandbox/scopeshop/page3.jsp
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/sandbox/scopeshop/page3.jsp?rev=307205&view=auto
==============================================================================
--- myfaces/examples/trunk/sandbox/scopeshop/page3.jsp (added)
+++ myfaces/examples/trunk/sandbox/scopeshop/page3.jsp Fri Oct 7 15:38:44 2005
@@ -0,0 +1,64 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+<%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
+
+<html>
+
+<html>
+<%@include file="../inc/head.inc" %>
+<body>
+<f:view>
+ <h:panelGroup>
+ <t:div id="Header">
+ <f:subview id="head">
+ <jsp:include page="../inc/head.jsp" />
+ </f:subview>
+ </t:div>
+ <t:div id="Menu">
+ <f:subview id="nav">
+ <jsp:include page="../inc/navigation.jsp" />
+ </f:subview>
+ </t:div>
+
+ <t:div id="Content">
+ <h:form id="scopeForm">
+ <s:scope id="thescope" value="#{ScopeBean}" />
+
+ <h:panelGrid columns="1">
+ <h:outputFormat value="Frobozz Industrial Magic Order Form" />
+ <h:outputFormat value="Thank you for shopping at Frobozz Industrial Magic" />
+ </h:panelGrid>
+
+ <h:panelGrid columns="2">
+
+ <h:outputFormat value="First Name" />
+ <h:outputFormat id="firstname" value="#{ScopeBean.firstname}" />
+ <h:outputFormat value="Last Name" />
+ <h:outputFormat id="lastname" value="#{ScopeBean.lastname}" />
+ <h:outputFormat value="Street" />
+ <h:outputFormat id="street" value="#{ScopeBean.street}" />
+ <h:outputFormat value="Number" />
+ <h:outputFormat id="strno" value="#{ScopeBean.number}" />
+ <h:outputFormat value="Zip/Area Code" />
+ <h:outputFormat id="zip" value="#{ScopeBean.zipcode}" />
+ <h:outputFormat value="City" />
+ <h:outputFormat id="city" value="#{ScopeBean.city}" />
+ <h:outputFormat value="Country" />
+ <h:outputFormat id="country" value="#{ScopeBean.country}" />
+ <h:outputFormat value="Itemslist" />
+ <h:outputFormat id="itemsno" value="#{ScopeBean.itemsList}" />
+
+ </h:panelGrid>
+
+ <h:panelGrid columns="3">
+ <h:commandLink value="[Main Page]" action="go_home" />
+ <h:commandLink value="[<<< Previous]" action="go_previous" />
+ </h:panelGrid>
+ </h:form>
+ </t:div>
+ </h:panelGroup>
+</f:view>
+</body>
+<%@include file="../inc/page_footer.jsp" %>
+</html>
Added: myfaces/examples/trunk/sandbox/scopeshop/resetscope.jsp
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/sandbox/scopeshop/resetscope.jsp?rev=307205&view=auto
==============================================================================
--- myfaces/examples/trunk/sandbox/scopeshop/resetscope.jsp (added)
+++ myfaces/examples/trunk/sandbox/scopeshop/resetscope.jsp Fri Oct 7 15:38:44 2005
@@ -0,0 +1,32 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+<%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
+
+<html>
+<%@include file="../inc/head.inc" %>
+<body>
+<f:view>
+ <h:panelGroup>
+ <t:div id="Header">
+ <f:subview id="head">
+ <jsp:include page="../inc/head.jsp" />
+ </f:subview>
+ </t:div>
+ <t:div id="Menu">
+ <f:subview id="nav">
+ <jsp:include page="../inc/navigation.jsp" />
+ </f:subview>
+ </t:div>
+
+ <t:div id="Content">
+ <h:panelGrid columns="1">
+ <h:outputFormat value="Order reset, press ok to begin anew" />
+ <h:commandLink value="[OK]" action="go_first"></h:commandLink>
+ </h:panelGrid>
+ </t:div>
+ </h:panelGroup>
+</f:view>
+</body>
+<%@include file="../inc/page_footer.jsp" %>
+</html>
|