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/07/06 05:23:57 UTC

svn commit: r1751596 - 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/layout/ tobago-core/src/test/java/org/apache/myfaces/tobago/layout/ toba...

Author: lofwyr
Date: Wed Jul  6 05:23:57 2016
New Revision: 1751596

URL: http://svn.apache.org/viewvc?rev=1751596&view=rev
Log:
TOBAGO-1552: Add an 'align' attribute to <tc:flowLayout>

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FlowLayoutTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/StyleTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/TextAlign.java
    myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/TextAlignUnitTest.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/command.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/16-layout/10-flow/flow-layout.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/00-collapsible-box/collapsible-box.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/10-collapsible-popup/collapsible-popup.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/20-collapsible-panel/collapsible-panel.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/30-collapsible-section/collapsible-section.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/65-accessKey/accessKey.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/flowLayout/flowLayout-textAlign.xhtml
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FlowLayoutRenderer.java

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FlowLayoutTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FlowLayoutTagDeclaration.java?rev=1751596&r1=1751595&r2=1751596&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FlowLayoutTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FlowLayoutTagDeclaration.java Wed Jul  6 05:23:57 2016
@@ -20,11 +20,14 @@
 package org.apache.myfaces.tobago.internal.taglib.component;
 
 import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
 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.component.AbstractUIFlowLayout;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsVisual;
+import org.apache.myfaces.tobago.layout.TextAlign;
 
 /**
  * Renders a FlowLayout that positions the content components in there natural order.
@@ -39,4 +42,22 @@ import org.apache.myfaces.tobago.interna
     allowedChildComponenents = "NONE")
 public interface FlowLayoutTagDeclaration
     extends HasIdBindingAndRendered, IsVisual {
+
+  /**
+   * The alignment of the elements inside of the container, possible values are:
+   * {@link TextAlign#left},
+   * {@link TextAlign#right},
+   * {@link TextAlign#center} and
+   * {@link TextAlign#justify}.
+   *
+   * @since 3.0.0
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(
+      type = {"org.apache.myfaces.tobago.layout.TextAlign"},
+      allowedValues = {
+          TextAlign.LEFT, TextAlign.RIGHT, TextAlign.CENTER, TextAlign.JUSTIFY
+      })
+  void setTextAlign(String textAlign);
+
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/StyleTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/StyleTagDeclaration.java?rev=1751596&r1=1751595&r2=1751596&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/StyleTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/StyleTagDeclaration.java Wed Jul  6 05:23:57 2016
@@ -255,13 +255,15 @@ public interface StyleTagDeclaration ext
    * {@link TextAlign#right},
    * {@link TextAlign#center} and
    * {@link TextAlign#justify}.
+   *
    * @since 3.0.0
    */
-  @TagAttribute()
+  @TagAttribute
   @UIComponentTagAttribute(
       type = {"org.apache.myfaces.tobago.layout.TextAlign"},
       allowedValues = {
-          TextAlign.STRING_LEFT, TextAlign.STRING_RIGHT, TextAlign.STRING_CENTER, TextAlign.STRING_JUSTIFY})
+          TextAlign.LEFT, TextAlign.RIGHT, TextAlign.CENTER, TextAlign.JUSTIFY
+      })
   void setTextAlign(String textAlign);
 
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/TextAlign.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/TextAlign.java?rev=1751596&r1=1751595&r2=1751596&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/TextAlign.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/TextAlign.java Wed Jul  6 05:23:57 2016
@@ -32,44 +32,24 @@ public enum TextAlign {
   justify;
 
   /**
-   * @deprecated Since Tobago 3.0.0 Please use {@link TextAlign#left}
-   */
-  public static final TextAlign LEFT = left;
-
-  /**
-   * @deprecated Since Tobago 3.0.0 Please use {@link TextAlign#right}
-   */
-  public static final TextAlign RIGHT = right;
-
-  /**
-   * @deprecated Since Tobago 3.0.0 Please use {@link TextAlign#center}
-   */
-  public static final TextAlign CENTER = center;
-
-  /**
-   * @deprecated Since Tobago 3.0.0 Please use {@link TextAlign#justify}
-   */
-  public static final TextAlign JUSTIFY = justify;
-
-  /**
    * Internal constant to use in annotations. Please use {@link TextAlign#left}
    */
-  public static final String STRING_LEFT = "left";
+  public static final String LEFT = "left";
 
   /**
    * Internal constant to use in annotations. Please use {@link TextAlign#right}
    */
-  public static final String STRING_RIGHT = "right";
+  public static final String RIGHT = "right";
 
   /**
    * Internal constant to use in annotations. Please use {@link TextAlign#center}
    */
-  public static final String STRING_CENTER = "center";
+  public static final String CENTER = "center";
 
   /**
    * Internal constant to use in annotations. Please use {@link TextAlign#justify}
    */
-  public static final String STRING_JUSTIFY = "justify";
+  public static final String JUSTIFY = "justify";
 
   /**
    * @deprecated Since Tobago 3.0.0 Please use {@link TextAlign#name}

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/TextAlignUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/TextAlignUnitTest.java?rev=1751596&r1=1751595&r2=1751596&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/TextAlignUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/TextAlignUnitTest.java Wed Jul  6 05:23:57 2016
@@ -19,16 +19,13 @@
 
 package org.apache.myfaces.tobago.layout;
 
-import org.junit.Assert;
+import org.apache.myfaces.tobago.util.EnumUnitTest;
 import org.junit.Test;
 
-public class TextAlignUnitTest {
+public class TextAlignUnitTest extends EnumUnitTest {
 
   @Test
-  public void testConstants() {
-    Assert.assertEquals(TextAlign.left.name(), TextAlign.STRING_LEFT);
-    Assert.assertEquals(TextAlign.right.name(), TextAlign.STRING_RIGHT);
-    Assert.assertEquals(TextAlign.center.name(), TextAlign.STRING_CENTER);
-    Assert.assertEquals(TextAlign.justify.name(), TextAlign.STRING_JUSTIFY);
+  public void testNames() throws IllegalAccessException, NoSuchFieldException {
+    testNames(TextAlign.class);
   }
 }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/command.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/command.xhtml?rev=1751596&r1=1751595&r2=1751596&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/command.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/040-command/command.xhtml Wed Jul  6 05:23:57 2016
@@ -55,8 +55,7 @@
       <tc:button image="fa-hourglass" label="Hallo"/>
     </tc:commands>
 
-    <tc:flowLayout>
-      <tc:style textAlign="right" />
+    <tc:flowLayout textAlign="right">
       <tc:in label="Search"/>
     </tc:flowLayout>
   </tc:bar>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/16-layout/10-flow/flow-layout.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/16-layout/10-flow/flow-layout.xhtml?rev=1751596&r1=1751595&r2=1751596&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/16-layout/10-flow/flow-layout.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/16-layout/10-flow/flow-layout.xhtml Wed Jul  6 05:23:57 2016
@@ -43,8 +43,7 @@
 
   <tc:section label="Align: left (default)">
     TODO
-    <tc:flowLayout>
-      <tc:style textAlign="left"/>
+    <tc:flowLayout textAlign="left">
       <tc:button label="Button"/>
       <tc:button label="Button"/>
       <tc:button label="Button"/>
@@ -57,8 +56,7 @@
 
   <tc:section label="Align: right">
     TODO
-    <tc:flowLayout>
-      <tc:style textAlign="right"/>
+    <tc:flowLayout textAlign="right">
       <tc:button label="Button"/>
       <tc:button label="Button"/>
       <tc:button label="Button"/>
@@ -71,8 +69,7 @@
 
   <tc:section label="Align: center">
     TODO
-    <tc:flowLayout>
-      <tc:style textAlign="center"/>
+    <tc:flowLayout textAlign="center">
       <tc:button label="Button"/>
       <tc:button label="Button"/>
       <tc:button label="Button"/>
@@ -85,8 +82,7 @@
 
   <tc:section label="Align: justify">
     TODO
-    <tc:flowLayout>
-      <tc:style textAlign="justify"/>
+    <tc:flowLayout textAlign="justify">
       <tc:button label="Button"/>
       <tc:button label="Button"/>
       <tc:button label="Button"/>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/00-collapsible-box/collapsible-box.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/00-collapsible-box/collapsible-box.xhtml?rev=1751596&r1=1751595&r2=1751596&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/00-collapsible-box/collapsible-box.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/00-collapsible-box/collapsible-box.xhtml Wed Jul  6 05:23:57 2016
@@ -98,8 +98,7 @@
 
   <tc:out value="Requests: #{activityList.values[0].jsfRequest} / AJAX: #{activityList.values[0].ajaxRequest}"/>
 
-  <tc:flowLayout>
-    <tc:style textAlign="right"/>
+  <tc:flowLayout textAlign="right">
     <tc:button label="Submit"/>
   </tc:flowLayout>
 

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/10-collapsible-popup/collapsible-popup.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/10-collapsible-popup/collapsible-popup.xhtml?rev=1751596&r1=1751595&r2=1751596&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/10-collapsible-popup/collapsible-popup.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/10-collapsible-popup/collapsible-popup.xhtml Wed Jul  6 05:23:57 2016
@@ -57,8 +57,7 @@
     <tc:out value="Requests: #{activityList.values[0].jsfRequest} / AJAX: #{activityList.values[0].ajaxRequest}"/>
     <!--<tc:out value="#{collapsibleController.collapsed}" label="collapsed"/>-->
 
-    <tc:flowLayout>
-      <tc:style textAlign="right"/>
+    <tc:flowLayout textAlign="right">
       <tc:button label="Submit"/>
     </tc:flowLayout>
   </tc:section>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/20-collapsible-panel/collapsible-panel.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/20-collapsible-panel/collapsible-panel.xhtml?rev=1751596&r1=1751595&r2=1751596&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/20-collapsible-panel/collapsible-panel.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/20-collapsible-panel/collapsible-panel.xhtml Wed Jul  6 05:23:57 2016
@@ -90,8 +90,7 @@
 
   <tc:out value="Requests: #{activityList.values[0].jsfRequest} / AJAX: #{activityList.values[0].ajaxRequest}"/>
 
-  <tc:flowLayout>
-    <tc:style textAlign="right"/>
+  <tc:flowLayout textAlign="right">
     <tc:button label="Submit"/>
   </tc:flowLayout>
 

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/30-collapsible-section/collapsible-section.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/30-collapsible-section/collapsible-section.xhtml?rev=1751596&r1=1751595&r2=1751596&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/30-collapsible-section/collapsible-section.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/53-collapsible/30-collapsible-section/collapsible-section.xhtml Wed Jul  6 05:23:57 2016
@@ -96,8 +96,7 @@
 
   <tc:out value="Requests: #{activityList.values[0].jsfRequest} / AJAX: #{activityList.values[0].ajaxRequest}"/>
 
-  <tc:flowLayout>
-    <tc:style textAlign="right"/>
+  <tc:flowLayout textAlign="right">
     <tc:button label="Submit"/>
   </tc:flowLayout>
 

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/65-accessKey/accessKey.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/65-accessKey/accessKey.xhtml?rev=1751596&r1=1751595&r2=1751596&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/65-accessKey/accessKey.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/65-accessKey/accessKey.xhtml Wed Jul  6 05:23:57 2016
@@ -84,8 +84,7 @@
     <p>The following example show a label which is automatically bound to the inputfield after that.</p>
     <pre><code class="language-markup">&lt;tc:label value="Label" accessKey="l" for="@auto"/>
 &lt;tc:in/></code></pre>
-    <tc:flowLayout>
-      <tc:style textAlign="right"/>
+    <tc:flowLayout textAlign="right">
       <tc:label value="Label" accessKey="l" for="@auto"/>
       <tc:in/>
     </tc:flowLayout>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml?rev=1751596&r1=1751595&r2=1751596&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml Wed Jul  6 05:23:57 2016
@@ -104,8 +104,7 @@
         </tc:commands>
       </tc:form>
 
-      <tc:flowLayout>
-        <tc:style textAlign="right"/>
+      <tc:flowLayout textAlign="right">
         <tc:form>
           <tc:in placeholder="Search"/>
           <tc:button defaultCommand="true" omit="true" label="go">

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/flowLayout/flowLayout-textAlign.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/flowLayout/flowLayout-textAlign.xhtml?rev=1751596&r1=1751595&r2=1751596&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/flowLayout/flowLayout-textAlign.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/flowLayout/flowLayout-textAlign.xhtml Wed Jul  6 05:23:57 2016
@@ -28,8 +28,7 @@
       <tc:gridLayout rows="20px;auto;20px;auto;20px;auto;60px;"/>
     </f:facet>
 
-    <tc:flowLayout>
-      <tc:style textAlign="left"/>
+    <tc:flowLayout textAlign="left">
       <tc:out id="left" value="left">
         <tc:dataAttribute name="assert-left" value="0"/>
         <tc:dataAttribute name="assert-top" value="0"/>
@@ -41,8 +40,7 @@
 
     <tc:separator/>
 
-    <tc:flowLayout>
-      <tc:style textAlign="right"/>
+    <tc:flowLayout textAlign="right">
       <tc:out id="right" value="right">
         <tc:dataAttribute name="assert-left" value="577"/>
         <tc:dataAttribute name="assert-top" value="31"/>
@@ -54,8 +52,7 @@
 
     <tc:separator/>
 
-    <tc:flowLayout>
-      <tc:style textAlign="center"/>
+    <tc:flowLayout textAlign="center">
       <tc:out id="center" value="center">
         <tc:dataAttribute name="assert-left" value="283"/>
         <tc:dataAttribute name="assert-top" value="62"/>
@@ -67,8 +64,7 @@
 
     <tc:separator/>
 
-    <tc:flowLayout>
-      <tc:style textAlign="justify"/>
+    <tc:flowLayout textAlign="justify">
       1_XXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXX
       2_XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
       3_XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FlowLayoutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FlowLayoutRenderer.java?rev=1751596&r1=1751595&r2=1751596&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FlowLayoutRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FlowLayoutRenderer.java Wed Jul  6 05:23:57 2016
@@ -20,8 +20,10 @@
 package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
 
 import org.apache.myfaces.tobago.component.UIFlowLayout;
+import org.apache.myfaces.tobago.layout.TextAlign;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
+import org.apache.myfaces.tobago.renderkit.css.Style;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
 import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
@@ -35,12 +37,21 @@ public class FlowLayoutRenderer extends
 
   @Override
   public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
+
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
     final UIFlowLayout layout = (UIFlowLayout) component;
+
     writer.startElement(HtmlElements.DIV);
     writer.writeIdAttribute(layout.getClientId());
     writer.writeClassAttribute(Classes.create(layout), layout.getCustomClass());
-    writer.writeStyleAttribute(layout.getStyle());
+
+    Style style = layout.getStyle();
+    final TextAlign textAlign = layout.getTextAlign();
+    if (style == null && textAlign != null) {
+      style = new Style();
+      style.setTextAlign(textAlign);
+    }
+    writer.writeStyleAttribute(style);
   }
 
   @Override