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 2014/11/27 10:02:39 UTC
svn commit: r1642047 - in /myfaces/tobago/branches/tobago-3.0.x:
tobago-core/src/main/java/org/apache/myfaces/tobago/context/
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/
tobago-core/src/main/java/org/apache/myfaces/tobago/in...
Author: lofwyr
Date: Thu Nov 27 09:02:38 2014
New Revision: 1642047
URL: http://svn.apache.org/r1642047
Log:
TOBAGO-1361: New Layout Manager: Flex Box
TOBAGO-1368: Create a new theme which uses Bootstrap
Modified:
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.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/component/AbstractUIFlexLayout.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlowLayout.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUILayoutBase.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectOneBase.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroupLayout.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneChoiceTagDeclaration.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneListboxTagDeclaration.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneRadioTagDeclaration.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SheetTagDeclaration.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlElements.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRoleValues.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/resources/META-INF/web-fragment.xml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/tobago-config.xml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/WEB-INF/tobago-config.xml
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/tobago.css
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/less/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/tobago.less
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.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/FlexLayoutRenderer.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/ProgressRenderer.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/SheetRenderer.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/ToolBarRendererBase.java
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-layout.js
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java Thu Nov 27 09:02:38 2014
@@ -52,6 +52,7 @@ public final class Markup implements Ser
public static final Markup NULL = new Markup((String) null);
public static final Markup ASCENDING = valueOf("ascending");
+ public static final Markup BIG = valueOf("big");
public static final Markup CENTER = valueOf("center");
public static final Markup CLICKABLE = valueOf("clickable");
public static final Markup DEFAULT = valueOf("default");
@@ -86,6 +87,7 @@ public final class Markup implements Ser
public static final Markup SORTABLE = valueOf("sortable");
public static final Markup STRONG = valueOf("strong");
public static final Markup TOP = valueOf("top");
+ public static final Markup VERTICALLY = valueOf("vertically");
public static final Markup WARN = valueOf("warn");
/* Just one of "values" and "value" must be null */
Modified: 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/AbstractUIBootstrapLayout.java?rev=1642047&r1=1642046&r2=1642047&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/AbstractUIBootstrapLayout.java Thu Nov 27 09:02:38 2014
@@ -20,6 +20,8 @@
package org.apache.myfaces.tobago.internal.component;
import org.apache.myfaces.tobago.component.SupportsMarkup;
+import org.apache.myfaces.tobago.layout.LayoutComponent;
+import org.apache.myfaces.tobago.layout.LayoutContainer;
import org.apache.myfaces.tobago.layout.LayoutManager;
import org.apache.myfaces.tobago.layout.Orientation;
@@ -31,6 +33,11 @@ public abstract class AbstractUIBootstra
public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.BootstrapLayout";
public void init() {
+ for (final LayoutComponent component : getLayoutContainer().getComponents()) {
+ if (component instanceof LayoutContainer && component.isRendered()) {
+ ((LayoutContainer) component).getLayoutManager().init();
+ }
+ }
}
public void fixRelativeInsideAuto(final Orientation orientation, final boolean auto) {
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlexLayout.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/AbstractUIFlexLayout.java?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlexLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlexLayout.java Thu Nov 27 09:02:38 2014
@@ -20,6 +20,8 @@
package org.apache.myfaces.tobago.internal.component;
import org.apache.myfaces.tobago.component.SupportsMarkup;
+import org.apache.myfaces.tobago.layout.LayoutComponent;
+import org.apache.myfaces.tobago.layout.LayoutContainer;
import org.apache.myfaces.tobago.layout.LayoutManager;
import org.apache.myfaces.tobago.layout.Orientation;
@@ -31,6 +33,11 @@ public abstract class AbstractUIFlexLayo
public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.FlexLayout";
public void init() {
+ for (final LayoutComponent component : getLayoutContainer().getComponents()) {
+ if (component instanceof LayoutContainer && component.isRendered()) {
+ ((LayoutContainer) component).getLayoutManager().init();
+ }
+ }
}
public void fixRelativeInsideAuto(final Orientation orientation, final boolean auto) {
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlowLayout.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/AbstractUIFlowLayout.java?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlowLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFlowLayout.java Thu Nov 27 09:02:38 2014
@@ -20,6 +20,8 @@
package org.apache.myfaces.tobago.internal.component;
import org.apache.myfaces.tobago.component.SupportsMarkup;
+import org.apache.myfaces.tobago.layout.LayoutComponent;
+import org.apache.myfaces.tobago.layout.LayoutContainer;
import org.apache.myfaces.tobago.layout.LayoutManager;
import org.apache.myfaces.tobago.layout.Orientation;
@@ -28,6 +30,11 @@ public abstract class AbstractUIFlowLayo
public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.FlowLayout";
public void init() {
+ for (final LayoutComponent component : getLayoutContainer().getComponents()) {
+ if (component instanceof LayoutContainer && component.isRendered()) {
+ ((LayoutContainer) component).getLayoutManager().init();
+ }
+ }
}
public void fixRelativeInsideAuto(final Orientation orientation, final boolean auto) {
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.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/AbstractUIGridLayout.java?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java Thu Nov 27 09:02:38 2014
@@ -399,7 +399,7 @@ public abstract class AbstractUIGridLayo
}
}
- private LayoutContainer getLayoutContainer() {
+ public LayoutContainer getLayoutContainer() {
return ComponentUtils.findAncestor(getParent(), LayoutContainer.class);
}
@@ -467,6 +467,9 @@ public abstract class AbstractUIGridLayo
public abstract boolean isRigid();
public Grid getGrid() {
+ if (grid == null) {
+ init();
+ }
return grid;
}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUILayoutBase.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/AbstractUILayoutBase.java?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUILayoutBase.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUILayoutBase.java Thu Nov 27 09:02:38 2014
@@ -19,7 +19,16 @@
package org.apache.myfaces.tobago.internal.component;
+import org.apache.myfaces.tobago.layout.LayoutContainer;
+
import javax.faces.component.UIComponentBase;
public abstract class AbstractUILayoutBase extends UIComponentBase {
+
+
+ LayoutContainer getLayoutContainer() {
+ // todo: check with instanceof and do something in the error case
+ return ((LayoutContainer) getParent());
+ }
+
}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectOneBase.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/AbstractUISelectOneBase.java?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectOneBase.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectOneBase.java Thu Nov 27 09:02:38 2014
@@ -19,6 +19,7 @@
package org.apache.myfaces.tobago.internal.component;
+import org.apache.myfaces.tobago.component.SupportsCss;
import org.apache.myfaces.tobago.component.SupportsMarkup;
import org.apache.myfaces.tobago.layout.LayoutComponent;
import org.apache.myfaces.tobago.util.MessageUtils;
@@ -28,7 +29,7 @@ import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
public abstract class AbstractUISelectOneBase extends javax.faces.component.UISelectOne
- implements SupportsMarkup, LayoutComponent {
+ implements SupportsMarkup, SupportsCss, LayoutComponent {
public static final String MESSAGE_VALUE_REQUIRED = "tobago.SelectOne.MESSAGE_VALUE_REQUIRED";
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.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/AbstractUISheet.java?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java Thu Nov 27 09:02:38 2014
@@ -26,6 +26,7 @@ import org.apache.myfaces.tobago.compone
import org.apache.myfaces.tobago.component.OnComponentPopulated;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.component.Sorter;
+import org.apache.myfaces.tobago.component.SupportsCss;
import org.apache.myfaces.tobago.component.SupportsRenderedPartially;
import org.apache.myfaces.tobago.event.PageActionEvent;
import org.apache.myfaces.tobago.event.SheetStateChangeEvent;
@@ -64,7 +65,7 @@ import java.util.Map;
public abstract class AbstractUISheet extends AbstractUIData
implements SheetStateChangeSource2, SortActionSource2, OnComponentPopulated,
- LayoutContainer, LayoutComponent, SupportsRenderedPartially {
+ LayoutContainer, LayoutComponent, SupportsCss, SupportsRenderedPartially {
private static final Logger LOG = LoggerFactory.getLogger(AbstractUISheet.class);
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.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/AbstractUISheetLayout.java?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java Thu Nov 27 09:02:38 2014
@@ -194,11 +194,6 @@ public abstract class AbstractUISheetLay
}
}
- private LayoutContainer getLayoutContainer() {
- // todo: check with instanceof and do something in the error case
- return ((LayoutContainer) getParent());
- }
-
@Override
public boolean getRendersChildren() {
return false;
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroupLayout.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/AbstractUITabGroupLayout.java?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroupLayout.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroupLayout.java Thu Nov 27 09:02:38 2014
@@ -125,11 +125,6 @@ public abstract class AbstractUITabGroup
}
}
- private LayoutContainer getLayoutContainer() {
- // todo: check with instanceof and do something in the error case
- return ((LayoutContainer) getParent());
- }
-
@Override
public boolean getRendersChildren() {
return false;
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneChoiceTagDeclaration.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/SelectOneChoiceTagDeclaration.java?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneChoiceTagDeclaration.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneChoiceTagDeclaration.java Thu Nov 27 09:02:38 2014
@@ -29,9 +29,14 @@ import org.apache.myfaces.tobago.compone
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasConverter;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasCss;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasCurrentCss;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasCurrentMarkup;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasId;
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.InputTagDeclaration;
import org.apache.myfaces.tobago.internal.taglib.declaration.IsDisabled;
import org.apache.myfaces.tobago.internal.taglib.declaration.IsReadonly;
import org.apache.myfaces.tobago.internal.taglib.declaration.IsRendered;
@@ -64,8 +69,8 @@ import javax.faces.component.UISelectOne
allowedChildComponenents = "org.apache.myfaces.tobago.Command")
})
public interface SelectOneChoiceTagDeclaration
- extends SelectOneTagDeclaration, HasId, IsDisabled,
- IsReadonly, HasLabel, IsRendered, HasConverter, HasBinding, HasTip {
+ extends InputTagDeclaration, HasId, IsDisabled, IsReadonly, HasLabel,
+ IsRendered, HasConverter, HasBinding, HasTip, HasMarkup, HasCurrentMarkup, HasCss, HasCurrentCss {
/**
* Flag indicating that selecting an Item representing a value is required.
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneListboxTagDeclaration.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/SelectOneListboxTagDeclaration.java?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneListboxTagDeclaration.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneListboxTagDeclaration.java Thu Nov 27 09:02:38 2014
@@ -29,9 +29,14 @@ import org.apache.myfaces.tobago.compone
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasConverter;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasCss;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasCurrentCss;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasCurrentMarkup;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasId;
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.InputTagDeclaration;
import org.apache.myfaces.tobago.internal.taglib.declaration.IsDisabled;
import org.apache.myfaces.tobago.internal.taglib.declaration.IsReadonly;
import org.apache.myfaces.tobago.internal.taglib.declaration.IsRendered;
@@ -63,8 +68,9 @@ import javax.faces.component.UISelectOne
"This facet can contain a UICommand that is invoked in case of a change event from the component",
allowedChildComponenents = "org.apache.myfaces.tobago.Command")
})
-public interface SelectOneListboxTagDeclaration extends SelectOneTagDeclaration, HasId, IsDisabled,
- IsReadonly, HasLabel, IsRendered, HasBinding, HasTip, HasConverter {
+public interface SelectOneListboxTagDeclaration
+ extends InputTagDeclaration, HasId, IsDisabled, IsReadonly, HasLabel, IsRendered, HasBinding, HasTip,
+ HasConverter, HasMarkup, HasCurrentMarkup, HasCss, HasCurrentCss {
/**
* Flag indicating that selecting an Item representing a Value is Required.
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneRadioTagDeclaration.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/SelectOneRadioTagDeclaration.java?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneRadioTagDeclaration.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneRadioTagDeclaration.java Thu Nov 27 09:02:38 2014
@@ -29,10 +29,15 @@ import org.apache.myfaces.tobago.compone
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasConverter;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasCss;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasCurrentCss;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasCurrentMarkup;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasId;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasInputLabel;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasMarkup;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasRenderRange;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
+import org.apache.myfaces.tobago.internal.taglib.declaration.InputTagDeclaration;
import org.apache.myfaces.tobago.internal.taglib.declaration.IsDisabled;
import org.apache.myfaces.tobago.internal.taglib.declaration.IsInline;
import org.apache.myfaces.tobago.internal.taglib.declaration.IsReadonly;
@@ -65,8 +70,9 @@ import javax.faces.component.UISelectOne
"This facet can contain a UICommand that is invoked in case of a change event from the component",
allowedChildComponenents = "org.apache.myfaces.tobago.Command")
})
-public interface SelectOneRadioTagDeclaration extends SelectOneTagDeclaration, IsDisabled, IsReadonly, HasId,
- HasTip, IsInline, HasRenderRange, IsRendered, HasBinding, HasConverter, HasInputLabel {
+public interface SelectOneRadioTagDeclaration
+ extends InputTagDeclaration, IsDisabled, IsReadonly, HasId, HasTip, IsInline, HasRenderRange, IsRendered,
+ HasBinding, HasConverter, HasInputLabel, HasMarkup, HasCurrentMarkup, HasCss, HasCurrentCss {
/**
* Flag indicating that selecting an Item representing a Value is Required.
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SheetTagDeclaration.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/SheetTagDeclaration.java?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SheetTagDeclaration.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SheetTagDeclaration.java Thu Nov 27 09:02:38 2014
@@ -28,6 +28,8 @@ import org.apache.myfaces.tobago.apt.ann
import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.RendererTypes;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasCss;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasCurrentCss;
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.HasMarkup;
@@ -59,7 +61,7 @@ import javax.faces.component.UIData;
allowedChildComponenents = "org.apache.myfaces.tobago.Reload")})
public interface SheetTagDeclaration
extends HasIdBindingAndRendered, IsGridLayoutComponent, IsGridLayoutContainer, HasMarkup, HasCurrentMarkup,
- HasRenderedPartially, IsShowRoot, IsShowRootJunction, HasVar {
+ HasCss, HasCurrentCss, HasRenderedPartially, IsShowRoot, IsShowRootJunction, HasVar {
/**
* LayoutConstraints for column layout.
* Semicolon separated list of layout tokens ('<x>*', '<x>px' or '<x>%').
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlElements.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlElements.java?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlElements.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlElements.java Thu Nov 27 09:02:38 2014
@@ -44,6 +44,7 @@ public final class HtmlElements {
public static final String LI = "li";
public static final String LINK = "link";
public static final String META = "meta";
+ public static final String NAV = "nav";
public static final String NOSCRIPT = "noscript";
public static final String OL = "ol";
public static final String OPTGROUP = "optgroup";
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRoleValues.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRoleValues.java?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRoleValues.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRoleValues.java Thu Nov 27 09:02:38 2014
@@ -21,7 +21,8 @@ package org.apache.myfaces.tobago.render
public enum HtmlRoleValues {
- PRESENTATION("presentation");
+ PRESENTATION("presentation"),
+ NAVIGATION("navigation");
private String value;
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/resources/META-INF/web-fragment.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/resources/META-INF/web-fragment.xml?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/resources/META-INF/web-fragment.xml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/resources/META-INF/web-fragment.xml Thu Nov 27 09:02:38 2014
@@ -25,6 +25,14 @@
<name>TobagoCore</name>
+<!--
+ <ordering>
+ <after>
+ <others/>
+ </after>
+ </ordering>
+-->
+
<listener>
<listener-class>org.apache.myfaces.tobago.webapp.TobagoServletContextListener</listener-class>
</listener>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/tobago-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/tobago-config.xml?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/tobago-config.xml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/tobago-config.xml Thu Nov 27 09:02:38 2014
@@ -37,6 +37,8 @@
<supported-theme>richmond</supported-theme>
<supported-theme>charlotteville</supported-theme>
<supported-theme>bootstrap</supported-theme>
+ <!-- for development -->
+ <supported-theme>standard</supported-theme>
</theme-config>
<resource-dir>tobago-resource</resource-dir>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/WEB-INF/tobago-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/WEB-INF/tobago-config.xml?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/WEB-INF/tobago-config.xml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-test/src/main/webapp/WEB-INF/tobago-config.xml Thu Nov 27 09:02:38 2014
@@ -27,6 +27,8 @@
<supported-theme>richmond</supported-theme>
<supported-theme>charlotteville</supported-theme>
<supported-theme>bootstrap</supported-theme>
+ <!-- for development -->
+ <supported-theme>standard</supported-theme>
</theme-config>
<resource-dir>tobago-resource</resource-dir>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/tobago.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/tobago.css?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/tobago.css (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/tobago.css Thu Nov 27 09:02:38 2014
@@ -1101,23 +1101,22 @@ hr.tobago-separator {
left: 0;
top: 0;
height: 20px;
- text-align: center;
overflow: hidden;
}
.tobago-sheet-pagingOuter-markup-left {
- position : absolute;
- top: 0;
- left: 0;
+ /*position : absolute;*/
+ /*top: 0;*/
+ /*left: 0;*/
}
.tobago-sheet-pagingOuter-markup-center {
}
.tobago-sheet-pagingOuter-markup-right {
- position : absolute;
- top: 0;
- right: 0;
+ /*position : absolute;*/
+ /*top: 0;*/
+ /*right: 0;*/
}
.tobago-sheet-pagingInput {
@@ -1128,33 +1127,24 @@ hr.tobago-separator {
padding-bottom: 0;
margin-top: 0;
margin-bottom: 0;
- text-align: center;
}
.tobago-sheet-pagingOuter {
- vertical-align: top;
- cursor: pointer;
}
.tobago-sheet-pagingText {
- cursor: pointer;
padding-right: 5px;
- vertical-align: top;
}
.tobago-sheet-footerPagerButton {
- cursor: pointer;
- vertical-align: top;
}
.tobago-sheet-footerPagerButton-markup-disabled {
- cursor: auto;
}
.tobago-sheet-pagingLink {
padding-left: 2px;
padding-right: 2px;
- vertical-align: top;
}
a:link.tobago-sheet-pagingLink, a:visited.tobago-sheet-pagingLink,
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/less/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/tobago.less
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/less/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/tobago.less?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/less/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/tobago.less (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/less/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/tobago.less Thu Nov 27 09:02:38 2014
@@ -870,8 +870,8 @@ div.tobago-tabGroup-toolBar {
background-color: #FFFFFF;
}
.tobago-toolBar-item {
- position: relative;
- display: inline-block;
+// position: relative;
+// display: inline-block;
border-width: 0;
border-style: solid;
margin: 0 1px;
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.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/BoxRenderer.java?rev=1642047&r1=1642046&r2=1642047&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/BoxRenderer.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/BoxRenderer.java Thu Nov 27 09:02:38 2014
@@ -78,14 +78,14 @@ public class BoxRenderer extends BoxRend
}
if (toolbar != null) {
- writer.startElement(HtmlElements.DIV, null);
+ writer.startElement(HtmlElements.SPAN, null);
writer.writeClassAttribute(Classes.create(box, "toolbarOuter"));
- writer.startElement(HtmlElements.DIV, null);
+ writer.startElement(HtmlElements.SPAN, null);
writer.writeClassAttribute(Classes.create(box, "toolbarInner"));
toolbar.setRendererType(RendererTypes.BOX_TOOL_BAR);
RenderUtils.encode(facesContext, toolbar);
- writer.endElement(HtmlElements.DIV);
- writer.endElement(HtmlElements.DIV);
+ writer.endElement(HtmlElements.SPAN);
+ writer.endElement(HtmlElements.SPAN);
}
writer.endElement(HtmlElements.LEGEND);
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FlexLayoutRenderer.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/FlexLayoutRenderer.java?rev=1642047&r1=1642046&r2=1642047&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/FlexLayoutRenderer.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/FlexLayoutRenderer.java Thu Nov 27 09:02:38 2014
@@ -19,7 +19,8 @@
package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
-import org.apache.myfaces.tobago.internal.component.AbstractUIFlexLayout;
+import org.apache.myfaces.tobago.component.UIFlexLayout;
+import org.apache.myfaces.tobago.context.Markup;
import org.apache.myfaces.tobago.layout.LayoutContainer;
import org.apache.myfaces.tobago.renderkit.RendererBase;
import org.apache.myfaces.tobago.renderkit.css.Classes;
@@ -40,13 +41,52 @@ public class FlexLayoutRenderer extends
@Override
public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
- final AbstractUIFlexLayout flexLayout = (AbstractUIFlexLayout) component;
+ final UIFlexLayout flexLayout = (UIFlexLayout) component;
final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
writer.startElement(HtmlElements.DIV, flexLayout);
- writer.writeClassAttribute(Classes.create(flexLayout));
+ final String columns = flexLayout.getColumns();
+ StringBuilder b = new StringBuilder(); // TODO: implement better: own class, parser, validation, etc.
+ if (columns.contains(";")) {
+ b.append("{\"columns\":[");
+ b.append(columns
+ .replace("auto", "\"auto\"")
+ .replace(";", ",")
+ .replace("1*", "1")
+ .replace("2*", "2")
+ .replace("3*", "3")
+ .replace("4*", "4")
+ .replace("5*", "5")
+ .replace("6*", "6")
+ .replace("7*", "7")
+ .replace("8*", "8")
+ .replace("9*", "9")
+ .replace("*", "1"));
+ b.append("]}");
+ }
+ final String rows = flexLayout.getRows();
+ if (rows.contains(";")) {
+ b.append("{\"rows\":[");
+ b.append(rows
+ .replace("auto", "\"auto\"")
+ .replace(";", ",")
+ .replace("1*", "1")
+ .replace("2*", "2")
+ .replace("3*", "3")
+ .replace("4*", "4")
+ .replace("5*", "5")
+ .replace("6*", "6")
+ .replace("7*", "7")
+ .replace("8*", "8")
+ .replace("9*", "9")
+ .replace("*", "1"));
+ b.append("]}");
+ }
+ boolean vertically = rows.contains(";");
+ writer.writeClassAttribute(Classes.create(flexLayout, vertically ? Markup.VERTICALLY : Markup.NULL));
// todo: const, utils, etc.
- writer.writeAttribute("data-tobago-layout", "{\"columns\":[\"auto\",1]}", true);
+ writer.writeAttribute("data-tobago-layout", b.toString(), true);
+// writer.writeAttribute("data-tobago-layout", "{\"columns\":[\"auto\",1]}", true);
}
@Override
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ProgressRenderer.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/ProgressRenderer.java?rev=1642047&r1=1642046&r2=1642047&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/ProgressRenderer.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/ProgressRenderer.java Thu Nov 27 09:02:38 2014
@@ -22,7 +22,6 @@ package org.apache.myfaces.tobago.render
import org.apache.myfaces.tobago.component.Attributes;
import org.apache.myfaces.tobago.component.UICommand;
import org.apache.myfaces.tobago.component.UIProgress;
-import org.apache.myfaces.tobago.layout.Measure;
import org.apache.myfaces.tobago.renderkit.LayoutComponentRendererBase;
import org.apache.myfaces.tobago.renderkit.css.Classes;
import org.apache.myfaces.tobago.renderkit.css.Style;
@@ -56,18 +55,12 @@ public class ProgressRenderer extends La
final int diff = model.getMaximum() - model.getMinimum();
Object title = progress.getAttributes().get(Attributes.TIP);
+ final double percent = 100.0 * model.getValue() / diff;
if (title == null && diff > 0) {
- title = Integer.toString(100 * model.getValue() / diff) + " %";
+ title = Integer.toString((int)percent) + " %";
}
final Style style = new Style(facesContext, progress);
- final Measure width = style.getWidth();
- final Measure valueWidth = diff > 0 ? width.multiply(model.getValue()).divide(diff) : width;
-
- final Style valueStyle = new Style();
- valueStyle.setHeight(style.getHeight());
- valueStyle.setWidth(valueWidth);
-
final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
writer.startElement(HtmlElements.DIV, progress);
@@ -83,7 +76,7 @@ public class ProgressRenderer extends La
}
writer.startElement(HtmlElements.DIV, null);
writer.writeClassAttribute(Classes.create(progress, "value"));
- writer.writeStyleAttribute(valueStyle);
+ writer.writeStyleAttribute("width: " + percent + "%");
writer.endElement(HtmlElements.DIV);
writer.endElement(HtmlElements.DIV);
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.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/SheetRenderer.java?rev=1642047&r1=1642046&r2=1642047&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/SheetRenderer.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/SheetRenderer.java Thu Nov 27 09:02:38 2014
@@ -34,6 +34,7 @@ import org.apache.myfaces.tobago.compone
import org.apache.myfaces.tobago.component.UISheet;
import org.apache.myfaces.tobago.component.UIToolBar;
import org.apache.myfaces.tobago.config.Configurable;
+import org.apache.myfaces.tobago.context.ClientProperties;
import org.apache.myfaces.tobago.context.Markup;
import org.apache.myfaces.tobago.context.ResourceManagerUtils;
import org.apache.myfaces.tobago.event.PageAction;
@@ -248,7 +249,7 @@ public class SheetRenderer extends Layou
writer.writeAttribute(HtmlAttributes.CELLSPACING, "0", false);
writer.writeAttribute(HtmlAttributes.CELLPADDING, "0", false);
writer.writeAttribute(HtmlAttributes.SUMMARY, "", false);
- writer.writeClassAttribute(Classes.create(sheet, "bodyTable"));
+ writer.writeClassAttribute(Classes.create(sheet, "bodyTable table table-hover")); // XXX table comes from bootstrap
if (columnWidths != null) {
writer.startElement(HtmlElements.COLGROUP, null);
@@ -474,6 +475,16 @@ public class SheetRenderer extends Layou
link(facesContext, application, areaId, atEnd || !sheet.hasRowCount(), PageAction.LAST, sheet);
}
writer.endElement(HtmlElements.SPAN);
+/*
+ writer.startElement(HtmlElements.UL, null);
+ final Classes pagingOuter = Classes.create(sheet, "pagingOuter", showDirectLinks);
+ // XXX hack for bootstrap
+ final String css = pagingOuter.getStringValue() + " pagination tobago-sheet-pagingLinks";
+ writer.writeClassAttribute(css);
+// writer.writeIdAttribute(sheetId + ComponentUtils.SUB_SEPARATOR + "pagingLinks");
+ writeDirectPagingLinks(writer, facesContext, application, sheet);
+ writer.endElement(HtmlElements.UL);
+*/
}
// show page range
@@ -787,7 +798,7 @@ public class SheetRenderer extends Layou
writer.writeAttribute(HtmlAttributes.CELLSPACING, "0", false);
writer.writeAttribute(HtmlAttributes.CELLPADDING, "0", false);
writer.writeAttribute(HtmlAttributes.SUMMARY, "", false);
- writer.writeClassAttribute(Classes.create(sheet, "headerTable"));
+ writer.writeClassAttribute(Classes.create(sheet, "headerTable table")); // XXX table comes from bootstrap
if (needVerticalScrollbar) {
verticalScrollbarWidth = getVerticalScrollbarWeight(facesContext, sheet).getPixel();
writer.writeAttribute("data-tobago-sheet-verticalscrollbarwidth", String.valueOf(verticalScrollbarWidth), false);
@@ -809,7 +820,8 @@ public class SheetRenderer extends Layou
for (int j = 0; j < grid.getColumnCount(); j++) {
final Cell cell = grid.getCell(j, i);
if (cell instanceof OriginCell) {
- writer.startElement(HtmlElements.TD, null);
+// writer.startElement(HtmlElements.TD, null);
+ writer.startElement(HtmlElements.TH, null);
if (cell.getColumnSpan() > 1) {
writer.writeAttribute(HtmlAttributes.COLSPAN, cell.getColumnSpan());
}
@@ -931,11 +943,13 @@ public class SheetRenderer extends Layou
}
writer.endElement(HtmlElements.DIV);
- writer.endElement(HtmlElements.TD);
+// writer.endElement(HtmlElements.TD);
+ writer.endElement(HtmlElements.TH);
}
}
// add a filler column
- writer.startElement(HtmlElements.TD, null);
+// writer.startElement(HtmlElements.TD, null);
+ writer.startElement(HtmlElements.TH, null);
writer.startElement(HtmlElements.DIV, null);
// todo: is the filler class needed here?
writer.writeClassAttribute(Classes.create(sheet, "headerCell", Markup.FILLER));
@@ -946,7 +960,8 @@ public class SheetRenderer extends Layou
writer.writeStyleAttribute(headerStyle);
writer.endElement(HtmlElements.SPAN);
writer.endElement(HtmlElements.DIV);
- writer.endElement(HtmlElements.TD);
+// writer.endElement(HtmlElements.TD);
+ writer.endElement(HtmlElements.TH);
writer.endElement(HtmlElements.TR);
}
@@ -1075,47 +1090,59 @@ public class SheetRenderer extends Layou
}
}
+ final boolean bootstrap = ClientProperties.getInstance(facesContext).getTheme().getName().equals("bootstrap");
String name;
+ name = bootstrap ? "«" : "...";
int skip = prevs.size() > 0 ? prevs.get(0) : 1;
if (!sheet.isShowDirectLinksArrows() && skip > 1) {
skip -= (linkCount - (linkCount / 2));
skip--;
- name = DOTS;
+ name = "...";
if (skip < 1) {
skip = 1;
if (prevs.get(0) == 2) {
name = "1";
}
}
- writeLinkElement(writer, sheet, name, skip, true);
+ writeLinkElement(writer, sheet, name, skip, PagingLinkType.NORMAL);
+ } else {
+ writeLinkElement(writer, sheet, name, null, PagingLinkType.DISABLED);
}
for (final Integer prev : prevs) {
name = prev.toString();
- writeLinkElement(writer, sheet, name, prev, true);
+ writeLinkElement(writer, sheet, name, prev, PagingLinkType.NORMAL);
}
name = Integer.toString(sheet.getCurrentPage() + 1);
- writeLinkElement(writer, sheet, name, sheet.getCurrentPage() + 1, false);
+ writeLinkElement(writer, sheet, name, sheet.getCurrentPage() + 1, PagingLinkType.CURRENT);
for (final Integer next : nexts) {
name = next.toString();
- writeLinkElement(writer, sheet, name, next, true);
+ writeLinkElement(writer, sheet, name, next, PagingLinkType.NORMAL);
}
+ // XXX hack bootstrap
+ name = bootstrap ? "»" : "...";
skip = nexts.size() > 0 ? nexts.get(nexts.size() - 1) : pages;
if (!sheet.isShowDirectLinksArrows() && skip < pages) {
skip += linkCount / 2;
skip++;
- name = DOTS;
+ name = "...";
if (skip > pages) {
skip = pages;
if ((nexts.get(nexts.size() - 1)) == skip - 1) {
name = Integer.toString(skip);
}
}
- writeLinkElement(writer, sheet, name, skip, true);
+ writeLinkElement(writer, sheet, name, skip, PagingLinkType.NORMAL);
+ } else {
+ writeLinkElement(writer, sheet, name, null, PagingLinkType.DISABLED);
}
}
+ private enum PagingLinkType {
+ NORMAL, CURRENT, DISABLED
+ }
+
private UICommand createPagingCommand(
final Application application, final PageAction command, final boolean disabled) {
final UICommand link;
@@ -1129,18 +1156,30 @@ public class SheetRenderer extends Layou
}
private void writeLinkElement(
- final TobagoResponseWriter writer, final UISheet sheet, final String text, final int page, final boolean makeLink)
+ final TobagoResponseWriter writer, final UISheet sheet, final String name, final Integer toPage,
+ final PagingLinkType pagingLinkType)
throws IOException {
- final String type = makeLink ? HtmlElements.A : HtmlElements.SPAN;
- writer.startElement(type, null);
+ String innerElement = pagingLinkType == PagingLinkType.NORMAL ? HtmlElements.A : HtmlElements.SPAN;
+
+ writer.startElement(HtmlElements.LI, null);
+ if (pagingLinkType == PagingLinkType.CURRENT) {
+ // XXX hack for Bootstrap
+ writer.writeClassAttribute("active");
+ }
+ if (pagingLinkType == PagingLinkType.DISABLED) {
+ // XXX hack for Bootstrap
+ writer.writeClassAttribute("disabled");
+ }
+ writer.startElement(innerElement, null);
writer.writeClassAttribute(Classes.create(sheet, "pagingLink"));
- if (makeLink) {
- writer.writeAttribute(DataAttributes.TO_PAGE, page);
+ if (pagingLinkType == PagingLinkType.NORMAL) {
+ writer.writeAttribute(DataAttributes.TO_PAGE, toPage);
writer.writeAttribute(HtmlAttributes.HREF, "#", true);
}
writer.flush();
- writer.write(text);
- writer.endElement(type);
+ writer.write(name);
+ writer.endElement(innerElement);
+ writer.endElement(HtmlElements.LI);
}
private Measure getContentBorder(final FacesContext facesContext, final UISheet data) {
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ToolBarRendererBase.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/ToolBarRendererBase.java?rev=1642047&r1=1642046&r2=1642047&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/ToolBarRendererBase.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/ToolBarRendererBase.java Thu Nov 27 09:02:38 2014
@@ -62,10 +62,26 @@ public abstract class ToolBarRendererBas
private static final Logger LOG = LoggerFactory.getLogger(ToolBarRendererBase.class);
+ @Override
+ public void prepareRender(
+ final FacesContext facesContext, final UIComponent component) throws IOException {
+ super.prepareRender(facesContext, component);
+
+ final UIToolBar toolBar = (UIToolBar) component;
+
+ if ("big".equals(getIconSize(toolBar))) {
+ ComponentUtils.addCurrentMarkup(toolBar, Markup.BIG);
+ }
+ if ("right".equals(getLabelPosition(toolBar))) {
+ ComponentUtils.addCurrentMarkup(toolBar, Markup.RIGHT);
+ }
+ }
+
protected String getLabelPosition(final UIComponent component) {
return (String) component.getAttributes().get(Attributes.LABEL_POSITION);
}
+ // XXX remove it, after removing subclasses
protected String getIconSize(final UIComponent component) {
return (String) component.getAttributes().get(Attributes.ICON_SIZE);
}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml Thu Nov 27 09:02:38 2014
@@ -91,6 +91,12 @@
</supported-markup>
</renderer>
<renderer>
+ <name>FlexLayout</name>
+ <supported-markup>
+ <markup>vertically</markup>
+ </supported-markup>
+ </renderer>
+ <renderer>
<name>Image</name>
<supported-markup>
<markup>disabled</markup>
@@ -346,6 +352,8 @@
<supported-markup>
<markup>disabled</markup>
<markup>selected</markup>
+ <markup>big</markup>
+ <markup>right</markup>
</supported-markup>
</renderer>
<renderer>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-layout.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-layout.js?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-layout.js (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-layout.js Thu Nov 27 09:02:38 2014
@@ -196,6 +196,7 @@ jQuery(document).ready(function () {
flexLayouts.each(function () {
var container = jQuery(this);
layoutFlex(container, true);
+ layoutFlex(container, false);
});
});
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js Thu Nov 27 09:02:38 2014
@@ -273,6 +273,7 @@ Tobago.Sheet.setup2 = function (sheets)
// begin resizing
// console.log("begin");
// console.log(event);
+ LOG.info("down");
var columnIndex = jQuery(this).data("tobago-column-index");
var body = jQuery("body");
var column = jQuery(this).closest("table").children("colgroup").children("col").eq(columnIndex);
@@ -286,6 +287,7 @@ Tobago.Sheet.setup2 = function (sheets)
originalFillerWidth: parseInt(filler.attr("width"))
};
body.on("mousemove", data, function(event) {
+ LOG.info("move");
var delta = event.clientX - event.data.originalClientX;
// console.log("columnResize(): " + event.data.columnIndex + ", delta: " + delta);
delta = - Math.min(-delta, event.data.originalColumnWidth - 10);
@@ -304,7 +306,7 @@ Tobago.Sheet.setup2 = function (sheets)
body.one("mouseup", {sheet: jQuery(this).closest(".tobago-sheet")}, function (event) {
// switch off the mouse move listener
jQuery("body").off("mousemove");
-
+ LOG.info("up");
// copy the width values from the header to the body, (and build a list of it)
var sheet = event.data.sheet;
var headerTable = sheet.find(".tobago-sheet-headerTable");
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css?rev=1642047&r1=1642046&r2=1642047&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css Thu Nov 27 09:02:38 2014
@@ -26,6 +26,10 @@
display: flex;
}
+.tobago-flexLayout-markup-vertically {
+ flex-direction: column;
+}
+
.tobago-flexLayout > .tobago-date,
.tobago-flexLayout > .tobago-in,
.tobago-flexLayout > .tobago-label,
@@ -70,6 +74,49 @@ table.tobago-gridLayout > tbody > tr:fir
/* sheet -------------------------------------------------------------- */
+.tobago-sheet-footer {
+ text-align: center;
+}
+
+.tobago-sheet-pagingOuter-markup-left {
+ float: left;
+}
+.tobago-sheet-pagingOuter-markup-center {
+}
+
+.tobago-sheet-pagingOuter-markup-right {
+ float:right;
+}
+
+.tobago-sheet-pagingInput {
+ text-align: center;
+}
+
+.tobago-sheet-pagingOuter {
+ vertical-align: top;
+ cursor: pointer;
+}
+
+.tobago-sheet-pagingText {
+ cursor: pointer;
+ vertical-align: top;
+}
+
+.tobago-sheet-footerPagerButton {
+ cursor: pointer;
+ vertical-align: top;
+}
+
+.tobago-sheet-footerPagerButton-markup-disabled {
+ cursor: auto;
+}
+
+.tobago-sheet-pagingLink {
+ vertical-align: top;
+}
+
+/* sheet -------------------------------------------------------------- */
+
.tobago-sheet-pagingInput {
display: none;
}