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