You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2006/08/01 19:44:01 UTC
svn commit: r427657 [42/42] - in /myfaces:
core/trunk/api/src/main/java/javax/faces/component/
core/trunk/api/src/test/java/javax/faces/
core/trunk/api/src/test/java/javax/faces/application/
core/trunk/api/src/test/java/javax/faces/component/ core/trun...
Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputsuggest/UserHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputsuggest/UserHandler.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputsuggest/UserHandler.java (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputsuggest/UserHandler.java Tue Aug 1 10:43:28 2006
@@ -1,65 +1,65 @@
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.myfaces.examples.inputsuggest;
-
-import java.util.Map;
-
-/**
- * Backing bean designed to handle changes to an inputSuggest field and map it to the
- * {@link StateInfo} associated with a {@link User.}
- *
- * @author Sean Schofield
- * @version $Revision: $ $Date: $
- */
-public class UserHandler
-{
- private User user;
- private Map choices;
-
- public void setUser(User user) {
- this.user = user;
- }
-
- public void setChoices(Map choices) {
- this.choices = choices;
- }
-
- /**
- * Updates the "datastore" with the user's choice. This method simluates the process of adding a new
- * choice to the database and setting the user's state info key to the id that the database would
- * produce.
- *
- * @return String
- */
- public String update() {
-
- String newKey = null;
- String currentKey = (String) user.getState().getKey();
- String currentText = (String) user.getState().getText();
- if (!choices.containsKey(currentKey)) {
-
- // database code goes here
-
- // fake key (actual key would probably come from a database function that adds the new value)
- newKey = String.valueOf(choices.size() + 1);
-
- // Replace the old choice value
- user.setState(new StateInfo(newKey, currentText));
- }
-
- return "success";
- }
-}
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.examples.inputsuggest;
+
+import java.util.Map;
+
+/**
+ * Backing bean designed to handle changes to an inputSuggest field and map it to the
+ * {@link StateInfo} associated with a {@link User.}
+ *
+ * @author Sean Schofield
+ * @version $Revision: $ $Date: $
+ */
+public class UserHandler
+{
+ private User user;
+ private Map choices;
+
+ public void setUser(User user) {
+ this.user = user;
+ }
+
+ public void setChoices(Map choices) {
+ this.choices = choices;
+ }
+
+ /**
+ * Updates the "datastore" with the user's choice. This method simluates the process of adding a new
+ * choice to the database and setting the user's state info key to the id that the database would
+ * produce.
+ *
+ * @return String
+ */
+ public String update() {
+
+ String newKey = null;
+ String currentKey = (String) user.getState().getKey();
+ String currentText = (String) user.getState().getText();
+ if (!choices.containsKey(currentKey)) {
+
+ // database code goes here
+
+ // fake key (actual key would probably come from a database function that adds the new value)
+ newKey = String.valueOf(choices.size() + 1);
+
+ // Replace the old choice value
+ user.setState(new StateInfo(newKey, currentText));
+ }
+
+ return "success";
+ }
+}
Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputsuggest/UserHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/picklist/PicklistBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/scope/Catalog.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/scope/ScopeBean.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/scope/ScopeBean.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/scope/ScopeBean.java (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/scope/ScopeBean.java Tue Aug 1 10:43:28 2006
@@ -1,214 +1,214 @@
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.myfaces.examples.scope;
-
-import java.io.Serializable;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.apache.myfaces.custom.scope.ScopeHolder;
-import org.apache.myfaces.custom.scope.ScopeUtils;
-
-/**
- * A simple bean for testing the scoping system it is filled over a scoped
- * wizard over several screens and later a report is printed to the result
- * screen
- *
- * @author Werner Punz werpu@gmx.at
- * @version $Revision$ $Date$
- */
-public class ScopeBean implements Serializable
-{
-
- /**
- *
- */
- private static final long serialVersionUID = -7538089116831271626L;
- private String firstname = "";
- private String lastname = "";
- private String street = "";
- private String number = "";
- private String country = "";
- private String selectedproduct1 = "";
- private String selectedproduct2 = "";
- private String selectedproduct3 = "";
- private String selectedproduct4 = "";
- private String selectedproduct5 = "";
- private java.lang.String zipcode;
- private java.lang.String city;
-
- public String getFirstname()
- {
- return firstname;
- }
-
- public void setFirstname(String firstName)
- {
- this.firstname = firstName;
- }
-
- public String getLastname()
- {
- return lastname;
- }
-
- public void setLastname(String lastName)
- {
- this.lastname = lastName;
- }
-
- public String getStreet()
- {
- return street;
- }
-
- public void setStreet(String street)
- {
- this.street = street;
- }
-
- public String getNumber()
- {
- return number;
- }
-
- public void setNumber(String number)
- {
- this.number = number;
- }
-
- public String getCountry()
- {
- return country;
- }
-
- public void setCountry(String country)
- {
- this.country = country;
- }
-
- public String getSelectedproduct1()
- {
- return selectedproduct1;
- }
-
- public void setSelectedproduct1(String selectedProduct1)
- {
- this.selectedproduct1 = selectedProduct1;
- }
-
- public String getSelectedproduct2()
- {
- return selectedproduct2;
- }
-
- public void setSelectedproduct2(String selectedproduct2)
- {
- this.selectedproduct2 = selectedproduct2;
- }
-
- public String getSelectedproduct3()
- {
- return selectedproduct3;
- }
-
- public void setSelectedproduct3(String selectedproduct3)
- {
- this.selectedproduct3 = selectedproduct3;
- }
-
- public String getSelectedproduct4()
- {
- return selectedproduct4;
- }
-
- public void setSelectedproduct4(String selectedproduct4)
- {
- this.selectedproduct4 = selectedproduct4;
- }
-
- public String getSelectedproduct5()
- {
- return selectedproduct5;
- }
-
- public void setSelectedproduct5(String selectedproduct5)
- {
- this.selectedproduct5 = selectedproduct5;
- }
-
- public java.lang.String getZipcode()
- {
- return zipcode;
- }
-
- public void setZipcode(java.lang.String zipcode)
- {
- this.zipcode = zipcode;
- }
-
- public java.lang.String getCity()
- {
- return city;
- }
-
- public void setCity(java.lang.String city)
- {
- this.city = city;
- }
-
- public String resetOrder()
- {
- ScopeHolder holder = (ScopeHolder) ScopeUtils.getManagedBean("ScopeContainer");
- holder.resetScopes();
- return "go_first";
- }
-
- public String getItemsList()
- {
- Set items = new HashSet();
- if (selectedproduct1 != null && !selectedproduct1.equals(""))
- items.add(selectedproduct1);
- if (selectedproduct2 != null && !selectedproduct2.equals(""))
- items.add(selectedproduct2);
- if (selectedproduct3 != null && !selectedproduct3.equals(""))
- items.add(selectedproduct3);
- if (selectedproduct4 != null && !selectedproduct4.equals(""))
- items.add(selectedproduct4);
- if (selectedproduct5 != null && !selectedproduct5.equals(""))
- items.add(selectedproduct5);
-
- StringBuffer retBuf = new StringBuffer();
- retBuf.append("Number of bought products: ");
- retBuf.append(items.size());
- retBuf.append(" ");
- Iterator i = items.iterator();
- while (i.hasNext())
- {
- retBuf.append((String) i.next());
- if (i.hasNext())
- retBuf.append(",");
- }
- return retBuf.toString();
- }
-
- public void setItemsList()
- {
-
- }
-}
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.myfaces.examples.scope;
+
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.myfaces.custom.scope.ScopeHolder;
+import org.apache.myfaces.custom.scope.ScopeUtils;
+
+/**
+ * A simple bean for testing the scoping system it is filled over a scoped
+ * wizard over several screens and later a report is printed to the result
+ * screen
+ *
+ * @author Werner Punz werpu@gmx.at
+ * @version $Revision$ $Date$
+ */
+public class ScopeBean implements Serializable
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -7538089116831271626L;
+ private String firstname = "";
+ private String lastname = "";
+ private String street = "";
+ private String number = "";
+ private String country = "";
+ private String selectedproduct1 = "";
+ private String selectedproduct2 = "";
+ private String selectedproduct3 = "";
+ private String selectedproduct4 = "";
+ private String selectedproduct5 = "";
+ private java.lang.String zipcode;
+ private java.lang.String city;
+
+ public String getFirstname()
+ {
+ return firstname;
+ }
+
+ public void setFirstname(String firstName)
+ {
+ this.firstname = firstName;
+ }
+
+ public String getLastname()
+ {
+ return lastname;
+ }
+
+ public void setLastname(String lastName)
+ {
+ this.lastname = lastName;
+ }
+
+ public String getStreet()
+ {
+ return street;
+ }
+
+ public void setStreet(String street)
+ {
+ this.street = street;
+ }
+
+ public String getNumber()
+ {
+ return number;
+ }
+
+ public void setNumber(String number)
+ {
+ this.number = number;
+ }
+
+ public String getCountry()
+ {
+ return country;
+ }
+
+ public void setCountry(String country)
+ {
+ this.country = country;
+ }
+
+ public String getSelectedproduct1()
+ {
+ return selectedproduct1;
+ }
+
+ public void setSelectedproduct1(String selectedProduct1)
+ {
+ this.selectedproduct1 = selectedProduct1;
+ }
+
+ public String getSelectedproduct2()
+ {
+ return selectedproduct2;
+ }
+
+ public void setSelectedproduct2(String selectedproduct2)
+ {
+ this.selectedproduct2 = selectedproduct2;
+ }
+
+ public String getSelectedproduct3()
+ {
+ return selectedproduct3;
+ }
+
+ public void setSelectedproduct3(String selectedproduct3)
+ {
+ this.selectedproduct3 = selectedproduct3;
+ }
+
+ public String getSelectedproduct4()
+ {
+ return selectedproduct4;
+ }
+
+ public void setSelectedproduct4(String selectedproduct4)
+ {
+ this.selectedproduct4 = selectedproduct4;
+ }
+
+ public String getSelectedproduct5()
+ {
+ return selectedproduct5;
+ }
+
+ public void setSelectedproduct5(String selectedproduct5)
+ {
+ this.selectedproduct5 = selectedproduct5;
+ }
+
+ public java.lang.String getZipcode()
+ {
+ return zipcode;
+ }
+
+ public void setZipcode(java.lang.String zipcode)
+ {
+ this.zipcode = zipcode;
+ }
+
+ public java.lang.String getCity()
+ {
+ return city;
+ }
+
+ public void setCity(java.lang.String city)
+ {
+ this.city = city;
+ }
+
+ public String resetOrder()
+ {
+ ScopeHolder holder = (ScopeHolder) ScopeUtils.getManagedBean("ScopeContainer");
+ holder.resetScopes();
+ return "go_first";
+ }
+
+ public String getItemsList()
+ {
+ Set items = new HashSet();
+ if (selectedproduct1 != null && !selectedproduct1.equals(""))
+ items.add(selectedproduct1);
+ if (selectedproduct2 != null && !selectedproduct2.equals(""))
+ items.add(selectedproduct2);
+ if (selectedproduct3 != null && !selectedproduct3.equals(""))
+ items.add(selectedproduct3);
+ if (selectedproduct4 != null && !selectedproduct4.equals(""))
+ items.add(selectedproduct4);
+ if (selectedproduct5 != null && !selectedproduct5.equals(""))
+ items.add(selectedproduct5);
+
+ StringBuffer retBuf = new StringBuffer();
+ retBuf.append("Number of bought products: ");
+ retBuf.append(items.size());
+ retBuf.append(" ");
+ Iterator i = items.iterator();
+ while (i.hasNext())
+ {
+ retBuf.append((String) i.next());
+ if (i.hasNext())
+ retBuf.append(",");
+ }
+ return retBuf.toString();
+ }
+
+ public void setItemsList()
+ {
+
+ }
+}
Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/scope/ScopeBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SelectOneRowList.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SelectOneRowList.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SelectOneRowList.java (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SelectOneRowList.java Tue Aug 1 10:43:28 2006
@@ -1,92 +1,92 @@
-/*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.myfaces.examples.selectOneRow;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.faces.context.FacesContext;
-import javax.faces.event.ActionEvent;
-import javax.faces.event.ValueChangeEvent;
-
-import org.apache.myfaces.custom.datascroller.ScrollerActionEvent;
-
-/**
- * DOCUMENT ME!
- * @author Ernst Fastl
- * @version
- */
-public class SelectOneRowList
-{
- private List _list = new ArrayList();
-
- private Long _selectedRowIndex;
-
- public Long getSelectedRowIndex()
- {
- return _selectedRowIndex;
- }
-
- public void setSelectedRowIndex(Long selectedRowIndex)
- {
- _selectedRowIndex = selectedRowIndex;
- }
-
- public String getSelectionMessage()
- {
- if(getSelectedRowIndex()==null)
- {
- return "Currently there is no Row selected!";
- }
- else
- {
- return "Row number: " + _selectedRowIndex.toString() + " selected!";
- }
- }
-
- public SelectOneRowList()
- {
- for (int i = 1; i < 10; i++)
- {
- _list.add(new SimpleCar(i, "Car Type " + i, "blue"));
- _list.add(new SimpleCar(i, "Car Type " + i, "red"));
- _list.add(new SimpleCar(i, "Car Type " + i, "green"));
- _list.add(new SimpleCar(i, "Car Type " + i, "black"));
- _list.add(new SimpleCar(i, "Car Type " + i, "white"));
- }
- }
-
- public List getList()
- {
- return _list;
- }
-
- public void scrollerAction(ActionEvent event)
- {
- ScrollerActionEvent scrollerEvent = (ScrollerActionEvent) event;
- FacesContext.getCurrentInstance().getExternalContext().log(
- "scrollerAction: facet: "
- + scrollerEvent.getScrollerfacet()
- + ", pageindex: "
- + scrollerEvent.getPageIndex());
- }
-
- public void processRowSelection(ValueChangeEvent event)
- {
- Long newVal = (Long) event.getNewValue();
- }
-
-}
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.examples.selectOneRow;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ValueChangeEvent;
+
+import org.apache.myfaces.custom.datascroller.ScrollerActionEvent;
+
+/**
+ * DOCUMENT ME!
+ * @author Ernst Fastl
+ * @version
+ */
+public class SelectOneRowList
+{
+ private List _list = new ArrayList();
+
+ private Long _selectedRowIndex;
+
+ public Long getSelectedRowIndex()
+ {
+ return _selectedRowIndex;
+ }
+
+ public void setSelectedRowIndex(Long selectedRowIndex)
+ {
+ _selectedRowIndex = selectedRowIndex;
+ }
+
+ public String getSelectionMessage()
+ {
+ if(getSelectedRowIndex()==null)
+ {
+ return "Currently there is no Row selected!";
+ }
+ else
+ {
+ return "Row number: " + _selectedRowIndex.toString() + " selected!";
+ }
+ }
+
+ public SelectOneRowList()
+ {
+ for (int i = 1; i < 10; i++)
+ {
+ _list.add(new SimpleCar(i, "Car Type " + i, "blue"));
+ _list.add(new SimpleCar(i, "Car Type " + i, "red"));
+ _list.add(new SimpleCar(i, "Car Type " + i, "green"));
+ _list.add(new SimpleCar(i, "Car Type " + i, "black"));
+ _list.add(new SimpleCar(i, "Car Type " + i, "white"));
+ }
+ }
+
+ public List getList()
+ {
+ return _list;
+ }
+
+ public void scrollerAction(ActionEvent event)
+ {
+ ScrollerActionEvent scrollerEvent = (ScrollerActionEvent) event;
+ FacesContext.getCurrentInstance().getExternalContext().log(
+ "scrollerAction: facet: "
+ + scrollerEvent.getScrollerfacet()
+ + ", pageindex: "
+ + scrollerEvent.getPageIndex());
+ }
+
+ public void processRowSelection(ValueChangeEvent event)
+ {
+ Long newVal = (Long) event.getNewValue();
+ }
+
+}
Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SelectOneRowList.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SimpleCar.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SimpleCar.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SimpleCar.java (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SimpleCar.java Tue Aug 1 10:43:28 2006
@@ -1,72 +1,72 @@
-/*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.myfaces.examples.selectOneRow;
-
-import java.io.Serializable;
-
-/**
- * DOCUMENT ME!
- * @author Thomas Spiegl (latest modification by $Author: werpu $)
- * @version $Revision: 371731 $ $Date: 2006-01-24 01:18:44 +0100 (Di, 24 Jän 2006) $
- */
-public class SimpleCar
- implements Serializable
-{
- /**
- * serial id for serialisation versioning
- */
- private static final long serialVersionUID = 1L;
- private int _id;
- private String _type;
- private String _color;
-
- public SimpleCar(int id, String type, String color)
- {
- _id = id;
- _type = type;
- _color = color;
- }
-
- public int getId()
- {
- return _id;
- }
-
- public void setId(int id)
- {
- _id = id;
- }
-
- public String getType()
- {
- return _type;
- }
-
- public void setType(String type)
- {
- _type = type;
- }
-
- public String getColor()
- {
- return _color;
- }
-
- public void setColor(String color)
- {
- _color = color;
- }
-}
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.examples.selectOneRow;
+
+import java.io.Serializable;
+
+/**
+ * DOCUMENT ME!
+ * @author Thomas Spiegl (latest modification by $Author: werpu $)
+ * @version $Revision: 371731 $ $Date: 2006-01-24 01:18:44 +0100 (Di, 24 Jän 2006) $
+ */
+public class SimpleCar
+ implements Serializable
+{
+ /**
+ * serial id for serialisation versioning
+ */
+ private static final long serialVersionUID = 1L;
+ private int _id;
+ private String _type;
+ private String _color;
+
+ public SimpleCar(int id, String type, String color)
+ {
+ _id = id;
+ _type = type;
+ _color = color;
+ }
+
+ public int getId()
+ {
+ return _id;
+ }
+
+ public void setId(int id)
+ {
+ _id = id;
+ }
+
+ public String getType()
+ {
+ return _type;
+ }
+
+ public void setType(String type)
+ {
+ _type = type;
+ }
+
+ public String getColor()
+ {
+ return _color;
+ }
+
+ public void setColor(String color)
+ {
+ _color = color;
+ }
+}
Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SimpleCar.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectitems/SelectItemsBean.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectitems/SelectItemsBean.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectitems/SelectItemsBean.java (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectitems/SelectItemsBean.java Tue Aug 1 10:43:28 2006
@@ -1,42 +1,42 @@
-package org.apache.myfaces.examples.selectitems;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.myfaces.examples.selectOneRow.SimpleCar;
-
-public class SelectItemsBean {
-
- private List carList;
-
- private String selectedCarColor;
-
- public List getCarList() {
- if(carList == null) {
- carList = createCarList();
- }
- return carList;
- }
-
- public void setCarList(List list) {
- carList = list;
- }
-
- private List createCarList() {
- List list = new ArrayList();
- list.add(new SimpleCar(1, "Car 1", "blue"));
- list.add(new SimpleCar(2, "Car 2", "white"));
- list.add(new SimpleCar(3, "Car 3", "red"));
- list.add(new SimpleCar(4, "Car 4", "green"));
- return list;
- }
-
- public String getSelectedCarColor() {
- return selectedCarColor;
- }
-
- public void setSelectedCarColor(String selectedCarColor) {
- this.selectedCarColor = selectedCarColor;
- }
-
-}
+package org.apache.myfaces.examples.selectitems;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.myfaces.examples.selectOneRow.SimpleCar;
+
+public class SelectItemsBean {
+
+ private List carList;
+
+ private String selectedCarColor;
+
+ public List getCarList() {
+ if(carList == null) {
+ carList = createCarList();
+ }
+ return carList;
+ }
+
+ public void setCarList(List list) {
+ carList = list;
+ }
+
+ private List createCarList() {
+ List list = new ArrayList();
+ list.add(new SimpleCar(1, "Car 1", "blue"));
+ list.add(new SimpleCar(2, "Car 2", "white"));
+ list.add(new SimpleCar(3, "Car 3", "red"));
+ list.add(new SimpleCar(4, "Car 4", "green"));
+ return list;
+ }
+
+ public String getSelectedCarColor() {
+ return selectedCarColor;
+ }
+
+ public void setSelectedCarColor(String selectedCarColor) {
+ this.selectedCarColor = selectedCarColor;
+ }
+
+}
Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectitems/SelectItemsBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/subform/SubFormBean.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/subform/SubFormBean.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/subform/SubFormBean.java (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/subform/SubFormBean.java Tue Aug 1 10:43:28 2006
@@ -1,69 +1,69 @@
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.myfaces.examples.subform;
-
-/**
- *
- * @author Martin Marinschek
- * @version $Revision$ $Date$
- */
-public class SubFormBean
-{
- private String _firstName;
- private String _lastName;
- private String _type;
- private String _make;
-
- public String getFirstName()
- {
- return _firstName;
- }
-
- public void setFirstName(String firstName)
- {
- _firstName = firstName;
- }
-
- public String getLastName()
- {
- return _lastName;
- }
-
- public void setLastName(String lastName)
- {
- _lastName = lastName;
- }
-
- public String getType()
- {
- return _type;
- }
-
- public void setType(String type)
- {
- _type = type;
- }
-
- public String getMake()
- {
- return _make;
- }
-
- public void setMake(String make)
- {
- _make = make;
- }
-}
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.examples.subform;
+
+/**
+ *
+ * @author Martin Marinschek
+ * @version $Revision$ $Date$
+ */
+public class SubFormBean
+{
+ private String _firstName;
+ private String _lastName;
+ private String _type;
+ private String _make;
+
+ public String getFirstName()
+ {
+ return _firstName;
+ }
+
+ public void setFirstName(String firstName)
+ {
+ _firstName = firstName;
+ }
+
+ public String getLastName()
+ {
+ return _lastName;
+ }
+
+ public void setLastName(String lastName)
+ {
+ _lastName = lastName;
+ }
+
+ public String getType()
+ {
+ return _type;
+ }
+
+ public void setType(String type)
+ {
+ _type = type;
+ }
+
+ public String getMake()
+ {
+ return _make;
+ }
+
+ public void setMake(String make)
+ {
+ _make = make;
+ }
+}
Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/subform/SubFormBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/template/TemplateBacker.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/template/TemplateBacker.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/template/TemplateBacker.java (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/template/TemplateBacker.java Tue Aug 1 10:43:28 2006
@@ -1,54 +1,54 @@
-/*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.myfaces.examples.template;
-
-import java.net.URL;
-import java.io.File;
-import java.io.InputStream;
-import java.io.FileInputStream;
-import java.io.IOException;
-
-/**
- * Backing bean for template examples. Used to demonstrate how you can provide both the
- * content and the stylesheet using value bindings.
- *
- * @author Sean Schofield
- */
-public class TemplateBacker
-{
- private ClassLoader loader = Thread.currentThread().getContextClassLoader();
-
- public TemplateBacker()
- {
- if (loader == null)
- {
- loader = TemplateBacker.class.getClassLoader();
- }
- }
-
- public InputStream getContentStream() throws IOException
- {
- URL url = loader.getResource("org/apache/myfaces/examples/template/foo.xml");
- return new FileInputStream(new File(url.getFile()));
- }
-
- public InputStream getStyleStream() throws IOException
- {
- URL url = loader.getResource("org/apache/myfaces/examples/template/foo.xsl");
- return new FileInputStream(new File(url.getFile()));
- }
-}
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.myfaces.examples.template;
+
+import java.net.URL;
+import java.io.File;
+import java.io.InputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+/**
+ * Backing bean for template examples. Used to demonstrate how you can provide both the
+ * content and the stylesheet using value bindings.
+ *
+ * @author Sean Schofield
+ */
+public class TemplateBacker
+{
+ private ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ public TemplateBacker()
+ {
+ if (loader == null)
+ {
+ loader = TemplateBacker.class.getClassLoader();
+ }
+ }
+
+ public InputStream getContentStream() throws IOException
+ {
+ URL url = loader.getResource("org/apache/myfaces/examples/template/foo.xml");
+ return new FileInputStream(new File(url.getFile()));
+ }
+
+ public InputStream getStyleStream() throws IOException
+ {
+ URL url = loader.getResource("org/apache/myfaces/examples/template/foo.xsl");
+ return new FileInputStream(new File(url.getFile()));
+ }
+}
Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/template/TemplateBacker.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/valueChangeNotifier/NotifierBean.java
------------------------------------------------------------------------------
svn:eol-style = native