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/04/08 16:47:45 UTC

svn commit: r392537 - in /incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago: component/ taglib/component/

Author: bommel
Date: Sat Apr  8 07:47:42 2006
New Revision: 392537

URL: http://svn.apache.org/viewcvs?rev=392537&view=rev
Log:
next step facelets

Added:
    incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTagDeclaration.java
    incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TabGroupTagDeclaration.java
    incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeListboxTagDeclaration.java
Modified:
    incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIData.java
    incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UITreeListbox.java
    incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTag.java
    incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TabGroupTag.java
    incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TabTagDeclaration.java
    incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeListboxTag.java

Modified: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIData.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIData.java?rev=392537&r1=392536&r2=392537&view=diff
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIData.java (original)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIData.java Sat Apr  8 07:47:42 2006
@@ -26,6 +26,10 @@
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STATE;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_WIDTH_LIST_STRING;
 import static org.apache.myfaces.tobago.TobagoConstants.RENDERER_TYPE_OUT;
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DIRECT_LINK_COUNT;
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SHOW_DIRECT_LINKS;
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SHOW_PAGE_RANGE;
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SHOW_ROW_RANGE;
 import org.apache.myfaces.tobago.ajax.api.AjaxComponent;
 import org.apache.myfaces.tobago.ajax.api.AjaxPhaseListener;
 import org.apache.myfaces.tobago.ajax.api.AjaxUtils;
@@ -64,17 +68,18 @@
   public static final String FACET_SORTER = "sorter";
   public static final String SORTER_ID = "sorter";
 
-  private MethodBinding stateChangeListener;
+  public static final String NONE = "none";
+  public static final int DEFAULT_DIRECT_LINK_COUNT = 9;
 
+  private MethodBinding stateChangeListener;
   private List<Integer> widthList;
-
   private MethodBinding sortActionListener;
-
   private SheetState sheetState;
-
-  private boolean showHeader = true;
-  private boolean showHeaderSet = false;
-
+  private Boolean showHeader;
+  private String showRowRange;
+  private String showPageRange;
+  private String showDirectLinks;
+  private Integer directLinkCount;
 
   public void encodeBegin(FacesContext facesContext) throws IOException {
     UILayout.prepareDimension(facesContext, this);
@@ -91,6 +96,70 @@
     super.encodeEnd(facesContext);
   }
 
+  public String getShowRowRange() {
+    if (showRowRange != null) {
+      return showRowRange;
+    }
+    ValueBinding vb = getValueBinding(ATTR_SHOW_ROW_RANGE);
+    if (vb != null) {
+      return (String) vb.getValue(getFacesContext());
+    } else {
+      return NONE;
+    }
+  }
+
+  public void setShowRowRange(String showRowRange) {
+    this.showRowRange = showRowRange;
+  }
+
+  public String getShowPageRange() {
+    if (showPageRange != null) {
+      return showPageRange;
+    }
+    ValueBinding vb = getValueBinding(ATTR_SHOW_PAGE_RANGE);
+    if (vb != null) {
+      return (String) vb.getValue(getFacesContext());
+    } else {
+      return NONE;
+    }
+  }
+
+  public void setShowPageRange(String showPageRange) {
+    this.showPageRange = showPageRange;
+  }
+
+  public String getShowDirectLinks() {
+    if (showDirectLinks != null) {
+      return showDirectLinks;
+    }
+    ValueBinding vb = getValueBinding(ATTR_SHOW_DIRECT_LINKS);
+    if (vb != null) {
+      return (String) vb.getValue(getFacesContext());
+    } else {
+      return NONE;
+    }
+  }
+
+  public void setShowDirectLinks(String showDirectLinks) {
+    this.showDirectLinks = showDirectLinks;
+  }
+
+  public Integer getDirectLinkCount() {
+    if (directLinkCount != null) {
+      return directLinkCount;
+    }
+    ValueBinding vb = getValueBinding(ATTR_DIRECT_LINK_COUNT);
+    if (vb != null) {
+      return (Integer) vb.getValue(getFacesContext());
+    } else {
+      return DEFAULT_DIRECT_LINK_COUNT;
+    }
+  }
+
+  public void setDirectLinkCount(Integer directLinkCount) {
+    this.directLinkCount = directLinkCount;
+  }
+
   private void setupState(FacesContext facesContext) {
     SheetState state = getSheetState(facesContext);
     ensureColumnWidthList(facesContext, state);
@@ -360,14 +429,16 @@
 
 
   public Object saveState(FacesContext context) {
-    Object[] saveState = new Object[5];
+    Object[] saveState = new Object[9];
     saveState[0] = super.saveState(context);
     saveState[1] = sheetState;
     saveState[2] = saveAttachedState(context, sortActionListener);
     saveState[3] = saveAttachedState(context, stateChangeListener);
-    if (showHeaderSet) {
-      saveState[4] = showHeader;
-    }
+    saveState[4] = showHeader;
+    saveState[5] = showRowRange;
+    saveState[6] = showPageRange;
+    saveState[7] = showDirectLinks;
+    saveState[8] = directLinkCount;
     return saveState;
   }
 
@@ -377,10 +448,12 @@
     sheetState = (SheetState) values[1];
     sortActionListener = (MethodBinding) restoreAttachedState(context, values[2]);
     stateChangeListener = (MethodBinding) restoreAttachedState(context, values[3]);
-    if (values[4] != null) {
-      showHeaderSet = true;
-      showHeader = (Boolean) values[4];
-    }
+    showHeader = (Boolean) values[4];
+    showRowRange = (String) values[5];
+    showPageRange = (String) values[6];
+    showDirectLinks = (String) values[7];
+    directLinkCount = (Integer) values[8];
+
   }
 
 
@@ -493,20 +566,19 @@
   }
 
   public boolean isShowHeader() {
-    if (showHeaderSet) {
+    if (showHeader != null) {
         return showHeader;
     }
     ValueBinding vb = getValueBinding(ATTR_SHOW_HEADER);
     if (vb != null) {
         return (!Boolean.FALSE.equals(vb.getValue(getFacesContext())));
     } else {
-        return showHeader;
+        return showHeader == null || showHeader;
     }
   }
 
   public void setShowHeader(boolean showHeader) {
     this.showHeader = showHeader;
-    this.showHeaderSet = true;
   }
 
   public void encodeAjax(FacesContext facesContext) throws IOException {    

Modified: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UITreeListbox.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UITreeListbox.java?rev=392537&r1=392536&r2=392537&view=diff
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UITreeListbox.java (original)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UITreeListbox.java Sat Apr  8 07:47:42 2006
@@ -83,6 +83,8 @@
     if ("single".equals(selectable)
         || "singleLeafOnly".equals(selectable)
         || "siblingLeafOnly".equals(selectable)) {
+    } else if (selectable == null) {
+      attributes.put(ATTR_SELECTABLE, "single");
     } else {
       // fix to single
       LOG.warn("Illegal attributeValue selectable : " + selectable + " set to 'single'");

Modified: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTag.java?rev=392537&r1=392536&r2=392537&view=diff
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTag.java (original)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTag.java Sat Apr  8 07:47:42 2006
@@ -20,7 +20,6 @@
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DIRECT_LINK_COUNT;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_FIRST;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_FORCE_VERTICAL_SCROLLBAR;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_INNER_WIDTH;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ROWS;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SHOW_DIRECT_LINKS;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SHOW_HEADER;
@@ -31,20 +30,13 @@
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_VAR;
 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.apt.annotation.UIComponentTag;
 import org.apache.myfaces.tobago.component.ComponentUtil;
 import org.apache.myfaces.tobago.component.UIData;
-import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
-
 import javax.faces.component.UIComponent;
 
-/**
- * Render a sheet element.
- */
-@Tag(name = "sheet")
-@BodyContentDescription(anyTagOf = "<tc:column>* <tc:columnSelector>?")
-public class SheetTag extends TobagoTag implements HasIdBindingAndRendered {
+
+public class SheetTag extends TobagoTag implements SheetTagDeclaration {
 
   private String var;
   private String showRowRange = "none";
@@ -52,8 +44,8 @@
   private String showDirectLinks = "none";
   private String directLinkCount = "9";
   private String showHeader;
-  private String pagingStart = "0";
-  private String pagingLength = "100";
+  private String first = "0";
+  private String rows = "100";
   private String columns;
   private String value;
   private String forceVerticalScrollbar;
@@ -74,8 +66,8 @@
     showDirectLinks = "none";
     directLinkCount = "9";
     showHeader = null;
-    pagingStart = "0";
-    pagingLength = "100";
+    first = "0";
+    rows = "100";
     columns = null;
     value = null;
     forceVerticalScrollbar = null;
@@ -87,37 +79,27 @@
   protected void setProperties(UIComponent component) {
     super.setProperties(component);
     UIData data = (UIData) component;
-
     ComponentUtil.setStringProperty(data, ATTR_SHOW_ROW_RANGE, showRowRange);
     ComponentUtil.setStringProperty(data, ATTR_SHOW_PAGE_RANGE, showPageRange);
     ComponentUtil.setStringProperty(data, ATTR_SHOW_DIRECT_LINKS, showDirectLinks);
     ComponentUtil.setIntegerProperty(data, ATTR_DIRECT_LINK_COUNT, directLinkCount);
     ComponentUtil.setBooleanProperty(data, ATTR_SHOW_HEADER, showHeader);
-    ComponentUtil.setIntegerProperty(data, ATTR_FIRST, pagingStart);
-    ComponentUtil.setIntegerProperty(data, ATTR_ROWS, pagingLength);
+    ComponentUtil.setIntegerProperty(data, ATTR_FIRST, first);
+    ComponentUtil.setIntegerProperty(data, ATTR_ROWS, rows);
     ComponentUtil.setStringProperty(data, ATTR_COLUMNS, columns);
     ComponentUtil.setStringProperty(data, ATTR_VALUE, value);
     ComponentUtil.setStringProperty(data, ATTR_FORCE_VERTICAL_SCROLLBAR, forceVerticalScrollbar);
-    // TODO: works this? or use that: data.setVar(var);
     ComponentUtil.setStringProperty(data, ATTR_VAR, var);
-    data.getAttributes().put(ATTR_INNER_WIDTH, new Integer(-1));
+    //data.getAttributes().put(ATTR_INNER_WIDTH, new Integer(-1));
     ComponentUtil.setValueBinding(component, ATTR_STATE, state);
     ComponentUtil.setStateChangeListener(data, stateChangeListener);
     ComponentUtil.setSortActionListener(data, sortActionListener);
-
   }
 
   public String getColumns() {
     return columns;
   }
 
-
-  /**
-   * LayoutConstraints for column layout.
-   * Semicolon separated list of layout tokens ('<x>*', '<x>px' or '<x>%').
-   */
-  @TagAttribute(required = true)
-  @UIComponentTagAttribute()
   public void setColumns(String columns) {
     this.columns = columns;
   }
@@ -126,56 +108,42 @@
     return showHeader;
   }
 
-  /**
-   * Flag indicating the header should rendered.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "true")
   public void setShowHeader(String showHeader) {
     this.showHeader = showHeader;
   }
 
   public String getPagingLength() {
-    return pagingLength;
+    return rows;
   }
 
-  /**
-   * The number of rows to display, starting with the one identified by the
-   * "pageingStart" property.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "100")
   public void setPagingLength(String pagingLength) {
-    this.pagingLength = pagingLength;
+    this.rows = pagingLength;
+  }
+
+  public void setRows(String pagingLength) {
+    this.rows = pagingLength;
   }
 
   public String getPagingStart() {
-    return pagingStart;
+    return first;
   }
 
   public String getStateChangeListener() {
     return stateChangeListener;
   }
 
-  /**
-   * Zero-relative row number of the first row to be displayed.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "0")
   public void setPagingStart(String pagingStart) {
-    this.pagingStart = pagingStart;
+    this.first = pagingStart;
+  }
+
+  public void setFirst(String pagingStart) {
+    this.first = pagingStart;
   }
 
   public String getValue() {
     return value;
   }
 
-  /**
-   * The sheet's data.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(type = {"java.lang.Object[]", "java.util.List", "javax.servlet.jsp.jstl.sql.Result",
-      "java.sql.ResultSet", "java.lang.Object", "javax.faces.model.DataModel"})
   public void setValue(String value) {
     this.value = value;
   }
@@ -184,125 +152,38 @@
     return var;
   }
 
-  /**
-   * Name of a request-scope attribute under which the model data for the row
-   * selected by the current value of the "rowIndex" property
-   * (i.e. also the current value of the "rowData" property) will be exposed.
-   */
-  @TagAttribute(required = true)
-  @UIComponentTagAttribute()
   public void setVar(String var) {
     this.var = var;
   }
 
-  /**
-   * The count of rendered direct paging links in the sheet's footer.<br />
-   * The <strong>default</strong> is 9.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "9")
   public void setDirectLinkCount(String directLinkCount) {
     this.directLinkCount = directLinkCount;
   }
 
-  /**
-   * Flag indicating whether or not this sheet should reserve space for
-   * vertical toolbar when calculating column width's.<br>
-   * Possible values are: <pre>
-   *      'auto'  : sheet try to estimate the need of scrollbar,
-   *                this is the default.
-   *      'true'  : space for scroolbar is reserved.
-   *      'false' : no space is reserved.
-   *      </pre>
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(defaultValue = "auto")
   public void setForceVerticalScrollbar(String forceVerticalScrollbar) {
     this.forceVerticalScrollbar = forceVerticalScrollbar;
   }
 
-  /**
-   * Flag indicating whether or not a range of direct paging links should be
-   * rendered in the sheet's footer.<br />
-   * Valid values are <strong>left</strong>, <strong>center</strong>,
-   * <strong>right</strong> and <strong>none</strong>.
-   * The <strong>default</strong> is <code>none</code>.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(defaultValue = "none")
   public void setShowDirectLinks(String showDirectLinks) {
     this.showDirectLinks = showDirectLinks;
   }
 
-  /**
-   * Flag indicating whether and where the range pages should
-   * rendered in the sheet's footer. Rendering this range also offers the
-   * capability to enter the index displayed page directly.<br />
-   * Valid values are <strong>left</strong>, <strong>center</strong>,
-   * <strong>right</strong> and <strong>none</strong>.
-   * The <strong>default</strong> is <code>none</code>.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(defaultValue = "none")
   public void setShowPageRange(String showPageRange) {
     this.showPageRange = showPageRange;
   }
 
-
-  /**
-   * Flag indicating whether or not the range of displayed rows should
-   * rendered in the sheet's footer. Rendering this range also offers the
-   * capability to enter the index of the start row directly. <br />
-   * Valid values are <strong>left</strong>, <strong>center</strong>,
-   * <strong>right</strong> and <strong>none</strong>.
-   * The <strong>default</strong> is <code>none</code>.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(defaultValue = "none")
   public void setShowRowRange(String showRowRange) {
     this.showRowRange = showRowRange;
   }
 
-  /**
-   * Sheet state saving object.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.model.SheetState")
   public void setState(String state) {
     this.state = state;
   }
 
-  /**
-   * MethodBinding representing an stateChangeListener method that will be
-   * notified when the state was changed by the user.
-   * The expression must evaluate to a public method that takes an
-   * StateChangeEvent parameter, with a return type of void.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute()
   public void setStateChangeListener(String stateChangeListener) {
     this.stateChangeListener = stateChangeListener;
   }
 
-  /**
-   * MethodBinding representing an actionListener method that will be
-   * invoked when sorting was requested by the user.
-   * Use this if your application needs special handling for sorting columns.
-   * If this is not set and the sortable attribute column is set to true the sheet
-   * implementation will use a default sort method.
-   * The expression must evaluate to a public method that takes an
-   * ActionEvent parameter, with a return type of void.
-   * The method will recieve a SortActionEvent,
-   * The method should sort according to the sortColumnId and direction getting from
-   * the sheets SheetState object.*//*
-   * The expression must evaluate to a public method that takes an
-   * ActionEvent parameter, with a return type of void.
-   * The method will recieve a {@link SortActionEvent},
-   * The method should sort according to the sortColumnId and direction getting from
-   * the sheets {@link SheetState} object.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute()
   public void setSortActionListener(String sortActionListener) {
     this.sortActionListener = sortActionListener;
   }

Added: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTagDeclaration.java?rev=392537&view=auto
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTagDeclaration.java (added)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTagDeclaration.java Sat Apr  8 07:47:42 2006
@@ -0,0 +1,207 @@
+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.taglib.decl.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+
+/*
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 08.04.2006
+ * Time: 15:30:50
+ * To change this template use File | Settings | File Templates.
+ */
+
+/**
+ * Render a sheet element.
+ */
+@Tag(name = "sheet")
+@BodyContentDescription(anyTagOf = "<tc:column>* <tc:columnSelector>?")
+@UIComponentTag(
+    uiComponent = "org.apache.myfaces.tobago.component.UISheet",
+    rendererType = "Sheet")
+
+public interface SheetTagDeclaration extends TobagoTagDeclaration, HasIdBindingAndRendered {
+  /**
+   * LayoutConstraints for column layout.
+   * Semicolon separated list of layout tokens ('<x>*', '<x>px' or '<x>%').
+   */
+  @TagAttribute(required = true)
+  @UIComponentTagAttribute()
+  void setColumns(String columns);
+
+  /**
+   * Flag indicating the header should rendered.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "true")
+  void setShowHeader(String showHeader);
+
+  /**
+   * The number of rows to display, starting with the one identified by the
+   * "pageingStart" property.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "100")
+  @Deprecated
+  void setPagingLength(String pagingLength);
+
+  /**
+   * The number of rows to display, starting with the one identified by the
+   * "pageingStart/first" property.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "100")
+  void setRows(String pagingLength);
+
+  /**
+   * Zero-relative row number of the first row to be displayed.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "0")
+  @Deprecated
+  void setPagingStart(String pagingStart);
+
+  /**
+   * Zero-relative row number of the first row to be displayed.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "0")
+  void setFirst(String pagingStart);
+
+  /**
+   * The sheet's data.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(type = {"java.lang.Object[]", "java.util.List", "javax.servlet.jsp.jstl.sql.Result",
+      "java.sql.ResultSet", "java.lang.Object", "javax.faces.model.DataModel"})
+  void setValue(String value);
+
+  /**
+   * Name of a request-scope attribute under which the model data for the row
+   * selected by the current value of the "rowIndex" property
+   * (i.e. also the current value of the "rowData" property) will be exposed.
+   */
+  @TagAttribute(required = true)
+  @UIComponentTagAttribute()
+  void setVar(String var);
+
+  /**
+   * The count of rendered direct paging links in the sheet's footer.<br />
+   * The <strong>default</strong> is 9.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "9")
+  void setDirectLinkCount(String directLinkCount);
+
+  /**
+   * Flag indicating whether or not this sheet should reserve space for
+   * vertical toolbar when calculating column width's.<br>
+   * Possible values are: <pre>
+   *      'auto'  : sheet try to estimate the need of scrollbar,
+   *                this is the default.
+   *      'true'  : space for scroolbar is reserved.
+   *      'false' : no space is reserved.
+   *      </pre>
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(defaultValue = "auto",
+      allowedValues = {"auto", "true", "false"})
+  void setForceVerticalScrollbar(String forceVerticalScrollbar);
+
+  /**
+   * Flag indicating whether or not a range of direct paging links should be
+   * rendered in the sheet's footer.<br />
+   * Valid values are <strong>left</strong>, <strong>center</strong>,
+   * <strong>right</strong> and <strong>none</strong>.
+   * The <strong>default</strong> is <code>none</code>.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(defaultValue = "none",
+      allowedValues = {"left", "center", "right", "none"})
+  void setShowDirectLinks(String showDirectLinks);
+
+  /**
+   * Flag indicating whether and where the range pages should
+   * rendered in the sheet's footer. Rendering this range also offers the
+   * capability to enter the index displayed page directly.<br />
+   * Valid values are <strong>left</strong>, <strong>center</strong>,
+   * <strong>right</strong> and <strong>none</strong>.
+   * The <strong>default</strong> is <code>none</code>.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(defaultValue = "none",
+      allowedValues = {"left", "center", "right", "none"})
+  void setShowPageRange(String showPageRange);
+
+  /**
+   * Flag indicating whether or not the range of displayed rows should
+   * rendered in the sheet's footer. Rendering this range also offers the
+   * capability to enter the index of the start row directly. <br />
+   * Valid values are <strong>left</strong>, <strong>center</strong>,
+   * <strong>right</strong> and <strong>none</strong>.
+   * The <strong>default</strong> is <code>none</code>.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(defaultValue = "none",
+      allowedValues = {"left", "center", "right", "none"})
+  void setShowRowRange(String showRowRange);
+
+  /**
+   * Sheet state saving object.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.model.SheetState")
+  void setState(String state);
+
+  /**
+   * MethodBinding representing an stateChangeListener method that will be
+   * notified when the state was changed by the user.
+   * The expression must evaluate to a public method that takes an
+   * StateChangeEvent parameter, with a return type of void.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute()
+  void setStateChangeListener(String stateChangeListener);
+
+  /**
+   * MethodBinding representing an actionListener method that will be
+   * invoked when sorting was requested by the user.
+   * Use this if your application needs special handling for sorting columns.
+   * If this is not set and the sortable attribute column is set to true the sheet
+   * implementation will use a default sort method.
+   * The expression must evaluate to a public method that takes an
+   * ActionEvent parameter, with a return type of void.
+   * The method will recieve a SortActionEvent,
+   * The method should sort according to the sortColumnId and direction getting from
+   * the sheets SheetState object.
+   * The expression must evaluate to a public method that takes an
+   * ActionEvent parameter, with a return type of void.
+   * The method will recieve a {@link org.apache.myfaces.tobago.event.SortActionEvent},
+   * The method should sort according to the sortColumnId and direction getting from
+   * the sheets {@link org.apache.myfaces.tobago.model.SheetState} object.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute()
+  void setSortActionListener(String sortActionListener);
+
+}

Modified: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TabGroupTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TabGroupTag.java?rev=392537&r1=392536&r2=392537&view=diff
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TabGroupTag.java (original)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TabGroupTag.java Sat Apr  8 07:47:42 2006
@@ -20,31 +20,15 @@
 import org.apache.commons.logging.LogFactory;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STATE;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SWITCH_TYPE;
-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;
 import org.apache.myfaces.tobago.component.ComponentUtil;
 import org.apache.myfaces.tobago.component.UITabGroup;
 import static org.apache.myfaces.tobago.component.UITabGroup.SWITCH_TYPE_CLIENT;
 import static org.apache.myfaces.tobago.component.UITabGroup.SWITCH_TYPE_RELOAD_PAGE;
-import org.apache.myfaces.tobago.taglib.decl.HasDeprecatedDimension;
-import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
-import org.apache.myfaces.tobago.taglib.decl.HasState;
 
 import javax.faces.component.UIComponent;
 
-/**
- * Renders a tabpanel.
- */
-@Tag(name = "tabGroup")
-@BodyContentDescription(anyTagOf = "(<tc:tab>* ")
-@UIComponentTag(
-    uiComponent = "org.apache.myfaces.tobago.component.UITabGroup",
-    rendererType = "TabGroupTag")
 public class TabGroupTag extends TobagoTag
-    implements HasIdBindingAndRendered, HasDeprecatedDimension, HasState {
+    implements TabGroupTagDeclaration {
 
   private static final Log LOG = LogFactory.getLog(TabGroupTag.class);
 
@@ -69,14 +53,6 @@
     state = null;
   }
 
-  /**
-   * Deprecated! Use 'switchType' instead.
-   * Flag indicating that tab switching is done by server request.
-   * @deprecated
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "false")
-  @Deprecated
   public void setServerside(String serverside) {
     LOG.warn("Attribute 'serverside' is deprecated! Use 'switchType' instead.");
     this.switchType = Boolean.valueOf(serverside)
@@ -87,16 +63,6 @@
     this.state = state;
   }
 
-  /**
-   * Flag indicating how tab switching should be done.
-   *
-   * Possible values are:
-   *   "client"     : Tab switching id done on client, no server Request. This is default.
-   *   "reloadPage" : Tab switching id done by server request. Full page is reloaded.
-   *   "reloadTab"  : Tab switching id done by server request. Only the Tab is reloaded.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(type = "java.lang.String", defaultValue = SWITCH_TYPE_CLIENT)
   public void setSwitchType(String switchType) {
     this.switchType = switchType;
   }

Added: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TabGroupTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TabGroupTagDeclaration.java?rev=392537&view=auto
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TabGroupTagDeclaration.java (added)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TabGroupTagDeclaration.java Sat Apr  8 07:47:42 2006
@@ -0,0 +1,69 @@
+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.taglib.decl.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.taglib.decl.HasDeprecatedDimension;
+import org.apache.myfaces.tobago.taglib.decl.HasState;
+import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.component.UITabGroup;
+
+/*
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 08.04.2006
+ * Time: 14:53:06
+ * To change this template use File | Settings | File Templates.
+ */
+
+/**
+ * Renders a tabpanel.
+ */
+@Tag(name = "tabGroup")
+@BodyContentDescription(anyTagOf = "(<tc:tab>* ")
+@UIComponentTag(
+    uiComponent = "org.apache.myfaces.tobago.component.UITabGroup",
+    rendererType = "TabGroup")
+
+public interface TabGroupTagDeclaration extends TobagoTagDeclaration, HasIdBindingAndRendered, HasDeprecatedDimension,
+    HasState {
+  /**
+   * Deprecated! Use 'switchType' instead.
+   * Flag indicating that tab switching is done by server request.
+   * @deprecated
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "false")
+  @Deprecated
+  void setServerside(String serverside);
+
+  /**
+   * Flag indicating how tab switching should be done.
+   *
+   * Possible values are:
+   *   "client"     : Tab switching id done on client, no server Request. This is default.
+   *   "reloadPage" : Tab switching id done by server request. Full page is reloaded.
+   *   "reloadTab"  : Tab switching id done by server request. Only the Tab is reloaded.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(type = "java.lang.String", defaultValue = UITabGroup.SWITCH_TYPE_CLIENT)
+  void setSwitchType(String switchType);
+}

Modified: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TabTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TabTagDeclaration.java?rev=392537&r1=392536&r2=392537&view=diff
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TabTagDeclaration.java (original)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TabTagDeclaration.java Sat Apr  8 07:47:42 2006
@@ -36,7 +36,7 @@
 @Tag(name = "tab")
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UIPanel",
-    rendererType = "TabGroupTag")
+    rendererType = "Tab")
 public interface TabTagDeclaration extends TobagoBodyTagDeclaration, HasIdBindingAndRendered, HasLabelAndAccessKey,
     HasTip {
 }

Modified: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeListboxTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeListboxTag.java?rev=392537&r1=392536&r2=392537&view=diff
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeListboxTag.java (original)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeListboxTag.java Sat Apr  8 07:47:42 2006
@@ -22,38 +22,19 @@
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SELECTABLE;
 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.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.UITreeListbox;
-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.UIComponent;
 
-/**
- * Renders a listbox view of a tree.
- */
-@Tag(name = "treeListbox")
-@BodyContentDescription(anyTagOf = "<f:facet>* <f:actionListener>?")
 public class TreeListboxTag extends TobagoTag
-    implements HasIdBindingAndRendered, HasTreeNodeValue, HasState,
-    HasIdReference, HasNameReference, IsRequired {
+    implements TreeListboxTagDeclaration {
 
   private String value;
   private String state;
-
   private String idReference;
   private String nameReference;
-
-  private String selectable = "single";
-
+  private String selectable;
   private String required;
 
   public String getComponentType() {
@@ -62,15 +43,12 @@
 
   protected void setProperties(UIComponent component) {
     super.setProperties(component);
-
     ComponentUtil.setStringProperty(component, ATTR_VALUE, value);
     ComponentUtil.setValueBinding(component, ATTR_STATE, state);
-
     ComponentUtil.setStringProperty(component, ATTR_ID_REFERENCE, idReference);
     ComponentUtil.setStringProperty(component, ATTR_NAME_REFERENCE, nameReference);
     ComponentUtil.setStringProperty(component, ATTR_SELECTABLE, selectable);
     ComponentUtil.setBooleanProperty(component, ATTR_REQUIRED, required);
-
   }
 
   public void release() {
@@ -79,7 +57,7 @@
     state = null;
     idReference = null;
     nameReference = null;
-    selectable = "single";
+    selectable = null;
     required = null;
   }
 
@@ -119,20 +97,6 @@
     return selectable;
   }
 
-
-  /**
-   * Flag indicating whether or not this component should be render selectable items.
-   * Possible values are:
-   * <ul>
-   * <li><strong>single</strong> : a singleselection tree is rendered
-   * <li><strong>singleLeafOnly</strong> : a singleselection tree is rendered,
-   * only Leaf's are selectable
-   * <li><strong>siblingLeafOnly</strong> : a multiselection tree is rendered,
-   * where only sibling Leaf's are selectable
-   * </ul>
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(defaultValue = "single")
   public void setSelectable(String selectable) {
     this.selectable = selectable;
   }

Added: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeListboxTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeListboxTagDeclaration.java?rev=392537&view=auto
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeListboxTagDeclaration.java (added)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeListboxTagDeclaration.java Sat Apr  8 07:47:42 2006
@@ -0,0 +1,65 @@
+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.taglib.decl.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.taglib.decl.HasTreeNodeValue;
+import org.apache.myfaces.tobago.taglib.decl.HasState;
+import org.apache.myfaces.tobago.taglib.decl.HasIdReference;
+import org.apache.myfaces.tobago.taglib.decl.HasNameReference;
+import org.apache.myfaces.tobago.taglib.decl.IsRequired;
+import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
+import org.apache.myfaces.tobago.apt.annotation.Preliminary;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+
+/*
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 06.04.2006
+ * Time: 22:32:57
+ * To change this template use File | Settings | File Templates.
+ */
+/**
+ * Renders a listbox view of a tree.
+ */
+@Tag(name = "treeListbox")
+@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.UITreeListbox",
+    rendererType = "TreeListbox")
+public interface TreeListboxTagDeclaration extends TobagoTagDeclaration, HasIdBindingAndRendered, HasTreeNodeValue,
+    HasState, HasIdReference, HasNameReference, IsRequired {
+  /**
+   * Flag indicating whether or not this component should be render selectable items.
+   * Possible values are:
+   * <ul>
+   * <li><strong>single</strong> : a singleselection tree is rendered
+   * <li><strong>singleLeafOnly</strong> : a singleselection tree is rendered,
+   * only Leaf's are selectable
+   * <li><strong>siblingLeafOnly</strong> : a multiselection tree is rendered,
+   * where only sibling Leaf's are selectable
+   * </ul>
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(defaultValue = "single", allowedValues = {"single", "singleLeafOnly", "siblingLeafOnly"})
+  void setSelectable(String selectable);
+}