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/09/13 10:12:44 UTC

svn commit: r1170074 - in /myfaces/tobago/trunk: tobago-example/tobago-example-test/src/main/webapp/tc/selectManyCheckbox/ tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ tobago-the...

Author: lofwyr
Date: Tue Sep 13 08:12:43 2011
New Revision: 1170074

URL: http://svn.apache.org/viewvc?rev=1170074&view=rev
Log:
TOBAGO-1028: Attribute inline="true" doesn't work anymore in <tc:selectManyCheckbox>

Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/selectManyCheckbox/selectManyCheckbox.xhtml
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/selectManyCheckbox/selectManyCheckbox.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/selectManyCheckbox/selectManyCheckbox.xhtml?rev=1170074&r1=1170073&r2=1170074&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/selectManyCheckbox/selectManyCheckbox.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/selectManyCheckbox/selectManyCheckbox.xhtml Tue Sep 13 08:12:43 2011
@@ -26,7 +26,7 @@
     <tc:gridLayoutConstraint width="700px" height="600px"/>
     <f:facet name="layout">
       <!-- fixme: rows="20px" -->
-      <tc:gridLayout columns="*;2*" rows="auto;20px" columnSpacing="30px"/>
+      <tc:gridLayout columns="*;2*" rows="auto;20px;auto;auto;auto;auto;auto;auto;auto" columnSpacing="30px"/>
     </f:facet>
 
     <tc:messages>

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java?rev=1170074&r1=1170073&r2=1170074&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java Tue Sep 13 08:12:43 2011
@@ -19,6 +19,7 @@ package org.apache.myfaces.tobago.render
 
 import org.apache.myfaces.tobago.component.UISelectManyCheckbox;
 import org.apache.myfaces.tobago.config.Configurable;
+import org.apache.myfaces.tobago.context.Markup;
 import org.apache.myfaces.tobago.layout.Measure;
 import org.apache.myfaces.tobago.renderkit.SelectManyRendererBase;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
@@ -29,8 +30,6 @@ import org.apache.myfaces.tobago.renderk
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
 import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import javax.faces.component.NamingContainer;
 import javax.faces.component.UIComponent;
@@ -43,15 +42,15 @@ import java.util.List;
 
 public class SelectManyCheckboxRenderer extends SelectManyRendererBase {
 
-  private static final Logger LOG = LoggerFactory.getLogger(SelectManyCheckboxRenderer.class);
-
-  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
-    if (!(component instanceof UISelectManyCheckbox)) {
-      LOG.error("Wrong type: Need " + UISelectManyCheckbox.class.getName() + ", but was "
-          + component.getClass().getName());
-      return;
+  public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
+    UISelectManyCheckbox select = (UISelectManyCheckbox) component;
+    super.prepareRender(facesContext, select);
+    if (select.isInline()) {
+      select.setCurrentMarkup(Markup.INLINE.add(select.getCurrentMarkup()));
     }
+  }
 
+  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
     UISelectManyCheckbox select = (UISelectManyCheckbox) component;
     TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
 

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css?rev=1170074&r1=1170073&r2=1170074&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css Tue Sep 13 08:12:43 2011
@@ -641,7 +641,8 @@ li.tobago-menu-markup-selected {
   color: #778899;
 }
 
-.tobago-selectManyCheckbox-inline, .tobago-selectManyCheckbox-inline li  {
+/* todo after removing IE6 support please use ">" */
+.tobago-selectManyCheckbox-markup-inline li  {
   display: inline;
 }
 

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml?rev=1170074&r1=1170073&r2=1170074&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml Tue Sep 13 08:12:43 2011
@@ -163,6 +163,7 @@
             <markup>warn</markup>
             <markup>info</markup>
             <markup>selected</markup>
+            <markup>inline</markup>
           </supported-markup>
         </renderer>
         <renderer>