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 static org.apache.myfaces.tobago.TobagoConstants.ATTR_ALIGN; 021 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SORTABLE; 022 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TIP; 023 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_WIDTH; 024 import org.apache.myfaces.tobago.component.ComponentUtil; 025 import org.apache.myfaces.tobago.component.UIColumn; 026 027 import javax.faces.component.UIComponent; 028 029 030 public class ColumnTag extends TobagoTag 031 implements ColumnTagDeclaration { 032 033 private String sortable; 034 private String align; 035 private String markup; 036 private String tip; 037 private String width; 038 039 public String getComponentType() { 040 return UIColumn.COMPONENT_TYPE; 041 } 042 043 public String getRendererType() { 044 return null; 045 } 046 047 public void release() { 048 super.release(); 049 sortable = null; 050 align = null; 051 markup = null; 052 tip = null; 053 width = null; 054 } 055 056 protected void setProperties(UIComponent component) { 057 super.setProperties(component); 058 ComponentUtil.setBooleanProperty(component, ATTR_SORTABLE, sortable); 059 ComponentUtil.setStringProperty(component, ATTR_ALIGN, align); 060 ComponentUtil.setMarkup(component, markup); 061 ComponentUtil.setStringProperty(component, ATTR_TIP, tip); 062 ComponentUtil.setStringProperty(component, ATTR_WIDTH, width); 063 } 064 065 public void setMarkup(String markup) { 066 this.markup = markup; 067 } 068 069 public String getAlign() { 070 return align; 071 } 072 073 public void setAlign(String align) { 074 this.align = align; 075 } 076 077 public String getSortable() { 078 return sortable; 079 } 080 081 public void setSortable(String sortable) { 082 this.sortable = sortable; 083 } 084 085 public void setTip(String tip) { 086 this.tip = tip; 087 } 088 089 public void setWidth(String width) { 090 this.width = width; 091 } 092 }