myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r307165 - in /myfaces/examples/trunk/sandbox/src/java/org/apache/myfaces/examples/scope: Catalog.java ScopeBean.java
Date Fri, 07 Oct 2005 16:52:07 GMT
Author: werpu
Date: Fri Oct  7 09:52:02 2005
New Revision: 307165

URL: http://svn.apache.org/viewcvs?rev=307165&view=rev
Log:
beautified the code according to the conventions
of the project

Modified:
    myfaces/examples/trunk/sandbox/src/java/org/apache/myfaces/examples/scope/Catalog.java
    myfaces/examples/trunk/sandbox/src/java/org/apache/myfaces/examples/scope/ScopeBean.java

Modified: myfaces/examples/trunk/sandbox/src/java/org/apache/myfaces/examples/scope/Catalog.java
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/sandbox/src/java/org/apache/myfaces/examples/scope/Catalog.java?rev=307165&r1=307164&r2=307165&view=diff
==============================================================================
--- myfaces/examples/trunk/sandbox/src/java/org/apache/myfaces/examples/scope/Catalog.java
(original)
+++ myfaces/examples/trunk/sandbox/src/java/org/apache/myfaces/examples/scope/Catalog.java
Fri Oct  7 09:52:02 2005
@@ -15,41 +15,44 @@
  */
 
 package org.apache.myfaces.examples.scope;
-
-
-import java.util.LinkedList;
-import java.util.List;
-
-import javax.faces.model.SelectItem;
-
-/**
- * A back catalog for industrial magic items
- *
+
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.faces.model.SelectItem;
+
+/**
+ * A back catalog for industrial magic items
+ *
  * @author Werner Punz werpu@gmx.at
- * @version $Revision: $ $Date: $
- */
-public class Catalog {
-	List	items	= new LinkedList();
-
-	public Catalog() {
-		super();
-		items.add(new SelectItem("","None"));
-		items.add(new SelectItem("Foozler", "Foozler"));
-		items.add(new SelectItem("Acme Coyote Bomb", "Acme Coyote Bomb"));
-		items.add(new SelectItem("Frobozz Magick Bloink",
-				"Frobozz Magick Bloink"));
-		items.add(new SelectItem("Stink Bonkaz", "Stink Bonkaz"));
-		items.add(new SelectItem("Frobozz Turbo Wand", "Frobozz Turbo Wand"));
-		items.add(new SelectItem("Fungaz Rebod Wand", "Fungaz Rebod Wand"));
-		items.add(new SelectItem("Industrial Bruara Charm",
-				"Industrial Bruara Charm"));
-	}
-
-	public List getItems() {
-		return items;
-	}
-
-	public void setItems(List items) {
-		//this.items = items;
-	}
-}
+ * @version $Revision: $ $Date: $
+ */
+public class Catalog
+{
+    List items = new LinkedList();
+
+    public Catalog()
+    {
+        super();
+        items.add(new SelectItem("", "None"));
+        items.add(new SelectItem("Foozler", "Foozler"));
+        items.add(new SelectItem("Acme Coyote Bomb", "Acme Coyote Bomb"));
+        items.add(new SelectItem("Frobozz Magick Bloink",
+                "Frobozz Magick Bloink"));
+        items.add(new SelectItem("Stink Bonkaz", "Stink Bonkaz"));
+        items.add(new SelectItem("Frobozz Turbo Wand", "Frobozz Turbo Wand"));
+        items.add(new SelectItem("Fungaz Rebod Wand", "Fungaz Rebod Wand"));
+        items.add(new SelectItem("Industrial Bruara Charm",
+                "Industrial Bruara Charm"));
+    }
+
+    public List getItems()
+    {
+        return items;
+    }
+
+    public void setItems(List items)
+    {
+        //this.items = items;
+    }
+}

Modified: myfaces/examples/trunk/sandbox/src/java/org/apache/myfaces/examples/scope/ScopeBean.java
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/sandbox/src/java/org/apache/myfaces/examples/scope/ScopeBean.java?rev=307165&r1=307164&r2=307165&view=diff
==============================================================================
--- myfaces/examples/trunk/sandbox/src/java/org/apache/myfaces/examples/scope/ScopeBean.java
(original)
+++ myfaces/examples/trunk/sandbox/src/java/org/apache/myfaces/examples/scope/ScopeBean.java
Fri Oct  7 09:52:02 2005
@@ -31,151 +31,180 @@
  * @author Werner Punz werpu@gmx.at
  * @version $Revision: $ $Date: $
  */
-public class ScopeBean {
+public class ScopeBean
+{
 
-	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) FacesUtils.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();
-	}
+    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) FacesUtils
+                .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() {
+    public void setItemsList()
+    {
 
-	}
+    }
 }



Mime
View raw message