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 2011/01/10 22:19:32 UTC

svn commit: r1057369 - in /myfaces/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/ tobago-example/tobago-example-demo/src/main...

Author: lofwyr
Date: Mon Jan 10 21:19:29 2011
New Revision: 1057369

URL: http://svn.apache.org/viewvc?rev=1057369&view=rev
Log:
using only one "Has"-Interface for value, to support converters.
+ cleanup
+ make boolean converter runable with selectBooleanCheckbox
+ examples

Added:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/select.xhtml   (contents, props changed)
      - copied, changed from r1057264, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/select.jsp
Removed:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasBooleanValue.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/HasStringValue.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/select.jsp
Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectBooleanCheckboxTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectBooleanCommandTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ToolBarSelectBooleanTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeNodeTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeSelectTagDeclaration.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/xslt/facelet2jsp.xsl
    myfaces/tobago/trunk/tobago-extension/tobago-taglib-extension/src/main/java-jsf-1.1/org/apache/myfaces/tobago/internal/taglib/extension/MenuCheckboxExtensionTag.java
    myfaces/tobago/trunk/tobago-extension/tobago-taglib-extension/src/main/java-jsf-1.1/org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.java

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectBooleanCheckboxTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectBooleanCheckboxTagDeclaration.java?rev=1057369&r1=1057368&r2=1057369&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectBooleanCheckboxTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectBooleanCheckboxTagDeclaration.java Mon Jan 10 21:19:29 2011
@@ -23,7 +23,6 @@ import org.apache.myfaces.tobago.apt.ann
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.RendererTypes;
-import org.apache.myfaces.tobago.internal.taglib.declaration.HasBooleanValue;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasConverter;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasConverterMessage;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasCurrentMarkup;
@@ -36,6 +35,7 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasValidator;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasValidatorMessage;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasValue;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasValueChangeListener;
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsDisabled;
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsFocus;
@@ -66,7 +66,7 @@ import org.apache.myfaces.tobago.interna
         })
 
 public interface SelectBooleanCheckboxTagDeclaration extends HasValidator,
-    HasOnchange, HasValueChangeListener, HasIdBindingAndRendered, HasLabelAndAccessKey, HasBooleanValue, IsDisabled,
+    HasOnchange, HasValueChangeListener, HasIdBindingAndRendered, HasLabelAndAccessKey, HasValue, IsDisabled,
     IsInline, HasTip, IsReadonly, HasMarkup, HasCurrentMarkup, HasTabIndex, IsRequired, HasConverter, IsFocus,
     HasValidatorMessage, HasRequiredMessage, HasConverterMessage, IsGridLayoutComponent {
     // IsImmediateComponent

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectBooleanCommandTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectBooleanCommandTagDeclaration.java?rev=1057369&r1=1057368&r2=1057369&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectBooleanCommandTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectBooleanCommandTagDeclaration.java Mon Jan 10 21:19:29 2011
@@ -19,12 +19,12 @@ package org.apache.myfaces.tobago.intern
 
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
 import org.apache.myfaces.tobago.internal.taglib.declaration.AbstractCommandTagDeclaration;
-import org.apache.myfaces.tobago.internal.taglib.declaration.HasBooleanValue;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasValue;
 
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UISelectBooleanCommand",
     uiComponentBaseClass = "org.apache.myfaces.tobago.component.UICommand")
-public interface SelectBooleanCommandTagDeclaration extends AbstractCommandTagDeclaration,
-    HasIdBindingAndRendered, HasBooleanValue {
+public interface SelectBooleanCommandTagDeclaration
+    extends AbstractCommandTagDeclaration, HasIdBindingAndRendered, HasValue {
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ToolBarSelectBooleanTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ToolBarSelectBooleanTagDeclaration.java?rev=1057369&r1=1057368&r2=1057369&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ToolBarSelectBooleanTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ToolBarSelectBooleanTagDeclaration.java Mon Jan 10 21:19:29 2011
@@ -21,11 +21,11 @@ import org.apache.myfaces.tobago.apt.ann
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
 import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.internal.taglib.declaration.AbstractCommandTagDeclaration;
-import org.apache.myfaces.tobago.internal.taglib.declaration.HasBooleanValue;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasImage;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasLabelAndAccessKey;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasValue;
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsDisabled;
 
 /**
@@ -41,5 +41,5 @@ import org.apache.myfaces.tobago.interna
     allowedChildComponenents = "NONE")
 public interface ToolBarSelectBooleanTagDeclaration
     extends AbstractCommandTagDeclaration, HasIdBindingAndRendered, HasLabelAndAccessKey,
-    HasImage, IsDisabled, HasBooleanValue, HasTip {
+    HasImage, IsDisabled, HasValue, HasTip {
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeNodeTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeNodeTagDeclaration.java?rev=1057369&r1=1057368&r2=1057369&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeNodeTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeNodeTagDeclaration.java Mon Jan 10 21:19:29 2011
@@ -45,7 +45,8 @@ import org.apache.myfaces.tobago.interna
         "org.apache.myfaces.tobago.TreeNode",
         "org.apache.myfaces.tobago.TreeData"
     })
-public interface TreeNodeTagDeclaration
+public interface
+    TreeNodeTagDeclaration
     extends HasIdBindingAndRendered, HasMarkup, HasCurrentMarkup, HasTip, IsDisabled {
 
   /**

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeSelectTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeSelectTagDeclaration.java?rev=1057369&r1=1057368&r2=1057369&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeSelectTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeSelectTagDeclaration.java Mon Jan 10 21:19:29 2011
@@ -22,12 +22,12 @@ import org.apache.myfaces.tobago.apt.ann
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
 import org.apache.myfaces.tobago.component.RendererTypes;
-import org.apache.myfaces.tobago.internal.taglib.declaration.HasBooleanValue;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasCurrentMarkup;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasLabel;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasMarkup;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasValue;
 
 /**
  * Makes a tree node selectable.
@@ -39,7 +39,7 @@ import org.apache.myfaces.tobago.interna
     rendererType = RendererTypes.TREE_SELECT,
     allowedChildComponenents = "NONE")
 public interface TreeSelectTagDeclaration
-    extends HasIdBindingAndRendered, HasLabel, HasTip, HasMarkup, HasCurrentMarkup, HasBooleanValue {
+    extends HasIdBindingAndRendered, HasLabel, HasTip, HasMarkup, HasCurrentMarkup, HasValue {
 
   /**
    * Show a checkbox to visualize the selection state.

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java?rev=1057369&r1=1057368&r2=1057369&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java Mon Jan 10 21:19:29 2011
@@ -81,7 +81,7 @@ public class Navigation {
     reference.add(new Node("reference_object", "reference/object"));
     reference.add(new Node("reference_popup", "reference/popup"));
     reference.add(new Node("reference_progress", "reference/progress"));
-    reference.add(new Node("reference_select", "reference/select"));
+    reference.add(new Node("reference_select", "/reference/select"));
     reference.add(new Node("reference_sheet", "reference/sheet"));
     reference.add(new Node("reference_tab", "reference/tab"));
     reference.add(new Node("reference_time", "reference/time"));

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml?rev=1057369&r1=1057368&r2=1057369&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml Mon Jan 10 21:19:29 2011
@@ -430,8 +430,12 @@
       <to-view-id>/reference/progress.jsp</to-view-id>
     </navigation-case>
     <navigation-case>
-      <from-outcome>reference/select</from-outcome>
-      <to-view-id>/reference/select.jsp</to-view-id>
+      <from-outcome>/reference/select.jspx</from-outcome>
+      <to-view-id>/reference/select.jspx</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>/reference/select.xhtml</from-outcome>
+      <to-view-id>/reference/select.xhtml</to-view-id>
     </navigation-case>
     <navigation-case>
       <from-outcome>reference/sheet</from-outcome>

Copied: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/select.xhtml (from r1057264, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/select.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/select.xhtml?p2=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/select.xhtml&p1=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/select.jsp&r1=1057264&r2=1057369&rev=1057369&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/select.jsp (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/select.xhtml Mon Jan 10 21:19:29 2011
@@ -1,4 +1,6 @@
-<%--
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
  * 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.
@@ -13,144 +15,142 @@
  * 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.
---%>
-<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
-<%@ taglib uri="http://myfaces.apache.org/tobago/extension" prefix="tx" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
-
-<layout:overview>
-  <jsp:body>
-    <tc:box>
-      <f:facet name="layout">
-        <tc:gridLayout
-            rows="fixed;fixed;fixed;fixed;fixed;fixed;fixed;45px;45px;fixed;fixed;fixed;200px;200px;fixed;fixed;fixed;fixed;fixed;*;fixed"/>
+-->
+
+<ui:composition template="/WEB-INF/tags/layout/overview.xhtml"
+                xmlns:tc="http://myfaces.apache.org/tobago/component"
+                xmlns:tx="http://myfaces.apache.org/tobago/extension"
+                xmlns:ui="http://java.sun.com/jsf/facelets"
+                xmlns:f="http://java.sun.com/jsf/core">
+  <tc:box>
+    <f:facet name="layout">
+      <tc:gridLayout
+          rows="fixed;fixed;fixed;fixed;fixed;fixed;fixed;45px;45px;fixed;fixed;fixed;200px;200px;fixed;fixed;fixed;fixed;fixed;*;fixed"/>
+    </f:facet>
+
+    <tc:messages/>
+
+    <!-- code-sniplet-start id="selectBooleanCheckbox" -->
+    <tc:selectBooleanCheckbox label="_Letter"/>
+    <!-- code-sniplet-end id="selectBooleanCheckbox" -->
+    <tc:selectBooleanCheckbox label="_Phone"/>
+    <tc:selectBooleanCheckbox label="_eMail"/>
+    <tc:selectBooleanCheckbox label="_Fax">
+      <f:facet name="click">
+        <tc:command/>
       </f:facet>
+    </tc:selectBooleanCheckbox>
 
-      <tc:messages/>
+    <tc:selectBooleanCheckbox label="Value is Boolean" value="#{selectBooleanCheckboxController.normalBoolean}"/>
 
-      <%-- code-sniplet-start id="selectBooleanCheckbox" --%>
-      <tc:selectBooleanCheckbox label="_Letter"/>
-      <%-- code-sniplet-end id="selectBooleanCheckbox" --%>
-      <tc:selectBooleanCheckbox label="_Phone"/>
-      <tc:selectBooleanCheckbox label="_eMail"/>
-      <tc:selectBooleanCheckbox label="_Fax">
-        <f:facet name="click">
-          <tc:command/>
-        </f:facet>
-      </tc:selectBooleanCheckbox>
-
-      <tc:selectBooleanCheckbox label="Value is Boolean" value="#{selectBooleanCheckboxController.normalBoolean}"/>
-
-      <tc:selectBooleanCheckbox label="Converter for Boolean" value="#{selectBooleanCheckboxController.onOffString}">
-        <f:converter converterId="org.apache.myfaces.tobago.example.reference.OnOffConverter"/>
-      </tc:selectBooleanCheckbox>
-
-      <%-- code-sniplet-start id="selectManyListbox" --%>
-      <tx:selectManyListbox inline="true" label="Contact via: ">
-        <f:selectItem itemValue="Phone" itemLabel="Phone"/>
-        <f:selectItem itemValue="eMail" itemLabel="eMail"/>
-        <f:selectItem itemValue="Mobile" itemLabel="Mobile"/>
-        <f:selectItem itemValue="Fax" itemLabel="Faxscimile"/>
-      </tx:selectManyListbox>
-      <tx:selectManyListbox inline="true"
-                            label="Contact via: ">
-        <f:selectItem itemValue="Phone" itemLabel="Phone"/>
-        <f:selectItem itemValue="eMail" itemLabel="eMail"/>
-        <f:selectItem itemValue="Mobile" itemLabel="Mobile"/>
-        <f:selectItem itemValue="Fax" itemLabel="Faxscimile"/>
-        <f:facet name="click">
-          <tc:command/>
-        </f:facet>
-      </tx:selectManyListbox>
-      <%-- code-sniplet-end id="selectManyListbox" --%>
-
-      <%-- code-sniplet-start id="selectOneChoice" --%>
-      <tx:selectOneChoice inline="true" value="selectOneChoice0"
-                          label="Contact me1: ">
-        <tc:selectItem itemLabel="Letter" itemValue="letter"/>
-        <tc:selectItem itemLabel="Phone" itemValue="phone"/>
-        <tc:selectItem itemLabel="eMail" itemValue="eMail"/>
-        <tc:selectItem itemLabel="Fax" itemValue="fax"/>
-      </tx:selectOneChoice>
-
-      <%-- code-sniplet-end id="selectOneChoice" --%>
-
-      <%-- surround this with a tc:form if you get validatation or required messages from other fields.
-        With tc:form you enable partial validation and update model.
-         <tc:form>
-      --%>
-      <tx:selectOneChoice value="#{reference.vehicle}"
-                          label="Vehicle: " valueChangeListener="#{reference.valueChanged}">
-        <f:selectItems value="#{reference.selectItems}"/>
-        <f:facet name="change">
-          <tc:command action="#{reference.action}"/>
-        </f:facet>
-      </tx:selectOneChoice>
-      <tx:selectOneChoice value="#{reference.manufacturer}"
-                          label="Manufacturer: " valueChangeListener="#{reference.valueChanged}">
-        <f:selectItems value="#{reference.manufacturerSelectItems}"/>
-      </tx:selectOneChoice>
-
-      <%-- code-sniplet-start id="selectOneListbox" --%>
-      <tx:selectOneListbox label="Contact via: ">
-        <f:selectItem itemValue="Phone" itemLabel="Phone"/>
-        <f:selectItem itemValue="eMail" itemLabel="eMail"/>
-        <f:selectItem itemValue="Mobile" itemLabel="Mobile"/>
-        <f:selectItem itemValue="Fax" itemLabel="Faxscimile"/>
-      </tx:selectOneListbox>
-      <tx:selectOneListbox label="Contact via: ">
-        <f:selectItem itemValue="Phone" itemLabel="Phone"/>
-        <f:selectItem itemValue="eMail" itemLabel="eMail"/>
-        <f:selectItem itemValue="Mobile" itemLabel="Mobile"/>
-        <f:selectItem itemValue="Fax" itemLabel="Faxscimile"/>
-        <f:facet name="click">
-          <tc:command/>
-        </f:facet>
-      </tx:selectOneListbox>
-      <%-- code-sniplet-end id="selectOneListbox" --%>
-
-      <tc:separator >
-        <f:facet name="label">
-          <tc:label value="Layout"/>
-        </f:facet>
-      </tc:separator>
-
-      <tc:selectOneRadio>
-        <tc:selectItem itemValue="sun" itemLabel="Sun" />
-        <tc:selectItem itemValue="moon" itemLabel="Moon" />
-        <tc:selectItem itemValue="stars" itemLabel="Stars" itemDisabled="true" />
-      </tc:selectOneRadio>
-
-      <tc:selectOneRadio inline="true">
-        <tc:selectItem itemValue="sun" itemLabel="Sun" />
-        <tc:selectItem itemValue="moon" itemLabel="Moon" />
-        <tc:selectItem itemValue="stars" itemLabel="Stars" itemDisabled="true" />
-      </tc:selectOneRadio>
-
-      <tc:selectManyCheckbox>
-        <tc:selectItem itemValue="sun" itemLabel="Sun" />
-        <tc:selectItem itemValue="moon" itemLabel="Moon" />
-        <tc:selectItem itemValue="stars" itemLabel="Stars" itemDisabled="true" />
-      </tc:selectManyCheckbox>
-
-      <tc:selectManyCheckbox inline="true">
-        <tc:selectItem itemValue="sun" itemLabel="Sun" />
-        <tc:selectItem itemValue="moon" itemLabel="Moon" />
-        <tc:selectItem itemValue="stars" itemLabel="Stars" itemDisabled="true" />
-      </tc:selectManyCheckbox>
+    <tc:selectBooleanCheckbox label="Converter for Boolean" value="#{selectBooleanCheckboxController.onOffString}">
+      <f:converter converterId="org.apache.myfaces.tobago.example.reference.OnOffConverter"/>
+    </tc:selectBooleanCheckbox>
+
+    <!-- code-sniplet-start id="selectManyListbox" -->
+    <tx:selectManyListbox inline="true" label="Contact via: ">
+      <f:selectItem itemValue="Phone" itemLabel="Phone"/>
+      <f:selectItem itemValue="eMail" itemLabel="eMail"/>
+      <f:selectItem itemValue="Mobile" itemLabel="Mobile"/>
+      <f:selectItem itemValue="Fax" itemLabel="Faxscimile"/>
+    </tx:selectManyListbox>
+    <tx:selectManyListbox inline="true"
+                          label="Contact via: ">
+      <f:selectItem itemValue="Phone" itemLabel="Phone"/>
+      <f:selectItem itemValue="eMail" itemLabel="eMail"/>
+      <f:selectItem itemValue="Mobile" itemLabel="Mobile"/>
+      <f:selectItem itemValue="Fax" itemLabel="Faxscimile"/>
+      <f:facet name="click">
+        <tc:command/>
+      </f:facet>
+    </tx:selectManyListbox>
+    <!-- code-sniplet-end id="selectManyListbox" -->
 
-      <tc:cell/>
+    <!-- code-sniplet-start id="selectOneChoice" -->
+    <tx:selectOneChoice inline="true" value="selectOneChoice0"
+                        label="Contact me1: ">
+      <tc:selectItem itemLabel="Letter" itemValue="letter"/>
+      <tc:selectItem itemLabel="Phone" itemValue="phone"/>
+      <tc:selectItem itemLabel="eMail" itemValue="eMail"/>
+      <tc:selectItem itemLabel="Fax" itemValue="fax"/>
+    </tx:selectOneChoice>
+
+    <!-- code-sniplet-end id="selectOneChoice" -->
+
+    <!-- surround this with a tc:form if you get validatation or required messages from other fields.
+    With tc:form you enable partial validation and update model.
+    <tc:form>
+    -->
+    <tx:selectOneChoice value="#{reference.vehicle}"
+                        label="Vehicle: " valueChangeListener="#{reference.valueChanged}">
+      <f:selectItems value="#{reference.selectItems}"/>
+      <f:facet name="change">
+        <tc:command action="#{reference.action}"/>
+      </f:facet>
+    </tx:selectOneChoice>
+    <tx:selectOneChoice value="#{reference.manufacturer}"
+                        label="Manufacturer: " valueChangeListener="#{reference.valueChanged}">
+      <f:selectItems value="#{reference.manufacturerSelectItems}"/>
+    </tx:selectOneChoice>
+
+    <!-- code-sniplet-start id="selectOneListbox" -->
+    <tx:selectOneListbox label="Contact via: ">
+      <f:selectItem itemValue="Phone" itemLabel="Phone"/>
+      <f:selectItem itemValue="eMail" itemLabel="eMail"/>
+      <f:selectItem itemValue="Mobile" itemLabel="Mobile"/>
+      <f:selectItem itemValue="Fax" itemLabel="Faxscimile"/>
+    </tx:selectOneListbox>
+    <tx:selectOneListbox label="Contact via: ">
+      <f:selectItem itemValue="Phone" itemLabel="Phone"/>
+      <f:selectItem itemValue="eMail" itemLabel="eMail"/>
+      <f:selectItem itemValue="Mobile" itemLabel="Mobile"/>
+      <f:selectItem itemValue="Fax" itemLabel="Faxscimile"/>
+      <f:facet name="click">
+        <tc:command/>
+      </f:facet>
+    </tx:selectOneListbox>
+    <!-- code-sniplet-end id="selectOneListbox" -->
 
-      <tc:panel>
-        <f:facet name="layout">
-          <tc:gridLayout columns="*;fixed"   />
-        </f:facet>
-        <tc:cell/>
-        <tc:button action="submit" label="Submit" />
-      </tc:panel>
+    <tc:separator>
+      <f:facet name="label">
+        <tc:label value="Layout"/>
+      </f:facet>
+    </tc:separator>
+
+    <tc:selectOneRadio>
+      <tc:selectItem itemValue="sun" itemLabel="Sun"/>
+      <tc:selectItem itemValue="moon" itemLabel="Moon"/>
+      <tc:selectItem itemValue="stars" itemLabel="Stars" itemDisabled="true"/>
+    </tc:selectOneRadio>
+
+    <tc:selectOneRadio inline="true">
+      <tc:selectItem itemValue="sun" itemLabel="Sun"/>
+      <tc:selectItem itemValue="moon" itemLabel="Moon"/>
+      <tc:selectItem itemValue="stars" itemLabel="Stars" itemDisabled="true"/>
+    </tc:selectOneRadio>
+
+    <tc:selectManyCheckbox>
+      <tc:selectItem itemValue="sun" itemLabel="Sun"/>
+      <tc:selectItem itemValue="moon" itemLabel="Moon"/>
+      <tc:selectItem itemValue="stars" itemLabel="Stars" itemDisabled="true"/>
+    </tc:selectManyCheckbox>
+
+    <tc:selectManyCheckbox inline="true">
+      <tc:selectItem itemValue="sun" itemLabel="Sun"/>
+      <tc:selectItem itemValue="moon" itemLabel="Moon"/>
+      <tc:selectItem itemValue="stars" itemLabel="Stars" itemDisabled="true"/>
+    </tc:selectManyCheckbox>
+
+    <tc:cell/>
+
+    <tc:panel>
+      <f:facet name="layout">
+        <tc:gridLayout columns="*;fixed"/>
+      </f:facet>
+      <tc:cell/>
+      <tc:button action="submit" label="Submit"/>
+    </tc:panel>
 
-    </tc:box>
+  </tc:box>
 
-  </jsp:body>
-</layout:overview>
+</ui:composition>

Propchange: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/select.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/reference/select.xhtml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/xslt/facelet2jsp.xsl
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/xslt/facelet2jsp.xsl?rev=1057369&r1=1057368&r2=1057369&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/xslt/facelet2jsp.xsl (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/xslt/facelet2jsp.xsl Mon Jan 10 21:19:29 2011
@@ -41,9 +41,7 @@
     <jsp:root version="2.1">
       <jsp:directive.page contentType="text/html; charset=utf-8"/>   
       <layout:overview>
-        <jsp:params>
-          <xsl:apply-templates select="ui:param" mode="parameter"/>
-        </jsp:params>
+        <xsl:apply-templates select="ui:param" mode="parameter"/>
         <jsp:body>
           <xsl:apply-templates/>
         </jsp:body>
@@ -52,7 +50,9 @@
   </xsl:template>
 
   <xsl:template match="ui:param" mode="parameter">
-    <jsp:param name="title" value="BASICS"/>
+    <jsp:params>
+      <jsp:param name="title" value="BASICS"/>
+    </jsp:params>
   </xsl:template>
 
   <xsl:template match="ui:param">

Modified: myfaces/tobago/trunk/tobago-extension/tobago-taglib-extension/src/main/java-jsf-1.1/org/apache/myfaces/tobago/internal/taglib/extension/MenuCheckboxExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-taglib-extension/src/main/java-jsf-1.1/org/apache/myfaces/tobago/internal/taglib/extension/MenuCheckboxExtensionTag.java?rev=1057369&r1=1057368&r2=1057369&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-taglib-extension/src/main/java-jsf-1.1/org/apache/myfaces/tobago/internal/taglib/extension/MenuCheckboxExtensionTag.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-taglib-extension/src/main/java-jsf-1.1/org/apache/myfaces/tobago/internal/taglib/extension/MenuCheckboxExtensionTag.java Mon Jan 10 21:19:29 2011
@@ -26,7 +26,7 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.internal.taglib.MenuCommandTag;
 import org.apache.myfaces.tobago.internal.taglib.SelectBooleanCheckboxTag;
 import org.apache.myfaces.tobago.internal.taglib.declaration.AbstractCommandTagDeclaration;
-import org.apache.myfaces.tobago.internal.taglib.declaration.HasBooleanValue;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasValue;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasLabel;
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsDisabled;
@@ -52,7 +52,7 @@ import javax.servlet.jsp.tagext.BodyTagS
 @Tag(name = "menuCheckbox", tagExtraInfoClassName = "org.apache.myfaces.tobago.internal.taglib.component.CommandTagExtraInfo")
 @ExtensionTag(baseClassName = "org.apache.myfaces.tobago.internal.taglib.component.MenuCheckboxTag")
 public class MenuCheckboxExtensionTag extends BodyTagSupport implements AbstractCommandTagDeclaration,
-    HasIdBindingAndRendered, IsDisabled, HasBooleanValue, HasLabel {
+    HasIdBindingAndRendered, IsDisabled, HasValue, HasLabel {
   private String rendered;
   private String value;
 

Modified: myfaces/tobago/trunk/tobago-extension/tobago-taglib-extension/src/main/java-jsf-1.1/org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-taglib-extension/src/main/java-jsf-1.1/org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.java?rev=1057369&r1=1057368&r2=1057369&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-taglib-extension/src/main/java-jsf-1.1/org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-taglib-extension/src/main/java-jsf-1.1/org/apache/myfaces/tobago/internal/taglib/extension/SelectBooleanCheckboxExtensionTag.java Mon Jan 10 21:19:29 2011
@@ -20,7 +20,7 @@ package org.apache.myfaces.tobago.intern
 import org.apache.myfaces.tobago.apt.annotation.ExtensionTag;
 import org.apache.myfaces.tobago.apt.annotation.Tag;
 import org.apache.myfaces.tobago.internal.taglib.SelectBooleanCheckboxTag;
-import org.apache.myfaces.tobago.internal.taglib.declaration.HasBooleanValue;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasValue;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasConverterMessage;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasFieldId;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
@@ -50,7 +50,7 @@ import javax.servlet.jsp.tagext.BodyTagS
 public class SelectBooleanCheckboxExtensionTag extends BodyTagSupport implements
     HasValidator, HasOnchange, HasValueChangeListener, HasIdBindingAndRendered, HasLabel,
     HasValidatorMessage, HasRequiredMessage, HasConverterMessage,
-    HasBooleanValue, HasLabelWidth, IsDisabled, HasTip, IsReadonly, HasMarkup, HasTabIndex, IsRequired,
+    HasValue, HasLabelWidth, IsDisabled, HasTip, IsReadonly, HasMarkup, HasTabIndex, IsRequired,
     IsFocus, HasFieldId {
 
   private String value;