📄 tag.xdt
字号:
/* * Generated by XDoclet - do not edit! */ /* * 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.wap.taglib;import org.apache.myfaces.wap.component.<XDtClass:className/>;import javax.faces.el.ValueBinding;import javax.faces.component.UIComponent;import javax.faces.context.FacesContext;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;/** * Generated tag class. */public class <XDtClass:className/>Tag extends <XDtWapFaces:tagBaseClass/> { private static Log log = LogFactory.getLog(<XDtClass:className/>Tag.class); /* properties */ <XDtField:forAllFields> <XDtWapFaces:ifIsNotAttributeAbstract> private String <XDtField:fieldName/> = null; </XDtWapFaces:ifIsNotAttributeAbstract> </XDtField:forAllFields> // ----------------------------------------------------- Own methods // ----------------------------------------------------- Constructor public <XDtClass:className/>Tag() { super(); log.debug("created object <XDtClass:className/>"); } public String getComponentType() { log.debug("getComponentType(): <XDtClass:className/>"); return("<XDtClass:className/>"); } public String getRendererType() { log.debug("getRenderType(): <XDtWapFaces:rendererType/>"); return("<XDtWapFaces:rendererType/>"); } public void release() { super.release(); log.debug("release()"); <XDtField:forAllFields> <XDtWapFaces:ifIsNotAttributeAbstract> this.<XDtField:fieldName/> = null; </XDtWapFaces:ifIsNotAttributeAbstract> </XDtField:forAllFields> } protected void setProperties(UIComponent component) { super.setProperties(component); log.debug("setProperties()"); <XDtClass:className/> comp = (<XDtClass:className/>)component; <XDtField:forAllFields> <XDtWapFaces:ifIsNotAttributeAbstract> if (<XDtField:fieldName/> != null) { if (isValueReference(<XDtField:fieldName/>)) { ValueBinding vb = FacesContext.getCurrentInstance().getApplication().createValueBinding(<XDtField:fieldName/>); comp.setValueBinding("<XDtField:fieldName/>", vb); } else { <XDtWapFaces:ifIsAttributePrimitive> <XDtField:fieldType/> _<XDtField:fieldName/> = new <XDtWapFaces:classForType/>(<XDtField:fieldName/>).<XDtField:fieldType/>Value(); comp.<XDtWapFaces:setterMethodName/>(_<XDtField:fieldName/>); </XDtWapFaces:ifIsAttributePrimitive> <XDtWapFaces:ifIsNotAttributePrimitive> comp.<XDtWapFaces:setterMethodName/>(<XDtField:fieldName/>); </XDtWapFaces:ifIsNotAttributePrimitive> } } </XDtWapFaces:ifIsNotAttributeAbstract> </XDtField:forAllFields> } // ----------------------------------------------------- Getters and Setters <XDtField:forAllFields> <XDtWapFaces:ifIsNotAttributeAbstract> /** * Getter for property <XDtField:fieldName/>. * @return value of property <XDtField:fieldName/>. */ public String get<XDtWapFaces:firstLetterToUpperCaseAttributeName/>() { return <XDtField:fieldName/>; } /** * Setter for property <XDtField:fieldName/>. * @param <XDtField:fieldName/> new value of property <XDtField:fieldName/>. */ public void <XDtWapFaces:setterMethodName/>(String <XDtField:fieldName/>) { this.<XDtField:fieldName/> = <XDtField:fieldName/>; } </XDtWapFaces:ifIsNotAttributeAbstract> </XDtField:forAllFields> }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -