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