You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2016/03/20 21:58:43 UTC

svn commit: r1735905 - in /myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main: java/org/apache/myfaces/tobago/example/demo/ webapp/content/20-component/010-input/40-date/ webapp/content/20-component/020-output/20-label/ we...

Author: lofwyr
Date: Sun Mar 20 20:58:42 2016
New Revision: 1735905

URL: http://svn.apache.org/viewvc?rev=1735905&view=rev
Log:
TOBAGO-1544: Revise Demo Application for Tobago 3.0
[developed by hnoeth]

Added:
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ObjectController.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PlanetExample.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectManyCheckboxController.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectManyListboxController.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneListboxController.java
Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneChoiceController.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneRadioController.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/40-date/date.xhtml
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/20-label/label.xhtml
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/60-object/object.xhtml
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/10-selectBooleanCheckbox/selectBooleanCheckbox.xhtml
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/20-selectOneChoice/selectOneChoice.xhtml
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/30-selectOneRadio/selectOneRadio.xhtml
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/40-selectOneListbox/selectOneListbox.xhtml
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/50-selectManyCheckbox/selectManyCheckbox.xhtml
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/60-selectManyListbox/selectManyListbox.xhtml
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml

Added: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ObjectController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ObjectController.java?rev=1735905&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ObjectController.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ObjectController.java Sun Mar 20 20:58:42 2016
@@ -0,0 +1,74 @@
+/*
+ * 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.tobago.example.demo;
+
+import org.apache.commons.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.enterprise.context.SessionScoped;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.inject.Named;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+
+@SessionScoped
+@Named
+public class ObjectController implements Serializable {
+
+  private static final Logger LOG = LoggerFactory.getLogger(ObjectController.class);
+
+  private boolean collapsed;
+
+  public ObjectController() {
+    collapsed = true;
+  }
+
+  public boolean isCollapsed() {
+    return collapsed;
+  }
+
+  public void setCollapsed(boolean collapsed) {
+    this.collapsed = collapsed;
+  }
+
+  public void switchCollapsed() {
+    collapsed = !collapsed;
+  }
+
+  public String getJavaScriptSource() {
+    final FacesContext facesContext = FacesContext.getCurrentInstance();
+    final ExternalContext externalContext = facesContext.getExternalContext();
+    final String viewId = facesContext.getViewRoot().getViewId();
+    final String objectjs = viewId.substring(0, viewId.lastIndexOf("/")) + "/object.js";
+    InputStream resourceAsStream = null;
+    try {
+      resourceAsStream = externalContext.getResourceAsStream(objectjs);
+      return IOUtils.toString(resourceAsStream, "UTF-8");
+    } catch (final IOException e) {
+      LOG.error("", e);
+      return "error";
+    } finally {
+      IOUtils.closeQuietly(resourceAsStream);
+    }
+  }
+}

Added: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PlanetExample.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PlanetExample.java?rev=1735905&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PlanetExample.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/PlanetExample.java Sun Mar 20 20:58:42 2016
@@ -0,0 +1,76 @@
+/*
+ * 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.tobago.example.demo;
+
+import org.apache.myfaces.tobago.model.SelectItem;
+
+public abstract class PlanetExample {
+
+  private SelectItem[] planets;
+  private SelectItem[] earthmoons;
+  private SelectItem[] marsmoons;
+  private SelectItem[] jupitermoons;
+  private int planet;
+
+  public PlanetExample() {
+    planets = new SelectItem[]{
+            new SelectItem(0, "Earth"),
+            new SelectItem(1, "Mars"),
+            new SelectItem(2, "Jupiter")};
+    earthmoons = new SelectItem[]{
+            new SelectItem(0, "Moon")
+    };
+    marsmoons = new SelectItem[]{
+            new SelectItem(0, "Phobos"),
+            new SelectItem(1, "Deimos")
+    };
+    jupitermoons = new SelectItem[]{
+            new SelectItem(0, "Europa"),
+            new SelectItem(1, "Ganymed"),
+            new SelectItem(2, "Io"),
+            new SelectItem(3, "Kallisto")
+    };
+  }
+
+  public SelectItem[] getPlanets() {
+    return planets;
+  }
+
+  public int getPlanet() {
+    return planet;
+  }
+
+  public void setPlanet(int planet) {
+    this.planet = planet;
+  }
+
+  public SelectItem[] getMoons() {
+    switch (planet) {
+      case 0:
+        return earthmoons;
+      case 1:
+        return marsmoons;
+      case 2:
+        return jupitermoons;
+      default:
+        return new SelectItem[0];
+    }
+  }
+}

Added: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectManyCheckboxController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectManyCheckboxController.java?rev=1735905&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectManyCheckboxController.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectManyCheckboxController.java Sun Mar 20 20:58:42 2016
@@ -0,0 +1,66 @@
+/*
+ * 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.tobago.example.demo;
+
+import javax.enterprise.context.SessionScoped;
+import javax.inject.Named;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+@SessionScoped
+@Named
+public class SelectManyCheckboxController implements Serializable {
+
+  private List<String> animals = new ArrayList<String>();
+  private List<String> numbers = new ArrayList<String>();
+
+  public List getAnimals() {
+    return animals;
+  }
+
+  public void setAnimals(List<String> animals) {
+    this.animals = animals;
+  }
+
+  public String getAnimal() {
+    String retValue = "";
+    for (String s : animals) {
+      retValue = retValue.concat(s + " ");
+    }
+    return retValue;
+  }
+
+  public List<String> getNumbers() {
+    return numbers;
+  }
+
+  public void setNumbers(List<String> numbers) {
+    this.numbers = numbers;
+  }
+
+  public int getResult() {
+    int result = 0;
+    for (String number : numbers) {
+      result += Integer.valueOf(number);
+    }
+    return result;
+  }
+}

Added: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectManyListboxController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectManyListboxController.java?rev=1735905&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectManyListboxController.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectManyListboxController.java Sun Mar 20 20:58:42 2016
@@ -0,0 +1,75 @@
+/*
+ * 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.tobago.example.demo;
+
+import org.apache.myfaces.tobago.model.SelectItem;
+
+import javax.enterprise.context.SessionScoped;
+import javax.inject.Named;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+@SessionScoped
+@Named
+public class SelectManyListboxController implements Serializable {
+
+  private List<String> celestials = new ArrayList<String>();
+  private SelectItem[] deserts;
+  private List<String> selectedDeserts = new ArrayList<String>();
+
+  public SelectManyListboxController() {
+    deserts = new SelectItem[]{
+            new SelectItem("Antarctic Desert"),
+            new SelectItem("Arctic"),
+            new SelectItem("Sahara"),
+            new SelectItem("Arabian Desert"),
+            new SelectItem("Gobi Desert")
+    };
+  }
+
+  public List<String> getCelestials() {
+    return celestials;
+  }
+
+  public void setCelestials(List<String> celestials) {
+    this.celestials = celestials;
+  }
+
+  public String getCelestial() {
+    String retValue = "";
+    for (String s : celestials) {
+      retValue = retValue.concat(s);
+    }
+    return retValue;
+  }
+
+  public SelectItem[] getDeserts() {
+    return deserts;
+  }
+
+  public List<String> getSelectedDeserts() {
+    return selectedDeserts;
+  }
+
+  public void setSelectedDeserts(List<String> selectedDeserts) {
+    this.selectedDeserts = selectedDeserts;
+  }
+}

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneChoiceController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneChoiceController.java?rev=1735905&r1=1735904&r2=1735905&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneChoiceController.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneChoiceController.java Sun Mar 20 20:58:42 2016
@@ -19,7 +19,7 @@
 
 package org.apache.myfaces.tobago.example.demo;
 
-import org.apache.myfaces.tobago.model.SelectItem;
+import org.apache.myfaces.tobago.example.demo.exampledata.PlanetExample;
 
 import javax.enterprise.context.SessionScoped;
 import javax.inject.Named;
@@ -27,58 +27,9 @@ import java.io.Serializable;
 
 @SessionScoped
 @Named
-public class SelectOneChoiceController implements Serializable {
-  private SelectItem[] planets;
-  private SelectItem[] earthmoons;
-  private SelectItem[] marsmoons;
-  private SelectItem[] jupitermoons;
-  private int planet;
-  private String person;
+public class SelectOneChoiceController extends PlanetExample implements Serializable {
 
-  public SelectOneChoiceController() {
-    planets = new SelectItem[]{
-            new SelectItem(0, "Earth"),
-            new SelectItem(1, "Mars"),
-            new SelectItem(2, "Jupiter")};
-    earthmoons = new SelectItem[]{
-            new SelectItem(0, "Moon")
-    };
-    marsmoons = new SelectItem[]{
-            new SelectItem(0, "Phobos"),
-            new SelectItem(1, "Deimos")
-    };
-    jupitermoons = new SelectItem[]{
-            new SelectItem(0, "Europa"),
-            new SelectItem(1, "Ganymed"),
-            new SelectItem(2, "Io"),
-            new SelectItem(3, "Kallisto")
-    };
-  }
-
-  public SelectItem[] getPlanets() {
-    return planets;
-  }
-
-  public int getPlanet() {
-    return planet;
-  }
-
-  public void setPlanet(int planet) {
-    this.planet = planet;
-  }
-
-  public SelectItem[] getMoons() {
-    switch (planet) {
-      case 0:
-        return earthmoons;
-      case 1:
-        return marsmoons;
-      case 2:
-        return jupitermoons;
-      default:
-        return new SelectItem[0];
-    }
-  }
+  private String person;
 
   public String getPerson() {
     return person;

Added: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneListboxController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneListboxController.java?rev=1735905&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneListboxController.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneListboxController.java Sun Mar 20 20:58:42 2016
@@ -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.
+ */
+
+package org.apache.myfaces.tobago.example.demo;
+
+import org.apache.myfaces.tobago.model.SelectItem;
+
+import javax.enterprise.context.SessionScoped;
+import javax.inject.Named;
+import java.io.Serializable;
+
+@SessionScoped
+@Named
+public class SelectOneListboxController implements Serializable {
+
+  private String river;
+  private SelectItem[] mountains;
+  private String mountain;
+
+  public SelectOneListboxController() {
+    mountains = new SelectItem[]{
+            new SelectItem("8848 m", "Everest"),
+            new SelectItem("8611 m", "K2"),
+            new SelectItem("8586 m", "Kangchenjunga"),
+            new SelectItem("8516 m", "Lhotse"),
+            new SelectItem("8481 m", "Makalu")
+    };
+  }
+
+  public String getRiver() {
+    return river;
+  }
+
+  public void setRiver(String river) {
+    this.river = river;
+  }
+
+  public SelectItem[] getMountains() {
+    return mountains;
+  }
+
+  public String getMountain() {
+    return mountain;
+  }
+
+  public void setMountain(String mountain) {
+    this.mountain = mountain;
+  }
+}

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneRadioController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneRadioController.java?rev=1735905&r1=1735904&r2=1735905&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneRadioController.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneRadioController.java Sun Mar 20 20:58:42 2016
@@ -19,7 +19,7 @@
 
 package org.apache.myfaces.tobago.example.demo;
 
-import org.apache.myfaces.tobago.model.SelectItem;
+import org.apache.myfaces.tobago.example.demo.exampledata.PlanetExample;
 
 import javax.enterprise.context.SessionScoped;
 import javax.inject.Named;
@@ -27,36 +27,11 @@ import java.io.Serializable;
 
 @SessionScoped
 @Named
-public class SelectOneRadioController implements Serializable {
+public class SelectOneRadioController extends PlanetExample implements Serializable {
 
   private int numberOne;
   private int numberTwo;
   private int result;
-  private SelectItem[] planets;
-  private SelectItem[] earthmoons;
-  private SelectItem[] marsmoons;
-  private SelectItem[] jupitermoons;
-  private int planet;
-
-  public SelectOneRadioController() {
-    planets = new SelectItem[]{
-            new SelectItem(0, "Earth"),
-            new SelectItem(1, "Mars"),
-            new SelectItem(2, "Jupiter")};
-    earthmoons = new SelectItem[]{
-            new SelectItem(0, "Moon")
-    };
-    marsmoons = new SelectItem[]{
-            new SelectItem(0, "Phobos"),
-            new SelectItem(1, "Deimos")
-    };
-    jupitermoons = new SelectItem[]{
-            new SelectItem(0, "Europa"),
-            new SelectItem(1, "Ganymed"),
-            new SelectItem(2, "Io"),
-            new SelectItem(3, "Kallisto")
-    };
-  }
 
   public int getNumberOne() {
     return numberOne;
@@ -85,29 +60,4 @@ public class SelectOneRadioController im
   public int getResult() {
     return result;
   }
-
-  public SelectItem[] getPlanets() {
-    return planets;
-  }
-
-  public int getPlanet() {
-    return planet;
-  }
-
-  public void setPlanet(int planet) {
-    this.planet = planet;
-  }
-
-  public SelectItem[] getMoons() {
-    switch (planet) {
-      case 0:
-        return earthmoons;
-      case 1:
-        return marsmoons;
-      case 2:
-        return jupitermoons;
-      default:
-        return new SelectItem[0];
-    }
-  }
 }

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/40-date/date.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/40-date/date.xhtml?rev=1735905&r1=1735904&r2=1735905&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/40-date/date.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/40-date/date.xhtml Sun Mar 20 20:58:42 2016
@@ -145,13 +145,11 @@
   </tc:section>
   <tc:section label="Ajax">
     <p>The outputfield in this example, display the given date.
-      With <code class="language-markup">&lt;f:ajax/&gt;</code>, the outputfield will be rerendered, after the date changed.
-      The date can be changed by button or by entering a valid date in the textfield. If the date is not valid, it won't be adopted.</p>
-    <pre><code class="language-markup">&lt;tc:date label="On Change" value="\#{dateController.onchange}"&gt;
-  &lt;f:convertDateTime pattern="dd.MM.yyyy"/&gt;
-  &lt;f:ajax render="outputfield"/&gt;
-&lt;/tc:date&gt;
-&lt;tc:out id="outputfield" label="On Server" value="\#{dateController.onchange}"/&gt;</code></pre>
+      With <code class="language-markup">&lt;f:ajax render="outputfield"/></code>,
+      the <code class="language-markup">&lt;tc:out id="outputfield" .../></code> will be rerendered,
+      after the date changed.
+      The date can be changed by button or by entering a valid date in the textfield. If the date is not valid,
+      it won't be adopted.</p>
     <tc:date id="d14" label="On Change" value="#{dateController.onchange}">
       <f:convertDateTime pattern="dd.MM.yyyy"/>
       <f:ajax render="outputfield"/>

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/20-label/label.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/20-label/label.xhtml?rev=1735905&r1=1735904&r2=1735905&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/20-label/label.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/20-label/label.xhtml Sun Mar 20 20:58:42 2016
@@ -22,19 +22,19 @@
                 xmlns:ui="http://java.sun.com/jsf/facelets">
   <ui:param name="title" value="#{overviewBundle.label} &lt;tc:label&gt;"/>
   <p>With <code class="language-markup">&lt;tc:label&gt;</code>, a single label can be created.
-    Some components already have a <code>label</code> attribute to combine it with a label, which should be used in general.</p>
-  <p>TODO:link to attribute</p>
+    Some components already have a <code>label</code> attribute to combine it with a label,
+    which should be used in general.</p>
+  <tc:link label="Generated Documentation"
+           link="https://myfaces.apache.org/tobago/doc/2.0.9/tld/tc/label.html"/>
   <tc:section label="Basics">
     <pre><code class="language-markup">&lt;tc:label value="Single Label"/&gt;</code></pre>
     <tc:label id="l1" value="Single Label"/>
   </tc:section>
 
   <tc:section label="Input Field">
-    <pre><code class="language-markup">&lt;tc:flexLayout columns="250px;*;200px">
-  &lt;tc:label value="Label in front of inputfield"/>
-  &lt;tc:in placeholder="Inputfield"/>
-  &lt;tc:label value="Label after inputfield"/>
-&lt;/tc:flexLayout></code></pre>
+    <p>With <code class="language-markup">&lt;tc:flexLayout columns="250px;*;200px"></code> a label is set
+      in front and after an inputfield. The <code>label</code> attribute is not used for
+      <code class="language-markup">&lt;tc:in/></code>.</p>
     <tc:flexLayout columns="250px;*;200px">
       <tc:label id="l2" value="Label in front of inputfield"/>
       <tc:in id="i1" placeholder="Inputfield"/>
@@ -47,10 +47,9 @@
   </tc:section>
 
   <tc:section label="Progress Bar">
-    <pre><code class="language-markup">&lt;tc:flowLayout&gt;
-  &lt;tc:label value="Progress:"/&gt;
-  &lt;tc:progress value="0.4" max="1"/&gt;
-&lt;/tc:flowLayout&gt;</code></pre>
+    <p>Some components like <code class="language-markup">&lt;tc:progress/></code> do not have a <code>label</code>
+      attribute. In this example, a label is combined with a progressbar using
+      <code class="language-markup">&lt;tc:flowLayout/></code>.</p>
     <tc:flowLayout>
       <tc:label id="l4" value="Progress:"/>
       <tc:progress value="0.4" max="1"/>

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/60-object/object.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/60-object/object.xhtml?rev=1735905&r1=1735904&r2=1735905&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/60-object/object.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/60-object/object.xhtml Sun Mar 20 20:58:42 2016
@@ -34,79 +34,36 @@
                src="https://www.google.com/maps/embed?pb=!1m10!1m8!1m3!1d137123.69440217633!2d-60.687103!3d11.249123!3m2!1i1024!2i768!4f13.1!5e1!3m2!1sde!2sus!4v1458208065829"/>
   </tc:section>
   <tc:section label="Style">
-    <pre><code class="language-markup">&lt;tc:object src="https://www.google.com/maps/..."&gt;
-      &lt;tc:style width="100%"/&gt;
-      &lt;/tc:object&gt;</code></pre>
+    <p>A <code class="language-markup">&lt;tc:object/></code> tag can contain a style tag.
+      In this case it's <code class="language-markup">&lt;tc:style width="100%"/></code>.</p>
     <tc:object id="o2"
                src="https://www.google.com/maps/embed?pb=!1m13!1m11!1m3!1d99967845.2048925!2d-60.68710300000001!3d11.249123!2m2!1f0!2f0!3m2!1i1024!2i768!4f13.1!5e1!3m2!1sde!2sus!4v1458208366973">
       <tc:style width="100%"/>
     </tc:object>
   </tc:section>
-  <tc:section label="Toolbar">
-    <p>In this example, the object would be reloaded, after hitting a button.</p>
-    <pre><code class="language-markup">&lt;tc:toolBar iconSize="off"&gt;
-  &lt;tc:toolBarCommand label="Show Tobago" omit="true"&gt;
-    &lt;tc:dataAttribute name="maps-position" value="11.249123,-60.687103"/&gt;
-    &lt;tc:dataAttribute name="maps-zoom" value="12"/&gt;
-    &lt;tc:dataAttribute name="maps-target" value="page:map"/&gt;
-  &lt;/tc:toolBarCommand&gt;
-  &lt;tc:toolBarCommand label="Show World" omit="true"&gt;
-    &lt;tc:dataAttribute name="maps-target" value="page:map"/&gt;
-  &lt;/tc:toolBarCommand&gt;
-&lt;/tc:toolBar&gt;
-
-&lt;tc:object id="map"&gt;
-  &lt;tc:style width="100%" height="500px"/&gt;
-&lt;/tc:object&gt;</code></pre>
-
-    <pre><code class="language-javascript">(function ($) {
-  $.widget("demo.maps", {
-    options: {
-      position: "11.249123,-60.687103", // tobago
-      zoom: 2 // global
-    },
-    _create: function () {
-      this._on({
-        click: function (event) {
-          var position = this.element.data("maps-position");
-          if (position == null) {
-            position = this.options.position;
-          }
-          var zoom = this.element.data("maps-zoom");
-          if (zoom == null) {
-            zoom = this.options.zoom;
-          }
-          var target = this.element.data("maps-target");
-          var url = 'https://maps.google.com/maps?'
-            + 'ie=UTF8&amp;ll=' + position + '&amp;t=h&amp;z='
-            + zoom + '&amp;output=embed&amp;f=q&amp;cd=1';
-          jQuery(Tobago.Utils.escapeClientId(target)).attr('src', url);
-        }
-      });
-    },
-    _setOption: function (key, value) {
-    },
-    _destroy: function () {
-    }
-  });
-}(jQuery));
-
-var initMaps = function () {
-  jQuery("[data-maps-target]")
-    .maps()
-    .first()
-    .click();
-};
-
-Tobago.registerListener(initMaps, Tobago.Phase.DOCUMENT_READY);</code></pre>
-
-    <tc:toolBar iconSize="off">
-      <tc:toolBarCommand label="Show Tobago" omit="true">
+  <tc:section label="Tool Bar">
+    <p>There are two <code class="language-markup">&lt;tc:toolBarCommand/></code>
+      within a <code class="language-markup">&lt;tc:toolBar/></code> in this example.
+      The first show the island Tobago,
+      the second show the worldmap in <code class="language-markup">&lt;tc:object id="map"></code>.
+      The toolbarcommands send the parameter (maps-position, maps-zoom, maps-target) to an <code>object.js</code>,
+      which is shown in the objects.js-box. The JavaScript build the URL for the iframe.</p>
+    <pre><code class="language-markup">&lt;tc:toolBarCommand label="Show Tobago" omit="true"&gt;
+  &lt;tc:dataAttribute name="maps-position" value="11.249123,-60.687103"/&gt;
+  &lt;tc:dataAttribute name="maps-zoom" value="12"/&gt;
+  &lt;tc:dataAttribute name="maps-target" value="page:map"/&gt;
+&lt;/tc:toolBarCommand&gt;</code></pre>
+    <tc:button label="show/hide" action="#{objectController.switchCollapsed}"/>
+    <tc:box label="object.js" collapsed="#{objectController.collapsed}">
+      <pre><code class="language-javascript"><tc:out value="#{objectController.javaScriptSource}"/></code></pre>
+    </tc:box>
+    <tc:toolBar id="t1" iconSize="off">
+      <tc:toolBarCommand id="c1" label="Show Tobago" omit="true">
         <tc:dataAttribute name="maps-position" value="11.249123,-60.687103"/>
         <tc:dataAttribute name="maps-zoom" value="12"/>
         <tc:dataAttribute name="maps-target" value="page:map"/>
       </tc:toolBarCommand>
-      <tc:toolBarCommand label="Show World" omit="true">
+      <tc:toolBarCommand id="c2" label="Show World" omit="true">
         <tc:dataAttribute name="maps-target" value="page:map"/>
       </tc:toolBarCommand>
     </tc:toolBar>

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/10-selectBooleanCheckbox/selectBooleanCheckbox.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/10-selectBooleanCheckbox/selectBooleanCheckbox.xhtml?rev=1735905&r1=1735904&r2=1735905&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/10-selectBooleanCheckbox/selectBooleanCheckbox.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/10-selectBooleanCheckbox/selectBooleanCheckbox.xhtml Sun Mar 20 20:58:42 2016
@@ -35,12 +35,8 @@
 
   <tc:section label="Simple Usage">
     <p>In this example, the selected items are displayed in an outputfield after the submit-button is pressed.</p>
-    <pre><code
-            class="language-markup">&lt;tc:selectBooleanCheckbox label="A" value="\#{selectBooleanCheckboxController.a}"/&gt;
-&lt;tc:selectBooleanCheckbox label="B" value="\#{selectBooleanCheckboxController.b}"/&gt;
-&lt;tc:selectBooleanCheckbox label="C" value="\#{selectBooleanCheckboxController.c}"/&gt;
-&lt;tc:out label="Selected items: " value="\#{selectBooleanCheckboxController.selectedItems}"/&gt;
-&lt;tc:button label="Submit"/&gt;</code></pre>
+    <pre><code class="language-markup">&lt;tc:selectBooleanCheckbox label="A" value="\#{selectBooleanCheckboxController.a}"/>
+&lt;tc:out label="Selected items: " value="\#{selectBooleanCheckboxController.selectedItems}"/></code></pre>
     <tc:selectBooleanCheckbox id="s4" label="A" value="#{selectBooleanCheckboxController.a}"/>
     <tc:selectBooleanCheckbox id="s5" label="B" value="#{selectBooleanCheckboxController.b}"/>
     <tc:selectBooleanCheckbox id="s6" label="C" value="#{selectBooleanCheckboxController.c}"/>
@@ -49,20 +45,12 @@
   </tc:section>
 
   <tc:section label="Ajax">
-    <p>The outputfields always shows the current value of the checkbox.</p>
-    <pre><code class="language-markup">&lt;tc:selectBooleanCheckbox id="s5" label="D" value="#{selectBooleanCheckboxController.d}"&gt;
-  &lt;f:ajax render="outputD"/&gt;
-&lt;/tc:selectBooleanCheckbox&gt;
-&lt;tc:out id="outputD" label="Value is" value="#{selectBooleanCheckboxController.d}"/&gt;
-&lt;tc:selectBooleanCheckbox id="s6" label="E" value="#{selectBooleanCheckboxController.e}"&gt;
-  &lt;f:ajax render="outputE"/&gt;
-&lt;/tc:selectBooleanCheckbox&gt;
-&lt;tc:out id="outputE" label="Value is" value="#{selectBooleanCheckboxController.e}"/&gt;
-&lt;tc:selectBooleanCheckbox id="s7" label="F" value="#{selectBooleanCheckboxController.f}"&gt;
-  &lt;f:ajax render="outputF"/&gt;
-&lt;/tc:selectBooleanCheckbox&gt;
-&lt;tc:out id="outputF" label="Value is" value="#{selectBooleanCheckboxController.f}"/&gt;
-    </code></pre>
+    <p>The outputfields always shows the current value of the checkbox.
+      With <code class="language-markup">&lt;f:ajax render="output"/></code>, the outputfield will be rerendered,
+      after the value changed in the
+      <code class="language-markup">&lt;tc:selectBooleanCheckbox label="Character" value="#{selectBooleanCheckboxController.d}"/></code>.
+      The ID of the outputfield and the value in the <code>render</code> attribute of the ajax tag
+      has to be the same.</p>
     <tc:selectBooleanCheckbox id="s7" label="D" value="#{selectBooleanCheckboxController.d}">
       <f:ajax render="outputD"/>
     </tc:selectBooleanCheckbox>

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/20-selectOneChoice/selectOneChoice.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/20-selectOneChoice/selectOneChoice.xhtml?rev=1735905&r1=1735904&r2=1735905&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/20-selectOneChoice/selectOneChoice.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/20-selectOneChoice/selectOneChoice.xhtml Sun Mar 20 20:58:42 2016
@@ -21,20 +21,19 @@
                 xmlns:tc="http://myfaces.apache.org/tobago/component"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:f="http://java.sun.com/jsf/core">
-  <ui:param name="title" value="#{overviewBundle.selectOneChoice} &lt;tc:selectOneChoice&gt;"/>
-  <p><code class="language-markup">&lt;tc:selectOneChoice/&gt;</code> create a dropdownbox.
-    Static entries could be created via <code class="language-markup">&lt;tc:selectItem/&gt;</code>.
-    For a list from a controller, use <code
-            class="language-markup">&lt;tc:selectItems value="\#{controller.list}"/&gt;</code>.</p>
+  <ui:param name="title" value="#{overviewBundle.selectOneChoice} &lt;tc:selectOneChoice>"/>
+  <p>The tag <code class="language-markup">&lt;tc:selectOneChoice/&gt;</code> create a dropdownbox,
+    which contain<br/>
+  <code class="language-markup">&lt;tc:selectItem/></code> for static entries or<br/>
+    <code class="language-markup">&lt;tc:selectItems value="\#{controller.list}"/></code> for entries from
+    a controller.</p>
   <tc:link label="Generated Documentation"
            link="https://myfaces.apache.org/tobago/doc/2.0.9/tld/tc/selectOneChoice.html"/>
 
   <tc:section label="Basics">
-    <p>Dropdown Box with hardcoded items. The second item is disabled.</p>
-    <pre><code class="language-markup">&lt;tc:selectOneChoice label="Dropdown Box">
-  &lt;tc:selectItem itemLabel="Item One" itemValue="one"/>
-  &lt;tc:selectItem itemLabel="Item Two" itemValue="two" itemDisabled="true"/>
-&lt;/tc:selectOneChoice></code></pre>
+    <p>Dropdown Box with hardcoded items. The second item is disabled.
+      To disable an item, use the <code>itemDisable</code> attribute.</p>
+    <pre><code class="language-markup">&lt;tc:selectOneChoice label="Dropdown Box"/></code></pre>
     <tc:selectOneChoice id="s1" label="Dropdown Box">
       <tc:selectItem itemLabel="Item One" itemValue="one"/>
       <tc:selectItem itemLabel="Item Two" itemValue="two" itemDisabled="true"/>
@@ -51,13 +50,9 @@
 
   <tc:section label="Simple Usage">
     <p>Select a person. The label of the item is shown in the dropdownbox.
-      After submitting, the value of the item is shown in the outputfield.</p>
-    <pre><code class="language-markup">&lt;tc:selectOneChoice label="Person" value="\#{selectOneChoiceController.person}">
-  &lt;tc:selectItem itemLabel="Alice" itemValue="Alice Anderson"/>
-  &lt;tc:selectItem itemLabel="Bob" itemValue="Bob Brunch"/>
-&lt;/tc:selectOneChoice>
-&lt;tc:out label="Selected Person" value="\#{selectOneChoiceController.person}"/>
-&lt;tc:button label="Submit"/></code></pre>
+      After submitting, the value of the item is shown in the outputfield.
+      So, if 'Alice' is selected, the text in the outputfield is 'Alice Anderson'.</p>
+    <pre><code class="language-markup">&lt;tc:selectItem itemLabel="Alice" itemValue="Alice Anderson"/></code></pre>
     <tc:selectOneChoice id="s4" label="Person" value="#{selectOneChoiceController.person}">
       <tc:selectItem itemLabel="Alice" itemValue="Alice Anderson"/>
       <tc:selectItem itemLabel="Bob" itemValue="Bob Brunch"/>
@@ -67,7 +62,9 @@
   </tc:section>
 
   <tc:section label="Ajax">
-    <p>Select a planet and a moon. The list of moons depends on the selected planet.</p>
+    <p>Select a planet and a moon. The list of moons depends on the selected planet.
+      The planet-dropdownbox contain a <code class="language-markup">&lt;f:ajax render="moonbox"/></code>.
+      With it, the moon-dropdownbox will be rerendered, after a value changed in planet-dropdownbox.</p>
     <pre><code class="language-markup">&lt;tc:selectOneChoice label="Planet" value="\#{selectOneChoiceController.planet}">
   &lt;f:selectItems value="\#{selectOneChoiceController.planets}"/>
   &lt;f:ajax render="moonbox"/>

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/30-selectOneRadio/selectOneRadio.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/30-selectOneRadio/selectOneRadio.xhtml?rev=1735905&r1=1735904&r2=1735905&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/30-selectOneRadio/selectOneRadio.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/30-selectOneRadio/selectOneRadio.xhtml Sun Mar 20 20:58:42 2016
@@ -32,11 +32,7 @@
   <tc:section label="Basics">
     <p>Radiobutton group with a label. The last item is disabled.
       Also the label set on top with the <code>labelLayout</code> attribute.</p>
-    <pre><code class="language-markup">&lt;tc:selectOneRadio label="Radio Group">
-      &lt;tc:selectItem itemLabel="Sun" itemValue="solis"/>
-      &lt;tc:selectItem itemLabel="Moon" itemValue="luna"/>
-      &lt;tc:selectItem itemLabel="Stars" itemValue="stella" itemDisabled="true"/>
-      &lt;/tc:selectOneRadio></code></pre>
+    <pre><code class="language-markup">&lt;tc:selectOneRadio label="Radio Group" labelLayout="top"/></code></pre>
     <tc:segmentLayout large="4;4;4">
       <tc:selectOneRadio id="s1" label="Radio Group" labelLayout="top">
         <tc:selectItem itemLabel="Sun" itemValue="solis"/>
@@ -57,22 +53,13 @@
   </tc:section>
 
   <tc:section label="Simple Usage">
-    <p>Add number one to number two or subtract number two from number one.</p>
+    <p>Add number1 to number2 or subtract number2 from number1.</p>
     <pre><code class="language-markup">&lt;tc:selectOneRadio label="Number 1" labelLayout="top"
   value="\#{selectOneRadioController.numberOne}">
   &lt;tc:selectItem itemLabel="1" itemValue="1"/>
   &lt;tc:selectItem itemLabel="2" itemValue="2"/>
   &lt;tc:selectItem itemLabel="4" itemValue="4"/>
-&lt;/tc:selectOneRadio>
-&lt;tc:selectOneRadio label="Number 2" labelLayout="top"
-  value="\#{selectOneRadioController.numberTwo}">
-  &lt;tc:selectItem itemLabel="1" itemValue="1"/>
-  &lt;tc:selectItem itemLabel="2" itemValue="2"/>
-  &lt;tc:selectItem itemLabel="4" itemValue="4"/>
-&lt;/tc:selectOneRadio>
-&lt;tc:out label="Result" value="\#{selectOneRadioController.result}"/>
-&lt;tc:button label="Addition" action="\#{selectOneRadioController.add}"/>
-&lt;tc:button label="Subtraction" action="\#{selectOneRadioController.subtract}"/></code></pre>
+&lt;/tc:selectOneRadio></code></pre>
     <tc:segmentLayout large="6;6">
       <tc:selectOneRadio id="s4" label="Number 1" labelLayout="top" value="#{selectOneRadioController.numberOne}">
         <tc:selectItem itemLabel="1" itemValue="1"/>

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/40-selectOneListbox/selectOneListbox.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/40-selectOneListbox/selectOneListbox.xhtml?rev=1735905&r1=1735904&r2=1735905&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/40-selectOneListbox/selectOneListbox.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/40-selectOneListbox/selectOneListbox.xhtml Sun Mar 20 20:58:42 2016
@@ -21,21 +21,46 @@
                 xmlns:tc="http://myfaces.apache.org/tobago/component"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:f="http://java.sun.com/jsf/core">
-  <ui:param name="title" value="Select One Listbox: &lt;tc:selectOneListbox>"/>
+  <ui:param name="title" value="#{overviewBundle.selectOneListbox} &lt;tc:selectOneListbox>"/>
+  <p>The <code class="language-markup">&lt;tc:selectOneListbox/></code> create a list of entries, where only one
+  entry can be selected.</p>
+  <tc:link label="Generated Documentation"
+           link="https://myfaces.apache.org/tobago/doc/2.0.9/tld/tc/selectOneListbox.html"/>
+
+  <tc:section label="Basics">
+    <tc:selectOneListbox id="s1" label="List" size="2">
+      <tc:selectItem itemLabel="Alpha"/>
+      <tc:selectItem itemLabel="Beta"/>
+    </tc:selectOneListbox>
+    <tc:selectOneListbox id="s2" label="Read Only" readonly="true" size="2">
+      <tc:selectItem itemLabel="Alpha"/>
+      <tc:selectItem itemLabel="Beta"/>
+    </tc:selectOneListbox>
+    <tc:selectOneListbox id="s3" label="Disabled" disabled="true" size="2">
+      <tc:selectItem itemLabel="Alpha"/>
+      <tc:selectItem itemLabel="Beta"/>
+    </tc:selectOneListbox>
+  </tc:section>
 
   <tc:section label="Simple Usage">
-
-    TODO
-
+    <tc:selectOneListbox id="s4" label="River" value="#{selectOneListboxController.river}">
+      <tc:selectItem itemLabel="Nile" itemValue="Nile (6853 km)"/>
+      <tc:selectItem itemLabel="Amazon" itemValue="Amazon (6437 km)"/>
+      <tc:selectItem itemLabel="Yangtze" itemValue="Yangtze (6300 km)"/>
+      <tc:selectItem itemLabel="Yellow River" itemValue="Yellow River (5464 km)"/>
+      <tc:selectItem itemLabel="Paraná River" itemValue="Paraná River (4880 km)"/>
+    </tc:selectOneListbox>
+    <tc:out id="o1" label="River" value="#{selectOneListboxController.river}"/>
+    <tc:button id="b1" label="Submit"/>
   </tc:section>
 
-  <tc:section label="AJAX" id="ajax">
-
-    <tc:selectOneListbox value="#{selectOne.value}" label="D" id="d">
-      <tc:selectItems value="#{selectOne.types}" var="item" itemValue="#{item}" itemLabel="#{item}"/>
-      <f:ajax render="ajax"/>
+  <tc:section label="Ajax">
+    <tc:selectOneListbox id="s5" label="Mountains" value="#{selectOneListboxController.mountain}" >
+      <tc:selectItems value="#{selectOneListboxController.mountains}" var="mountain"
+                      itemLabel="#{mountain.label}" itemValue="#{mountain.value}" />
+      <f:ajax render="selectedMountain"/>
     </tc:selectOneListbox>
-    <tc:out label="Value is" value="#{selectOne.value}"/>
+    <tc:out id="selectedMountain" label="Height" value="#{selectOneListboxController.mountain}"/>
 
   </tc:section>
 

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/50-selectManyCheckbox/selectManyCheckbox.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/50-selectManyCheckbox/selectManyCheckbox.xhtml?rev=1735905&r1=1735904&r2=1735905&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/50-selectManyCheckbox/selectManyCheckbox.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/50-selectManyCheckbox/selectManyCheckbox.xhtml Sun Mar 20 20:58:42 2016
@@ -22,17 +22,45 @@
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:f="http://java.sun.com/jsf/core">
   <ui:param name="title" value="Select Many Checkbox: &lt;tc:selectManyCheckbox>"/>
+  <p>With <code class="language-markup">&lt;tc:selectManyCheckbox/></code>, you can create a group of checkboxes.
+    The items are added via <code class="language-markup">&lt;tc:selectItem/></code> for static entries or
+    <code class="language-markup">&lt;tc:selectItems value="\#{controller.list}"/></code> for entries from a
+    controller.</p>
+  <tc:section label="Basics">
+    <p>Checkbox Group with two items. The second one is disabled.</p>
+    <tc:selectManyCheckbox label="Checkbox Group">
+      <tc:selectItem itemLabel="Item One" itemValue="one"/>
+      <tc:selectItem itemLabel="Item Two" itemValue="two" itemDisabled="true"/>
+    </tc:selectManyCheckbox>
+    <tc:selectManyCheckbox label="Read Only" readonly="true">
+      <tc:selectItem itemLabel="Item One" itemValue="one"/>
+      <tc:selectItem itemLabel="Item Two" itemValue="two" itemDisabled="true"/>
+    </tc:selectManyCheckbox>
+    <tc:selectManyCheckbox label="Disabled" disabled="true">
+      <tc:selectItem itemLabel="Item One" itemValue="one"/>
+      <tc:selectItem itemLabel="Item Two" itemValue="two" itemDisabled="true"/>
+    </tc:selectManyCheckbox>
+  </tc:section>
 
   <tc:section label="Simple Usage">
-
-    TODO
-
+    <tc:selectManyCheckbox label="Checkbox Group" value="#{selectManyCheckboxController.animals}">
+      <tc:selectItem itemLabel="Cat" itemValue="Cat"/>
+      <tc:selectItem itemLabel="Dog" itemValue="Dog"/>
+      <tc:selectItem itemLabel="Fox" itemValue="Fox"/>
+      <tc:selectItem itemLabel="Rabbit" itemValue="Rabbit"/>
+    </tc:selectManyCheckbox>
+    <tc:out id="o1" label="Selected Animals" value="#{selectManyCheckboxController.animal}"/>
+    <tc:button id="b1" label="Submit"/>
   </tc:section>
 
-  <tc:section label="AJAX" id="ajax">
-
-    TODO
-
+  <tc:section label="Ajax">
+    <tc:selectManyCheckbox label="Checkbox Group" value="#{selectManyCheckboxController.numbers}">
+      <tc:selectItem itemLabel="One" itemValue="1"/>
+      <tc:selectItem itemLabel="Two" itemValue="2"/>
+      <tc:selectItem itemLabel="Three" itemValue="3"/>
+      <tc:selectItem itemLabel="Four" itemValue="4"/>
+      <f:ajax render="resultOutput"/>
+    </tc:selectManyCheckbox>
+    <tc:out id="resultOutput" label="Selected Animals" value="#{selectManyCheckboxController.result}"/>
   </tc:section>
-
 </ui:composition>

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/60-selectManyListbox/selectManyListbox.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/60-selectManyListbox/selectManyListbox.xhtml?rev=1735905&r1=1735904&r2=1735905&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/60-selectManyListbox/selectManyListbox.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/60-selectManyListbox/selectManyListbox.xhtml Sun Mar 20 20:58:42 2016
@@ -23,16 +23,40 @@
                 xmlns:f="http://java.sun.com/jsf/core">
   <ui:param name="title" value="Select Many Listbox: &lt;tc:selectManyListbox>"/>
 
-  <tc:section label="Simple Usage">
-
-    TODO
+  <tc:section label="Basics">
+    <p>A list with three items. The second one is disabled.</p>
+    <tc:selectManyListbox id="s1" label="List">
+      <tc:selectItem itemLabel="Item1" itemValue="item1"/>
+      <tc:selectItem itemLabel="Item2" itemValue="item2" itemDisabled="true"/>
+      <tc:selectItem itemLabel="Item3" itemValue="item3"/>
+    </tc:selectManyListbox>
+    <tc:selectManyListbox id="s2" label="Read Only" readonly="true">
+      <tc:selectItem itemLabel="Item1" itemValue="item1"/>
+      <tc:selectItem itemLabel="Item2" itemValue="item2" itemDisabled="true"/>
+      <tc:selectItem itemLabel="Item3" itemValue="item3"/>
+    </tc:selectManyListbox>
+    <tc:selectManyListbox id="s3" label="Disabled" disabled="true">
+      <tc:selectItem itemLabel="Item1" itemValue="item1"/>
+      <tc:selectItem itemLabel="Item2" itemValue="item2" itemDisabled="true"/>
+      <tc:selectItem itemLabel="Item3" itemValue="item3"/>
+    </tc:selectManyListbox>
+  </tc:section>
 
+  <tc:section label="Simple Usage">
+    <tc:selectManyListbox id="s4" label="List" value="#{selectManyListboxController.celestials}">
+      <tc:selectItem itemLabel="Sun" itemValue="The sun, "/>
+      <tc:selectItem itemLabel="Moon" itemValue="the moon, "/>
+      <tc:selectItem itemLabel="Stars" itemValue="the stars..."/>
+    </tc:selectManyListbox>
+    <tc:out id="o1" label="" value="#{selectManyListboxController.celestial}"/>
+    <tc:button id="b1" label="Submit"/>
   </tc:section>
 
   <tc:section label="AJAX" id="ajax">
-
-    TODO
-
+    <tc:selectManyListbox id="s5" label="Deserts" size="4" value="#{selectManyListboxController.selectedDeserts}">
+      <f:selectItems value="#{selectManyListboxController.deserts}"/>
+      <f:ajax render="desertOutput"/>
+    </tc:selectManyListbox>
+    <tc:out id="desertOutput" label="Selected Desets" value="#{selectManyListboxController.selectedDeserts}"/>
   </tc:section>
-
 </ui:composition>

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml?rev=1735905&r1=1735904&r2=1735905&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml Sun Mar 20 20:58:42 2016
@@ -52,7 +52,9 @@
   <entry key="selectBooleanCheckbox">Boolean Checkbox</entry>
   <entry key="selectOneChoice">Dropdown Box</entry>
   <entry key="selectOneRadio">Radio Button</entry>
-  <entry key="selectOneListbox">List</entry>
+  <entry key="selectOneListbox">Single Selection List</entry>
+  <entry key="selectManyCheckbox">Checkbox Group</entry>
+  <entry key="selectManyListbox">Multi Selection List</entry>
 
   <entry key="sheet">Sheet Control</entry>
   <entry key="tree">Tree Control</entry>