001 package org.apache.myfaces.tobago.taglib.component; 002 003 /* 004 * Licensed to the Apache Software Foundation (ASF) under one or more 005 * contributor license agreements. See the NOTICE file distributed with 006 * this work for additional information regarding copyright ownership. 007 * The ASF licenses this file to You under the Apache License, Version 2.0 008 * (the "License"); you may not use this file except in compliance with 009 * the License. You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, 015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 016 * See the License for the specific language governing permissions and 017 * limitations under the License. 018 */ 019 020 import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription; 021 import org.apache.myfaces.tobago.apt.annotation.DynamicExpression; 022 import org.apache.myfaces.tobago.apt.annotation.Tag; 023 import org.apache.myfaces.tobago.apt.annotation.TagAttribute; 024 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag; 025 import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute; 026 import org.apache.myfaces.tobago.apt.annotation.Facet; 027 import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered; 028 import org.apache.myfaces.tobago.component.UIData; 029 030 /* 031 * Date: 08.04.2006 032 * Time: 15:30:50 033 */ 034 035 /** 036 * Render a sheet element. 037 */ 038 @Tag(name = "sheet") 039 @BodyContentDescription(anyTagOf = "<tc:column>* <tc:columnSelector>?") 040 @UIComponentTag( 041 uiComponent = "org.apache.myfaces.tobago.component.UIData", 042 rendererType = "Sheet", 043 facets = {@Facet(name = "reload", description = "Contains an instance of UIReload")}) 044 045 public interface SheetTagDeclaration extends TobagoTagDeclaration, HasIdBindingAndRendered { 046 /** 047 * LayoutConstraints for column layout. 048 * Semicolon separated list of layout tokens ('<x>*', '<x>px' or '<x>%'). 049 */ 050 @TagAttribute 051 @UIComponentTagAttribute() 052 void setColumns(String columns); 053 054 /** 055 * Flag indicating the header should be rendered. 056 */ 057 @TagAttribute 058 @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "true") 059 void setShowHeader(String showHeader); 060 061 /** 062 * Please use "rows" instead. 063 * The number of rows to display, starting with the one identified by the 064 * "pageingStart" property. 065 */ 066 @TagAttribute 067 @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "100") 068 @Deprecated 069 void setPagingLength(String pagingLength); 070 071 /** 072 * The number of rows to display, starting with the one identified by the 073 * "pageingStart/first" property. 074 */ 075 @TagAttribute 076 @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "100") 077 void setRows(String pagingLength); 078 079 /** 080 * Please use "first" instead. 081 * Zero-relative row number of the first row to be displayed. 082 */ 083 @TagAttribute 084 @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "0") 085 @Deprecated 086 void setPagingStart(String pagingStart); 087 088 /** 089 * Zero-relative row number of the first row to be displayed. 090 */ 091 @TagAttribute 092 @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "0") 093 void setFirst(String pagingStart); 094 095 /** 096 * The sheet's data. 097 */ 098 @TagAttribute 099 @UIComponentTagAttribute(type = {"java.lang.Object[]", "java.util.List", "javax.servlet.jsp.jstl.sql.Result", 100 "java.sql.ResultSet", "java.lang.Object", "javax.faces.model.DataModel"}) 101 void setValue(String value); 102 103 /** 104 * Name of a request-scope attribute under which the model data for the row 105 * selected by the current value of the "rowIndex" property 106 * (i.e. also the current value of the "rowData" property) will be exposed. 107 */ 108 @TagAttribute(required = true) 109 @UIComponentTagAttribute() 110 void setVar(String var); 111 112 /** 113 * The count of rendered direct paging links in the sheet's footer.<br /> 114 * The <strong>default</strong> is 9. 115 */ 116 @TagAttribute 117 @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "9") 118 void setDirectLinkCount(String directLinkCount); 119 120 /** 121 * Flag indicating whether or not this sheet should reserve space for 122 * vertical toolbar when calculating column width's.<br /> 123 * Possible values are: <pre> 124 * 'auto' : sheet try to estimate the need of scrollbar, 125 * this is the default. 126 * 'true' : space for scroolbar is reserved. 127 * 'false' : no space is reserved. 128 * </pre> 129 */ 130 @TagAttribute 131 @UIComponentTagAttribute(defaultValue = "auto", 132 allowedValues = {"auto", "true", "false"}) 133 void setForceVerticalScrollbar(String forceVerticalScrollbar); 134 135 /** 136 * Flag indicating whether or not a range of direct paging links should be 137 * rendered in the sheet's footer.<br /> 138 * Valid values are <strong>left</strong>, <strong>center</strong>, 139 * <strong>right</strong> and <strong>none</strong>. 140 * The <strong>default</strong> is <code>none</code>. 141 */ 142 @TagAttribute 143 @UIComponentTagAttribute(defaultValue = "none", 144 allowedValues = {"left", "center", "right", "none"}) 145 void setShowDirectLinks(String showDirectLinks); 146 147 /** 148 * Flag indicating whether and where the range pages should 149 * rendered in the sheet's footer. Rendering this range also offers the 150 * capability to enter the index displayed page directly.<br /> 151 * Valid values are <strong>left</strong>, <strong>center</strong>, 152 * <strong>right</strong> and <strong>none</strong>. 153 * The <strong>default</strong> is <code>none</code>. 154 */ 155 @TagAttribute 156 @UIComponentTagAttribute(defaultValue = "none", 157 allowedValues = {"left", "center", "right", "none"}) 158 void setShowPageRange(String showPageRange); 159 160 /** 161 * Flag indicating whether or not the range of displayed rows should 162 * rendered in the sheet's footer. Rendering this range also offers the 163 * capability to enter the index of the start row directly. <br /> 164 * Valid values are <strong>left</strong>, <strong>center</strong>, 165 * <strong>right</strong> and <strong>none</strong>. 166 * The <strong>default</strong> is <code>none</code>. 167 */ 168 @TagAttribute 169 @UIComponentTagAttribute(defaultValue = "none", 170 allowedValues = {"left", "center", "right", "none"}) 171 void setShowRowRange(String showRowRange); 172 173 /** 174 * Flag indicating whether or not the sheet should be selectable <br /> 175 * Valid values are <strong>none</strong>, <strong>single</strong>, 176 * and <strong>multi</strong>.<br /> 177 * The <strong>default</strong> is <code>multi</code>. 178 */ 179 @TagAttribute 180 @UIComponentTagAttribute(defaultValue = UIData.MULTI, 181 allowedValues = {UIData.NONE, UIData.SINGLE, UIData.MULTI}) 182 void setSelectable(String selectable); 183 184 /** 185 * Sheet state saving object. 186 */ 187 @TagAttribute 188 @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.model.SheetState") 189 void setState(String state); 190 191 /** 192 * Method binding representing a stateChangeListener method that will be 193 * notified when the state was changed by the user. 194 * The expression must evaluate to a public method that takes a 195 * SheetStateChangeEvent parameter, with a return type of void. 196 */ 197 @TagAttribute 198 @UIComponentTagAttribute(type = "javax.faces.el.MethodBinding", 199 expression = DynamicExpression.METHOD_BINDING) 200 void setStateChangeListener(String stateChangeListener); 201 202 /** 203 * Method binding representing an actionListener method that will be 204 * invoked when sorting was requested by the user. 205 * Use this if your application needs special handling for sorting columns. 206 * If this is not set and the sortable attribute column is set to true the sheet 207 * implementation will use a default sort method. 208 * The expression must evaluate to a public method which takes an 209 * ActionEvent as parameter and with a return type of void. 210 * The method will receive a {@link org.apache.myfaces.tobago.event.SortActionEvent}. 211 * The method should sort according to the sortColumnId and direction getting from 212 * the sheet's {@link org.apache.myfaces.tobago.model.SheetState} object. 213 */ 214 @TagAttribute 215 @UIComponentTagAttribute(type = "javax.faces.el.MethodBinding", 216 expression = DynamicExpression.METHOD_BINDING) 217 void setSortActionListener(String sortActionListener); 218 219 }