You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2007/05/12 22:26:26 UTC

svn commit: r537508 - in /myfaces/tobago/trunk: contrib/facelets/src/main/resources/META-INF/ example/facelets/src/main/webapp/

Author: bommel
Date: Sat May 12 13:26:25 2007
New Revision: 537508

URL: http://svn.apache.org/viewvc?view=rev&rev=537508
Log:
(TOBAGO-356) Add "id" functionality to tx: Facelets components

Modified:
    myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/date.xml
    myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/file.xml
    myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/in.xml
    myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectBooleanCheckbox.xml
    myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectManyListbox.xml
    myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectOneChoice.xml
    myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectOneListbox.xml
    myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/textarea.xml
    myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/time.xml
    myfaces/tobago/trunk/example/facelets/src/main/webapp/helloWorld.xml
    myfaces/tobago/trunk/example/facelets/src/main/webapp/helloWorldNext.xml

Modified: myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/date.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/date.xml?view=diff&rev=537508&r1=537507&r2=537508
==============================================================================
--- myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/date.xml (original)
+++ myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/date.xml Sat May 12 13:26:25 2007
@@ -31,12 +31,25 @@
       <tc:gridLayout columns="${labelWidth};*;fixed"/>
     </f:facet>
     <tc:label value="${label}" for="@auto" tip="${tip}"/>
-    <tc:date value="${value}" required="${required}"
-        readonly="${readonly}" disabled="${disabled}">
-      <ui:insert/>
-    </tc:date>
-    <tc:form>
-      <tc:datePicker for="@auto" />
-    </tc:form>
+    <c:choose>
+	    <c:when test="${empty id}">
+	      <tc:date value="${value}" required="${required}"
+                 readonly="${readonly}" disabled="${disabled}">
+          <ui:insert/>
+        </tc:date>
+        <tc:form>
+          <tc:datePicker for="@auto" />
+        </tc:form>
+      </c:when>
+	    <c:when test="${not empty id}">
+	      <tc:date id="${id}" value="${value}" required="${required}"
+                 readonly="${readonly}" disabled="${disabled}">
+          <ui:insert/>
+        </tc:date>
+        <tc:form>
+          <tc:datePicker for="@auto" />
+        </tc:form>
+      </c:when>
+    </c:choose>
   </tc:panel>
 </ui:composition>

Modified: myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/file.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/file.xml?view=diff&rev=537508&r1=537507&r2=537508
==============================================================================
--- myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/file.xml (original)
+++ myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/file.xml Sat May 12 13:26:25 2007
@@ -32,9 +32,19 @@
       <tc:gridLayout columns="${labelWidth};*"/>
     </f:facet>
     <tc:label value="${label}" for="@auto" tip="${tip}"/>
-    <tc:file value="${value}" required="${required}"
-        readonly="${readonly}" disabled="${disabled}">
-      <ui:insert/>
-    </tc:file>
+    <c:choose>
+	    <c:when test="${empty id}">
+        <tc:file value="${value}" required="${required}"
+                 readonly="${readonly}" disabled="${disabled}">
+          <ui:insert/>
+        </tc:file>
+      </c:when>
+	    <c:when test="${not empty id}">
+        <tc:file id="${id}" value="${value}" required="${required}"
+                 readonly="${readonly}" disabled="${disabled}">
+          <ui:insert/>
+        </tc:file>
+      </c:when>
+    </c:choose>     
   </tc:panel>
 </ui:composition>

Modified: myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/in.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/in.xml?view=diff&rev=537508&r1=537507&r2=537508
==============================================================================
--- myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/in.xml (original)
+++ myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/in.xml Sat May 12 13:26:25 2007
@@ -32,9 +32,19 @@
       <tc:gridLayout columns="${labelWidth};*"/>
     </f:facet>
     <tc:label value="${label}" for="@auto" tip="${tip}"/>
-    <tc:in value="${value}" required="${required}" password="${password}"
-        readonly="${readonly}" disabled="${disabled}" >
-      <ui:insert/>
-    </tc:in>
+    <c:choose>
+	    <c:when test="${empty id}">
+        <tc:in value="${value}" required="${required}"
+               password="${password}" readonly="${readonly}" disabled="${disabled}" >
+          <ui:insert/>
+        </tc:in>
+      </c:when>
+	    <c:when test="${not empty id}">
+        <tc:in id="${id}" value="${value}" required="${required}"
+               password="${password}" readonly="${readonly}" disabled="${disabled}" >
+          <ui:insert/>
+        </tc:in>
+      </c:when>
+    </c:choose>   
   </tc:panel>
 </ui:composition>

Modified: myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectBooleanCheckbox.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectBooleanCheckbox.xml?view=diff&rev=537508&r1=537507&r2=537508
==============================================================================
--- myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectBooleanCheckbox.xml (original)
+++ myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectBooleanCheckbox.xml Sat May 12 13:26:25 2007
@@ -32,9 +32,19 @@
       <tc:gridLayout columns="${labelWidth};*"/>
     </f:facet>
     <tc:label value="${label}" for="@auto" tip="${tip}"/>
-    <tc:selectBooleanCheckbox value="${value}" 
-        readonly="${readonly}" disabled="${disabled}">
-      <ui:insert/>
-    </tc:selectBooleanCheckbox>
+     <c:choose>
+	    <c:when test="${empty id}">
+        <tc:selectBooleanCheckbox value="${value}"
+               readonly="${readonly}" disabled="${disabled}" >
+          <ui:insert/>
+        </tc:selectBooleanCheckbox>
+      </c:when>
+	    <c:when test="${not empty id}">
+        <tc:selectBooleanCheckbox id="${id}" value="${value}"
+               readonly="${readonly}" disabled="${disabled}" >
+          <ui:insert/>
+        </tc:selectBooleanCheckbox>
+      </c:when>
+    </c:choose>   
   </tc:panel>
 </ui:composition>

Modified: myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectManyListbox.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectManyListbox.xml?view=diff&rev=537508&r1=537507&r2=537508
==============================================================================
--- myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectManyListbox.xml (original)
+++ myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectManyListbox.xml Sat May 12 13:26:25 2007
@@ -32,9 +32,19 @@
       <tc:gridLayout columns="${labelWidth};*"/>
     </f:facet>
     <tc:label value="${label}" for="@auto" tip="${tip}"/>
-    <tc:selectManyListbox value="${value}" required="${required}"
-        readonly="${readonly}" disabled="${disabled}" >
-      <ui:insert/>
-    </tc:selectManyListbox>
+    <c:choose>
+	    <c:when test="${empty id}">
+        <tc:selectManyListbox value="${value}" required="${required}"
+               readonly="${readonly}" disabled="${disabled}" >
+          <ui:insert/>
+        </tc:selectManyListbox>
+      </c:when>
+	    <c:when test="${not empty id}">
+        <tc:selectManyListbox id="${id}" value="${value}" required="${required}"
+               readonly="${readonly}" disabled="${disabled}" >
+          <ui:insert/>
+        </tc:selectManyListbox>
+      </c:when>
+    </c:choose>
   </tc:panel>
 </ui:composition>

Modified: myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectOneChoice.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectOneChoice.xml?view=diff&rev=537508&r1=537507&r2=537508
==============================================================================
--- myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectOneChoice.xml (original)
+++ myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectOneChoice.xml Sat May 12 13:26:25 2007
@@ -32,9 +32,19 @@
       <tc:gridLayout columns="${labelWidth};*"/>
     </f:facet>
     <tc:label value="${label}" for="@auto" tip="${tip}"/>
-    <tc:selectOneChoice value="${value}" required="${required}"
-        readonly="${readonly}" disabled="${disabled}">
-      <ui:insert/>
-    </tc:selectOneChoice>
+    <c:choose>
+	    <c:when test="${empty id}">
+        <tc:selectOneChoice value="${value}" required="${required}"
+               readonly="${readonly}" disabled="${disabled}" >
+          <ui:insert/>
+        </tc:selectOneChoice>
+      </c:when>
+	    <c:when test="${not empty id}">
+        <tc:selectOneChoice id="${id}" value="${value}" required="${required}"
+               readonly="${readonly}" disabled="${disabled}" >
+          <ui:insert/>
+        </tc:selectOneChoice>
+      </c:when>
+    </c:choose>   
   </tc:panel>
 </ui:composition>

Modified: myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectOneListbox.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectOneListbox.xml?view=diff&rev=537508&r1=537507&r2=537508
==============================================================================
--- myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectOneListbox.xml (original)
+++ myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/selectOneListbox.xml Sat May 12 13:26:25 2007
@@ -32,9 +32,19 @@
       <tc:gridLayout columns="${labelWidth};*"/>
     </f:facet>
     <tc:label value="${label}" for="@auto" tip="${tip}"/>
-    <tc:selectOneListbox value="${value}" required="${required}"
-        readonly="${readonly}" disabled="${disabled}">
-      <ui:insert/>
-    </tc:selectOneListbox>
+    <c:choose>
+	    <c:when test="${empty id}">
+        <tc:selectOneListbox value="${value}" required="${required}"
+               readonly="${readonly}" disabled="${disabled}" >
+          <ui:insert/>
+        </tc:selectOneListbox>
+      </c:when>
+	    <c:when test="${not empty id}">
+        <tc:selectOneListbox id="${id}" value="${value}" required="${required}"
+               readonly="${readonly}" disabled="${disabled}" >
+          <ui:insert/>
+        </tc:selectOneListbox>
+      </c:when>
+    </c:choose>   
   </tc:panel>
 </ui:composition>

Modified: myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/textarea.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/textarea.xml?view=diff&rev=537508&r1=537507&r2=537508
==============================================================================
--- myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/textarea.xml (original)
+++ myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/textarea.xml Sat May 12 13:26:25 2007
@@ -32,9 +32,19 @@
       <tc:gridLayout columns="${labelWidth};*"/>
     </f:facet>
     <tc:label value="${label}" for="@auto" tip="${tip}"/>
-    <tc:textarea value="${value}" required="${required}"
-        readonly="${readonly}" disabled="${disabled}">
-      <ui:insert/>
-    </tc:textarea>
+    <c:choose>
+	    <c:when test="${empty id}">
+        <tc:textarea value="${value}" required="${required}"
+               readonly="${readonly}" disabled="${disabled}" >
+          <ui:insert/>
+        </tc:textarea>
+      </c:when>
+	    <c:when test="${not empty id}">
+        <tc:textarea id="${id}" value="${value}" required="${required}"
+               readonly="${readonly}" disabled="${disabled}" >
+          <ui:insert/>
+        </tc:textarea>
+      </c:when>
+    </c:choose>   
   </tc:panel>
 </ui:composition>

Modified: myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/time.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/time.xml?view=diff&rev=537508&r1=537507&r2=537508
==============================================================================
--- myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/time.xml (original)
+++ myfaces/tobago/trunk/contrib/facelets/src/main/resources/META-INF/time.xml Sat May 12 13:26:25 2007
@@ -32,9 +32,19 @@
       <tc:gridLayout columns="${labelWidth};*"/>
     </f:facet>
     <tc:label value="${label}" for="@auto" tip="${tip}"/>
-    <tc:time value="${value}" required="${required}"
-        readonly="${readonly}" disabled="${disabled}" >
-      <ui:insert/>
-    </tc:time>
+    <c:choose>
+	    <c:when test="${empty id}">
+        <tc:time value="${value}" required="${required}"
+               readonly="${readonly}" disabled="${disabled}" >
+          <ui:insert/>
+        </tc:time>
+      </c:when>
+	    <c:when test="${not empty id}">
+        <tc:time id="${id}" value="${value}" required="${required}"
+               readonly="${readonly}" disabled="${disabled}" >
+          <ui:insert/>
+        </tc:time>
+      </c:when>
+    </c:choose>
   </tc:panel>
 </ui:composition>

Modified: myfaces/tobago/trunk/example/facelets/src/main/webapp/helloWorld.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/facelets/src/main/webapp/helloWorld.xml?view=diff&rev=537508&r1=537507&r2=537508
==============================================================================
--- myfaces/tobago/trunk/example/facelets/src/main/webapp/helloWorld.xml (original)
+++ myfaces/tobago/trunk/example/facelets/src/main/webapp/helloWorld.xml Sat May 12 13:26:25 2007
@@ -23,10 +23,12 @@
         xmlns:tx="http://myfaces.apache.org/tobago/facelet-extension">
   <tc:page height="200" width="300" label="Tobago Hello World Faclets">
     <f:facet name="layout">
-      <tc:gridLayout/>
+      <tc:gridLayout rows="fixed;fixed;fixed;1*"/>
     </f:facet>
     <tc:out value="Hello World!"/>
+    <tx:date id="test" label="Label"/>
     <ui:debug hotkey="m"/>
     <tc:button label="Go on" action="next" />
+    <tc:cell/>
   </tc:page>
 </f:view>

Modified: myfaces/tobago/trunk/example/facelets/src/main/webapp/helloWorldNext.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/facelets/src/main/webapp/helloWorldNext.xml?view=diff&rev=537508&r1=537507&r2=537508
==============================================================================
--- myfaces/tobago/trunk/example/facelets/src/main/webapp/helloWorldNext.xml (original)
+++ myfaces/tobago/trunk/example/facelets/src/main/webapp/helloWorldNext.xml Sat May 12 13:26:25 2007
@@ -23,10 +23,11 @@
         xmlns:tx="http://myfaces.apache.org/tobago/facelet-extension">
   <tc:page height="200" width="300" label="Tobago Hello World Faclets">
     <f:facet name="layout">
-      <tc:gridLayout/>
+      <tc:gridLayout  rows="fixed;fixed;1*"/>
     </f:facet>
     <tc:out value="#{counter.count}"/>
     <ui:debug hotkey="m"/>
     <tc:button label="Go back" action="back" />
+    <tc:cell/>
   </tc:page>
 </f:view>