You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2008/07/09 14:42:18 UTC
svn commit: r675149 - in /myfaces/orchestra/trunk/examples: ./
src/main/java/org/apache/myfaces/examples/tripPlanner/
src/main/java/org/apache/myfaces/examples/tripPlanner/backings/
src/main/java/org/apache/myfaces/examples/tripPlanner/model/ src/main/...
Author: skitching
Date: Wed Jul 9 05:42:17 2008
New Revision: 675149
URL: http://svn.apache.org/viewvc?rev=675149&view=rev
Log:
Add orchestra flow example.
Added:
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerOverview.java (with props)
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerPlane.java (with props)
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerTrain.java (with props)
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/Journey.java (with props)
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/PlaneJourney.java (with props)
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/TrainJourney.java (with props)
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/backings/
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/backings/TerminusSelectorDetails.java (with props)
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/backings/TerminusSelectorOverview.java (with props)
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/model/
myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/model/Terminus.java (with props)
myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/
myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/overview.jsp (with props)
myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/plane-flow.xml (with props)
myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/plane.jsp (with props)
myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/
myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelector-flow.xml (with props)
myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelector.jsp (with props)
myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelectorDetails.jsp (with props)
myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/train-flow.xml (with props)
myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/train.jsp (with props)
Modified:
myfaces/orchestra/trunk/examples/pom.xml
myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/applicationContext.xml
myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/faces-config.xml
myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp
Modified: myfaces/orchestra/trunk/examples/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/pom.xml?rev=675149&r1=675148&r2=675149&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/pom.xml (original)
+++ myfaces/orchestra/trunk/examples/pom.xml Wed Jul 9 05:42:17 2008
@@ -88,7 +88,6 @@
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>1.1.6-SNAPSHOT</version>
-
</dependency>
<dependency>
@@ -225,6 +224,12 @@
</dependency>
<dependency>
+ <groupId>org.apache.myfaces.orchestra</groupId>
+ <artifactId>myfaces-orchestra-flow</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.myfaces.tomahawk</groupId>
<artifactId>tomahawk</artifactId>
<version>1.1.7-SNAPSHOT</version>
Added: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerOverview.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerOverview.java?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerOverview.java (added)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerOverview.java Wed Jul 9 05:42:17 2008
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+package org.apache.myfaces.examples.tripPlanner.backings;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.examples.tripPlanner.model.Journey;
+
+/**
+ * JSF backing-bean (aka controller class) for reservation.jsp.
+ */
+public class TripPlannerOverview
+{
+ private final Log log = LogFactory.getLog(TripPlannerOverview.class);
+
+ private List journeys = new ArrayList(20);
+
+ public void addJourney(Journey journey)
+ {
+ this.journeys.add(journey);
+ }
+
+ public List getJourneys()
+ {
+ return journeys;
+ }
+
+}
Propchange: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerOverview.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerPlane.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerPlane.java?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerPlane.java (added)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerPlane.java Wed Jul 9 05:42:17 2008
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+package org.apache.myfaces.examples.tripPlanner.backings;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.examples.tripPlanner.model.Journey;
+import org.apache.myfaces.examples.tripPlanner.model.PlaneJourney;
+import org.apache.myfaces.examples.tripPlanner.terminusSelector.model.Terminus;
+
+/**
+ * JSF backing-bean (aka controller class) for reservation.jsp.
+ */
+public class TripPlannerPlane
+{
+ private final Log log = LogFactory.getLog(TripPlannerPlane.class);
+
+ private TripPlannerOverview tripPlanner;
+ private String from;
+ private String to;
+ private String notes;
+
+ // bean configuration injects trip planner object into this bean
+ public void setTripPlanner(TripPlannerOverview tp)
+ {
+ tripPlanner = tp;
+ }
+
+ public String addJourney()
+ {
+ Journey journey = new PlaneJourney(from, to, notes);
+ tripPlanner.addJourney(journey);
+ return "overview";
+ }
+
+ public String getFrom()
+ {
+ return from;
+ }
+
+ public void setFrom(String from)
+ {
+ this.from = from;
+ }
+
+ public String getTo()
+ {
+ return to;
+ }
+
+ public void setTo(String to)
+ {
+ this.to = to;
+ }
+
+ public String getNotes()
+ {
+ return notes;
+ }
+
+ public void setNotes(String notes)
+ {
+ this.notes = notes;
+ }
+
+ public String getTerminusType()
+ {
+ return Terminus.TYPE_AIRPORT;
+ }
+}
Propchange: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerPlane.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerTrain.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerTrain.java?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerTrain.java (added)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerTrain.java Wed Jul 9 05:42:17 2008
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+package org.apache.myfaces.examples.tripPlanner.backings;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.examples.tripPlanner.model.Journey;
+import org.apache.myfaces.examples.tripPlanner.model.TrainJourney;
+import org.apache.myfaces.examples.tripPlanner.terminusSelector.model.Terminus;
+
+/**
+ * JSF backing-bean (aka controller class) for reservation.jsp.
+ */
+public class TripPlannerTrain
+{
+ private final Log log = LogFactory.getLog(TripPlannerTrain.class);
+
+ private TripPlannerOverview tripPlanner;
+ private String from;
+ private String to;
+ private String notes;
+
+ // bean configuration injects trip planner object into this bean
+ public void setTripPlanner(TripPlannerOverview tp)
+ {
+ tripPlanner = tp;
+ }
+
+ public String addJourney()
+ {
+ Journey journey = new TrainJourney(from, to, notes);
+ tripPlanner.addJourney(journey);
+ return "overview";
+ }
+
+ public String getFrom()
+ {
+ return from;
+ }
+
+ public void setFrom(String from)
+ {
+ this.from = from;
+ }
+
+ public String getTo()
+ {
+ return to;
+ }
+
+ public void setTo(String to)
+ {
+ this.to = to;
+ }
+
+ public String getNotes()
+ {
+ return notes;
+ }
+
+ public void setNotes(String notes)
+ {
+ this.notes = notes;
+ }
+
+ public String getTerminusType()
+ {
+ return Terminus.TYPE_STATION;
+ }
+}
Propchange: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/backings/TripPlannerTrain.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/Journey.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/Journey.java?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/Journey.java (added)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/Journey.java Wed Jul 9 05:42:17 2008
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+package org.apache.myfaces.examples.tripPlanner.model;
+
+
+
+public abstract class Journey
+{
+ private String from;
+ private String to;
+ private String notes;
+
+ public Journey(String from, String to, String notes)
+ {
+ this.from = from;
+ this.to = to;
+ this.notes = notes;
+ }
+
+ public abstract String getType();
+
+ public String getFrom()
+ {
+ return from;
+ }
+
+ public String getTo()
+ {
+ return to;
+ }
+
+ public String getNotes()
+ {
+ return notes;
+ }
+}
Propchange: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/Journey.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/PlaneJourney.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/PlaneJourney.java?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/PlaneJourney.java (added)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/PlaneJourney.java Wed Jul 9 05:42:17 2008
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+package org.apache.myfaces.examples.tripPlanner.model;
+
+
+
+public class PlaneJourney extends Journey
+{
+ public PlaneJourney(String from, String to, String notes)
+ {
+ super(from, to, notes);
+ }
+
+ public String getType()
+ {
+ return "Train";
+ }
+}
Propchange: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/PlaneJourney.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/TrainJourney.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/TrainJourney.java?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/TrainJourney.java (added)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/TrainJourney.java Wed Jul 9 05:42:17 2008
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+package org.apache.myfaces.examples.tripPlanner.model;
+
+
+
+public class TrainJourney extends Journey
+{
+ public TrainJourney(String from, String to, String notes)
+ {
+ super(from, to, notes);
+ }
+
+ public String getType()
+ {
+ return "Train";
+ }
+}
Propchange: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/model/TrainJourney.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/backings/TerminusSelectorDetails.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/backings/TerminusSelectorDetails.java?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/backings/TerminusSelectorDetails.java (added)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/backings/TerminusSelectorDetails.java Wed Jul 9 05:42:17 2008
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+package org.apache.myfaces.examples.tripPlanner.terminusSelector.backings;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.examples.tripPlanner.terminusSelector.model.Terminus;
+
+/**
+ * JSF backing-bean (aka controller class) for reservation.jsp.
+ */
+public class TerminusSelectorDetails
+{
+ private final Log log = LogFactory.getLog(TerminusSelectorDetails.class);
+
+ private Terminus terminus;
+
+ public void setTerminus(Terminus terminus)
+ {
+ this.terminus = terminus;
+ }
+
+ public Terminus getTerminus()
+ {
+ return terminus;
+ }
+}
Propchange: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/backings/TerminusSelectorDetails.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/backings/TerminusSelectorOverview.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/backings/TerminusSelectorOverview.java?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/backings/TerminusSelectorOverview.java (added)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/backings/TerminusSelectorOverview.java Wed Jul 9 05:42:17 2008
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ */
+package org.apache.myfaces.examples.tripPlanner.terminusSelector.backings;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.examples.tripPlanner.terminusSelector.model.Terminus;
+
+/**
+ * JSF backing-bean (aka controller class) for reservation.jsp.
+ */
+public class TerminusSelectorOverview
+{
+ private final Log log = LogFactory.getLog(TerminusSelectorOverview.class);
+
+ private static final Terminus[] TERMINII = new Terminus[]
+ {
+ new Terminus(Terminus.TYPE_AIRPORT, "Schwechat", "Vienna", "Main Austrian Airport"),
+ new Terminus(Terminus.TYPE_AIRPORT, "Heathrow", "London", "Main British Airport"),
+ new Terminus(Terminus.TYPE_AIRPORT, "Schiphol", "Amsterdam", "Main Dutch Airport"),
+ new Terminus(Terminus.TYPE_STATION, "Sudbahnhof Wien", "Vienna", "Southern Vienna Train Station"),
+ new Terminus(Terminus.TYPE_STATION, "Westbahnhof Wien", "Vienna", "Western Vienna Train Station"),
+ new Terminus(Terminus.TYPE_STATION, "Paddington", "London", "Monopoly Board (and where the bear was found)"),
+ new Terminus(Terminus.TYPE_STATION, "Marylebone", "London", "Monopoly Board"),
+ new Terminus(Terminus.TYPE_STATION, "Fenchurch", "London", "Monopoly Board"),
+ new Terminus(Terminus.TYPE_STATION, "High St. Kensington", "London", "Monopoly Board"),
+ };
+
+ private String terminusType;
+ private List terminii;
+ private Terminus selectedTerminus;
+
+ // This is expected to be set via the flow input parameters
+ public void setType(String type)
+ {
+ terminusType = type;
+
+ // filter the set of available Terminus objects according to type
+ terminii = new ArrayList();
+ for(int i=0; i<TERMINII.length; ++i)
+ {
+ Terminus t = TERMINII[i];
+ if (t.getType().equals(type))
+ {
+ terminii.add(t);
+ }
+ }
+
+ }
+
+ public String getType()
+ {
+ return terminusType;
+ }
+
+ public void setTerminus(Terminus terminus)
+ {
+ this.selectedTerminus = terminus;
+ }
+
+ public Terminus getTerminus()
+ {
+ return selectedTerminus;
+ }
+
+ public List getTerminii()
+ {
+ return terminii;
+ }
+}
Propchange: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/backings/TerminusSelectorOverview.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/model/Terminus.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/model/Terminus.java?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/model/Terminus.java (added)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/model/Terminus.java Wed Jul 9 05:42:17 2008
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+package org.apache.myfaces.examples.tripPlanner.terminusSelector.model;
+
+public class Terminus
+{
+ public static final String TYPE_AIRPORT = "airport";
+ public static final String TYPE_STATION = "station";
+
+ private String type;
+ private String name;
+ private String city;
+ private String desc;
+
+ public Terminus(String type, String name, String city, String desc)
+ {
+ this.type = type;
+ this.name = name;
+ this.city = city;
+ this.desc = desc;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getCity()
+ {
+ return city;
+ }
+
+ public String getDesc()
+ {
+ return desc;
+ }
+}
Propchange: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/tripPlanner/terminusSelector/model/Terminus.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/applicationContext.xml?rev=675149&r1=675148&r2=675149&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/applicationContext.xml (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/applicationContext.xml Wed Jul 9 05:42:17 2008
@@ -343,4 +343,34 @@
scope="conversation.access"
autowire="byName"/>
+ <!--
+ - tripPlanner
+ -->
+
+ <bean name="tripPlannerOverview"
+ class="org.apache.myfaces.examples.tripPlanner.backings.TripPlannerOverview"
+ scope="conversation.manual"
+ autowire="byName"/>
+
+ <bean name="tripPlannerPlane"
+ class="org.apache.myfaces.examples.tripPlanner.backings.TripPlannerPlane"
+ scope="conversation.access">
+ <property name="tripPlanner" ref="tripPlannerOverview"/>
+ </bean>
+
+ <bean name="tripPlannerTrain"
+ class="org.apache.myfaces.examples.tripPlanner.backings.TripPlannerTrain"
+ scope="conversation.access">
+ <property name="tripPlanner" ref="tripPlannerOverview"/>
+ </bean>
+
+ <!-- Note that this can safely be scope=manual because it is deleted when the flow ends anyway. -->
+ <bean name="terminusSelector"
+ class="org.apache.myfaces.examples.tripPlanner.terminusSelector.backings.TerminusSelectorOverview"
+ scope="conversation.manual"/>
+
+ <bean name="terminusSelectorDetails"
+ class="org.apache.myfaces.examples.tripPlanner.terminusSelector.backings.TerminusSelectorDetails"
+ scope="conversation.access"/>
+
</beans>
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/faces-config.xml?rev=675149&r1=675148&r2=675149&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/faces-config.xml Wed Jul 9 05:42:17 2008
@@ -27,6 +27,9 @@
<view-handler>org.apache.myfaces.orchestra.urlParamNav.UrlParameterViewHandler</view-handler>
</application>
+ <!--
+ - Navigation rules for the "simple" example (hotel reservation)
+ -->
<navigation-rule>
<description>rules leading from the reservationBook view</description>
<from-view-id>/simple/reservationBook.jsp</from-view-id>
@@ -62,6 +65,86 @@
</navigation-case>
</navigation-rule>
+ <!--
+ - Navigation rules for the "flow" example (journey planner)
+ -->
+ <navigation-rule>
+ <description>rules leading from the journey overview</description>
+ <from-view-id>/tripPlanner/overview.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>addPlane</from-outcome>
+ <to-view-id>/tripPlanner/plane.jsp</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>addTrain</from-outcome>
+ <to-view-id>/tripPlanner/train.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <description>rules leading from the plane screen</description>
+ <from-view-id>/tripPlanner/plane.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>overview</from-outcome>
+ <to-view-id>/tripPlanner/overview.jsp</to-view-id>
+ </navigation-case>
+
+ <!-- navigate to start of flow -->
+ <navigation-case>
+ <from-outcome>chooseTerminusFrom</from-outcome>
+ <to-view-id>/tripPlanner/terminusSelector/terminusSelector.jsp</to-view-id>
+ </navigation-case>
+
+ <!-- navigate to start of flow -->
+ <navigation-case>
+ <from-outcome>chooseTerminusTo</from-outcome>
+ <to-view-id>/tripPlanner/terminusSelector/terminusSelector.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <description>rules leading from the train screen</description>
+ <from-view-id>/tripPlanner/train.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>overview</from-outcome>
+ <to-view-id>/tripPlanner/overview.jsp</to-view-id>
+ </navigation-case>
+
+ <!-- navigate to start of flow -->
+ <navigation-case>
+ <from-outcome>chooseTerminusFrom</from-outcome>
+ <to-view-id>/tripPlanner/terminusSelector/terminusSelector.jsp</to-view-id>
+ </navigation-case>
+
+ <!-- navigate to start of flow -->
+ <navigation-case>
+ <from-outcome>chooseTerminusTo</from-outcome>
+ <to-view-id>/tripPlanner/terminusSelector/terminusSelector.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+
+ <navigation-rule>
+ <description>rules leading from the terminusSelector screen</description>
+ <from-view-id>/tripPlanner/terminusSelector/terminusSelector.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>details</from-outcome>
+ <to-view-id>/tripPlanner/terminusSelector/terminusSelectorDetails.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <description>rules leading from the terminusSelector details screen</description>
+ <from-view-id>/tripPlanner/terminusSelector/terminusSelectorDetails.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>overview</from-outcome>
+ <to-view-id>/tripPlanner/terminusSelector/terminusSelector.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <!--
+ - Navigation rules for the "configurator" example
+ -->
<navigation-rule>
<description>orderHead complete / checkout</description>
<navigation-case>
@@ -101,6 +184,7 @@
</navigation-case>
</navigation-rule>
+ <!-- ======================== -->
<navigation-rule>
<description>edit/new topic</description>
<navigation-case>
Modified: myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp?rev=675149&r1=675148&r2=675149&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp Wed Jul 9 05:42:17 2008
@@ -133,5 +133,21 @@
</div>
+
+ <div class="section" id="examples.flow">
+ <h3>Orchestra Flow Examples</h3>
+
+ <div class="example">
+ <h:outputLink value="tripPlanner/overview.faces">
+ <h:outputText value="A Trip Planner"/>
+ </h:outputLink>
+ <p>
+ This very simple webapp demonstrates how to define a common sequence of
+ pages as a "flow", and how to then call that flow from multiple places
+ passing parameters and accepting return values from the called flow.
+ </p>
+ </div>
+ </div>
+
<%@ include file="/footer.jspf"%>
</f:view>
\ No newline at end of file
Added: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/overview.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/overview.jsp?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/overview.jsp (added)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/overview.jsp Wed Jul 9 05:42:17 2008
@@ -0,0 +1,80 @@
+<%--
+ 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.
+ --%>
+
+<%@ page pageEncoding="UTF-8"%>
+<%@ 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"%>
+
+<f:view>
+ <%@ include file="/header.jspf"%>
+ <div class="pagedoc">
+ <p>
+ This trivial webapp demonstrates the use of Orchestra Flows. These allow common
+ page sequences to be invoked from multiple places, rather like a method-call in
+ java. As with a method call, parameters can be passed to a Flow, and the Flow can
+ return data to the caller. And when the Flow ends, control returns automatically
+ to the calling page, without any need for tricky navigation rules; the flow takes
+ care of that automatically.
+ <p>
+ The application is a simple trip-planning system. A journey consists of a list of
+ plane or train trips. Plane trips are chosen by going to the plane page, then
+ invoking the "select terminus" flow with an input parameter that specifies that
+ only airports are to be shown. Train trips are chosen by going to the train page,
+ then invoking the "select terminus" flow with an input parameter that specifies
+ that only train stations are to be shown. The flow shows a simple two-page
+ flow sequence that returns to wherever it was called from.
+ </p>
+ </div>
+
+ <h:form id="main">
+ <h3>Trip List</h3>
+ <h:dataTable var="journey" value="#{tripPlannerOverview.journeys}">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Type"/>
+ </f:facet>
+ <h:outputText value="#{journey.type}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="From"/>
+ </f:facet>
+ <h:outputText value="#{journey.from}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="To"/>
+ </f:facet>
+ <h:outputText value="#{journey.to}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Notes"/>
+ </f:facet>
+ <h:outputText value="#{journey.notes}"/>
+ </h:column>
+ </h:dataTable>
+ <h:commandButton id="addPlane" action="addPlane" value="Add Plane Journey"/>
+ <h:commandButton id="addTrain" action="addTrain" value="Add Train Journey"/>
+ </h:form>
+
+ <%@ include file="/footer.jspf"%>
+</f:view>
\ No newline at end of file
Propchange: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/overview.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/plane-flow.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/plane-flow.xml?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/plane-flow.xml (added)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/plane-flow.xml Wed Jul 9 05:42:17 2008
@@ -0,0 +1,10 @@
+<flowConfig>
+ <flowCall outcome="chooseTerminusFrom" service="org.apache.myfaces.orchestra.examples.ChooseTerminusByType">
+ <param name="type" src="#{tripPlannerPlane.terminusType}"/>
+ <return name="terminus" dst="#{tripPlannerPlane.from}"/>
+ </flowCall>
+ <flowCall outcome="chooseTerminusTo" service="org.apache.myfaces.orchestra.examples.ChooseTerminusByType">
+ <param name="type" src="#{tripPlannerPlane.terminusType}"/>
+ <return name="terminus" dst="#{tripPlannerPlane.to}"/>
+ </flowCall>
+</flowConfig>
\ No newline at end of file
Propchange: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/plane-flow.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/plane.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/plane.jsp?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/plane.jsp (added)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/plane.jsp Wed Jul 9 05:42:17 2008
@@ -0,0 +1,57 @@
+<%--
+ 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.
+ --%>
+
+<%@ page pageEncoding="UTF-8"%>
+<%@ 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"%>
+
+<f:view>
+ <%@ include file="/header.jspf"%>
+ <div class="pagedoc">
+ <p>
+ Demonstrates invoking of the terminusSelector flow passing a parameter of "airport"
+ and storing the return variable into a specific property of the backing bean.
+ </p>
+ </div>
+
+ <h:form id="main">
+ <h3>Plane Journey Planner</h3>
+
+ <h:panelGrid columns="3">
+ <h:outputLabel for="from" value="From"/>
+ <h:inputText id="from" disabled="true" value="#{tripPlannerPlane.from}" required="true"/>
+ <h:commandButton action="chooseTerminusFrom" value="Choose" immediate="true"/>
+
+ <h:outputLabel for="to" value="To"/>
+ <h:inputText id="to" disabled="true" value="#{tripPlannerPlane.to}" required="true"/>
+ <h:commandButton action="chooseTerminusTo" value="Choose" immediate="true"/>
+
+ <h:outputLabel for="notes" value="Notes"/>
+ <h:inputText id="notes" value="#{tripPlannerPlane.notes}" required="true"/>
+ <h:outputText value=""/>
+ </h:panelGrid>
+
+ <h:commandButton id="ok" action="#{tripPlannerPlane.addJourney}" value="OK"/>
+ <h:commandButton id="cancel" action="overview" value="Cancel" immediate="true"/>
+ </h:form>
+
+ <%@ include file="/footer.jspf"%>
+</f:view>
\ No newline at end of file
Propchange: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/plane.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelector-flow.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelector-flow.xml?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelector-flow.xml (added)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelector-flow.xml Wed Jul 9 05:42:17 2008
@@ -0,0 +1,6 @@
+<flowConfig>
+ <flowAccept service="org.apache.myfaces.orchestra.examples.ChooseTerminusByType">
+ <param name="type" dst="#{terminusSelector.type}"/>
+ <return name="terminus" src="#{terminusSelector.terminus.name}"/>
+ </flowAccept>
+</flowConfig>
\ No newline at end of file
Propchange: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelector-flow.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelector.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelector.jsp?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelector.jsp (added)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelector.jsp Wed Jul 9 05:42:17 2008
@@ -0,0 +1,65 @@
+<%--
+ 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.
+ --%>
+
+<%@ page pageEncoding="UTF-8"%>
+<%@ 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"%>
+
+<f:view>
+ <%@ include file="/header.jspf"%>
+ <div class="pagedoc">
+ <p>
+ This page is the entry point for a flow that can be called from other
+ pages in a webapp.
+ </p>
+ </div>
+
+ <h:form id="main">
+ <h3>Select City</h3>
+
+ <h:panelGrid columns="2">
+ <h:outputText value="Terminus type:"/>
+ <h:outputText value="#{terminusSelector.type}"/>
+ </h:panelGrid>
+
+ <h:dataTable var="terminus" value="#{terminusSelector.terminii}">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Type"/>
+ </f:facet>
+ <h:outputText value="#{terminus.type}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Name"/>
+ </f:facet>
+ <h:commandLink value="#{terminus.name}" action="details">
+ <t:updateActionListener property="#{terminusSelector.terminus}" value="#{terminus}"/>
+ <t:updateActionListener property="#{terminusSelectorDetails.terminus}" value="#{terminus}"/>
+ </h:commandLink>
+ </h:column>
+ </h:dataTable>
+
+ <h:commandButton id="cancel" action="cancel" value="Cancel"/>
+ </h:form>
+
+ <%@ include file="/footer.jspf"%>
+</f:view>
\ No newline at end of file
Propchange: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelector.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelectorDetails.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelectorDetails.jsp?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelectorDetails.jsp (added)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelectorDetails.jsp Wed Jul 9 05:42:17 2008
@@ -0,0 +1,55 @@
+<%--
+ 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.
+ --%>
+
+<%@ page pageEncoding="UTF-8"%>
+<%@ 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"%>
+
+<f:view>
+ <%@ include file="/header.jspf"%>
+ <div class="pagedoc">
+ <p>
+ Simple page to show the details of the selected terminus.
+ </p>
+ <p>
+ Note that if this page navigates to an outcome of "commit" or "cancel" then navigation
+ occurs back to whatever page called the terminusSelector flow.
+ </p>
+ </div>
+
+ <h:form id="main">
+ <h3>Terminus Details</h3>
+ <h:panelGrid columns="2">
+ <h:outputText value="name"/>
+ <h:inputText disabled="true" value="#{terminusSelectorDetails.terminus.name}"/>
+ <h:outputText value="city"/>
+ <h:inputText disabled="true" value="#{terminusSelectorDetails.terminus.city}"/>
+ <h:outputText value="desc"/>
+ <h:inputText disabled="true" value="#{terminusSelectorDetails.terminus.desc}"/>
+ </h:panelGrid>
+
+ <h:commandButton id="back" action="overview" value="back"/>
+ <h:commandButton id="ok" action="commit" value="OK"/>
+ <h:commandButton id="cancel" action="cancel" value="Cancel" immediate="true"/>
+ </h:form>
+
+ <%@ include file="/footer.jspf"%>
+</f:view>
\ No newline at end of file
Propchange: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/terminusSelector/terminusSelectorDetails.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/train-flow.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/train-flow.xml?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/train-flow.xml (added)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/train-flow.xml Wed Jul 9 05:42:17 2008
@@ -0,0 +1,10 @@
+<flowConfig>
+ <flowCall outcome="chooseTerminusFrom" service="org.apache.myfaces.orchestra.examples.ChooseTerminusByType">
+ <param name="type" src="#{tripPlannerTrain.terminusType}"/>
+ <return name="terminus" dst="#{tripPlannerTrain.from}"/>
+ </flowCall>
+ <flowCall outcome="chooseTerminusTo" service="org.apache.myfaces.orchestra.examples.ChooseTerminusByType">
+ <param name="type" src="#{tripPlannerTrain.terminusType}"/>
+ <return name="terminus" dst="#{tripPlannerTrain.to}"/>
+ </flowCall>
+</flowConfig>
\ No newline at end of file
Propchange: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/train-flow.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/train.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/train.jsp?rev=675149&view=auto
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/train.jsp (added)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/train.jsp Wed Jul 9 05:42:17 2008
@@ -0,0 +1,57 @@
+<%--
+ 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.
+ --%>
+
+<%@ page pageEncoding="UTF-8"%>
+<%@ 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"%>
+
+<f:view>
+ <%@ include file="/header.jspf"%>
+ <div class="pagedoc">
+ <p>
+ Demonstrates invoking of the terminusSelector flow passing a parameter of "station"
+ and storing the return variable into a specific property of the backing bean.
+ </p>
+ </div>
+
+ <h:form id="main">
+ <h3>Train Journey Planner</h3>
+
+ <h:panelGrid columns="3">
+ <h:outputLabel for="from" value="From"/>
+ <h:inputText id="from" disabled="true" value="#{tripPlannerTrain.from}" required="true"/>
+ <h:commandButton action="chooseTerminusFrom" value="Choose" immediate="true"/>
+
+ <h:outputLabel for="to" value="To"/>
+ <h:inputText id="to" disabled="true" value="#{tripPlannerTrain.to}" required="true"/>
+ <h:commandButton action="chooseTerminusTo" value="Choose" immediate="true"/>
+
+ <h:outputLabel for="notes" value="Notes"/>
+ <h:inputText id="notes" value="#{tripPlannerPlane.notes}" required="true"/>
+ <h:outputText value=""/>
+ </h:panelGrid>
+
+ <h:commandButton id="ok" action="#{tripPlannerTrain.addJourney}" value="OK"/>
+ <h:commandButton id="cancel" action="overview" value="Cancel" immediate="true"/>
+ </h:form>
+
+ <%@ include file="/footer.jspf"%>
+</f:view>
\ No newline at end of file
Propchange: myfaces/orchestra/trunk/examples/src/main/webapp/tripPlanner/train.jsp
------------------------------------------------------------------------------
svn:eol-style = native