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 2009/06/26 14:13:47 UTC
svn commit: r788668 [6/6] - in /myfaces/tobago/trunk: core/
core/src/main/java/org/apache/myfaces/tobago/component/
core/src/main/java/org/apache/myfaces/tobago/context/
core/src/main/java/org/apache/myfaces/tobago/layout/
core/src/main/java/org/apache...
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java?rev=788668&r1=788667&r2=788668&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRendererBase.java Fri Jun 26 12:13:41 2009
@@ -20,6 +20,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import static org.apache.myfaces.tobago.TobagoConstants.SUBCOMPONENT_SEP;
+import org.apache.myfaces.tobago.component.AbstractUICommand;
import org.apache.myfaces.tobago.component.Attributes;
import org.apache.myfaces.tobago.component.CreateComponentUtils;
import org.apache.myfaces.tobago.component.Facets;
@@ -351,7 +352,7 @@
return "tobagoButtonOpenMenu(this, '" + searchId + "')";
} else {
CommandRendererHelper helper
- = new CommandRendererHelper(facesContext, (UICommand) component);
+ = new CommandRendererHelper(facesContext, (AbstractUICommand) component);
return helper.getOnclick();
}
}
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java?rev=788668&r1=788667&r2=788668&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeNodeRenderer.java Fri Jun 26 12:13:41 2009
@@ -97,7 +97,7 @@
searchString = treeId + NamingContainer.SEPARATOR_CHAR + nodeStateId;
node.setMarked(marked.equals(searchString));
} else {
- LOG.warn("This log message is help clarifying the occurence of this else case.");
+ LOG.warn("This log message is help clarifying the occurrence of this else case.");
}
}
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css?rev=788668&r1=788667&r2=788668&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css Fri Jun 26 12:13:41 2009
@@ -363,8 +363,10 @@
div.tobago-gridLayout-default {
padding-bottom: 0px;
padding-right: 0px;
- padding-left: 5px;
- padding-top: 5px;
+/* XXX was changed from 5px */
+ padding-left: 0px;
+/* XXX was changed from 5px */
+ padding-top: 0px;
overflow: hidden;
-moz-box-sizing: border-box;
box-sizing: border-box;
Modified: myfaces/tobago/trunk/theme/speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java?rev=788668&r1=788667&r2=788668&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java Fri Jun 26 12:13:41 2009
@@ -51,15 +51,18 @@
public static final String CONTENT_INNER = SUBCOMPONENT_SEP + "content-inner";
public static final String HEADER = SUBCOMPONENT_SEP + "header";
+ @Override
public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
super.prepareRender(facesContext, component);
HtmlRendererUtil.renderDojoDndSource(facesContext, component);
}
+ @Override
public int getFixedHeight(FacesContext facesContext, UIComponent component) {
return super.getFixedHeight(facesContext, component);
}
+ @Override
public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
TobagoResponseWriter writer = HtmlRendererUtil.getTobagoResponseWriter(facesContext);
@@ -77,9 +80,11 @@
HtmlRendererUtil.renderDojoDndItem(component, writer, true);
writer.writeClassAttribute();
writer.writeIdAttribute(clientId);
- if (style != null) {
+// if (style != null) {
writer.writeStyleAttribute(style);
- }
+// }
+ // XXX what is abrout the writeStyleAttribute(style) method? is it useful or should it be deprecated?
+ writer.writeStyleAttribute();
writer.writeJavascript("Tobago.addAjaxComponent(\"" + clientId + "\");");
encodeBeginInner(facesContext, writer, component);
@@ -145,6 +150,7 @@
writer.endElement(HtmlConstants.DIV);
}
+ @Override
public void encodeEnd(FacesContext facesContext,
UIComponent component) throws IOException {
TobagoResponseWriter writer = HtmlRendererUtil.getTobagoResponseWriter(facesContext);
@@ -181,4 +187,3 @@
facesContext.responseComplete();
}
}
-
Modified: myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtil.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtil.java?rev=788668&r1=788667&r2=788668&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtil.java (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtil.java Fri Jun 26 12:13:41 2009
@@ -40,7 +40,7 @@
import org.apache.myfaces.tobago.renderkit.html.StyleClasses;
import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
import org.apache.myfaces.tobago.util.ComponentUtil;
-import org.apache.myfaces.tobago.util.LayoutUtil;
+import org.apache.myfaces.tobago.util.LayoutUtils;
import org.apache.myfaces.tobago.webapp.TobagoResponseJsonWriterImpl;
import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
import org.apache.myfaces.tobago.webapp.TobagoResponseWriterWrapper;
@@ -231,13 +231,13 @@
public static String getLayoutSpaceStyle(UIComponent component) {
StringBuilder sb = new StringBuilder();
- Integer space = LayoutUtil.getLayoutSpace(component, Attributes.LAYOUT_WIDTH, Attributes.LAYOUT_WIDTH);
+ Integer space = LayoutUtils.getLayoutSpace(component, Attributes.LAYOUT_WIDTH, Attributes.LAYOUT_WIDTH);
if (space != null) {
sb.append(" width: ");
sb.append(space);
sb.append("px;");
}
- space = LayoutUtil.getLayoutSpace(component, Attributes.LAYOUT_HEIGHT, Attributes.LAYOUT_HEIGHT);
+ space = LayoutUtils.getLayoutSpace(component, Attributes.LAYOUT_HEIGHT, Attributes.LAYOUT_HEIGHT);
if (space != null) {
sb.append(" height: ");
sb.append(space);
@@ -348,11 +348,11 @@
String layoutAttribute;
String styleAttribute;
if (width) {
- layoutSpace = LayoutUtil.getLayoutWidth(component);
+ layoutSpace = LayoutUtils.getLayoutWidth(component);
layoutAttribute = Attributes.LAYOUT_WIDTH;
styleAttribute = HtmlAttributes.WIDTH;
} else {
- layoutSpace = LayoutUtil.getLayoutHeight(component);
+ layoutSpace = LayoutUtils.getLayoutHeight(component);
layoutAttribute = Attributes.LAYOUT_HEIGHT;
styleAttribute = HtmlAttributes.HEIGHT;
}
@@ -362,7 +362,7 @@
}
if (space == -1 && (!RendererTypes.OUT.equals(component.getRendererType()))) {
UIComponent parent = component.getParent();
- space = LayoutUtil.getInnerSpace(facesContext, parent, width);
+ space = LayoutUtils.getInnerSpace(facesContext, parent, width);
if (space > 0 && !ComponentUtil.isFacetOf(component, parent)) {
component.getAttributes().put(layoutAttribute, Integer.valueOf(space));
if (width) {
@@ -390,7 +390,7 @@
}
UIComponent layout = component.getFacet(Facets.LAYOUT);
if (layout != null) {
- int layoutSpace2 = LayoutUtil.getInnerSpace(facesContext, component,
+ int layoutSpace2 = LayoutUtils.getInnerSpace(facesContext, component,
width);
if (layoutSpace2 > 0) {
layout.getAttributes().put(layoutAttribute, Integer.valueOf(layoutSpace2));
Modified: myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtil.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtil.java?rev=788668&r1=788667&r2=788668&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtil.java (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/util/RenderUtil.java Fri Jun 26 12:13:41 2009
@@ -77,6 +77,12 @@
}
}
+ public static void encodeChildrenWithoutLayout(FacesContext facesContext, UIComponent container) throws IOException {
+ for (UIComponent child : (List<UIComponent>) container.getChildren()) {
+ encode(facesContext, child);
+ }
+ }
+
public static void encode(FacesContext facesContext, UIComponent component) throws IOException {
if (component.isRendered()) {
if (LOG.isDebugEnabled()) {
Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/CreateComponentAnnotationVisitor.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/CreateComponentAnnotationVisitor.java?rev=788668&r1=788667&r2=788668&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/CreateComponentAnnotationVisitor.java (original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/CreateComponentAnnotationVisitor.java Fri Jun 26 12:13:41 2009
@@ -141,7 +141,11 @@
String className = "org.apache.myfaces.tobago.internal.taglib." + StringUtils.capitalize(tag.name()) + "Tag";
TagInfo tagInfo = new TagInfo(className, componentTag.rendererType());
- tagInfo.getProperties().addAll(properties);
+ for (PropertyInfo property : properties) {
+ if (property.isTagAttribute()) {
+ tagInfo.getProperties().add(property);
+ }
+ }
if (is12()) {
tagInfo.setSuperClass("org.apache.myfaces.tobago.internal.taglib12.TobagoELTag");
} else {
@@ -364,6 +368,7 @@
propertyInfo.setAllowdValues(uiComponentTagAttribute.allowedValues());
if (tagAttribute != null) {
propertyInfo.setBodyContent(tagAttribute.bodyContent());
+ propertyInfo.setTagAttribute(true);
}
String type;
if (uiComponentTagAttribute.expression().isMethodExpression()) {
Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/generate/PropertyInfo.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/generate/PropertyInfo.java?rev=788668&r1=788667&r2=788668&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/generate/PropertyInfo.java (original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/generate/PropertyInfo.java Fri Jun 26 12:13:41 2009
@@ -31,6 +31,7 @@
private boolean literalOnly;
private boolean deprecated;
private boolean bodyContent;
+ private boolean tagAttribute;
public PropertyInfo() {
}
@@ -187,6 +188,14 @@
this.methodExpressionRequired = methodExpressionRequired;
}
+ public boolean isTagAttribute() {
+ return tagAttribute;
+ }
+
+ public void setTagAttribute(boolean tagAttribute) {
+ this.tagAttribute = tagAttribute;
+ }
+
public PropertyInfo fill(PropertyInfo info) {
info.setName(name);
info.setType(type);
@@ -198,6 +207,7 @@
info.setValueExpressionRequired(valueExpressionRequired);
info.setLiteralOnly(literalOnly);
info.setMethodExpressionRequired(methodExpressionRequired);
+ info.setTagAttribute(tagAttribute);
return info;
}
Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.1.stg
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.1.stg?rev=788668&r1=788667&r2=788668&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.1.stg (original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.1.stg Fri Jun 26 12:13:41 2009
@@ -338,6 +338,10 @@
<NormalProperty(property)>
>>
+DisplayProperty(property) ::= <<
+<NormalProperty(property)>
+>>
+
OrderByProperty(property) ::= <<
<NormalProperty(property)>
>>
@@ -435,6 +439,14 @@
values[<it.indexPlusOne>] = <it.propertyName>;
>>
+MeasureSaveStateProperty() ::= <<
+values[<it.indexPlusOne>] = <it.propertyName>;
+>>
+
+DisplaySaveStateProperty() ::= <<
+values[<it.indexPlusOne>] = <it.propertyName>;
+>>
+
OrderBySaveStateProperty() ::= <<
values[<it.indexPlusOne>] = <it.propertyName>;
>>
@@ -480,6 +492,14 @@
<it.propertyName> = (<it.type>) values[<it.indexPlusOne>];
>>
+MeasureRestoreStateProperty() ::= <<
+<it.propertyName> = (<it.type>) values[<it.indexPlusOne>];
+>>
+
+DisplayRestoreStateProperty() ::= <<
+<it.propertyName> = (<it.type>) values[<it.indexPlusOne>];
+>>
+
OrderByRestoreStateProperty() ::= <<
<it.propertyName> = (<it.type>) values[<it.indexPlusOne>];
>>
Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.2.stg
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.2.stg?rev=788668&r1=788667&r2=788668&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.2.stg (original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.2.stg Fri Jun 26 12:13:41 2009
@@ -249,6 +249,10 @@
<NormalProperty(property)>
>>
+DisplayProperty(property) ::= <<
+<NormalProperty(property)>
+>>
+
OrderByProperty(property) ::= <<
<NormalProperty(property)>
>>
@@ -393,6 +397,14 @@
values[<it.indexPlusOne>] = <it.propertyName>;
>>
+MeasureSaveStateProperty() ::= <<
+values[<it.indexPlusOne>] = <it.propertyName>;
+>>
+
+DisplaySaveStateProperty() ::= <<
+values[<it.indexPlusOne>] = <it.propertyName>;
+>>
+
OrderBySaveStateProperty() ::= <<
values[<it.indexPlusOne>] = <it.propertyName>;
>>
@@ -445,6 +457,14 @@
<it.propertyName> = (<it.type>) values[<it.indexPlusOne>];
>>
+MeasureRestoreStateProperty() ::= <<
+<it.propertyName> = (<it.type>) values[<it.indexPlusOne>];
+>>
+
+DisplayRestoreStateProperty() ::= <<
+<it.propertyName> = (<it.type>) values[<it.indexPlusOne>];
+>>
+
OrderByRestoreStateProperty() ::= <<
<it.propertyName> = (<it.type>) values[<it.indexPlusOne>];
>>