You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2006/02/13 22:23:28 UTC
svn commit: r377491 [2/2] - in /incubator/tobago/trunk:
tobago-core/src/main/java/org/apache/myfaces/tobago/
tobago-core/src/main/java/org/apache/myfaces/tobago/application/
tobago-core/src/main/java/org/apache/myfaces/tobago/component/
tobago-core/src...
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/PopupTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/PopupTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/PopupTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/PopupTag.java Mon Feb 13 13:23:23 2006
@@ -16,6 +16,8 @@
* limitations under the License.
*/
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_HEIGHT;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LEFT;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TOP;
@@ -24,14 +26,12 @@
import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
import org.apache.myfaces.tobago.component.ComponentUtil;
-import org.apache.myfaces.tobago.component.UIPage;
import org.apache.myfaces.tobago.component.UIPopup;
import org.apache.myfaces.tobago.taglib.decl.HasDimension;
import org.apache.myfaces.tobago.taglib.decl.HasId;
import org.apache.myfaces.tobago.taglib.decl.IsRendered;
import javax.faces.component.UIComponent;
-import javax.servlet.jsp.JspException;
/**
* Renders a popup panel.
@@ -39,8 +39,7 @@
@Tag(name = "popup")
public class PopupTag extends TobagoBodyTag
implements HasId, IsRendered, HasDimension {
-
-
+ private static final Log LOG = LogFactory.getLog(PopupTag.class);
private String width;
private String height;
private String left;
@@ -48,14 +47,6 @@
public String getComponentType() {
return UIPopup.COMPONENT_TYPE;
- }
-
- public int doStartTag() throws JspException {
- int result = super.doStartTag();
- UIPopup component = (UIPopup) getComponentInstance();
- UIPage page = ComponentUtil.findPage(component);
- page.getPopups().add(component);
- return result;
}
public void release() {
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTag.java Mon Feb 13 13:23:23 2006
@@ -60,8 +60,6 @@
private String state;
private String stateChangeListener;
-// ----------------------------------------------------------- business methods
-
public String getComponentType() {
// TODO: implement uidata with overridden processUpdates to store state
return UIData.COMPONENT_TYPE;
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TimeTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TimeTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TimeTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TimeTag.java Mon Feb 13 13:23:23 2006
@@ -20,13 +20,8 @@
import org.apache.commons.logging.LogFactory;
import org.apache.myfaces.tobago.component.UIInput;
-import javax.faces.application.Application;
import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.DateTimeConverter;
-import static javax.faces.convert.DateTimeConverter.CONVERTER_ID;
import javax.servlet.jsp.JspException;
-import java.util.TimeZone;
public class TimeTag extends InputTag implements TimeTagDeclaration {
@@ -38,17 +33,6 @@
public int doEndTag() throws JspException {
- UIInput component = (UIInput) getComponentInstance();
- // TODO move to renderkit
- if (component.getConverter() == null) {
- Application application
- = FacesContext.getCurrentInstance().getApplication();
- DateTimeConverter converter
- = (DateTimeConverter) application.createConverter(CONVERTER_ID);
- converter.setPattern("HH:mm");
- converter.setTimeZone(TimeZone.getDefault());
- component.setConverter(converter);
- }
return super.doEndTag();
}
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarTag.java Mon Feb 13 13:23:23 2006
@@ -18,70 +18,36 @@
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ICON_SIZE;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL_POSITION;
-import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
-import org.apache.myfaces.tobago.apt.annotation.Tag;
-import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
-import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
import org.apache.myfaces.tobago.component.ComponentUtil;
-import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
-import org.apache.myfaces.tobago.taglib.decl.HasWidth;
+import org.apache.myfaces.tobago.component.UIToolBar;
import javax.faces.component.UIComponent;
-import javax.faces.component.UIPanel;
+
/*
* Created 29.07.2003 at 15:09:53.
* $Id$
*/
-/**
- * <p/>
- * Renders a toolbar.<p>
- * Allowed subcomponents are subtypes of UICommand i.e.
- * <code>'button'</code> and <code>'link'</code> tags.
- * These are rendered by ToolbarRenderer, so the result has
- * no difference.<p>
- * To add an dropdown menu to a button add a facet <code>'menupopup'</code>
- * containing a
- * <a href="../tobago/menu.html"><code><tobago:menu></code></a>
- * tag to the button. Label's and Image's on those menu tag's are ignored
- * and replaced by the renderer.
- * <pre>
- * <tobago:button commandName="alert('test 0')" type="script"
- * label="Alert 0" >
- * <f:facet name="menupopup">
- * <tobago:menu>
- * <tobago:menuItem action="alert('test 1')" type="script" label="Alert 1"/>
- * <tobago:menuItem action="alert('test 2')" type="script" label="Alert 2"/>
- * <tobago:menuItem action="alert('test 3')" type="script" label="Alert 3"/>
- * </tobago:menu>
- * </f:facet>
- * </tobago:button>
- * </pre>
- */
-
-@Tag(name = "toolBar")
-@BodyContentDescription(anyTagOf = "(<tc:toolBarCommand>|<tc:toolBarSelectBoolean>|<tc:toolBarSelectOne>)* ")
public class ToolBarTag extends PanelTag
- implements HasIdBindingAndRendered, HasWidth {
+ implements ToolBarTagDeclaration {
- public static final String LABEL_BOTTOM = "bottom";
- public static final String LABEL_RIGHT = "right";
- public static final String LABEL_OFF = "off";
-
- public static final String ICON_SMALL = "small";
- public static final String ICON_BIG = "big";
- public static final String ICON_OFF = "off";
+ public static final String LABEL_BOTTOM = UIToolBar.LABEL_BOTTOM;
+ public static final String LABEL_RIGHT = UIToolBar.LABEL_RIGHT;
+ public static final String LABEL_OFF = UIToolBar.LABEL_OFF;
+
+ public static final String ICON_SMALL = UIToolBar.ICON_SMALL;
+ public static final String ICON_BIG = UIToolBar.ICON_BIG;
+ public static final String ICON_OFF = UIToolBar.ICON_OFF;
private String labelPosition = LABEL_BOTTOM;
private String iconSize = ICON_SMALL;
public String getComponentType() {
- return UIPanel.COMPONENT_TYPE;
+ return UIToolBar.COMPONENT_TYPE;
}
protected void setProperties(UIComponent component) {
super.setProperties(component);
-
ComponentUtil.setStringProperty(component, ATTR_LABEL_POSITION, labelPosition);
ComponentUtil.setStringProperty(component, ATTR_ICON_SIZE, iconSize);
}
@@ -92,23 +58,10 @@
iconSize = ICON_SMALL;
}
-
- /**
- * Position of the button label, possible values are: right, bottom, off.
- * If toolbar is facet of box: bottom is changed to right!
- */
- @TagAttribute
- @UIComponentTagAttribute(defaultValue = "bottom")
public void setLabelPosition(String labelPosition) {
this.labelPosition = labelPosition;
}
-
- /**
- * Size of button images, possible values are: small, big, off.
- */
- @TagAttribute
- @UIComponentTagAttribute(defaultValue = "small")
public void setIconSize(String iconSize) {
this.iconSize = iconSize;
}
Added: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarTagDeclaration.java?rev=377491&view=auto
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarTagDeclaration.java (added)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarTagDeclaration.java Mon Feb 13 13:23:23 2006
@@ -0,0 +1,79 @@
+package org.apache.myfaces.tobago.taglib.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 11.02.2006
+ * Time: 14:07:05
+ * To change this template use File | Settings | File Templates.
+ */
+
+/**
+ * <p/>
+ * Renders a toolbar.<p>
+ * Allowed subcomponents are subtypes of UICommand i.e.
+ * <code>'button'</code> and <code>'link'</code> tags.
+ * These are rendered by ToolbarRenderer, so the result has
+ * no difference.<p>
+ * To add an dropdown menu to a button add a facet <code>'menupopup'</code>
+ * containing a
+ * <a href="../tobago/menu.html"><code><tobago:menu></code></a>
+ * tag to the button. Label's and Image's on those menu tag's are ignored
+ * and replaced by the renderer.
+ * <pre>
+ * <tobago:button commandName="alert('test 0')" type="script"
+ * label="Alert 0" >
+ * <f:facet name="menupopup">
+ * <tobago:menu>
+ * <tobago:menuItem action="alert('test 1')" type="script" label="Alert 1"/>
+ * <tobago:menuItem action="alert('test 2')" type="script" label="Alert 2"/>
+ * <tobago:menuItem action="alert('test 3')" type="script" label="Alert 3"/>
+ * </tobago:menu>
+ * </f:facet>
+ * </tobago:button>
+ * </pre>
+ */
+
+@Tag(name = "toolBar")
+@BodyContentDescription(anyTagOf = "(<tc:toolBarCommand>|<tc:toolBarSelectBoolean>|<tc:toolBarSelectOne>)* ")
+@UIComponentTag(UIComponent = "javax.faces.component.UIPanel")
+public interface ToolBarTagDeclaration extends PanelTagDeclaration {
+ /**
+ * Position of the button label, possible values are: right, bottom, off.
+ * If toolbar is facet of box: bottom is changed to right!
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(defaultValue = "bottom",
+ allowedValues = {"bottom", "right", "off"})
+ void setLabelPosition(String labelPosition);
+
+ /**
+ * Size of button images, possible values are: small, big, off.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(defaultValue = "small",
+ allowedValues = {"small", "big", "off"})
+ void setIconSize(String iconSize);
+}
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeTag.java Mon Feb 13 13:23:23 2006
@@ -27,34 +27,14 @@
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SHOW_ROOT_JUNCTION;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STATE;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_VALUE;
-import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
-import org.apache.myfaces.tobago.apt.annotation.Preliminary;
-import org.apache.myfaces.tobago.apt.annotation.Tag;
-import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
-import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
import org.apache.myfaces.tobago.component.ComponentUtil;
import org.apache.myfaces.tobago.component.UITree;
-import org.apache.myfaces.tobago.taglib.decl.HasActionListener;
-import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
-import org.apache.myfaces.tobago.taglib.decl.HasIdReference;
-import org.apache.myfaces.tobago.taglib.decl.HasNameReference;
-import org.apache.myfaces.tobago.taglib.decl.HasState;
-import org.apache.myfaces.tobago.taglib.decl.HasTreeNodeValue;
-import org.apache.myfaces.tobago.taglib.decl.IsRequired;
import javax.faces.component.ActionSource;
import javax.faces.component.UIComponent;
-/**
- * Renders a tree view.
- */
-@Tag(name = "tree")
-@BodyContentDescription(anyTagOf = "<f:facet>* <f:actionListener>?")
-@Preliminary(
- "Implement a var attribute for the tree like in the sheet (http://issues.apache.org/jira/browse/MYFACES-903)")
-public class TreeTag extends TobagoTag
- implements HasIdBindingAndRendered, HasTreeNodeValue, HasState,
- HasIdReference, HasActionListener, HasNameReference, IsRequired {
+
+public class TreeTag extends TobagoTag implements TreeTagDeclaration {
private String value;
private String state;
@@ -140,11 +120,7 @@
public String getActionListener() {
return actionListener;
}
- /**
- *
- */
- @TagAttribute
- @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "false")
+
public void setShowIcons(String showIcons) {
this.showIcons = showIcons;
}
@@ -153,12 +129,6 @@
return showJunctions;
}
-
- /**
- *
- */
- @TagAttribute
- @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "false")
public void setShowJunctions(String showJunctions) {
this.showJunctions = showJunctions;
}
@@ -167,11 +137,6 @@
return showRoot;
}
- /**
- *
- */
- @TagAttribute
- @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "false")
public void setShowRoot(String showRoot) {
this.showRoot = showRoot;
}
@@ -180,11 +145,6 @@
return showRootJunction;
}
- /**
- *
- */
- @TagAttribute
- @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "false")
public void setShowRootJunction(String showRootJunction) {
this.showRootJunction = showRootJunction;
}
@@ -201,21 +161,6 @@
return selectable;
}
- /**
- * Flag indicating whether or not this component should be render selectable items.
- * Possible values are:
- * <ul>
- * <li><strong>multi</strong> : a multisection tree is rendered
- * <li><strong>single</strong> : a singlesection tree is rendered
- * <li><strong>multiLeafOnly</strong> : a multisection tree is rendered,
- * only Leaf's are selectable
- * <li><strong>singleLeafOnly</strong> : a singlesection tree is rendered,
- * only Leaf's are selectable
- * </ul>
- * For any other value or if this attribute is omited the items are not selectable.
- */
- @TagAttribute
- @UIComponentTagAttribute(defaultValue = "off")
public void setSelectable(String selectable) {
this.selectable = selectable;
}
@@ -224,11 +169,6 @@
return mutable;
}
- /**
- *
- */
- @TagAttribute
- @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "false")
public void setMutable(String mutable) {
this.mutable = mutable;
}
Added: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeTagDeclaration.java?rev=377491&view=auto
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeTagDeclaration.java (added)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeTagDeclaration.java Mon Feb 13 13:23:23 2006
@@ -0,0 +1,110 @@
+package org.apache.myfaces.tobago.taglib.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
+import org.apache.myfaces.tobago.apt.annotation.Preliminary;
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+import org.apache.myfaces.tobago.taglib.decl.HasActionListener;
+import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.taglib.decl.HasIdReference;
+import org.apache.myfaces.tobago.taglib.decl.HasNameReference;
+import org.apache.myfaces.tobago.taglib.decl.HasState;
+import org.apache.myfaces.tobago.taglib.decl.HasTreeNodeValue;
+import org.apache.myfaces.tobago.taglib.decl.IsRequired;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 11.02.2006
+ * Time: 13:28:14
+ * To change this template use File | Settings | File Templates.
+ */
+/**
+ * Renders a tree view.
+ */
+@Tag(name = "tree")
+@BodyContentDescription(anyTagOf = "<f:facet>* <f:actionListener>?")
+@Preliminary(
+ "Implement a var attribute for the tree like in the sheet (http://issues.apache.org/jira/browse/MYFACES-903)")
+@UIComponentTag(UIComponent = "org.apache.myfaces.tobago.component.UITree")
+public interface TreeTagDeclaration extends TobagoTagDeclaration,
+ HasIdBindingAndRendered, HasTreeNodeValue, HasState,
+ HasIdReference, HasActionListener, HasNameReference, IsRequired {
+
+ /**
+ * Flag indicating whether or not this component should be render selectable items.
+ * Possible values are:
+ * <ul>
+ * <li><strong>multi</strong> : a multisection tree is rendered
+ * <li><strong>single</strong> : a singlesection tree is rendered
+ * <li><strong>multiLeafOnly</strong> : a multisection tree is rendered,
+ * only Leaf's are selectable
+ * <li><strong>singleLeafOnly</strong> : a singlesection tree is rendered,
+ * only Leaf's are selectable
+ * </ul>
+ * For any other value or if this attribute is omited the items are not selectable.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(defaultValue = "off",
+ allowedValues = {"multi", "single", "multiLeafOnly", "singleLeafOnly", "off"})
+ void setSelectable(String selectable);
+
+ /**
+ *
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "java.lang.Boolean",
+ defaultValue = "false")
+ void setMutable(String mutable);
+
+ /**
+ *
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "java.lang.Boolean",
+ defaultValue = "false")
+ void setShowRootJunction(String showRootJunction);
+
+ /**
+ *
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "java.lang.Boolean",
+ defaultValue = "false")
+ void setShowIcons(String showIcons);
+
+ /**
+ *
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "java.lang.Boolean",
+ defaultValue = "false")
+ void setShowJunctions(String showJunctions);
+
+ /**
+ *
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "java.lang.Boolean",
+ defaultValue = "false")
+ void setShowRoot(String showRoot);
+
+}
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/LayoutInfo.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/LayoutInfo.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/LayoutInfo.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/LayoutInfo.java Mon Feb 13 13:23:23 2006
@@ -18,6 +18,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.commons.lang.builder.ToStringBuilder;
import java.util.ArrayList;
import java.util.List;
@@ -421,7 +422,13 @@
handleIllegalTokens();
}
}
-
-
+ public String toString() {
+ return new ToStringBuilder(this).
+ append("cellLeft", cellsLeft).
+ append("spaceLeft", spaceLeft).
+ append("spaces", spaces).
+ append("layoutTokens", layoutTokens).
+ toString();
+ }
}
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/LayoutUtil.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/LayoutUtil.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/LayoutUtil.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/LayoutUtil.java Mon Feb 13 13:23:23 2006
@@ -22,7 +22,6 @@
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_INLINE;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_INNER_HEIGHT;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_INNER_WIDTH;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LAYOUT_DIRECTIVE;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LAYOUT_HEIGHT;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LAYOUT_WIDTH;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_MINIMUM_SIZE;
@@ -31,6 +30,7 @@
import static org.apache.myfaces.tobago.TobagoConstants.RENDERER_TYPE_OUT;
import org.apache.myfaces.tobago.component.ComponentUtil;
import org.apache.myfaces.tobago.component.UIForm;
+import org.apache.myfaces.tobago.component.UICell;
import org.apache.myfaces.tobago.component.UIPanel;
import org.apache.myfaces.tobago.renderkit.InputRendererBase;
import org.apache.myfaces.tobago.renderkit.RendererBase;
@@ -224,11 +224,7 @@
// also Forms are transparent for layouting
- if (component instanceof UIForm) {
- return true;
- }
-
- return false;
+ return component instanceof UIForm;
}
public static UIComponent getLayoutParent(UIComponent component) {
@@ -253,9 +249,7 @@
} else if (ATTR_LAYOUT_HEIGHT.equals(attribute)) {
cell.getAttributes().remove(ATTR_INNER_HEIGHT);
}
- if (cell instanceof UIPanel
- && ComponentUtil.getBooleanAttribute(cell,
- ATTR_LAYOUT_DIRECTIVE)) {
+ if (cell instanceof UICell) {
List<UIComponent> children = addChildren(new ArrayList<UIComponent>(), cell);
for (UIComponent component : children) {
maybeSetLayoutAttribute(component, attribute, value);
Modified: incubator/tobago/trunk/tobago-core/src/main/resources/META-INF/faces-config.xml
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/resources/META-INF/faces-config.xml?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/resources/META-INF/faces-config.xml (original)
+++ incubator/tobago/trunk/tobago-core/src/main/resources/META-INF/faces-config.xml Mon Feb 13 13:23:23 2006
@@ -3,17 +3,17 @@
<!--
* Copyright 2002-2005 The Apache Software Foundation.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
-->
<!DOCTYPE faces-config PUBLIC
@@ -41,7 +41,10 @@
<lifecycle>
<phase-listener>org.apache.myfaces.tobago.ajax.api.AjaxPhaseListener</phase-listener>
</lifecycle>
-
+ <component>
+ <component-type>org.apache.myfaces.tobago.Cell</component-type>
+ <component-class>org.apache.myfaces.tobago.component.UICell</component-class>
+ </component>
<component>
<component-type>org.apache.myfaces.tobago.ColumnSelector</component-type>
<component-class>org.apache.myfaces.tobago.component.UIColumnSelector</component-class>
@@ -63,6 +66,10 @@
<component-class>org.apache.myfaces.tobago.component.UIForm</component-class>
</component>
<component>
+ <component-type>org.apache.myfaces.tobago.FileInput</component-type>
+ <component-class>org.apache.myfaces.tobago.component.UIFileInput</component-class>
+ </component>
+ <component>
<component-type>org.apache.myfaces.tobago.GridLayout</component-type>
<component-class>org.apache.myfaces.tobago.component.UIGridLayout</component-class>
</component>
@@ -71,6 +78,10 @@
<component-class>org.apache.myfaces.tobago.component.UIInput</component-class>
</component>
<component>
+ <component-type>org.apache.myfaces.tobago.Output</component-type>
+ <component-class>org.apache.myfaces.tobago.component.UIOutput</component-class>
+ </component>
+ <component>
<component-type>org.apache.myfaces.tobago.Label</component-type>
<component-class>org.apache.myfaces.tobago.component.UILabel</component-class>
</component>
@@ -95,6 +106,10 @@
<component-class>org.apache.myfaces.tobago.component.UITabGroup</component-class>
</component>
<component>
+ <component-type>org.apache.myfaces.tobago.TimeInput</component-type>
+ <component-class>org.apache.myfaces.tobago.component.UITimeInput</component-class>
+ </component>
+ <component>
<component-type>org.apache.myfaces.tobago.Tree</component-type>
<component-class>org.apache.myfaces.tobago.component.UITree</component-class>
</component>
@@ -105,6 +120,10 @@
<component>
<component-type>org.apache.myfaces.tobago.TreeListboxBox</component-type>
<component-class>org.apache.myfaces.tobago.component.UITreeListboxBox</component-class>
+ </component>
+ <component>
+ <component-type>org.apache.myfaces.tobago.ToolBar</component-type>
+ <component-class>org.apache.myfaces.tobago.component.UIToolBar</component-class>
</component>
<component>
<component-type>org.apache.myfaces.tobago.SelectItem</component-type>
Modified: incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java (original)
+++ incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java Mon Feb 13 13:23:23 2006
@@ -28,7 +28,6 @@
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_COLUMNS;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_INNER_HEIGHT;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_INNER_WIDTH;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LAYOUT_DIRECTIVE;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LAYOUT_HEIGHT;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LAYOUT_MARGIN;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LAYOUT_MARGIN_BOTTOM;
@@ -47,7 +46,7 @@
import org.apache.myfaces.tobago.component.UIGridLayout;
import org.apache.myfaces.tobago.component.UILayout;
import org.apache.myfaces.tobago.component.UIPage;
-import org.apache.myfaces.tobago.component.UIPanel;
+import org.apache.myfaces.tobago.component.UICell;
import org.apache.myfaces.tobago.renderkit.RenderUtil;
import org.apache.myfaces.tobago.renderkit.RendererBase;
import org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil;
@@ -645,10 +644,7 @@
cell.getAttributes().put(ATTR_LAYOUT_HEIGHT,
new Integer(cellHeight));
cell.getAttributes().remove(ATTR_INNER_HEIGHT);
- if (cell instanceof UIPanel
- && ComponentUtil.getBooleanAttribute(cell,
- ATTR_LAYOUT_DIRECTIVE)
- || cell instanceof UIForm) {
+ if (cell instanceof UICell || cell instanceof UIForm) {
List children = LayoutUtil.addChildren(new ArrayList(), cell);
for (Iterator childs = children.iterator(); childs.hasNext();) {
UIComponent component = (UIComponent) childs.next();
Modified: incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/ant/sniplet/CodeSnipletExtractTask.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/ant/sniplet/CodeSnipletExtractTask.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/ant/sniplet/CodeSnipletExtractTask.java (original)
+++ incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/ant/sniplet/CodeSnipletExtractTask.java Mon Feb 13 13:23:23 2006
@@ -22,11 +22,17 @@
import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.FileSet;
-import java.io.*;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
import java.util.List;
import java.util.ArrayList;
+import java.io.File;
+import java.io.LineNumberReader;
+import java.io.FileReader;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.FileOutputStream;
/**
* This task extracts lines from source fileSets marked with a tag. Such a sniplet starts with
Modified: incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/AnnotationDeclarationVisitorCollector.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/AnnotationDeclarationVisitorCollector.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/AnnotationDeclarationVisitorCollector.java (original)
+++ incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/AnnotationDeclarationVisitorCollector.java Mon Feb 13 13:23:23 2006
@@ -34,28 +34,45 @@
*/
public class AnnotationDeclarationVisitorCollector extends SimpleDeclarationVisitor {
- protected Set<MethodDeclaration> collectedMethodDeclations = new HashSet<MethodDeclaration>();
- protected Set<ClassDeclaration> collectedClassDeclations = new HashSet<ClassDeclaration>();
- protected Set<InterfaceDeclaration> collectedInterfaceDeclations = new HashSet<InterfaceDeclaration>();
- protected List<PackageDeclaration> collectedPackageDeclations = new ArrayList<PackageDeclaration>();
+ private Set<MethodDeclaration> collectedMethodDeclations = new HashSet<MethodDeclaration>();
+ private Set<ClassDeclaration> collectedClassDeclations = new HashSet<ClassDeclaration>();
+ private Set<InterfaceDeclaration> collectedInterfaceDeclations = new HashSet<InterfaceDeclaration>();
+ private List<PackageDeclaration> collectedPackageDeclations = new ArrayList<PackageDeclaration>();
+
+ public Set<MethodDeclaration> getCollectedMethodDeclations() {
+ return collectedMethodDeclations;
+ }
+
+ public Set<ClassDeclaration> getCollectedClassDeclations() {
+ return collectedClassDeclations;
+ }
+
+ public Set<InterfaceDeclaration> getCollectedInterfaceDeclations() {
+ return collectedInterfaceDeclations;
+ }
+
+ public List<PackageDeclaration> getCollectedPackageDeclations() {
+ return collectedPackageDeclations;
+ }
+
public void visitMethodDeclaration(MethodDeclaration d) {
- if (!collectedMethodDeclations.contains(d) &&
- !d.getAnnotationMirrors().isEmpty()) {
+ if (!collectedMethodDeclations.contains(d)
+ && !d.getAnnotationMirrors().isEmpty()) {
collectedMethodDeclations.add(d);
}
}
public void visitPackageDeclaration(PackageDeclaration d) {
- if (!collectedPackageDeclations.contains(d) &&
- !d.getAnnotationMirrors().isEmpty()) {
+ if (!collectedPackageDeclations.contains(d)
+ && !d.getAnnotationMirrors().isEmpty()) {
collectedPackageDeclations.add(d);
}
}
public void visitInterfaceDeclaration(InterfaceDeclaration d) {
- if (!collectedInterfaceDeclations.contains(d) &&
- !d.getAnnotationMirrors().isEmpty()) {
+ if (!collectedInterfaceDeclations.contains(d)
+ && !d.getAnnotationMirrors().isEmpty()) {
collectedInterfaceDeclations.add(d);
}
}
@@ -65,8 +82,8 @@
// TODO why this needed????
visitPackageDeclaration(d.getPackage());
- if (!collectedClassDeclations.contains(d) &&
- !d.getAnnotationMirrors().isEmpty()) {
+ if (!collectedClassDeclations.contains(d)
+ && !d.getAnnotationMirrors().isEmpty()) {
collectedClassDeclations.add(d);
}
}
Modified: incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/PrintAnnotationVisitor.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/PrintAnnotationVisitor.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/PrintAnnotationVisitor.java (original)
+++ incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/PrintAnnotationVisitor.java Mon Feb 13 13:23:23 2006
@@ -35,7 +35,7 @@
public class PrintAnnotationVisitor extends AnnotationDeclarationVisitorCollector {
public void print() {
- for (ClassDeclaration decl : collectedClassDeclations) {
+ for (ClassDeclaration decl : getCollectedClassDeclations()) {
printClassDeclaration(decl);
}
}
@@ -80,7 +80,7 @@
}
public void printMethods(ClassDeclaration d) {
- for (MethodDeclaration decl : collectedMethodDeclations) {
+ for (MethodDeclaration decl : getCollectedMethodDeclations()) {
if (d.getQualifiedName().
equals(decl.getDeclaringType().getQualifiedName())) {
System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
Modified: incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java (original)
+++ incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java Mon Feb 13 13:23:23 2006
@@ -47,7 +47,7 @@
*/
public class TaglibAnnotationVisitor extends AnnotationDeclarationVisitorCollector {
- protected final AnnotationProcessorEnvironment env;
+ private final AnnotationProcessorEnvironment env;
public TaglibAnnotationVisitor(AnnotationProcessorEnvironment env) {
this.env = env;
@@ -58,7 +58,7 @@
dbf.setValidating(false);
javax.xml.parsers.DocumentBuilder parser = dbf.newDocumentBuilder();
List<DocumentAndFileName> tlds = new ArrayList<DocumentAndFileName>();
- for (PackageDeclaration packageDeclaration :collectedPackageDeclations) {
+ for (PackageDeclaration packageDeclaration :getCollectedPackageDeclations()) {
DocumentAndFileName documentAndFileName = new DocumentAndFileName();
Document document = parser.newDocument();
Taglib taglibAnnotation = packageDeclaration.getAnnotation(Taglib.class);
@@ -87,12 +87,12 @@
taglib.appendChild(listener);
}
Set<String> tagSet = new HashSet<String>();
- for (ClassDeclaration decl : collectedClassDeclations) {
+ for (ClassDeclaration decl : getCollectedClassDeclations()) {
if (decl.getPackage().equals(packageDeclaration)) {
appendTag(decl, taglib, tagSet, document);
}
}
- for (InterfaceDeclaration decl : collectedInterfaceDeclations) {
+ for (InterfaceDeclaration decl : getCollectedInterfaceDeclations()) {
if (decl.getPackage().equals(packageDeclaration)) {
appendTag(decl, taglib, tagSet, document);
}
@@ -153,7 +153,8 @@
if (contentDescription != null) {
if (bodyContent.equals(BodyContent.JSP)
&& contentDescription.contentType().length() > 0) {
- throw new IllegalArgumentException("contentType " + contentDescription.contentType() + " for bodyContent JSP not allowed!");
+ throw new IllegalArgumentException("contentType " + contentDescription.contentType()
+ + " for bodyContent JSP not allowed!");
} else if (bodyContent.equals(BodyContent.TAGDEPENDENT)
&& contentDescription.contentType().length() == 0) {
throw new IllegalArgumentException("contentType should set for tagdependent bodyContent");
@@ -215,7 +216,7 @@
protected void addAttributes(InterfaceDeclaration type, Element tagElement, Document document) {
addAttributes(type.getSuperinterfaces(), tagElement, document);
- for (MethodDeclaration decl : collectedMethodDeclations) {
+ for (MethodDeclaration decl : getCollectedMethodDeclations()) {
if (decl.getDeclaringType().equals(type)) {
addAttribute(decl, tagElement, document);
}
@@ -223,7 +224,7 @@
}
protected void addAttributes(ClassDeclaration d, Element tagElement, Document document) {
- for (MethodDeclaration decl : collectedMethodDeclations) {
+ for (MethodDeclaration decl : getCollectedMethodDeclations()) {
if (d.getQualifiedName().
equals(decl.getDeclaringType().getQualifiedName())) {
addAttribute(decl, tagElement, document);
@@ -242,16 +243,20 @@
String simpleName = d.getSimpleName();
if (simpleName.startsWith("set")) {
Element attribute = document.createElement("attribute");
- addLeafTextElement(simpleName.substring(3, 4).toLowerCase() + simpleName.substring(4), "name", attribute, document);
+ addLeafTextElement(simpleName.substring(3, 4).toLowerCase() + simpleName.substring(4),
+ "name", attribute, document);
addLeafTextElement(Boolean.toString(tagAttribute.required()), "required", attribute, document);
addLeafTextElement(Boolean.toString(tagAttribute.rtexprvalue()), "rtexprvalue", attribute, document);
addDescription(d, attribute, document);
tagElement.appendChild(attribute);
- // TODO add description
} else {
throw new IllegalArgumentException("Only setter allowed found: " + simpleName);
}
}
+ }
+
+ public AnnotationProcessorEnvironment getEnv() {
+ return env;
}
}
Modified: incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TobagoAnnotationVisitor.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TobagoAnnotationVisitor.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TobagoAnnotationVisitor.java (original)
+++ incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TobagoAnnotationVisitor.java Mon Feb 13 13:23:23 2006
@@ -20,7 +20,11 @@
import com.sun.mirror.declaration.Declaration;
import com.sun.mirror.declaration.MethodDeclaration;
import org.apache.commons.lang.ClassUtils;
-import org.apache.myfaces.tobago.apt.annotation.*;
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.BodyContent;
+import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
+import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -118,7 +122,6 @@
addDescription(d, attribute, document);
tagElement.appendChild(attribute);
- // TODO add description
} else {
throw new IllegalArgumentException("Only setter allowed found: " + simpleName);
}
Modified: incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/annotation/BodyContent.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/annotation/BodyContent.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/annotation/BodyContent.java (original)
+++ incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/annotation/BodyContent.java Mon Feb 13 13:23:23 2006
@@ -30,7 +30,8 @@
case JSP: return "JSP";
case EMPTY: return "empty";
case TAGDEPENDENT: return "tagdependent";
+ default:
+ throw new IllegalStateException("Unexpected BodyContent "+name());
}
- throw new IllegalStateException("Unexpected BodyContent "+name());
}
}
Modified: incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/annotation/UIComponentTagAttribute.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/annotation/UIComponentTagAttribute.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/annotation/UIComponentTagAttribute.java (original)
+++ incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/annotation/UIComponentTagAttribute.java Mon Feb 13 13:23:23 2006
@@ -34,6 +34,8 @@
/** type of attribute in the UIComponent */
String[] type() default {"java.lang.String"};
+ String[] allowedValues() default { };
+
/** allow faces expression language, e.g. #{bean} */
DynamicExpression expression() default DynamicExpression.VALUE_BINDING;
Modified: incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/ant/compiler/AptCompilerAdapter.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/ant/compiler/AptCompilerAdapter.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/ant/compiler/AptCompilerAdapter.java (original)
+++ incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/ant/compiler/AptCompilerAdapter.java Mon Feb 13 13:23:23 2006
@@ -117,8 +117,8 @@
Object compiler = c.newInstance();
Method compile = c.getMethod(APT_METHOD_NAME,
new Class[]{(new String[]{}).getClass()});
- int result = ((Integer) compile.invoke
- (compiler, new Object[]{cmd.getArguments()}))
+ int result = ((Integer) compile.invoke(compiler,
+ new Object[]{cmd.getArguments()}))
.intValue();
return (result == APT_COMPILER_SUCCESS);
} catch (BuildException be) {