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 2015/01/07 14:56:19 UTC
svn commit: r1650057 - in /myfaces/tobago/branches/tobago-3.0.x:
tobago-core/src/main/java/org/apache/myfaces/tobago/component/
tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/c...
Author: lofwyr
Date: Wed Jan 7 13:56:18 2015
New Revision: 1650057
URL: http://svn.apache.org/r1650057
Log:
TOBAGO-1435: New Layout: ColumnLayout which uses 12 columns (like Bootstrap)
Added:
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/ColumnLayoutRule.java
- copied, changed from r1650005, myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/BootstrapLayoutRule.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIColumnLayout.java
- copied, changed from r1650021, myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIBootstrapLayout.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ColumnLayoutTagDeclaration.java
- copied, changed from r1650005, myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/BootstrapLayoutTagDeclaration.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/ColumnPartition.java
- copied, changed from r1650005, myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/BootstrapPartition.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/ColumnPartitionUnitTest.java
- copied, changed from r1650005, myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/BootstrapPartitionUnitTest.java
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ColumnLayoutRenderer.java
- copied, changed from r1650005, myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BootstrapLayoutRenderer.java
Removed:
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/BootstrapLayoutRule.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIBootstrapLayout.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/BootstrapLayoutTagDeclaration.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/BootstrapPartition.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/BootstrapPartitionUnitTest.java
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BootstrapLayoutRenderer.java
Modified:
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/editor.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/layout/basic.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/tab/personal.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/bootstrapLayout/simple-1.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/bootstrapLayout/simple-2.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/bootstrapLayout/simple-3.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/BootstrapCssGenerator.java
myfaces/tobago/branches/tobago-3.0.x/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java?rev=1650057&r1=1650056&r2=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/component/RendererTypes.java Wed Jan 7 13:56:18 2015
@@ -24,13 +24,13 @@ package org.apache.myfaces.tobago.compon
*/
public final class RendererTypes {
- public static final String BOOTSTRAP_LAYOUT = "BootstrapLayout";
public static final String BOX = "Box";
public static final String BOX_TOOL_BAR = "BoxToolBar";
public static final String BUTTON = "Button";
public static final String CALENDAR = "Calendar";
public static final String CELL = "Cell";
public static final String COLUMN = "Column";
+ public static final String COLUMN_LAYOUT = "ColumnLayout";
public static final String COLUMN_SELECTOR = "ColumnSelector";
public static final String COMMAND = "Command";
public static final String DATE = "Date";
Copied: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/ColumnLayoutRule.java (from r1650005, myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/BootstrapLayoutRule.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/ColumnLayoutRule.java?p2=myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/ColumnLayoutRule.java&p1=myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/BootstrapLayoutRule.java&r1=1650005&r2=1650057&rev=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/BootstrapLayoutRule.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/ColumnLayoutRule.java Wed Jan 7 13:56:18 2015
@@ -20,8 +20,8 @@
package org.apache.myfaces.tobago.facelets;
import org.apache.myfaces.tobago.component.Attributes;
-import org.apache.myfaces.tobago.component.UIBootstrapLayout;
-import org.apache.myfaces.tobago.layout.BootstrapPartition;
+import org.apache.myfaces.tobago.component.UIColumnLayout;
+import org.apache.myfaces.tobago.layout.ColumnPartition;
import javax.faces.view.facelets.FaceletContext;
import javax.faces.view.facelets.MetaRule;
@@ -29,12 +29,12 @@ import javax.faces.view.facelets.Metadat
import javax.faces.view.facelets.MetadataTarget;
import javax.faces.view.facelets.TagAttribute;
-public class BootstrapLayoutRule extends MetaRule {
+public class ColumnLayoutRule extends MetaRule {
- public static final BootstrapLayoutRule INSTANCE = new BootstrapLayoutRule();
+ public static final ColumnLayoutRule INSTANCE = new ColumnLayoutRule();
public Metadata applyRule(final String name, final TagAttribute attribute, final MetadataTarget metadataTarget) {
- if (metadataTarget.isTargetInstanceOf(UIBootstrapLayout.class)) {
+ if (metadataTarget.isTargetInstanceOf(UIColumnLayout.class)) {
if (attribute.isLiteral()) {
if (Attributes.EXTRA_SMALL.equals(name)) {
return new ExtraSmallMapper(attribute);
@@ -61,8 +61,8 @@ public class BootstrapLayoutRule extends
}
public void applyMetadata(final FaceletContext ctx, final Object instance) {
- final UIBootstrapLayout gridLayout = (UIBootstrapLayout) instance;
- gridLayout.setExtraSmall(BootstrapPartition.valueOf(attribute.getValue()));
+ final UIColumnLayout gridLayout = (UIColumnLayout) instance;
+ gridLayout.setExtraSmall(ColumnPartition.valueOf(attribute.getValue()));
}
}
@@ -74,8 +74,8 @@ public class BootstrapLayoutRule extends
}
public void applyMetadata(final FaceletContext ctx, final Object instance) {
- final UIBootstrapLayout gridLayout = (UIBootstrapLayout) instance;
- gridLayout.setSmall(BootstrapPartition.valueOf(attribute.getValue()));
+ final UIColumnLayout gridLayout = (UIColumnLayout) instance;
+ gridLayout.setSmall(ColumnPartition.valueOf(attribute.getValue()));
}
}
@@ -87,8 +87,8 @@ public class BootstrapLayoutRule extends
}
public void applyMetadata(final FaceletContext ctx, final Object instance) {
- final UIBootstrapLayout gridLayout = (UIBootstrapLayout) instance;
- gridLayout.setMedium(BootstrapPartition.valueOf(attribute.getValue()));
+ final UIColumnLayout gridLayout = (UIColumnLayout) instance;
+ gridLayout.setMedium(ColumnPartition.valueOf(attribute.getValue()));
}
}
@@ -100,8 +100,8 @@ public class BootstrapLayoutRule extends
}
public void applyMetadata(final FaceletContext ctx, final Object instance) {
- final UIBootstrapLayout gridLayout = (UIBootstrapLayout) instance;
- gridLayout.setLarge(BootstrapPartition.valueOf(attribute.getValue()));
+ final UIColumnLayout gridLayout = (UIColumnLayout) instance;
+ gridLayout.setLarge(ColumnPartition.valueOf(attribute.getValue()));
}
}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java?rev=1650057&r1=1650056&r2=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java Wed Jan 7 13:56:18 2015
@@ -30,7 +30,7 @@ import org.apache.myfaces.tobago.config.
import org.apache.myfaces.tobago.event.SheetStateChangeSource;
import org.apache.myfaces.tobago.event.SortActionSource;
import org.apache.myfaces.tobago.event.TabChangeSource;
-import org.apache.myfaces.tobago.internal.component.AbstractUIBootstrapLayout;
+import org.apache.myfaces.tobago.internal.component.AbstractUIColumnLayout;
import org.apache.myfaces.tobago.internal.component.AbstractUIFlowLayout;
import org.apache.myfaces.tobago.internal.component.AbstractUIGridLayout;
import org.apache.myfaces.tobago.internal.component.AbstractUIPopup;
@@ -72,8 +72,8 @@ public class TobagoComponentHandler exte
if (AbstractUIFlowLayout.class.isAssignableFrom(aClass)) {
metaRuleset.addRule(FlowLayoutRule.INSTANCE);
}
- if (AbstractUIBootstrapLayout.class.isAssignableFrom(aClass)) {
- metaRuleset.addRule(BootstrapLayoutRule.INSTANCE);
+ if (AbstractUIColumnLayout.class.isAssignableFrom(aClass)) {
+ metaRuleset.addRule(ColumnLayoutRule.INSTANCE);
}
if (TabChangeSource.class.isAssignableFrom(aClass)) {
metaRuleset.addRule(TabChangeSourceRule.INSTANCE);
Copied: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIColumnLayout.java (from r1650021, myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIBootstrapLayout.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIColumnLayout.java?p2=myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIColumnLayout.java&p1=myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIBootstrapLayout.java&r1=1650021&r2=1650057&rev=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIBootstrapLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIColumnLayout.java Wed Jan 7 13:56:18 2015
@@ -27,7 +27,7 @@ import org.apache.myfaces.tobago.layout.
/**
* TODO
*/
-public abstract class AbstractUIBootstrapLayout extends AbstractUILayoutBase implements LayoutManager, SupportsMarkup {
+public abstract class AbstractUIColumnLayout extends AbstractUILayoutBase implements LayoutManager, SupportsMarkup {
public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.BootstrapLayout";
Copied: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ColumnLayoutTagDeclaration.java (from r1650005, myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/BootstrapLayoutTagDeclaration.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ColumnLayoutTagDeclaration.java?p2=myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ColumnLayoutTagDeclaration.java&p1=myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/BootstrapLayoutTagDeclaration.java&r1=1650005&r2=1650057&rev=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/BootstrapLayoutTagDeclaration.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ColumnLayoutTagDeclaration.java Wed Jan 7 13:56:18 2015
@@ -24,7 +24,7 @@ import org.apache.myfaces.tobago.apt.ann
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.internal.component.AbstractUIBootstrapLayout;
+import org.apache.myfaces.tobago.internal.component.AbstractUIColumnLayout;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasCurrentMarkup;
@@ -32,44 +32,44 @@ import org.apache.myfaces.tobago.interna
import org.apache.myfaces.tobago.internal.taglib.declaration.HasMarkup;
/**
- * Renders a layout using the bootstrap 12 column grid.
+ * Renders a layout using a 12 columns grid.
*/
-@Tag(name = "bootstrapLayout", bodyContent = BodyContent.EMPTY)
+@Tag(name = "columnLayout", bodyContent = BodyContent.EMPTY)
@UIComponentTag(
- uiComponent = "org.apache.myfaces.tobago.component.UIBootstrapLayout",
- uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUIBootstrapLayout",
+ uiComponent = "org.apache.myfaces.tobago.component.UIColumnLayout",
+ uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUIColumnLayout",
uiComponentFacesClass = "javax.faces.component.UIComponentBase",
- componentFamily = AbstractUIBootstrapLayout.COMPONENT_FAMILY,
- rendererType = RendererTypes.BOOTSTRAP_LAYOUT,
+ componentFamily = AbstractUIColumnLayout.COMPONENT_FAMILY,
+ rendererType = RendererTypes.COLUMN_LAYOUT,
allowedChildComponenents = "NONE", isLayout = true)
-public interface BootstrapLayoutTagDeclaration extends HasId, HasBinding, HasMarkup, HasCurrentMarkup {
+public interface ColumnLayoutTagDeclaration extends HasId, HasBinding, HasMarkup, HasCurrentMarkup {
/**
* TODO
*/
@TagAttribute
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.BootstrapPartition")
+ @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.ColumnPartition")
void setExtraSmall(String extraSmall);
/**
* TODO
*/
@TagAttribute
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.BootstrapPartition")
+ @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.ColumnPartition")
void setSmall(String small);
/**
* TODO
*/
@TagAttribute
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.BootstrapPartition")
+ @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.ColumnPartition")
void setMedium(String medium);
/**
* TODO
*/
@TagAttribute
- @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.BootstrapPartition")
+ @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.ColumnPartition")
void setLarge(String large);
}
Copied: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/ColumnPartition.java (from r1650005, myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/BootstrapPartition.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/ColumnPartition.java?p2=myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/ColumnPartition.java&p1=myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/BootstrapPartition.java&r1=1650005&r2=1650057&rev=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/BootstrapPartition.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/ColumnPartition.java Wed Jan 7 13:56:18 2015
@@ -26,15 +26,15 @@ import java.util.Arrays;
import java.util.List;
/**
- * A list of positive integers with sum 12. Is used for the bootstrap column partitioning.
+ * A list of positive integers with sum 12. Is used for the 12 columns partitioning.
*/
-public final class BootstrapPartition {
+public final class ColumnPartition {
private static final Integer[] PART_12 = new Integer[]{12};
private final Integer[] parts;
- public BootstrapPartition(Integer... parts) {
+ public ColumnPartition(Integer... parts) {
if (checkSum(parts)) {
this.parts = parts;
} else {
@@ -42,20 +42,20 @@ public final class BootstrapPartition {
}
}
- public static BootstrapPartition valueOf(String string) {
+ public static ColumnPartition valueOf(String string) {
final List<Integer> integers = StringUtils.parseIntegerList(string, ";");
- return new BootstrapPartition(integers.toArray(new Integer[integers.size()]));
+ return new ColumnPartition(integers.toArray(new Integer[integers.size()]));
}
- public static BootstrapPartition valueOf(Object object) {
+ public static ColumnPartition valueOf(Object object) {
if (object instanceof String) {
return valueOf((String) object);
} else if (object instanceof Integer[]) {
- return new BootstrapPartition((Integer[]) object);
+ return new ColumnPartition((Integer[]) object);
} else if (object != null) {
return valueOf(object.toString());
} else {
- return new BootstrapPartition(PART_12);
+ return new ColumnPartition(PART_12);
}
}
Copied: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/ColumnPartitionUnitTest.java (from r1650005, myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/BootstrapPartitionUnitTest.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/ColumnPartitionUnitTest.java?p2=myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/ColumnPartitionUnitTest.java&p1=myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/BootstrapPartitionUnitTest.java&r1=1650005&r2=1650057&rev=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/BootstrapPartitionUnitTest.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/test/java/org/apache/myfaces/tobago/layout/ColumnPartitionUnitTest.java Wed Jan 7 13:56:18 2015
@@ -22,38 +22,38 @@ package org.apache.myfaces.tobago.layout
import org.junit.Assert;
import org.junit.Test;
-public class BootstrapPartitionUnitTest {
+public class ColumnPartitionUnitTest {
@Test
public void testArray() {
Assert.assertArrayEquals(
- new Integer[]{12}, new BootstrapPartition().getParts()); // will be fixed
+ new Integer[]{12}, new ColumnPartition().getParts()); // will be fixed
Assert.assertArrayEquals(
- new Integer[]{12}, new BootstrapPartition(12).getParts());
+ new Integer[]{12}, new ColumnPartition(12).getParts());
Assert.assertArrayEquals(
- new Integer[]{1, 11}, new BootstrapPartition(1, 11).getParts());
+ new Integer[]{1, 11}, new ColumnPartition(1, 11).getParts());
Assert.assertArrayEquals(
- new Integer[]{1, 11}, new BootstrapPartition(1, 12).getParts()); // will be fixed
+ new Integer[]{1, 11}, new ColumnPartition(1, 12).getParts()); // will be fixed
Assert.assertArrayEquals(
- new Integer[]{1, 2, 3, 4, 2}, new BootstrapPartition(1, 2, 3, 4, 5).getParts()); // will be fixed
+ new Integer[]{1, 2, 3, 4, 2}, new ColumnPartition(1, 2, 3, 4, 5).getParts()); // will be fixed
Assert.assertArrayEquals(
- new Integer[]{1, 1, 1, 1, 1, 7}, new BootstrapPartition(-1, -2, -3, -4, -5).getParts()); // will be fixed
+ new Integer[]{1, 1, 1, 1, 1, 7}, new ColumnPartition(-1, -2, -3, -4, -5).getParts()); // will be fixed
}
@Test
public void testString() {
Assert.assertArrayEquals(
- new Integer[]{12}, BootstrapPartition.valueOf("").getParts()); // will be fixed
+ new Integer[]{12}, ColumnPartition.valueOf("").getParts()); // will be fixed
Assert.assertArrayEquals(
- new Integer[]{12}, BootstrapPartition.valueOf("12").getParts());
+ new Integer[]{12}, ColumnPartition.valueOf("12").getParts());
Assert.assertArrayEquals(
- new Integer[]{1, 11}, BootstrapPartition.valueOf("1;11").getParts());
+ new Integer[]{1, 11}, ColumnPartition.valueOf("1;11").getParts());
Assert.assertArrayEquals(
- new Integer[]{1, 11}, BootstrapPartition.valueOf("1;12").getParts()); // will be fixed
+ new Integer[]{1, 11}, ColumnPartition.valueOf("1;12").getParts()); // will be fixed
Assert.assertArrayEquals(
- new Integer[]{1, 2, 3, 4, 2}, BootstrapPartition.valueOf("1;2;3;4;5").getParts()); // will be fixed
+ new Integer[]{1, 2, 3, 4, 2}, ColumnPartition.valueOf("1;2;3;4;5").getParts()); // will be fixed
Assert.assertArrayEquals(
- new Integer[]{1, 1, 1, 1, 1, 7}, BootstrapPartition.valueOf("-1;-2;-3;-4;-5").getParts()); // will be fixed
+ new Integer[]{1, 1, 1, 1, 1, 7}, ColumnPartition.valueOf("-1;-2;-3;-4;-5").getParts()); // will be fixed
}
}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/editor.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/editor.xhtml?rev=1650057&r1=1650056&r2=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/editor.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/editor.xhtml Wed Jan 7 13:56:18 2015
@@ -65,7 +65,7 @@
<tc:panel>
<f:facet name="layout">
- <tc:bootstrapLayout medium="2;10"/>
+ <tc:columnLayout medium="2;10"/>
</f:facet>
<tc:out/>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/layout/basic.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/layout/basic.xhtml?rev=1650057&r1=1650056&r2=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/layout/basic.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/layout/basic.xhtml Wed Jan 7 13:56:18 2015
@@ -87,7 +87,7 @@
<tc:panel>
<f:facet name="layout">
- <tc:bootstrapLayout medium="2;3;1;2;3;1"/>
+ <tc:columnLayout medium="2;3;1;2;3;1"/>
</f:facet>
<!--
<tc:form>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/tab/personal.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/tab/personal.xhtml?rev=1650057&r1=1650056&r2=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/tab/personal.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/tab/personal.xhtml Wed Jan 7 13:56:18 2015
@@ -29,7 +29,7 @@
</f:facet>
<tc:panel>
<f:facet name="layout">
- <tc:bootstrapLayout medium="2;10"/>
+ <tc:columnLayout medium="2;10"/>
</f:facet>
<tx:in value="#{controller.currentAddress.firstName}"
@@ -43,7 +43,7 @@
<tc:panel>
<f:facet name="layout">
- <tc:bootstrapLayout medium="2;8;2"/>
+ <tc:columnLayout medium="2;8;2"/>
</f:facet>
<tx:in value="#{controller.currentAddress.street}"
label="#{bundle.editorStreet}"/>
@@ -52,7 +52,7 @@
<tc:panel>
<f:facet name="layout">
- <tc:bootstrapLayout medium="2;3;7"/>
+ <tc:columnLayout medium="2;3;7"/>
</f:facet>
<tx:in value="#{controller.currentAddress.zipCode}"
label="#{bundle.editorCity}"/>
@@ -61,7 +61,7 @@
<tc:panel>
<f:facet name="layout">
- <tc:bootstrapLayout medium="2;10"/>
+ <tc:columnLayout medium="2;10"/>
</f:facet>
<tx:selectOneChoice
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/bootstrapLayout/simple-1.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/bootstrapLayout/simple-1.xhtml?rev=1650057&r1=1650056&r2=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/bootstrapLayout/simple-1.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/bootstrapLayout/simple-1.xhtml Wed Jan 7 13:56:18 2015
@@ -23,7 +23,7 @@
<tc:page id="page">
<f:facet name="layout">
- <tc:bootstrapLayout medium="2;4;2;4" small="6;6"/>
+ <tc:columnLayout medium="2;4;2;4" small="6;6"/>
</f:facet>
<tx:in label="1st label" value="a aa aaa aaaa aaaaa"/>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/bootstrapLayout/simple-2.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/bootstrapLayout/simple-2.xhtml?rev=1650057&r1=1650056&r2=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/bootstrapLayout/simple-2.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/bootstrapLayout/simple-2.xhtml Wed Jan 7 13:56:18 2015
@@ -28,7 +28,7 @@
<tc:page id="page">
<tc:panel>
<f:facet name="layout">
- <tc:bootstrapLayout medium="2;4;2;4" small="6;6"/>
+ <tc:columnLayout medium="2;4;2;4" small="6;6"/>
</f:facet>
<tx:in label="1st label" value="a aa aaa aaaa aaaaa"/>
@@ -36,7 +36,7 @@
</tc:panel>
<tc:panel>
<f:facet name="layout">
- <tc:bootstrapLayout medium="2;4;2;4" small="6;6"/>
+ <tc:columnLayout medium="2;4;2;4" small="6;6"/>
</f:facet>
<tx:textarea label="3rd label" value="c cc ccc cccc ccccc"/>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/bootstrapLayout/simple-3.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/bootstrapLayout/simple-3.xhtml?rev=1650057&r1=1650056&r2=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/bootstrapLayout/simple-3.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/test/bootstrapLayout/simple-3.xhtml Wed Jan 7 13:56:18 2015
@@ -24,7 +24,7 @@
<tc:page id="page">
<tc:panel>
<f:facet name="layout">
- <tc:bootstrapLayout medium="2;4;2;4" small="6;6"/>
+ <tc:columnLayout medium="2;4;2;4" small="6;6"/>
</f:facet>
<tx:in label="1st label" value="#{bootstrap.value}"/>
@@ -32,7 +32,7 @@
</tc:panel>
<tc:panel>
<f:facet name="layout">
- <tc:bootstrapLayout medium="2;4;2;4" small="6;6"/>
+ <tc:columnLayout medium="2;4;2;4" small="6;6"/>
</f:facet>
<tx:textarea label="3rd label" value="c cc ccc cccc ccccc"/>
@@ -41,7 +41,7 @@
</tc:panel>
<tc:panel>
<f:facet name="layout">
- <tc:bootstrapLayout medium="1;1;1" extraSmall="4;4;4"/>
+ <tc:columnLayout medium="1;1;1" extraSmall="4;4;4"/>
</f:facet>
<tc:button id="cancel" label="Cancel" action="#{bootstrap.reset}"/>
Copied: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ColumnLayoutRenderer.java (from r1650005, myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BootstrapLayoutRenderer.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ColumnLayoutRenderer.java?p2=myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ColumnLayoutRenderer.java&p1=myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BootstrapLayoutRenderer.java&r1=1650005&r2=1650057&rev=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BootstrapLayoutRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ColumnLayoutRenderer.java Wed Jan 7 13:56:18 2015
@@ -19,10 +19,10 @@
package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
-import org.apache.myfaces.tobago.component.UIBootstrapLayout;
+import org.apache.myfaces.tobago.component.UIColumnLayout;
import org.apache.myfaces.tobago.component.UIExtensionPanel;
import org.apache.myfaces.tobago.component.UILabel;
-import org.apache.myfaces.tobago.internal.component.AbstractUIBootstrapLayout;
+import org.apache.myfaces.tobago.internal.component.AbstractUIColumnLayout;
import org.apache.myfaces.tobago.layout.LayoutContainer;
import org.apache.myfaces.tobago.renderkit.RendererBase;
import org.apache.myfaces.tobago.renderkit.css.Css;
@@ -39,16 +39,16 @@ import javax.faces.context.FacesContext;
import java.io.IOException;
import java.util.List;
-public class BootstrapLayoutRenderer extends RendererBase {
+public class ColumnLayoutRenderer extends RendererBase {
- private static final Logger LOG = LoggerFactory.getLogger(BootstrapLayoutRenderer.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ColumnLayoutRenderer.class);
@Override
public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
- final AbstractUIBootstrapLayout bootstrapLayout = (AbstractUIBootstrapLayout) component;
+ final AbstractUIColumnLayout columnLayout = (AbstractUIColumnLayout) component;
final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
- writer.startElement(HtmlElements.DIV, bootstrapLayout);
+ writer.startElement(HtmlElements.DIV, columnLayout);
// writer.writeClassAttribute("row");
writer.writeClassAttribute("form-horizontal");
}
@@ -56,18 +56,18 @@ public class BootstrapLayoutRenderer ext
@Override
public void encodeChildren(final FacesContext facesContext, final UIComponent component) throws IOException {
final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
- final UIBootstrapLayout bootstrapLayout = (UIBootstrapLayout) component;
- final UIComponent container = bootstrapLayout.getParent();
+ final UIColumnLayout columnLayout = (UIColumnLayout) component;
+ final UIComponent container = columnLayout.getParent();
if (container instanceof LayoutContainer && !((LayoutContainer) container).isLayoutChildren()) {
return;
}
final List<UIComponent> children = container.getChildren();
final BootstrapCssGenerator generator = new BootstrapCssGenerator(
- bootstrapLayout.getExtraSmall(),
- bootstrapLayout.getSmall(),
- bootstrapLayout.getMedium(),
- bootstrapLayout.getLarge());
+ columnLayout.getExtraSmall(),
+ columnLayout.getSmall(),
+ columnLayout.getMedium(),
+ columnLayout.getLarge());
for (UIComponent child : children) {
if (child instanceof UIExtensionPanel) {
for (UIComponent subChild : child.getChildren()) {
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/BootstrapCssGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/BootstrapCssGenerator.java?rev=1650057&r1=1650056&r2=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/BootstrapCssGenerator.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/BootstrapCssGenerator.java Wed Jan 7 13:56:18 2015
@@ -19,21 +19,21 @@
package org.apache.myfaces.tobago.renderkit.util;
-import org.apache.myfaces.tobago.layout.BootstrapPartition;
+import org.apache.myfaces.tobago.layout.ColumnPartition;
import org.apache.myfaces.tobago.renderkit.css.Css;
public class BootstrapCssGenerator {
- private BootstrapPartition extraSmall;
- private BootstrapPartition small;
- private BootstrapPartition medium;
- private BootstrapPartition large;
+ private ColumnPartition extraSmall;
+ private ColumnPartition small;
+ private ColumnPartition medium;
+ private ColumnPartition large;
private int index = 0;
public BootstrapCssGenerator(
- final BootstrapPartition extraSmall, final BootstrapPartition small, final BootstrapPartition medium,
- final BootstrapPartition large) {
+ final ColumnPartition extraSmall, final ColumnPartition small, final ColumnPartition medium,
+ final ColumnPartition large) {
this.extraSmall = extraSmall;
this.small = small;
this.medium = medium;
@@ -55,7 +55,7 @@ public class BootstrapCssGenerator {
generate(css, large, "col-lg-");
}
- private void generate(final Css css, final BootstrapPartition partition, final String prefix) {
+ private void generate(final Css css, final ColumnPartition partition, final String prefix) {
if (partition != null) {
css.add(prefix + partition.getPart(index % partition.getSize()));
}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg?rev=1650057&r1=1650056&r2=1650057&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg Wed Jan 7 13:56:18 2015
@@ -333,7 +333,7 @@ CharacterProperty(property) ::= <<
<NormalProperty(property)>
>>
-BootstrapPartitionProperty(property) ::= <<
+ColumnPartitionProperty(property) ::= <<
<NormalProperty(property)>
>>