ejtools-cvs Mailing List for EJTools (Page 93)
Brought to you by:
letiemble
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(471) |
May
(303) |
Jun
(176) |
Jul
(67) |
Aug
(64) |
Sep
(84) |
Oct
(148) |
Nov
(57) |
Dec
(272) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(356) |
Feb
(304) |
Mar
(214) |
Apr
(22) |
May
(7) |
Jun
(25) |
Jul
|
Aug
(5) |
Sep
(106) |
Oct
|
Nov
(95) |
Dec
(193) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2016 |
Jan
(2) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Laurent E. <let...@us...> - 2002-05-24 21:11:24
|
Update of /cvsroot/ejtools/build In directory usw-pr-cvs1:/tmp/cvs-serv28791 Removed Files: beaninfo.j Log Message: Move to xdoclet library (under development) --- beaninfo.j DELETED --- |
From: Laurent E. <let...@us...> - 2002-05-24 21:07:32
|
Update of /cvsroot/ejtools/libraries/taglib/src/resources In directory usw-pr-cvs1:/tmp/cvs-serv27680/taglib/src/resources Modified Files: ejtools.tld Log Message: Typo corrected Index: ejtools.tld =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/resources/ejtools.tld,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ejtools.tld 23 May 2002 21:27:21 -0000 1.1 --- ejtools.tld 24 May 2002 21:07:29 -0000 1.2 *************** *** 93,97 **** <tag> <name>treeRenderer</name> ! <tagclass>net.sourceforge.ejtools.servlet.http.jsp.tagexts.TreeRendererTag</tagclass> <bodycontent>empty</bodycontent> <info/> --- 93,97 ---- <tag> <name>treeRenderer</name> ! <tagclass>net.sourceforge.ejtools.servlet.http.jsp.tagext.TreeRendererTag</tagclass> <bodycontent>empty</bodycontent> <info/> |
From: Laurent E. <let...@us...> - 2002-05-24 21:07:09
|
Update of /cvsroot/ejtools/libraries/taglib/src/main/net/sourceforge/ejtools/servlet/http/jsp/tagext In directory usw-pr-cvs1:/tmp/cvs-serv27560/taglib/src/main/net/sourceforge/ejtools/servlet/http/jsp/tagext Modified Files: BeanContextTreeTag.java IndentedObject.java TreeRendererTag.java TreeSpacerTag.java Log Message: Pretty print of the code Index: BeanContextTreeTag.java =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/main/net/sourceforge/ejtools/servlet/http/jsp/tagext/BeanContextTreeTag.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BeanContextTreeTag.java 23 May 2002 21:27:21 -0000 1.1 --- BeanContextTreeTag.java 24 May 2002 21:07:06 -0000 1.2 *************** *** 232,235 **** return result; } - } --- 232,234 ---- Index: IndentedObject.java =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/main/net/sourceforge/ejtools/servlet/http/jsp/tagext/IndentedObject.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IndentedObject.java 23 May 2002 21:27:21 -0000 1.1 --- IndentedObject.java 24 May 2002 21:07:06 -0000 1.2 *************** *** 7,10 **** --- 7,11 ---- package net.sourceforge.ejtools.servlet.http.jsp.tagext; + /** * Description of the Class Index: TreeRendererTag.java =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/main/net/sourceforge/ejtools/servlet/http/jsp/tagext/TreeRendererTag.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TreeRendererTag.java 23 May 2002 21:27:21 -0000 1.1 --- TreeRendererTag.java 24 May 2002 21:07:06 -0000 1.2 *************** *** 1,174 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package net.sourceforge.ejtools.servlet.http.jsp.tagext; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @todo Javadoc to complete ! */ ! public class TreeRendererTag extends TagSupport ! { ! /** Description of the Field */ ! protected String className = null; ! /** Description of the Field */ ! protected String name = null; ! /** Description of the Field */ ! protected String property = null; ! /** Description of the Field */ ! protected String scope = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() throws JspException ! { ! String img = null; ! Object o = null; ! ! if (property != null) ! { ! o = RequestUtils.lookup(pageContext, name, property, scope); ! } ! else ! { ! o = RequestUtils.lookup(pageContext, name, scope); ! } ! ! if (o == null) ! { ! return (SKIP_BODY); ! } ! ! try ! { ! TreeRenderer renderer = (TreeRenderer) Class.forName(this.className).newInstance(); ! ! img = renderer.getIcon(o); ! } ! catch (Exception e) ! { ! img = null; ! } ! if (img == null) { ! img = ""; ! } ! ! ResponseUtils.write(pageContext, "<img src=\"" + img + "\"/>"); ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Gets the class attribute of the TreeRendererTag object ! * ! * @return The class value ! */ ! public String getRenderer() ! { ! return (this.className); ! } ! ! ! /** ! * Gets the name attribute of the TreeSpacerTag object ! * ! * @return The name value ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Gets the property attribute of the TreeRendererTag object ! * ! * @return The property value ! */ ! public String getProperty() ! { ! return (this.property); ! } ! ! ! /** ! * Gets the scope attribute of the TreeSpacerTag object ! * ! * @return The scope value ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! } ! ! ! /** ! * Sets the class attribute of the TreeRendererTag object ! * ! * @param className The new class value ! */ ! public void setRenderer(String className) ! { ! this.className = className; ! } ! ! ! /** ! * Sets the name attribute of the TreeSpacerTag object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the property attribute of the TreeRendererTag object ! * ! * @param property The new property value ! */ ! public void setProperty(String property) ! { ! this.property = property; ! } ! ! ! /** ! * Sets the scope attribute of the TreeSpacerTag object ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! } --- 1,175 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package net.sourceforge.ejtools.servlet.http.jsp.tagext; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @todo Javadoc to complete ! */ ! public class TreeRendererTag extends TagSupport ! { ! /** Description of the Field */ ! protected String className = null; ! /** Description of the Field */ ! protected String name = null; ! /** Description of the Field */ ! protected String property = null; ! /** Description of the Field */ ! protected String scope = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() throws JspException ! { ! String img = null; ! Object o = null; ! ! if (property != null) ! { ! o = RequestUtils.lookup(pageContext, name, property, scope); ! } ! else ! { ! o = RequestUtils.lookup(pageContext, name, scope); ! } ! ! if (o == null) ! { ! return (SKIP_BODY); ! } ! ! try ! { ! TreeRenderer renderer = (TreeRenderer) Class.forName(this.className).newInstance(); ! ! img = renderer.getIcon(o); ! } ! catch (Exception e) ! { ! img = null; ! } ! if (img == null) ! { ! img = ""; ! } ! ! ResponseUtils.write(pageContext, "<img src=\"" + img + "\"/>"); ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Gets the name attribute of the TreeSpacerTag object ! * ! * @return The name value ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Gets the property attribute of the TreeRendererTag object ! * ! * @return The property value ! */ ! public String getProperty() ! { ! return (this.property); ! } ! ! ! /** ! * Gets the class attribute of the TreeRendererTag object ! * ! * @return The class value ! */ ! public String getRenderer() ! { ! return (this.className); ! } ! ! ! /** ! * Gets the scope attribute of the TreeSpacerTag object ! * ! * @return The scope value ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! } ! ! ! /** ! * Sets the name attribute of the TreeSpacerTag object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the property attribute of the TreeRendererTag object ! * ! * @param property The new property value ! */ ! public void setProperty(String property) ! { ! this.property = property; ! } ! ! ! /** ! * Sets the class attribute of the TreeRendererTag object ! * ! * @param className The new class value ! */ ! public void setRenderer(String className) ! { ! this.className = className; ! } ! ! ! /** ! * Sets the scope attribute of the TreeSpacerTag object ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! } Index: TreeSpacerTag.java =================================================================== RCS file: /cvsroot/ejtools/libraries/taglib/src/main/net/sourceforge/ejtools/servlet/http/jsp/tagext/TreeSpacerTag.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TreeSpacerTag.java 23 May 2002 21:27:21 -0000 1.1 --- TreeSpacerTag.java 24 May 2002 21:07:06 -0000 1.2 *************** *** 1,185 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package net.sourceforge.ejtools.servlet.http.jsp.tagext; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @todo Javadoc to complete ! */ ! public class TreeSpacerTag extends TagSupport ! { ! /** Description of the Field */ ! protected String name = null; ! /** Description of the Field */ ! protected String property = null; ! /** Description of the Field */ ! protected String scope = null; ! /** Description of the Field */ ! protected String value = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() throws JspException ! { ! String img = null; ! String follow = getValue(); ! ! if (follow == null) ! { ! if (name == null) ! { ! return (SKIP_BODY); ! } ! if (property != null) ! { ! follow = (String) RequestUtils.lookup(pageContext, name, property, scope); ! } ! else ! { ! follow = (String) RequestUtils.lookup(pageContext, name, scope); ! } ! } ! ! if (follow.length() <= 0) ! { ! return (SKIP_BODY); ! } ! ! StringBuffer output = new StringBuffer(); ! ! for (int i = 0; i < follow.length(); i++) ! { ! if ("1".equals(follow.substring(i, i+1))) ! { ! img = "<img src=\"images/tree/line.gif\"/>"; ! } ! else ! { ! img = "<img src=\"images/tree/empty.gif\"/>"; ! } ! output.append(img); ! } ! ! ResponseUtils.write(pageContext, output.toString()); ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Gets the name attribute of the TreeSpacerTag object ! * ! * @return The name value ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Gets the property attribute of the TreeSpacerTag object ! * ! * @return The property value ! */ ! public String getProperty() ! { ! return (this.property); ! } ! ! ! /** ! * Gets the scope attribute of the TreeSpacerTag object ! * ! * @return The scope value ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** ! * Gets the follow attribute of the TreeSpacerTag object ! * ! * @return The follow value ! */ ! public String getValue() ! { ! return (this.value); ! } ! ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! value = null; ! } ! ! ! /** ! * Sets the name attribute of the TreeSpacerTag object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the property attribute of the TreeSpacerTag object ! * ! * @param property The new property value ! */ ! public void setProperty(String property) ! { ! this.property = property; ! } ! ! ! /** ! * Sets the scope attribute of the TreeSpacerTag object ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! ! ! /** ! * Sets the follow attribute of the TreeSpacerTag object ! * ! * @param value The new value value ! */ ! public void setValue(String value) ! { ! this.value = value; ! } ! ! } ! --- 1,185 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package net.sourceforge.ejtools.servlet.http.jsp.tagext; ! ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.apache.struts.util.RequestUtils; ! import org.apache.struts.util.ResponseUtils; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @todo Javadoc to complete ! */ ! public class TreeSpacerTag extends TagSupport ! { ! /** Description of the Field */ ! protected String name = null; ! /** Description of the Field */ ! protected String property = null; ! /** Description of the Field */ ! protected String scope = null; ! /** Description of the Field */ ! protected String value = null; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! * @exception JspException Description of the Exception ! */ ! public int doStartTag() throws JspException ! { ! String img = null; ! String follow = getValue(); ! ! if (follow == null) ! { ! if (name == null) ! { ! return (SKIP_BODY); ! } ! if (property != null) ! { ! follow = (String) RequestUtils.lookup(pageContext, name, property, scope); ! } ! else ! { ! follow = (String) RequestUtils.lookup(pageContext, name, scope); ! } ! } ! ! if (follow.length() <= 0) ! { ! return (SKIP_BODY); ! } ! ! StringBuffer output = new StringBuffer(); ! ! for (int i = 0; i < follow.length(); i++) ! { ! if ("1".equals(follow.substring(i, i + 1))) ! { ! img = "<img src=\"images/tree/line.gif\"/>"; ! } ! else ! { ! img = "<img src=\"images/tree/empty.gif\"/>"; ! } ! output.append(img); ! } ! ! ResponseUtils.write(pageContext, output.toString()); ! ! // Continue processing this page ! return (SKIP_BODY); ! } ! ! ! /** ! * Gets the name attribute of the TreeSpacerTag object ! * ! * @return The name value ! */ ! public String getName() ! { ! return (this.name); ! } ! ! ! /** ! * Gets the property attribute of the TreeSpacerTag object ! * ! * @return The property value ! */ ! public String getProperty() ! { ! return (this.property); ! } ! ! ! /** ! * Gets the scope attribute of the TreeSpacerTag object ! * ! * @return The scope value ! */ ! public String getScope() ! { ! return (this.scope); ! } ! ! ! /** ! * Gets the follow attribute of the TreeSpacerTag object ! * ! * @return The follow value ! */ ! public String getValue() ! { ! return (this.value); ! } ! ! ! ! /** Release all allocated resources. */ ! public void release() ! { ! super.release(); ! value = null; ! } ! ! ! /** ! * Sets the name attribute of the TreeSpacerTag object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the property attribute of the TreeSpacerTag object ! * ! * @param property The new property value ! */ ! public void setProperty(String property) ! { ! this.property = property; ! } ! ! ! /** ! * Sets the scope attribute of the TreeSpacerTag object ! * ! * @param scope The new scope value ! */ ! public void setScope(String scope) ! { ! this.scope = scope; ! } ! ! ! /** ! * Sets the follow attribute of the TreeSpacerTag object ! * ! * @param value The new value value ! */ ! public void setValue(String value) ! { ! this.value = value; ! } ! ! } ! |
From: Laurent E. <let...@us...> - 2002-05-24 21:05:45
|
Update of /cvsroot/ejtools/libraries/xdoclet In directory usw-pr-cvs1:/tmp/cvs-serv27052/xdoclet Added Files: module.properties Log Message: Initial import --- NEW FILE: module.properties --- # # Module Properties # # $Revision: 1.2 $ # version.major=1 version.minor=0 version.revision=0 version.tag=alpha module.name=xdoclet module.display.name=XDoclet module.archive.name=ejtools.xdoclet module.package=xdoclet module.javadoc.title=EJTools - XDoclet Extension |
From: Laurent E. <let...@us...> - 2002-05-24 21:05:45
|
Update of /cvsroot/ejtools/libraries/xdoclet/src/main/xdoclet/beans In directory usw-pr-cvs1:/tmp/cvs-serv27052/xdoclet/src/main/xdoclet/beans Added Files: BeanInfoSubTask.java I18NSubTask.java JavaBeanDocletTask.java Log Message: Initial import --- NEW FILE: BeanInfoSubTask.java --- package xdoclet.beans; import xdoclet.TemplateSubTask; import xdoclet.XDocletException; import xdoclet.template.TemplateException; import xdoclet.template.TemplateEngine; import xdoclet.util.Log; import xdoclet.util.Translator; import java.io.File; import java.io.IOException; import java.text.MessageFormat; import java.util.*; import org.apache.log4j.Category; public class BeanInfoSubTask extends TemplateSubTask { public final static String SUBTASK_NAME = "beaninfo"; private static String DEFAULT_TEMPLATE_FILE = "/xdoclet/beans/beaninfo.j"; private static String GENERATED_FILE_NAME = "{0}BeanInfo.java"; public BeanInfoSubTask() { setTemplateURL( getClass().getResource( DEFAULT_TEMPLATE_FILE ) ); setDestinationFile( GENERATED_FILE_NAME ); setHavingClassTag( "beaninfo:class" ); } public String getSubTaskName() { return SUBTASK_NAME; } protected void engineStarted() throws XDocletException { System.out.println( Translator.getString( "xdoclet.beans.Messages", "generating_beaninfo", new String[]{super.getCurrentClass().qualifiedName() + "BeanInfo.java"} ) ); } } --- NEW FILE: I18NSubTask.java --- package xdoclet.beans; import xdoclet.TemplateSubTask; import xdoclet.XDocletException; import xdoclet.template.TemplateException; import xdoclet.template.TemplateEngine; import xdoclet.util.Log; import xdoclet.util.Translator; import java.io.File; import java.io.IOException; import java.text.MessageFormat; import java.util.*; import org.apache.log4j.Category; public class I18NSubTask extends TemplateSubTask { public final static String SUBTASK_NAME = "i18n"; protected String locale; private static String DEFAULT_TEMPLATE_FILE = "/xdoclet/beans/i18n.j"; private static String GENERATED_FILE_NAME = "{0}BeanInfo"; private static String GENERATED_FILE_EXTENSION = ".properties"; public String getLocale() { return locale; } public void setLocale( String new_locale) { locale = new_locale; } public I18NSubTask() { setTemplateURL( getClass().getResource( DEFAULT_TEMPLATE_FILE ) ); setHavingClassTag( "beaninfo:class" ); } public String getSubTaskName() { return SUBTASK_NAME; } public void execute() throws XDocletException { if ((getLocale() == null) || ("".equals(getLocale()))) { setDestinationFile( GENERATED_FILE_NAME + GENERATED_FILE_EXTENSION ); } else { setDestinationFile( GENERATED_FILE_NAME + "_" + getLocale() + GENERATED_FILE_EXTENSION ); } startProcess(); } protected void engineStarted() throws XDocletException { if (locale == null) { System.out.println( Translator.getString( "xdoclet.beans.Messages", "generating_properties_default", new String[]{super.getCurrentClass().qualifiedName() + "BeanInfo"} ) ); } else { System.out.println( Translator.getString( "xdoclet.beans.Messages", "generating_properties", new String[]{super.getCurrentClass().qualifiedName() + "BeanInfo", getLocale()} ) ); } } } --- NEW FILE: JavaBeanDocletTask.java --- package xdoclet.beans; import xdoclet.DocletTask; import xdoclet.doc.info.InfoSubTask; import java.util.Vector; public class JavaBeanDocletTask extends DocletTask { protected Vector tasks = new Vector(); public JavaBeanDocletTask() { } public BeanInfoSubTask createBeanInfo() { BeanInfoSubTask beaninfo = new BeanInfoSubTask(); tasks.add(beaninfo); return beaninfo; } public I18NSubTask createI18N() { I18NSubTask i18n = new I18NSubTask(); tasks.add(i18n); return i18n; } protected Vector getSubTasks() { Vector subtasks = super.getSubTasks(); subtasks.addAll(tasks); return subtasks; } } |
From: Laurent E. <let...@us...> - 2002-05-24 21:05:45
|
Update of /cvsroot/ejtools/libraries/xdoclet/src/resources/xdoclet/beans In directory usw-pr-cvs1:/tmp/cvs-serv27052/xdoclet/src/resources/xdoclet/beans Added Files: Messages.properties beaninfo.j i18n.j Log Message: Initial import --- NEW FILE: Messages.properties --- # ResourceBundle properties file for general javabean doclet messages do_not_edit=Generated file - Do not edit! generating_beaninfo=Generating {0} source file generating_properties_default=Generating properties file {0} for Default Locale. generating_properties=Generating properties file {0} for Locale {1}. --- NEW FILE: beaninfo.j --- /* * <XDtI18n:getString bundle="xdoclet.beans.Messages" resource="do_not_edit"/> */ package <XDtPackage:packageOf><XDtClass:fullClassName/></XDtPackage:packageOf>; import java.awt.Image; import java.beans.BeanDescriptor; import java.beans.BeanInfo; import java.beans.Introspector; import java.beans.IntrospectionException; import java.beans.PropertyDescriptor; import java.beans.ParameterDescriptor; import java.beans.MethodDescriptor; import java.beans.SimpleBeanInfo; import java.lang.reflect.Method; import java.util.ResourceBundle; import java.util.Vector; /** * */ public class <XDtClass:classOf><XDtClass:fullClassName/></XDtClass:classOf>BeanInfo extends SimpleBeanInfo { /** Description of the Field */ protected BeanDescriptor bd = new BeanDescriptor(<XDtClass:fullClassName/>.class<XDtClass:ifHasClassTag tagName="beaninfo:class" paramName="customizer">, <XDtClass:classTagValue tagName="beaninfo:class" paramName="customizer"/>.class</XDtClass:ifHasClassTag>); /** Description of the Field */ protected Image iconMono16<XDtClass:ifHasClassTag tagName="beaninfo:icons" paramName="mono16"> = loadImage("<XDtClass:classTagValue tagName="beaninfo:icons" paramName="mono16"/>")</XDtClass:ifHasClassTag>; /** Description of the Field */ protected Image iconColor16<XDtClass:ifHasClassTag tagName="beaninfo:icons" paramName="color16"> = loadImage("<XDtClass:classTagValue tagName="beaninfo:icons" paramName="color16"/>")</XDtClass:ifHasClassTag>; /** Description of the Field */ protected Image iconMono32<XDtClass:ifHasClassTag tagName="beaninfo:icons" paramName="mono32"> = loadImage("<XDtClass:classTagValue tagName="beaninfo:icons" paramName="mono32"/>")</XDtClass:ifHasClassTag>; /** Description of the Field */ protected Image iconColor32<XDtClass:ifHasClassTag tagName="beaninfo:icons" paramName="color32"> = loadImage("<XDtClass:classTagValue tagName="beaninfo:icons" paramName="color32"/>")</XDtClass:ifHasClassTag>; /** Description of the Field */ private final static ResourceBundle res = ResourceBundle.getBundle("<XDtClass:fullClassName/>BeanInfo"); /** Constructor for the <XDtClass:classOf><XDtClass:fullClassName/></XDtClass:classOf>BeanInfo object */ public <XDtClass:classOf><XDtClass:fullClassName/></XDtClass:classOf>BeanInfo() { try { BeanInfo info = Introspector.getBeanInfo(getBeanDescriptor().getBeanClass().getSuperclass()); String order = info.getBeanDescriptor().getValue("propertyorder") == null ? "" : (String) info.getBeanDescriptor().getValue("propertyorder"); PropertyDescriptor[] pd = getPropertyDescriptors(); for (int i = 0; i != pd.length; i++) { if (order.indexOf(pd[i].getName()) == -1) { order = order + (order.length() == 0 ? "" : ":") + pd[i].getName(); } } getBeanDescriptor().setValue("propertyorder", order); } catch (Exception e) { // Ignore it } } /** * Gets the additionalBeanInfo attribute ... * * @return The additionalBeanInfo value */ public BeanInfo[] getAdditionalBeanInfo() { Vector bi = new Vector(); BeanInfo[] biarr = null; try { <XDtClass:ifHasClassTag tagName="beaninfo:class" paramName="stopClass"> for (Class cl = <XDtClass:fullClassName/>.class.getSuperclass(); !cl.equals(<XDtClass:classTagValue tagName="beaninfo:class" paramName="stopClass"/>.class.getSuperclass()); cl = cl.getSuperclass()) { bi.addElement(Introspector.getBeanInfo(cl)); } biarr = new BeanInfo[bi.size()]; bi.copyInto(biarr); </XDtClass:ifHasClassTag> } catch (Exception e) { // Ignore it } return biarr; } /** * Gets the beanDescriptor attribute ... * * @return The beanDescriptor value */ public BeanDescriptor getBeanDescriptor() { <XDtClass:ifHasClassTag tagName="beaninfo:class" paramName="name">bd.setName("<XDtClass:classTagValue tagName="beaninfo:class" paramName="name"/>");</XDtClass:ifHasClassTag> <XDtClass:ifHasClassTag tagName="beaninfo:class" paramName="displayName">bd.setDisplayName("<XDtClass:classTagValue tagName="beaninfo:class" paramName="displayName"/>");</XDtClass:ifHasClassTag> <XDtClass:ifHasClassTag tagName="beaninfo:class" paramName="shortDescription">bd.setShortDescription("<XDtClass:classTagValue tagName="beaninfo:class" paramName="shortDescription"/>");</XDtClass:ifHasClassTag> <XDtClass:ifHasClassTag tagName="beaninfo:class" paramName="expert">bd.setExpert(<XDtClass:classTagValue tagName="beaninfo:class" paramName="expert" values="true,false"/>);</XDtClass:ifHasClassTag> <XDtClass:ifHasClassTag tagName="beaninfo:class" paramName="hidden">bd.setHidden(<XDtClass:classTagValue tagName="beaninfo:class" paramName="hidden" values="true,false"/>);</XDtClass:ifHasClassTag> <XDtClass:ifHasClassTag tagName="beaninfo:class" paramName="preferred">bd.setPreferred(<XDtClass:classTagValue tagName="beaninfo:class" paramName="preferred" values="true,false"/>);</XDtClass:ifHasClassTag> <XDtClass:forAllClassTags tagName="beaninfo:attribute"> bd.setValue("<XDtClass:classTagValue tagName="beaninfo:attribute" paramName="name"/>","<XDtClass:classTagValue tagName="beaninfo:attribute" paramName="value"/>"); </XDtClass:forAllClassTags> return bd; } /** * Gets the defaultPropertyIndex attribute ... * * @return The defaultPropertyIndex value */ public int getDefaultPropertyIndex() { String defName = "<XDtClass:classTagValue tagName="beaninfo:class" paramName="defaultProperty" default=""/>"; if (defName.equals("")) { return -1; } PropertyDescriptor[] pd = getPropertyDescriptors(); for (int i = 0; i < pd.length; i++) { if (pd[i].getName().equals(defName)) { return i; } } return -1; } /** * Gets the icon attribute ... * * @param type Description of the Parameter * @return The icon value */ public Image getIcon(int type) { if (type == BeanInfo.ICON_COLOR_16x16) { return iconColor16; } if (type == BeanInfo.ICON_MONO_16x16) { return iconMono16; } if (type == BeanInfo.ICON_COLOR_32x32) { return iconColor32; } if (type == BeanInfo.ICON_MONO_32x32) { return iconMono32; } return null; } /** * Gets the propertyDescriptors attribute ... * * @return The propertyDescriptors value */ public PropertyDescriptor[] getPropertyDescriptors() { try { Vector descriptors = new Vector(); PropertyDescriptor descriptor = null; <XDtClass:forAllClassTags tagName="beaninfo:property"> try { descriptor = new PropertyDescriptor("<XDtClass:classTagValue tagName="beaninfo:property" paramName="name"/>",<XDtClass:fullClassName/>.class); <XDtClass:ifHasClassTag tagName="beaninfo:property" paramName="displayName">descriptor.setDisplayName("<XDtClass:classTagValue tagName="beaninfo:property" paramName="displayName"/>");</XDtClass:ifHasClassTag> <XDtClass:ifHasClassTag tagName="beaninfo:property" paramName="shortDescription">descriptor.setShortDescription("<XDtClass:classTagValue tagName="beaninfo:property" paramName="shortDescription"/>");</XDtClass:ifHasClassTag> <XDtClass:ifHasClassTag tagName="beaninfo:property" paramName="expert">descriptor.setExpert(<XDtClass:classTagValue tagName="beaninfo:property" paramName="expert" values="true,false"/>);</XDtClass:ifHasClassTag> <XDtClass:ifHasClassTag tagName="beaninfo:property" paramName="hidden">descriptor.setHidden(<XDtClass:classTagValue tagName="beaninfo:property" paramName="hidden" values="true,false"/>);</XDtClass:ifHasClassTag> <XDtClass:ifHasClassTag tagName="beaninfo:property" paramName="preferred">descriptor.setPreferred(<XDtClass:classTagValue tagName="beaninfo:property" paramName="preferred" values="true,false"/>);</XDtClass:ifHasClassTag> <XDtClass:ifHasClassTag tagName="beaninfo:property" paramName="bound">descriptor.setBound("<XDtClass:classTagValue tagName="beaninfo:property" paramName="bound" values="true,false"/>");</XDtClass:ifHasClassTag> <XDtClass:ifHasClassTag tagName="beaninfo:property" paramName="constrained">descriptor.setConstrained("<XDtClass:classTagValue tagName="beaninfo:property" paramName="constrained" values="true,false"/>");</XDtClass:ifHasClassTag> <XDtClass:ifHasClassTag tagName="beaninfo:property" paramName="propertyEditor">descriptor.setPropertyEditorClass(Class.forName("<XDtClass:classTagValue tagName="beaninfo:property" paramName="propertyEditor"/>"));</XDtClass:ifHasClassTag> descriptors.add(descriptor); } catch (IntrospectionException e) { // Ignore it } </XDtClass:forAllClassTags> return (PropertyDescriptor[]) descriptors.toArray(new PropertyDescriptor[descriptors.size()]); } catch (Exception e) { // Ignore it } return null; } /** * Gets the methodDescriptors attribute ... * * @return The methodDescriptors value */ public MethodDescriptor[] getMethodDescriptors() { Vector descriptors = new Vector(); MethodDescriptor descriptor = null; Method[] m; Method method; try { m = Class.forName("<XDtClass:fullClassName/>").getMethods(); } catch (ClassNotFoundException e) { return new MethodDescriptor[0]; } <XDtMethod:forAllMethods superclasses="false" sort="true"> <XDtMethod:ifHasMethodTag tagName="beaninfo:method"> method = null; for (int j = 0; j != m.length; j++) { if (m[j].getName().equals("<XDtMethod:methodName/>")) { method = m[j]; break; } } if (method != null) { ParameterDescriptor[] pd = new ParameterDescriptor[method.getParameterTypes().length]; int pidx = 0; <XDtMethod:ifHasMethodTag tagName="beaninfo:param"> <XDtMethod:forAllMethodTags tagName="beaninfo:param"> pd[pidx] = new ParameterDescriptor(); <XDtMethod:ifHasMethodTag tagName="beaninfo:param" paramName="propertyEditor">pd[pidx].setValue("propertyeditor","<XDtMethod:methodTagValue tagName="beaninfo:param" paramName="propertyEditor"/>");</XDtMethod:ifHasMethodTag> pd[pidx++].setDisplayName("<XDtMethod:methodTagValue tagName="beaninfo:param" paramName="displayName"/>"); </XDtMethod:forAllMethodTags> </XDtMethod:ifHasMethodTag> if (pidx == 0) { descriptor = new MethodDescriptor(method); } else { descriptor = new MethodDescriptor(method, pd); } descriptor.setName("<XDtMethod:methodTagValue tagName="beaninfo:method" paramName="name"/>"); <XDtMethod:ifHasMethodTag tagName="beaninfo:method" paramName="displayName">descriptor.setDisplayName("<XDtMethod:methodTagValue tagName="beaninfo:method" paramName="displayName"/>");</XDtMethod:ifHasMethodTag> <XDtMethod:ifHasMethodTag tagName="beaninfo:method" paramName="shortDescription">descriptor.setShortDescription("<XDtMethod:methodTagValue tagName="beaninfo:method" paramName="shortDescription"/>");</XDtMethod:ifHasMethodTag> <XDtMethod:ifHasMethodTag tagName="beaninfo:method" paramName="expert">descriptor.setExpert(<XDtMethod:methodTagValue tagName="beaninfo:method" paramName="expert" values="true,false"/>);</XDtMethod:ifHasMethodTag> <XDtMethod:ifHasMethodTag tagName="beaninfo:method" paramName="hidden">descriptor.setHidden(<XDtMethod:methodTagValue tagName="beaninfo:method" paramName="hidden" values="true,false"/>);</XDtMethod:ifHasMethodTag> <XDtMethod:ifHasMethodTag tagName="beaninfo:method" paramName="preferred">descriptor.setPreferred(<XDtMethod:methodTagValue tagName="beaninfo:method" paramName="preferred" values="true,false"/>);</XDtMethod:ifHasMethodTag> descriptors.add(descriptor); } </XDtMethod:ifHasMethodTag> </XDtMethod:forAllMethods> return descriptors; } } --- NEW FILE: i18n.j --- # # <XDtI18n:getString bundle="xdoclet.beans.Messages" resource="do_not_edit"/> # <XDtClass:ifHasClassTag tagName="beaninfo:class" paramName="displayName">bean.displayName=<XDtClass:classTagValue tagName="beaninfo:class" paramName="displayName"/></XDtClass:ifHasClassTag> <XDtClass:ifHasClassTag tagName="beaninfo:class" paramName="shortDescription">bean.shortDescription=<XDtClass:classTagValue tagName="beaninfo:class" paramName="shortDescription"/></XDtClass:ifHasClassTag> <XDtClass:forAllClassTags tagName="beaninfo:property"> property.<XDtClass:classTagValue tagName="beaninfo:property" paramName="name"/>.name=<XDtClass:classTagValue tagName="beaninfo:property" paramName="name"/> <XDtClass:ifHasClassTag tagName="beaninfo:property" paramName="displayName">property.<XDtClass:classTagValue tagName="beaninfo:property" paramName="name"/>.displayName=<XDtClass:classTagValue tagName="beaninfo:property" paramName="displayName"/></XDtClass:ifHasClassTag> <XDtClass:ifHasClassTag tagName="beaninfo:property" paramName="shortDescription">property.<XDtClass:classTagValue tagName="beaninfo:property" paramName="name"/>.shortDescription=<XDtClass:classTagValue tagName="beaninfo:property" paramName="shortDescription"/></XDtClass:ifHasClassTag> </XDtClass:forAllClassTags> <XDtMethod:forAllMethods superclasses="false" sort="true"> <XDtMethod:ifHasMethodTag tagName="beaninfo:method"> method.<XDtMethod:methodName/>.name=<XDtMethod:methodName/> <XDtMethod:ifHasMethodTag tagName="beaninfo:method" paramName="displayName">method.<XDtMethod:methodTagValue tagName="beaninfo:method" paramName="name"/>.displayName=<XDtMethod:methodTagValue tagName="beaninfo:method" paramName="displayName"/></XDtMethod:ifHasMethodTag> <XDtMethod:ifHasMethodTag tagName="beaninfo:method" paramName="shortDescription">method.<XDtMethod:methodTagValue tagName="beaninfo:method" paramName="name"/>.shortDescription=<XDtMethod:methodTagValue tagName="beaninfo:method" paramName="shortDescription"/></XDtMethod:ifHasMethodTag> <XDtMethod:ifHasMethodTag tagName="beaninfo:param"> <XDtMethod:forAllMethodTags tagName="beaninfo:param"> method.<XDtMethod:methodName/>.<XDtMethod:methodTagValue tagName="beaninfo:param" paramName="name"/>.displayName=<XDtMethod:methodTagValue tagName="beaninfo:param" paramName="displayName"/> </XDtMethod:forAllMethodTags> </XDtMethod:ifHasMethodTag> </XDtMethod:ifHasMethodTag> </XDtMethod:forAllMethods> |
From: Laurent E. <let...@us...> - 2002-05-24 21:05:45
|
Update of /cvsroot/ejtools/libraries/xdoclet/src/etc In directory usw-pr-cvs1:/tmp/cvs-serv27052/xdoclet/src/etc Added Files: default.mf Log Message: Initial import --- NEW FILE: default.mf --- Specification-Title: @module.name@ @version.major@.@version.minor@.@version.revision@-@version.tag@ Specification-Version: @version.major@.@version.minor@.@version.revision@-@version.tag@ Specification-Vendor: EJTools Project Implementation-Title: @module.name@ @version.major@.@version.minor@.@version.revision@-@version.tag@ Implementation-Version: @version.major@.@version.minor@.@version.revision@-@version.tag@ Implementation-Vendor: EJTools Project |
From: Laurent E. <let...@us...> - 2002-05-24 21:05:34
|
Update of /cvsroot/ejtools/libraries/xdoclet/src/resources/xdoclet/beans In directory usw-pr-cvs1:/tmp/cvs-serv26934/libraries/xdoclet/src/resources/xdoclet/beans Log Message: Directory /cvsroot/ejtools/libraries/xdoclet/src/resources/xdoclet/beans added to the repository |
From: Laurent E. <let...@us...> - 2002-05-24 21:05:34
|
Update of /cvsroot/ejtools/libraries/xdoclet/src/resources/xdoclet In directory usw-pr-cvs1:/tmp/cvs-serv26934/libraries/xdoclet/src/resources/xdoclet Log Message: Directory /cvsroot/ejtools/libraries/xdoclet/src/resources/xdoclet added to the repository |
From: Laurent E. <let...@us...> - 2002-05-24 21:05:34
|
Update of /cvsroot/ejtools/libraries/xdoclet/src/main/xdoclet In directory usw-pr-cvs1:/tmp/cvs-serv26934/libraries/xdoclet/src/main/xdoclet Log Message: Directory /cvsroot/ejtools/libraries/xdoclet/src/main/xdoclet added to the repository |
From: Laurent E. <let...@us...> - 2002-05-24 21:05:34
|
Update of /cvsroot/ejtools/libraries/xdoclet/src/resources In directory usw-pr-cvs1:/tmp/cvs-serv26934/libraries/xdoclet/src/resources Log Message: Directory /cvsroot/ejtools/libraries/xdoclet/src/resources added to the repository |
From: Laurent E. <let...@us...> - 2002-05-24 21:05:34
|
Update of /cvsroot/ejtools/libraries/xdoclet/src/etc In directory usw-pr-cvs1:/tmp/cvs-serv26934/libraries/xdoclet/src/etc Log Message: Directory /cvsroot/ejtools/libraries/xdoclet/src/etc added to the repository |
From: Laurent E. <let...@us...> - 2002-05-24 21:05:34
|
Update of /cvsroot/ejtools/libraries/xdoclet/src In directory usw-pr-cvs1:/tmp/cvs-serv26934/libraries/xdoclet/src Log Message: Directory /cvsroot/ejtools/libraries/xdoclet/src added to the repository |
From: Laurent E. <let...@us...> - 2002-05-24 21:05:34
|
Update of /cvsroot/ejtools/libraries/xdoclet/src/main In directory usw-pr-cvs1:/tmp/cvs-serv26934/libraries/xdoclet/src/main Log Message: Directory /cvsroot/ejtools/libraries/xdoclet/src/main added to the repository |
From: Laurent E. <let...@us...> - 2002-05-24 21:05:34
|
Update of /cvsroot/ejtools/libraries/xdoclet/src/main/xdoclet/beans In directory usw-pr-cvs1:/tmp/cvs-serv26934/libraries/xdoclet/src/main/xdoclet/beans Log Message: Directory /cvsroot/ejtools/libraries/xdoclet/src/main/xdoclet/beans added to the repository |
From: Laurent E. <let...@us...> - 2002-05-24 21:05:34
|
Update of /cvsroot/ejtools/libraries/xdoclet In directory usw-pr-cvs1:/tmp/cvs-serv26934/libraries/xdoclet Log Message: Directory /cvsroot/ejtools/libraries/xdoclet added to the repository |
From: Laurent E. <let...@us...> - 2002-05-23 21:33:12
|
Update of /cvsroot/ejtools/libraries/taglib/src/main/net/sourceforge/ejtools/servlet/http/jsp/tagext In directory usw-pr-cvs1:/tmp/cvs-serv8033/taglib/src/main/net/sourceforge/ejtools/servlet/http/jsp/tagext Added Files: BeanContextTreeTag.java IndentedObject.java TreeLeafTag.java TreeRenderer.java TreeRendererTag.java TreeSpacerTag.java Log Message: Initial import --- NEW FILE: BeanContextTreeTag.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.servlet.http.jsp.tagext; import java.beans.beancontext.BeanContext; import java.util.Collection; import java.util.Iterator; import java.util.Vector; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.TagSupport; import org.apache.struts.util.RequestUtils; /** * Description of the Class * * @author letiemble * @created 25 avril 2002 * @todo Javadoc to complete */ public class BeanContextTreeTag extends TagSupport { /** Description of the Field */ protected String id = null; /** Should we ignore missing beans and simply output nothing? */ protected boolean ignore = false; /** Name of the bean that contains the data we will be rendering. */ protected String name = null; /** Description of the Field */ protected String property = null; /** The scope to be searched to retrieve the specified bean. */ protected String scope = null; /** * Description of the Method * * @return Description of the Returned Value * @exception JspException Description of Exception */ public int doStartTag() throws JspException { // Look up the requested bean (if necessary) BeanContext context = null; if (property != null) { context = (BeanContext) RequestUtils.lookup(pageContext, name, property, scope); } else { context = (BeanContext) RequestUtils.lookup(pageContext, name, scope); } if (ignore) { if (context == null) { return (SKIP_BODY); } // Nothing to output } // Create the beancontext collection Collection collection = populate(context, ""); pageContext.setAttribute(id, collection); // Continue processing this page return (SKIP_BODY); } /** * Gets the id attribute of the BeanContextTreeTag object * * @return The id value */ public String getId() { return (this.id); } /** * Getter for the ignore attribute * * @return The value of ignore attribute */ public boolean getIgnore() { return (this.ignore); } /** * Getter for the name attribute * * @return The value of name attribute */ public String getName() { return (this.name); } /** * Gets the property attribute of the BeanContextTreeTag object * * @return The property value */ public String getProperty() { return (this.property); } /** * Getter for the scope attribute * * @return The value of scope attribute */ public String getScope() { return (this.scope); } /** Release all allocated resources. */ public void release() { super.release(); ignore = false; name = null; scope = null; id = null; } /** * Sets the id attribute of the BeanContextTreeTag object * * @param id The new id value */ public void setId(String id) { this.id = id; } /** * Setter for the ignore attribute * * @param ignore The new value for ignore attribute */ public void setIgnore(boolean ignore) { this.ignore = ignore; } /** * Setter for the name attribute * * @param name The new value for name attribute */ public void setName(String name) { this.name = name; } /** * Sets the property attribute of the BeanContextTreeTag object * * @param property The new property value */ public void setProperty(String property) { this.property = property; } /** * Setter for the scope attribute * * @param scope The new value for scope attribute */ public void setScope(String scope) { this.scope = scope; } /** * Description of the Method * * @param context Description of the Parameter * @param depth Description of the Parameter * @return Description of the Return Value */ protected Collection populate(BeanContext context, String depth) { String newDepth = depth; Collection result = new Vector(); Iterator it = context.iterator(); while (it.hasNext()) { BeanContext bc = (BeanContext) it.next(); IndentedObject o = new IndentedObject(); o.setObject(bc); o.setDepth(depth); if (it.hasNext()) { newDepth = depth + "1"; } else { newDepth = depth + "0"; o.setLast(true); } result.add(o); Collection collection = populate(bc, newDepth); result.addAll(collection); } return result; } } --- NEW FILE: IndentedObject.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.servlet.http.jsp.tagext; /** * Description of the Class * * @author letiembl * @created 17 mai 2002 */ public class IndentedObject { /** Description of the Field */ protected String depth = null; /** Description of the Field */ protected boolean last = false; /** Description of the Field */ protected Object o = null; /** Constructor for the IndentedObject object */ public IndentedObject() { } /** * Gets the depth attribute of the IndentedObject object * * @return The depth value */ public String getDepth() { return this.depth; } /** * Gets the object attribute of the IndentedObject object * * @return The object value */ public Object getObject() { return this.o; } /** * Gets the last attribute of the IndentedObject object * * @return The last value */ public boolean isLast() { return this.last; } /** * Sets the depth attribute of the IndentedObject object * * @param depth The new depth value */ public void setDepth(String depth) { this.depth = depth; } /** * Sets the last attribute of the IndentedObject object * * @param last The new last value */ public void setLast(boolean last) { this.last = last; } /** * Sets the object attribute of the IndentedObject object * * @param o The new object value */ public void setObject(Object o) { this.o = o; } /** * Description of the Method * * @return Description of the Return Value */ public String toString() { return "D=" + depth + " L=" + last + " O=" + o; } } --- NEW FILE: TreeLeafTag.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.servlet.http.jsp.tagext; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.TagSupport; import org.apache.struts.util.RequestUtils; import org.apache.struts.util.ResponseUtils; /** * Description of the Class * * @author letiemble * @created 25 avril 2002 * @todo Javadoc to complete */ public class TreeLeafTag extends TagSupport { /** Description of the Field */ protected String name = null; /** Description of the Field */ protected String property = null; /** Description of the Field */ protected String scope = null; /** Description of the Field */ protected boolean value = false; /** * Description of the Method * * @return Description of the Return Value * @exception JspException Description of the Exception */ public int doStartTag() throws JspException { String img = null; boolean leaf = getValue(); if (name != null) { if (property != null) { leaf = ((Boolean) RequestUtils.lookup(pageContext, name, property, scope)).booleanValue(); } else { leaf = ((Boolean) RequestUtils.lookup(pageContext, name, scope)).booleanValue(); } } if (leaf) { img = "<img src=\"images/tree/join.gif\"/>"; } else { img = "<img src=\"images/tree/joinbottom.gif\"/>"; } ResponseUtils.write(pageContext, img); // Continue processing this page return (SKIP_BODY); } /** * Gets the name attribute of the TreeSpacerTag object * * @return The name value */ public String getName() { return (this.name); } /** * Gets the property attribute of the TreeSpacerTag object * * @return The property value */ public String getProperty() { return (this.property); } /** * Gets the scope attribute of the TreeSpacerTag object * * @return The scope value */ public String getScope() { return (this.scope); } /** * Gets the follow attribute of the TreeSpacerTag object * * @return The follow value */ public boolean getValue() { return (this.value); } /** Release all allocated resources. */ public void release() { super.release(); value = false; } /** * Sets the name attribute of the TreeSpacerTag object * * @param name The new name value */ public void setName(String name) { this.name = name; } /** * Sets the property attribute of the TreeSpacerTag object * * @param property The new property value */ public void setProperty(String property) { this.property = property; } /** * Sets the scope attribute of the TreeSpacerTag object * * @param scope The new scope value */ public void setScope(String scope) { this.scope = scope; } /** * Sets the follow attribute of the TreeSpacerTag object * * @param value The new value value */ public void setValue(boolean value) { this.value = value; } } --- NEW FILE: TreeRenderer.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.servlet.http.jsp.tagext; import java.io.Serializable; /** * Description of the Class * * @author letiemble * @created 25 avril 2002 * @todo Javadoc to complete */ public interface TreeRenderer extends Serializable { /** * Gets the icon attribute of the TreeRenderer object * * @param o Description of the Parameter * @return The icon value */ public String getIcon(Object o); } --- NEW FILE: TreeRendererTag.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.servlet.http.jsp.tagext; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.TagSupport; import org.apache.struts.util.RequestUtils; import org.apache.struts.util.ResponseUtils; /** * Description of the Class * * @author letiemble * @created 25 avril 2002 * @todo Javadoc to complete */ public class TreeRendererTag extends TagSupport { /** Description of the Field */ protected String className = null; /** Description of the Field */ protected String name = null; /** Description of the Field */ protected String property = null; /** Description of the Field */ protected String scope = null; /** * Description of the Method * * @return Description of the Return Value * @exception JspException Description of the Exception */ public int doStartTag() throws JspException { String img = null; Object o = null; if (property != null) { o = RequestUtils.lookup(pageContext, name, property, scope); } else { o = RequestUtils.lookup(pageContext, name, scope); } if (o == null) { return (SKIP_BODY); } try { TreeRenderer renderer = (TreeRenderer) Class.forName(this.className).newInstance(); img = renderer.getIcon(o); } catch (Exception e) { img = null; } if (img == null) { img = ""; } ResponseUtils.write(pageContext, "<img src=\"" + img + "\"/>"); // Continue processing this page return (SKIP_BODY); } /** * Gets the class attribute of the TreeRendererTag object * * @return The class value */ public String getRenderer() { return (this.className); } /** * Gets the name attribute of the TreeSpacerTag object * * @return The name value */ public String getName() { return (this.name); } /** * Gets the property attribute of the TreeRendererTag object * * @return The property value */ public String getProperty() { return (this.property); } /** * Gets the scope attribute of the TreeSpacerTag object * * @return The scope value */ public String getScope() { return (this.scope); } /** Release all allocated resources. */ public void release() { super.release(); } /** * Sets the class attribute of the TreeRendererTag object * * @param className The new class value */ public void setRenderer(String className) { this.className = className; } /** * Sets the name attribute of the TreeSpacerTag object * * @param name The new name value */ public void setName(String name) { this.name = name; } /** * Sets the property attribute of the TreeRendererTag object * * @param property The new property value */ public void setProperty(String property) { this.property = property; } /** * Sets the scope attribute of the TreeSpacerTag object * * @param scope The new scope value */ public void setScope(String scope) { this.scope = scope; } } --- NEW FILE: TreeSpacerTag.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.servlet.http.jsp.tagext; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.TagSupport; import org.apache.struts.util.RequestUtils; import org.apache.struts.util.ResponseUtils; /** * Description of the Class * * @author letiemble * @created 25 avril 2002 * @todo Javadoc to complete */ public class TreeSpacerTag extends TagSupport { /** Description of the Field */ protected String name = null; /** Description of the Field */ protected String property = null; /** Description of the Field */ protected String scope = null; /** Description of the Field */ protected String value = null; /** * Description of the Method * * @return Description of the Return Value * @exception JspException Description of the Exception */ public int doStartTag() throws JspException { String img = null; String follow = getValue(); if (follow == null) { if (name == null) { return (SKIP_BODY); } if (property != null) { follow = (String) RequestUtils.lookup(pageContext, name, property, scope); } else { follow = (String) RequestUtils.lookup(pageContext, name, scope); } } if (follow.length() <= 0) { return (SKIP_BODY); } StringBuffer output = new StringBuffer(); for (int i = 0; i < follow.length(); i++) { if ("1".equals(follow.substring(i, i+1))) { img = "<img src=\"images/tree/line.gif\"/>"; } else { img = "<img src=\"images/tree/empty.gif\"/>"; } output.append(img); } ResponseUtils.write(pageContext, output.toString()); // Continue processing this page return (SKIP_BODY); } /** * Gets the name attribute of the TreeSpacerTag object * * @return The name value */ public String getName() { return (this.name); } /** * Gets the property attribute of the TreeSpacerTag object * * @return The property value */ public String getProperty() { return (this.property); } /** * Gets the scope attribute of the TreeSpacerTag object * * @return The scope value */ public String getScope() { return (this.scope); } /** * Gets the follow attribute of the TreeSpacerTag object * * @return The follow value */ public String getValue() { return (this.value); } /** Release all allocated resources. */ public void release() { super.release(); value = null; } /** * Sets the name attribute of the TreeSpacerTag object * * @param name The new name value */ public void setName(String name) { this.name = name; } /** * Sets the property attribute of the TreeSpacerTag object * * @param property The new property value */ public void setProperty(String property) { this.property = property; } /** * Sets the scope attribute of the TreeSpacerTag object * * @param scope The new scope value */ public void setScope(String scope) { this.scope = scope; } /** * Sets the follow attribute of the TreeSpacerTag object * * @param value The new value value */ public void setValue(String value) { this.value = value; } } |
From: Laurent E. <let...@us...> - 2002-05-23 21:33:11
|
Update of /cvsroot/ejtools/libraries/taglib/src/main In directory usw-pr-cvs1:/tmp/cvs-serv7909/libraries/taglib/src/main Log Message: Directory /cvsroot/ejtools/libraries/taglib/src/main added to the repository |
From: Laurent E. <let...@us...> - 2002-05-23 21:33:11
|
Update of /cvsroot/ejtools/libraries/taglib/src/etc In directory usw-pr-cvs1:/tmp/cvs-serv8033/taglib/src/etc Added Files: default.mf Log Message: Initial import --- NEW FILE: default.mf --- Specification-Title: @module.name@ @version.major@.@version.minor@.@version.revision@-@version.tag@ Specification-Version: @version.major@.@version.minor@.@version.revision@-@version.tag@ Specification-Vendor: EJTools Project Implementation-Title: @module.name@ @version.major@.@version.minor@.@version.revision@-@version.tag@ Implementation-Version: @version.major@.@version.minor@.@version.revision@-@version.tag@ Implementation-Vendor: EJTools Project |
From: Laurent E. <let...@us...> - 2002-05-23 21:33:11
|
Update of /cvsroot/ejtools/libraries/taglib/src/resources In directory usw-pr-cvs1:/tmp/cvs-serv8033/taglib/src/resources Added Files: ejtools.tld Log Message: Initial import --- NEW FILE: ejtools.tld --- (This appears to be a binary file; contents omitted.) |
From: Laurent E. <let...@us...> - 2002-05-23 21:33:11
|
Update of /cvsroot/ejtools/libraries/taglib In directory usw-pr-cvs1:/tmp/cvs-serv7909/libraries/taglib Log Message: Directory /cvsroot/ejtools/libraries/taglib added to the repository |
From: Laurent E. <let...@us...> - 2002-05-23 21:33:11
|
Update of /cvsroot/ejtools/libraries/taglib In directory usw-pr-cvs1:/tmp/cvs-serv8033/taglib Added Files: module.properties Log Message: Initial import --- NEW FILE: module.properties --- # # Module Properties # # $Revision: 1.3 $ # version.major=1 version.minor=0 version.revision=0 version.tag=alpha module.name=taglib module.display.name=JSP Tag Library module.archive.name=ejtools.taglib module.package=net.sourceforge.ejtools module.javadoc.title=EJTools - JSP Tag Library |
From: Laurent E. <let...@us...> - 2002-05-23 21:33:10
|
Update of /cvsroot/ejtools/libraries/taglib/src/main/net/sourceforge In directory usw-pr-cvs1:/tmp/cvs-serv7909/libraries/taglib/src/main/net/sourceforge Log Message: Directory /cvsroot/ejtools/libraries/taglib/src/main/net/sourceforge added to the repository |
From: Laurent E. <let...@us...> - 2002-05-23 21:33:10
|
Update of /cvsroot/ejtools/libraries/taglib/src In directory usw-pr-cvs1:/tmp/cvs-serv7909/libraries/taglib/src Log Message: Directory /cvsroot/ejtools/libraries/taglib/src added to the repository |
From: Laurent E. <let...@us...> - 2002-05-23 21:33:09
|
Update of /cvsroot/ejtools/libraries/taglib/src/main/net/sourceforge/ejtools/servlet/http In directory usw-pr-cvs1:/tmp/cvs-serv7909/libraries/taglib/src/main/net/sourceforge/ejtools/servlet/http Log Message: Directory /cvsroot/ejtools/libraries/taglib/src/main/net/sourceforge/ejtools/servlet/http added to the repository |