📄 htmlpaneltab.java
字号:
/* * Copyright 2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.apache.myfaces.custom.tabbedpane;import javax.faces.component.html.HtmlPanelGroup;import javax.faces.context.FacesContext;import javax.faces.el.ValueBinding;import org.apache.myfaces.component.UserRoleUtils;/** * @author Manfred Geiler (latest modification by $Author: oros $) * @version $Revision: 1.4 $ $Date: 2004/11/26 14:29:12 $ */public class HtmlPanelTab extends HtmlPanelGroup{ //private static final Log log = LogFactory.getLog(HtmlPanelTab.class); //------------------ GENERATED CODE BEGIN (do not modify!) -------------------- public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlPanelTab"; public static final String COMPONENT_FAMILY = "javax.faces.Panel"; private static final String DEFAULT_RENDERER_TYPE = "javax.faces.Group"; private String _label = null; public HtmlPanelTab() { setRendererType(DEFAULT_RENDERER_TYPE); } public String getFamily() { return COMPONENT_FAMILY; } public void setLabel(String label) { _label = label; } public String getLabel() { if (_label != null) return _label; ValueBinding vb = getValueBinding("label"); return vb != null ? (String)vb.getValue(getFacesContext()) : null; } public Object saveState(FacesContext context) { Object values[] = new Object[2]; values[0] = super.saveState(context); values[1] = _label; return ((Object) (values)); } public void restoreState(FacesContext context, Object state) { Object values[] = (Object[])state; super.restoreState(context, values[0]); _label = (String)values[1]; } //------------------ GENERATED CODE END --------------------------------------- public boolean isRendered() { if (!UserRoleUtils.isVisibleOnUserRole(this)) { return false; } return super.isRendered(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -