001/* 002 * (C) Copyright 2006-2007 Nuxeo SAS <http://nuxeo.com> and others 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 * 009 * Contributors: 010 * Jean-Marc Orliaguet, Chalmers 011 * 012 * $Id$ 013 */ 014 015package org.nuxeo.theme.jsf.taglib; 016 017import javax.faces.component.UIComponent; 018import javax.faces.webapp.UIComponentELTag; 019 020public class TabsTag extends UIComponentELTag { 021 private String identifier; 022 023 private String styleClass; 024 025 private String controlledBy; 026 027 @Override 028 public String getComponentType() { 029 return "nxthemes.tabs"; 030 } 031 032 @Override 033 public String getRendererType() { 034 return null; 035 } 036 037 @Override 038 protected void setProperties(UIComponent component) { 039 super.setProperties(component); 040 041 component.getAttributes().put("identifier", identifier); 042 043 if (styleClass != null) { 044 component.getAttributes().put("styleClass", styleClass); 045 } 046 047 // the perspective controller(s) 048 if (controlledBy != null) { 049 component.getAttributes().put("controlledBy", controlledBy); 050 } 051 } 052 053 @Override 054 public void release() { 055 super.release(); 056 identifier = null; 057 styleClass = null; 058 controlledBy = null; 059 } 060 061 public String getIdentifier() { 062 return identifier; 063 } 064 065 public void setIdentifier(String identifier) { 066 this.identifier = identifier; 067 } 068 069 public String getStyleClass() { 070 return styleClass; 071 } 072 073 public void setStyleClass(String styleClass) { 074 this.styleClass = styleClass; 075 } 076 077 public String getControlledBy() { 078 return controlledBy; 079 } 080 081 public void setControlledBy(String controlledBy) { 082 this.controlledBy = controlledBy; 083 } 084 085}