dgraham 2003/03/08 11:23:50 Modified: src/share/org/apache/struts/taglib/tiles InsertTag.java ImportAttributeTag.java UseAttributeTag.java AttributeToScopeTag.java GetAttributeTag.java src/share/org/apache/struts/taglib/html BaseHandlerTag.java JavascriptValidatorTag.java FormTag.java XhtmlTag.java HtmlTag.java BaseTag.java src/share/org/apache/struts/tiles/definition ComponentDefinitionsFactoryWrapper.java Log: Fixed references to static members. Revision Changes Path 1.12 +7 -7 jakarta-struts/src/share/org/apache/struts/taglib/tiles/InsertTag.java Index: InsertTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/tiles/InsertTag.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- InsertTag.java 27 Feb 2003 19:18:55 -0000 1.11 +++ InsertTag.java 8 Mar 2003 19:23:49 -0000 1.12 @@ -397,7 +397,7 @@ cachedCurrentContext = (ComponentContext) pageContext.getAttribute( ComponentConstants.COMPONENT_CONTEXT, - pageContext.REQUEST_SCOPE); + PageContext.REQUEST_SCOPE); } return cachedCurrentContext; } @@ -803,7 +803,7 @@ pageContext.setAttribute( ComponentConstants.COMPONENT_CONTEXT, subCompContext, - pageContext.REQUEST_SCOPE); + PageContext.REQUEST_SCOPE); // Call controller if any if (controller != null) controller.perform( @@ -844,7 +844,7 @@ pageContext.setAttribute( ComponentConstants.COMPONENT_CONTEXT, currentContext, - pageContext.REQUEST_SCOPE); + PageContext.REQUEST_SCOPE); } return EVAL_PAGE; } 1.7 +5 -5 jakarta-struts/src/share/org/apache/struts/taglib/tiles/ImportAttributeTag.java Index: ImportAttributeTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/tiles/ImportAttributeTag.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ImportAttributeTag.java 27 Feb 2003 19:18:55 -0000 1.6 +++ ImportAttributeTag.java 8 Mar 2003 19:23:49 -0000 1.7 @@ -7,7 +7,7 @@ * * The Apache Software License, Version 1.1 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights + * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -183,7 +183,7 @@ public int doStartTag() throws JspException { // retrieve component context - ComponentContext compContext = (ComponentContext)pageContext.getAttribute( ComponentConstants.COMPONENT_CONTEXT, pageContext.REQUEST_SCOPE); + ComponentContext compContext = (ComponentContext)pageContext.getAttribute( ComponentConstants.COMPONENT_CONTEXT, PageContext.REQUEST_SCOPE); if( compContext == null ) throw new JspException ( "Error - tag importAttribute : no tiles context found." ); 1.9 +5 -6 jakarta-struts/src/share/org/apache/struts/taglib/tiles/UseAttributeTag.java Index: UseAttributeTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/tiles/UseAttributeTag.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- UseAttributeTag.java 27 Feb 2003 19:18:55 -0000 1.8 +++ UseAttributeTag.java 8 Mar 2003 19:23:49 -0000 1.9 @@ -7,7 +7,7 @@ * * The Apache Software License, Version 1.1 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights + * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -74,7 +74,6 @@ * Custom tag exposing a component attribute to page. * */ - public final class UseAttributeTag extends TagSupport { @@ -215,7 +214,7 @@ if( localId==null ) localId=attributeName; - ComponentContext compContext = (ComponentContext)pageContext.getAttribute( ComponentConstants.COMPONENT_CONTEXT, pageContext.REQUEST_SCOPE); + ComponentContext compContext = (ComponentContext)pageContext.getAttribute( ComponentConstants.COMPONENT_CONTEXT, PageContext.REQUEST_SCOPE); if( compContext == null ) throw new JspException ( "Error - tag useAttribute : no tiles context found." ); 1.5 +5 -6 jakarta-struts/src/share/org/apache/struts/taglib/tiles/AttributeToScopeTag.java Index: AttributeToScopeTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/tiles/AttributeToScopeTag.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- AttributeToScopeTag.java 27 Feb 2003 19:18:55 -0000 1.4 +++ AttributeToScopeTag.java 8 Mar 2003 19:23:49 -0000 1.5 @@ -7,7 +7,7 @@ * * The Apache Software License, Version 1.1 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights + * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -74,7 +74,6 @@ * Custom tag that puts component's attributes in a scope (request, page, ...). * @deprecated Is it still in use ? */ - public final class AttributeToScopeTag extends TagSupport { @@ -145,7 +144,7 @@ if( id==null ) id=property; - ComponentContext compContext = (ComponentContext)pageContext.getAttribute( ComponentConstants.COMPONENT_CONTEXT, pageContext.REQUEST_SCOPE); + ComponentContext compContext = (ComponentContext)pageContext.getAttribute( ComponentConstants.COMPONENT_CONTEXT, PageContext.REQUEST_SCOPE); if( compContext == null ) throw new JspException ( "Error - tag.useProperty : component context is not defined. Check tag syntax" ); 1.8 +6 -5 jakarta-struts/src/share/org/apache/struts/taglib/tiles/GetAttributeTag.java Index: GetAttributeTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/tiles/GetAttributeTag.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- GetAttributeTag.java 27 Feb 2003 19:18:55 -0000 1.7 +++ GetAttributeTag.java 8 Mar 2003 19:23:49 -0000 1.8 @@ -7,7 +7,7 @@ * * The Apache Software License, Version 1.1 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights + * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -66,6 +66,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.jsp.JspException; +import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.TagSupport; import org.apache.struts.tiles.ComponentContext; @@ -191,7 +192,7 @@ } // end if // Get context - ComponentContext compContext = (ComponentContext)pageContext.getAttribute( ComponentConstants.COMPONENT_CONTEXT, pageContext.REQUEST_SCOPE); + ComponentContext compContext = (ComponentContext)pageContext.getAttribute( ComponentConstants.COMPONENT_CONTEXT, PageContext.REQUEST_SCOPE); if( compContext == null ) throw new JspException ( "Error - tag.getAsString : component context is not defined. Check tag syntax" ); 1.24 +11 -17 jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java Index: BaseHandlerTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- BaseHandlerTag.java 5 Jan 2003 01:44:08 -0000 1.23 +++ BaseHandlerTag.java 8 Mar 2003 19:23:49 -0000 1.24 @@ -7,7 +7,7 @@ * * The Apache Software License, Version 1.1 * - * Copyright (c) 1999-2001 The Apache Software Foundation. All rights + * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -61,19 +61,20 @@ package org.apache.struts.taglib.html; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.util.Locale; import javax.servlet.jsp.JspException; +import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.BodyTagSupport; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.struts.Globals; import org.apache.struts.taglib.logic.IterateTag; import org.apache.struts.util.MessageResources; import org.apache.struts.util.RequestUtils; -import java.lang.reflect.Method; -import java.lang.reflect.InvocationTargetException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; /** * Base class for tags that render form elements capable of including JavaScript @@ -855,20 +856,13 @@ */ protected boolean isXhtml() { String xhtml = - (String) this.pageContext.getAttribute(Globals.XHTML_KEY, this.pageContext.PAGE_SCOPE); + (String) this.pageContext.getAttribute(Globals.XHTML_KEY, PageContext.PAGE_SCOPE); if ("true".equalsIgnoreCase(xhtml)) { return true; } else { return false; } - -// HtmlTag htmlTag = (HtmlTag) findAncestorWithClass(tag, HtmlTag.class); -// if (htmlTag == null) { -// return false; -// } -// -// return htmlTag.getXhtml(); } /** 1.23 +5 -5 jakarta-struts/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java Index: JavascriptValidatorTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- JavascriptValidatorTag.java 20 Jan 2003 06:00:48 -0000 1.22 +++ JavascriptValidatorTag.java 8 Mar 2003 19:23:49 -0000 1.23 @@ -686,7 +686,7 @@ */ private boolean isXhtml() { String xhtml = - (String) this.pageContext.getAttribute(Globals.XHTML_KEY, this.pageContext.PAGE_SCOPE); + (String) this.pageContext.getAttribute(Globals.XHTML_KEY, PageContext.PAGE_SCOPE); return ("true".equalsIgnoreCase(xhtml)); } 1.44 +5 -5 jakarta-struts/src/share/org/apache/struts/taglib/html/FormTag.java Index: FormTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/FormTag.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- FormTag.java 28 Jan 2003 05:18:03 -0000 1.43 +++ FormTag.java 8 Mar 2003 19:23:49 -0000 1.44 @@ -778,7 +778,7 @@ */ private boolean isXhtml() { String xhtml = - (String) this.pageContext.getAttribute(Globals.XHTML_KEY, this.pageContext.PAGE_SCOPE); + (String) this.pageContext.getAttribute(Globals.XHTML_KEY, PageContext.PAGE_SCOPE); return ("true".equalsIgnoreCase(xhtml)); } 1.5 +5 -4 jakarta-struts/src/share/org/apache/struts/taglib/html/XhtmlTag.java Index: XhtmlTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/XhtmlTag.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- XhtmlTag.java 17 Jan 2003 05:27:52 -0000 1.4 +++ XhtmlTag.java 8 Mar 2003 19:23:49 -0000 1.5 @@ -62,6 +62,7 @@ package org.apache.struts.taglib.html; import javax.servlet.jsp.JspException; +import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.TagSupport; import org.apache.struts.Globals; @@ -89,7 +90,7 @@ * @see javax.servlet.jsp.tagext.Tag#doEndTag() */ public int doEndTag() throws JspException { - this.pageContext.setAttribute(Globals.XHTML_KEY, "true", this.pageContext.PAGE_SCOPE); + this.pageContext.setAttribute(Globals.XHTML_KEY, "true", PageContext.PAGE_SCOPE); return EVAL_PAGE; } 1.11 +6 -5 jakarta-struts/src/share/org/apache/struts/taglib/html/HtmlTag.java Index: HtmlTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/HtmlTag.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- HtmlTag.java 26 Feb 2003 04:51:09 -0000 1.10 +++ HtmlTag.java 8 Mar 2003 19:23:49 -0000 1.11 @@ -66,6 +66,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.jsp.JspException; +import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.TagSupport; import org.apache.struts.Globals; @@ -143,7 +144,7 @@ boolean validLanguage = ((lang != null) && (lang.length() > 0)); if (this.xhtml) { - this.pageContext.setAttribute(Globals.XHTML_KEY, "true", this.pageContext.PAGE_SCOPE); + this.pageContext.setAttribute(Globals.XHTML_KEY, "true", PageContext.PAGE_SCOPE); sb.append(" xmlns=\"http://www.w3.org/1999/xhtml\""); } 1.14 +5 -5 jakarta-struts/src/share/org/apache/struts/taglib/html/BaseTag.java Index: BaseTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseTag.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- BaseTag.java 30 Jan 2003 05:38:41 -0000 1.13 +++ BaseTag.java 8 Mar 2003 19:23:49 -0000 1.14 @@ -148,7 +148,7 @@ } String xhtml = - (String) this.pageContext.getAttribute(Globals.XHTML_KEY, this.pageContext.PAGE_SCOPE); + (String) this.pageContext.getAttribute(Globals.XHTML_KEY, PageContext.PAGE_SCOPE); if ("true".equalsIgnoreCase(xhtml)) { buf.append(" />"); 1.5 +9 -9 jakarta-struts/src/share/org/apache/struts/tiles/definition/ComponentDefinitionsFactoryWrapper.java Index: ComponentDefinitionsFactoryWrapper.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/tiles/definition/ComponentDefinitionsFactoryWrapper.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ComponentDefinitionsFactoryWrapper.java 27 Feb 2003 19:19:54 -0000 1.4 +++ ComponentDefinitionsFactoryWrapper.java 8 Mar 2003 19:23:50 -0000 1.5 @@ -7,7 +7,7 @@ * * The Apache Software License, Version 1.1 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights + * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -237,13 +237,13 @@ { Map map = new HashMap(config.getAttributes()); // Add property attributes using old names - map.put(config.DEFINITIONS_CONFIG_PARAMETER_NAME, config.getDefinitionConfigFiles()); - map.put(config.TILES_DETAILS_PARAMETER_NAME, Integer.toString(config.getDebugLevel()) ); - map.put(config.PARSER_DETAILS_PARAMETER_NAME, Integer.toString(config.getParserDebugLevel()) ); - map.put(config.PARSER_VALIDATE_PARAMETER_NAME, new Boolean(config.getParserValidate()).toString() ); + map.put(DefinitionsFactoryConfig.DEFINITIONS_CONFIG_PARAMETER_NAME, config.getDefinitionConfigFiles()); + map.put(DefinitionsFactoryConfig.TILES_DETAILS_PARAMETER_NAME, Integer.toString(config.getDebugLevel()) ); + map.put(DefinitionsFactoryConfig.PARSER_DETAILS_PARAMETER_NAME, Integer.toString(config.getParserDebugLevel()) ); + map.put(DefinitionsFactoryConfig.PARSER_VALIDATE_PARAMETER_NAME, new Boolean(config.getParserValidate()).toString() ); if( ! "org.apache.struts.tiles.xmlDefinition.I18nFactorySet".equals(config.getFactoryClassname()) ) - map.put(config.FACTORY_CLASSNAME_PARAMETER_NAME, config.getFactoryClassname()); + map.put(DefinitionsFactoryConfig.FACTORY_CLASSNAME_PARAMETER_NAME, config.getFactoryClassname()); return map; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]