You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hu...@apache.org on 2006/02/10 22:03:00 UTC
svn commit: r376843 [2/4] - in
/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested: ./ bean/
html/ logic/
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedCheckboxTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedCheckboxTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedCheckboxTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedCheckboxTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,69 +17,76 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.CheckboxTag;
import org.apache.struts.taglib.nested.NestedNameSupport;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+
/**
* NestedCheckboxTag.
+ *
+ * @version $Rev$ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004)
+ * $
* @since Struts 1.1
- * @version $Rev$ $Date$
*/
public class NestedCheckboxTag extends CheckboxTag implements NestedNameSupport {
-
- /**
- * Overriding method of the heart of the matter. Gets the relative property
- * and leaves the rest up to the original tag implementation. Sweet.
- * @return int JSP continuation directive.
- * This is in the hands of the super class.
- */
- public int doStartTag() throws JspException {
- // get the original properties
- originalName = getName();
- originalProperty = getProperty();
-
- // request
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- // set the properties
- NestedPropertyHelper.setNestedProperties(request, this);
-
- // let the super do it's thing
- return super.doStartTag();
- }
-
- /**
- * Complete the processing of the tag. The nested tags here will restore
- * all the original value for the tag itself and the nesting context.
- * @return int to describe the next step for the JSP processor
- * @throws JspException for the bad things JSP's do
- */
- public int doEndTag() throws JspException {
- // do the super's ending part
- int i = super.doEndTag();
-
- // reset the properties
- setName(originalName);
- setProperty(originalProperty);
-
- // continue
- return i;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- super.release();
- // reset the originals
- originalName = null;
- originalProperty = null;
- }
-
- /* the usual private member variables */
- private String originalName = null;
- private String originalProperty = null;
+ /* the usual private member variables */
+ private String originalName = null;
+ private String originalProperty = null;
+
+ /**
+ * Overriding method of the heart of the matter. Gets the relative
+ * property and leaves the rest up to the original tag implementation.
+ * Sweet.
+ *
+ * @return int JSP continuation directive. This is in the hands of the
+ * super class.
+ */
+ public int doStartTag() throws JspException {
+ // get the original properties
+ originalName = getName();
+ originalProperty = getProperty();
+
+ // request
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // set the properties
+ NestedPropertyHelper.setNestedProperties(request, this);
+
+ // let the super do it's thing
+ return super.doStartTag();
+ }
+
+ /**
+ * Complete the processing of the tag. The nested tags here will restore
+ * all the original value for the tag itself and the nesting context.
+ *
+ * @return int to describe the next step for the JSP processor
+ * @throws JspException for the bad things JSP's do
+ */
+ public int doEndTag() throws JspException {
+ // do the super's ending part
+ int i = super.doEndTag();
+
+ // reset the properties
+ setName(originalName);
+ setProperty(originalProperty);
+
+ // continue
+ return i;
+ }
+
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ super.release();
+
+ // reset the originals
+ originalName = null;
+ originalProperty = null;
+ }
}
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedErrorsTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedErrorsTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedErrorsTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedErrorsTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,69 +17,76 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.ErrorsTag;
-import org.apache.struts.taglib.nested.NestedPropertySupport;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
+import org.apache.struts.taglib.nested.NestedPropertySupport;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
/**
* NestedErrorsTag.
+ *
+ * @version $Rev$ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004)
+ * $
* @since Struts 1.1
- * @version $Rev$ $Date$
*/
public class NestedErrorsTag extends ErrorsTag implements NestedPropertySupport {
-
- /**
- * Overriding method of the heart of the matter. Gets the relative property
- * and leaves the rest up to the original tag implementation. Sweet.
- * @return int JSP continuation directive.
- * This is in the hands of the super class.
- */
- public int doStartTag() throws JspException {
- // get the original properties
- originalName = getName();
- originalProperty = getProperty();
-
- // request
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- // set the properties
- NestedPropertyHelper.setNestedProperties(request, this);
-
- // let the super do it's thing
- return super.doStartTag();
- }
-
- /**
- * Complete the processing of the tag. The nested tags here will restore
- * all the original value for the tag itself and the nesting context.
- * @return int to describe the next step for the JSP processor
- * @throws JspException for the bad things JSP's do
- */
- public int doEndTag() throws JspException {
- // do the super's ending part
- int i = super.doEndTag();
-
- // reset the properties
- setName(originalName);
- setProperty(originalProperty);
-
- // continue
- return i;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- super.release();
- // reset the originals
- originalName = null;
- originalProperty = null;
- }
-
- /* the usual private member variables */
- private String originalName = null;
- private String originalProperty = null;
+ /* the usual private member variables */
+ private String originalName = null;
+ private String originalProperty = null;
+
+ /**
+ * Overriding method of the heart of the matter. Gets the relative
+ * property and leaves the rest up to the original tag implementation.
+ * Sweet.
+ *
+ * @return int JSP continuation directive. This is in the hands of the
+ * super class.
+ */
+ public int doStartTag() throws JspException {
+ // get the original properties
+ originalName = getName();
+ originalProperty = getProperty();
+
+ // request
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // set the properties
+ NestedPropertyHelper.setNestedProperties(request, this);
+
+ // let the super do it's thing
+ return super.doStartTag();
+ }
+
+ /**
+ * Complete the processing of the tag. The nested tags here will restore
+ * all the original value for the tag itself and the nesting context.
+ *
+ * @return int to describe the next step for the JSP processor
+ * @throws JspException for the bad things JSP's do
+ */
+ public int doEndTag() throws JspException {
+ // do the super's ending part
+ int i = super.doEndTag();
+
+ // reset the properties
+ setName(originalName);
+ setProperty(originalProperty);
+
+ // continue
+ return i;
+ }
+
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ super.release();
+
+ // reset the originals
+ originalName = null;
+ originalProperty = null;
+ }
}
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedFileTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedFileTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedFileTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedFileTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,69 +17,75 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.FileTag;
import org.apache.struts.taglib.nested.NestedNameSupport;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+
/**
* NestedFileTag.
- * @since Struts 1.1
+ *
* @version $Rev$
+ * @since Struts 1.1
*/
public class NestedFileTag extends FileTag implements NestedNameSupport {
-
- /**
- * Overriding method of the heart of the matter. Gets the relative property
- * and leaves the rest up to the original tag implementation. Sweet.
- * @return int JSP continuation directive.
- * This is in the hands of the super class.
- */
- public int doStartTag() throws JspException {
- // get the original properties
- originalName = getName();
- originalProperty = getProperty();
-
- // request
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- // set the properties
- NestedPropertyHelper.setNestedProperties(request, this);
-
- // let the super do it's thing
- return super.doStartTag();
- }
-
- /**
- * Complete the processing of the tag. The nested tags here will restore
- * all the original value for the tag itself and the nesting context.
- * @return int to describe the next step for the JSP processor
- * @throws JspException for the bad things JSP's do
- */
- public int doEndTag() throws JspException {
- // do the super's ending part
- int i = super.doEndTag();
-
- // reset the properties
- setName(originalName);
- setProperty(originalProperty);
-
- // continue
- return i;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- super.release();
- // reset the originals
- originalName = null;
- originalProperty = null;
- }
-
- /* the usual private member variables */
- private String originalName = null;
- private String originalProperty = null;
+ /* the usual private member variables */
+ private String originalName = null;
+ private String originalProperty = null;
+
+ /**
+ * Overriding method of the heart of the matter. Gets the relative
+ * property and leaves the rest up to the original tag implementation.
+ * Sweet.
+ *
+ * @return int JSP continuation directive. This is in the hands of the
+ * super class.
+ */
+ public int doStartTag() throws JspException {
+ // get the original properties
+ originalName = getName();
+ originalProperty = getProperty();
+
+ // request
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // set the properties
+ NestedPropertyHelper.setNestedProperties(request, this);
+
+ // let the super do it's thing
+ return super.doStartTag();
+ }
+
+ /**
+ * Complete the processing of the tag. The nested tags here will restore
+ * all the original value for the tag itself and the nesting context.
+ *
+ * @return int to describe the next step for the JSP processor
+ * @throws JspException for the bad things JSP's do
+ */
+ public int doEndTag() throws JspException {
+ // do the super's ending part
+ int i = super.doEndTag();
+
+ // reset the properties
+ setName(originalName);
+ setProperty(originalProperty);
+
+ // continue
+ return i;
+ }
+
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ super.release();
+
+ // reset the originals
+ originalName = null;
+ originalProperty = null;
+ }
}
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedFormTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedFormTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedFormTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedFormTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,36 +17,39 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.FormTag;
import org.apache.struts.taglib.nested.NestedNameSupport;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+
/**
* NestedFormTag.
+ *
+ * @version $Rev$ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004)
+ * $
* @since Struts 1.1
- * @version $Rev$ $Date$
*/
public class NestedFormTag extends FormTag implements NestedNameSupport {
-
-
//TODO: name property was removed from FormTag but appears to be required
// for the nested version to work. See if it can be removed
// from here altogether.
+
/**
* The name
*/
protected String name = null;
+ // original nesting environment
+ private String originalNesting = null;
+ private String originalNestingName = null;
+
/**
* Return the name.
*/
public String getName() {
-
return (this.name);
-
}
/**
@@ -55,83 +58,86 @@
* @param name The new name
*/
public void setName(String name) {
-
this.name = name;
+ }
+
+ /**
+ * Get the string value of the "property" property.
+ *
+ * @return the property property
+ */
+ public String getProperty() {
+ return "";
+ }
+
+ /**
+ * Setter for the "property" property
+ *
+ * @param newProperty new value for the property
+ */
+ public void setProperty(String newProperty) {
+ }
+
+ /**
+ * Overriding to allow the chance to set the details of the system, so
+ * that dynamic includes can be possible
+ *
+ * @return int JSP continuation directive.
+ */
+ public int doStartTag() throws JspException {
+ // store original result
+ int temp = super.doStartTag();
+
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // original nesting details
+ originalNesting = NestedPropertyHelper.getCurrentProperty(request);
+ originalNestingName =
+ NestedPropertyHelper.getCurrentName(request, this);
+
+ // some new details
+ NestedPropertyHelper.setProperty(request, null);
+ NestedPropertyHelper.setName(request, super.getBeanName());
+ // continue
+ return temp;
}
+ /**
+ * This is only overriden to clean up the include reference
+ *
+ * @return int JSP continuation directive.
+ */
+ public int doEndTag() throws JspException {
+ // super result
+ int temp = super.doEndTag();
+
+ // all done. clean up
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // reset the original nesting values
+ if (originalNesting == null) {
+ NestedPropertyHelper.deleteReference(request);
+ } else {
+ NestedPropertyHelper.setProperty(request, originalNesting);
+ NestedPropertyHelper.setName(request, originalNestingName);
+ }
+
+ // return the super result
+ return temp;
+ }
- /**
- * Get the string value of the "property" property.
- * @return the property property
- */
- public String getProperty() {
- return "";
- }
-
- /**
- * Setter for the "property" property
- * @param newProperty new value for the property
- */
- public void setProperty(String newProperty) {}
-
-
- /**
- * Overriding to allow the chance to set the details of the system, so that
- * dynamic includes can be possible
- * @return int JSP continuation directive.
- */
- public int doStartTag() throws JspException {
- // store original result
- int temp = super.doStartTag();
-
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- // original nesting details
- originalNesting = NestedPropertyHelper.getCurrentProperty(request);
- originalNestingName = NestedPropertyHelper.getCurrentName(request, this);
-
- // some new details
- NestedPropertyHelper.setProperty(request, null);
- NestedPropertyHelper.setName(request, super.getBeanName());
-
- // continue
- return temp;
- }
-
- /**
- * This is only overriden to clean up the include reference
- * @return int JSP continuation directive.
- */
- public int doEndTag() throws JspException {
- // super result
- int temp = super.doEndTag();
-
- // all done. clean up
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- // reset the original nesting values
- if (originalNesting == null) {
- NestedPropertyHelper.deleteReference(request);
- } else {
- NestedPropertyHelper.setProperty(request, originalNesting);
- NestedPropertyHelper.setName(request, originalNestingName);
- }
-
- // return the super result
- return temp;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- // let the super release
- super.release();
- // reset the original value place holders
- originalNesting = null;
- originalNestingName = null;
- }
-
- // original nesting environment
- private String originalNesting = null;
- private String originalNestingName = null;
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ // let the super release
+ super.release();
+
+ // reset the original value place holders
+ originalNesting = null;
+ originalNestingName = null;
+ }
}
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedHiddenTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedHiddenTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedHiddenTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedHiddenTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,69 +17,76 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.HiddenTag;
import org.apache.struts.taglib.nested.NestedNameSupport;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+
/**
* NestedHiddenTag.
+ *
+ * @version $Rev$ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004)
+ * $
* @since Struts 1.1
- * @version $Rev$ $Date$
*/
public class NestedHiddenTag extends HiddenTag implements NestedNameSupport {
-
- /**
- * Overriding method of the heart of the matter. Gets the relative property
- * and leaves the rest up to the original tag implementation. Sweet.
- * @return int JSP continuation directive.
- * This is in the hands of the super class.
- */
- public int doStartTag() throws JspException {
- // get the original properties
- originalName = getName();
- originalProperty = getProperty();
-
- // request
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- // set the properties
- NestedPropertyHelper.setNestedProperties(request, this);
-
- // let the super do it's thing
- return super.doStartTag();
- }
-
- /**
- * Complete the processing of the tag. The nested tags here will restore
- * all the original value for the tag itself and the nesting context.
- * @return int to describe the next step for the JSP processor
- * @throws JspException for the bad things JSP's do
- */
- public int doEndTag() throws JspException {
- // do the super's ending part
- int i = super.doEndTag();
-
- // reset the properties
- setName(originalName);
- setProperty(originalProperty);
-
- // continue
- return i;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- super.release();
- // reset the originals
- originalName = null;
- originalProperty = null;
- }
-
- /* the usual private member variables */
- private String originalName = null;
- private String originalProperty = null;
+ /* the usual private member variables */
+ private String originalName = null;
+ private String originalProperty = null;
+
+ /**
+ * Overriding method of the heart of the matter. Gets the relative
+ * property and leaves the rest up to the original tag implementation.
+ * Sweet.
+ *
+ * @return int JSP continuation directive. This is in the hands of the
+ * super class.
+ */
+ public int doStartTag() throws JspException {
+ // get the original properties
+ originalName = getName();
+ originalProperty = getProperty();
+
+ // request
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // set the properties
+ NestedPropertyHelper.setNestedProperties(request, this);
+
+ // let the super do it's thing
+ return super.doStartTag();
+ }
+
+ /**
+ * Complete the processing of the tag. The nested tags here will restore
+ * all the original value for the tag itself and the nesting context.
+ *
+ * @return int to describe the next step for the JSP processor
+ * @throws JspException for the bad things JSP's do
+ */
+ public int doEndTag() throws JspException {
+ // do the super's ending part
+ int i = super.doEndTag();
+
+ // reset the properties
+ setName(originalName);
+ setProperty(originalProperty);
+
+ // continue
+ return i;
+ }
+
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ super.release();
+
+ // reset the originals
+ originalName = null;
+ originalProperty = null;
+ }
}
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedImageTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedImageTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedImageTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedImageTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,63 +17,72 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.ImageTag;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
import org.apache.struts.taglib.nested.NestedPropertySupport;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+
/**
* NestedMultiboxTag.
+ *
+ * @version $Rev$ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004)
+ * $
* @since Struts 1.1
- * @version $Rev$ $Date$
*/
public class NestedImageTag extends ImageTag implements NestedPropertySupport {
+ /* the usual private member variables */
+ private String originalProperty = null;
- /**
- * Overriding method of the heart of the matter. Gets the relative property
- * and leaves the rest up to the original tag implementation. Sweet.
- * @return int JSP continuation directive.
- * This is in the hands of the super class.
- */
- public int doStartTag() throws JspException {
- // get the original properties
- originalProperty = getProperty();
-
- // request
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- // set the properties
- NestedPropertyHelper.setNestedProperties(request, this);
-
- // let the super do it's thing
- return super.doStartTag();
- }
-
- /**
- * Complete the processing of the tag. The nested tags here will restore
- * all the original value for the tag itself and the nesting context.
- * @return int to describe the next step for the JSP processor
- * @throws JspException for the bad things JSP's do
- */
- public int doEndTag() throws JspException {
- // do the super's ending part
- int i = super.doEndTag();
- // reset the properties
- setProperty(originalProperty);
- // continue
- return i;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- super.release();
- // reset the originals
- originalProperty = null;
- }
-
- /* the usual private member variables */
- private String originalProperty = null;
+ /**
+ * Overriding method of the heart of the matter. Gets the relative
+ * property and leaves the rest up to the original tag implementation.
+ * Sweet.
+ *
+ * @return int JSP continuation directive. This is in the hands of the
+ * super class.
+ */
+ public int doStartTag() throws JspException {
+ // get the original properties
+ originalProperty = getProperty();
+
+ // request
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // set the properties
+ NestedPropertyHelper.setNestedProperties(request, this);
+
+ // let the super do it's thing
+ return super.doStartTag();
+ }
+
+ /**
+ * Complete the processing of the tag. The nested tags here will restore
+ * all the original value for the tag itself and the nesting context.
+ *
+ * @return int to describe the next step for the JSP processor
+ * @throws JspException for the bad things JSP's do
+ */
+ public int doEndTag() throws JspException {
+ // do the super's ending part
+ int i = super.doEndTag();
+
+ // reset the properties
+ setProperty(originalProperty);
+
+ // continue
+ return i;
+ }
+
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ super.release();
+
+ // reset the originals
+ originalProperty = null;
+ }
}
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedImgTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedImgTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedImgTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedImgTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,70 +17,75 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.ImgTag;
import org.apache.struts.taglib.nested.NestedNameSupport;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+
/**
* NestedImgTag, renders the nested version of the <img> tag.
*
- * @since Struts 1.1
* @version $Rev$
+ * @since Struts 1.1
*/
public class NestedImgTag extends ImgTag implements NestedNameSupport {
-
- /**
- * Overriding method of the heart of the matter. Gets the relative property
- * and leaves the rest up to the original tag implementation. Sweet.
- * @return int JSP continuation directive.
- * This is in the hands of the super class.
- */
- public int doStartTag() throws JspException {
- // get the original properties
- originalName = getName();
- originalProperty = getProperty();
-
- // request
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- // set the properties
- NestedPropertyHelper.setNestedProperties(request, this);
-
- // let the super do it's thing
- return super.doStartTag();
- }
-
- /**
- * Complete the processing of the tag. The nested tags here will restore
- * all the original value for the tag itself and the nesting context.
- * @return int to describe the next step for the JSP processor
- * @throws JspException for the bad things JSP's do
- */
- public int doEndTag() throws JspException {
- // do the super's ending part
- int i = super.doEndTag();
-
- // reset the properties
- setName(originalName);
- setProperty(originalProperty);
-
- // continue
- return i;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- super.release();
- // reset the originals
- originalName = null;
- originalProperty = null;
- }
-
- /* the usual private member variables */
- private String originalName = null;
- private String originalProperty = null;
+ /* the usual private member variables */
+ private String originalName = null;
+ private String originalProperty = null;
+
+ /**
+ * Overriding method of the heart of the matter. Gets the relative
+ * property and leaves the rest up to the original tag implementation.
+ * Sweet.
+ *
+ * @return int JSP continuation directive. This is in the hands of the
+ * super class.
+ */
+ public int doStartTag() throws JspException {
+ // get the original properties
+ originalName = getName();
+ originalProperty = getProperty();
+
+ // request
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // set the properties
+ NestedPropertyHelper.setNestedProperties(request, this);
+
+ // let the super do it's thing
+ return super.doStartTag();
+ }
+
+ /**
+ * Complete the processing of the tag. The nested tags here will restore
+ * all the original value for the tag itself and the nesting context.
+ *
+ * @return int to describe the next step for the JSP processor
+ * @throws JspException for the bad things JSP's do
+ */
+ public int doEndTag() throws JspException {
+ // do the super's ending part
+ int i = super.doEndTag();
+
+ // reset the properties
+ setName(originalName);
+ setProperty(originalProperty);
+
+ // continue
+ return i;
+ }
+
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ super.release();
+
+ // reset the originals
+ originalName = null;
+ originalProperty = null;
+ }
}
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedLinkTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedLinkTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedLinkTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedLinkTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,96 +17,109 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.LinkTag;
import org.apache.struts.taglib.nested.NestedNameSupport;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+
/**
* NestedLinkTag.
+ *
+ * @version $Rev$ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004)
+ * $
* @since Struts 1.1
- * @version $Rev$ $Date$
*/
public class NestedLinkTag extends LinkTag implements NestedNameSupport {
+ /* hold original property */
+ private String origName = null;
+ private String origProperty = null;
+ private String origParamProperty = null;
+
+ /**
+ * Overriding method of the heart of the matter. Gets the relative
+ * property and leaves the rest up to the original tag implementation.
+ * Sweet.
+ *
+ * @return int JSP continuation directive. This is in the hands of the
+ * super class.
+ */
+ public int doStartTag() throws JspException {
+ origName = super.getName();
+ origProperty = super.getProperty();
+ origParamProperty = super.getParamProperty();
+
+ /* decide the incoming options. Always two there are */
+ boolean doProperty =
+ ((origProperty != null) && (origProperty.length() > 0));
+ boolean doParam =
+ ((origParamProperty != null) && (origParamProperty.length() > 0));
+
+ // request
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ boolean hasName =
+ ((getName() != null) && (getName().trim().length() > 0));
+ String currentName;
+
+ if (hasName) {
+ currentName = getName();
+ } else {
+ currentName = NestedPropertyHelper.getCurrentName(request, this);
+ }
+
+ // set the bean name
+ super.setName(currentName);
+
+ // set property details
+ if (doProperty && !hasName) {
+ super.setProperty(NestedPropertyHelper.getAdjustedProperty(
+ request, origProperty));
+ }
+
+ // do the param property details
+ if (doParam) {
+ super.setName(null);
+ super.setParamName(currentName);
+ super.setParamProperty(NestedPropertyHelper.getAdjustedProperty(
+ request, origParamProperty));
+ }
- /**
- * Overriding method of the heart of the matter. Gets the relative property
- * and leaves the rest up to the original tag implementation. Sweet.
- * @return int JSP continuation directive.
- * This is in the hands of the super class.
- */
- public int doStartTag() throws JspException {
- origName = super.getName();
- origProperty = super.getProperty();
- origParamProperty = super.getParamProperty();
-
- /* decide the incoming options. Always two there are */
- boolean doProperty = (origProperty != null && origProperty.length() > 0);
- boolean doParam = (origParamProperty != null && origParamProperty.length() > 0);
-
- // request
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
-
- boolean hasName = (getName() != null && getName().trim().length() > 0);
- String currentName;
- if (hasName) {
- currentName = getName();
- } else {
- currentName = NestedPropertyHelper.getCurrentName(request, this);
+ /* do the tag */
+ return super.doStartTag();
}
- // set the bean name
- super.setName(currentName);
- // set property details
- if (doProperty && !hasName) {
- super.setProperty(NestedPropertyHelper.getAdjustedProperty(request, origProperty));
+ /**
+ * Complete the processing of the tag. The nested tags here will restore
+ * all the original value for the tag itself and the nesting context.
+ *
+ * @return int to describe the next step for the JSP processor
+ * @throws JspException for the bad things JSP's do
+ */
+ public int doEndTag() throws JspException {
+ // do the super's ending part
+ int i = super.doEndTag();
+
+ // reset the properties
+ setName(origName);
+ setProperty(origProperty);
+ setParamProperty(origParamProperty);
+
+ // continue
+ return i;
}
- // do the param property details
- if (doParam) {
- super.setName(null);
- super.setParamName(currentName);
- super.setParamProperty(NestedPropertyHelper.getAdjustedProperty(request, origParamProperty));
+
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ super.release();
+
+ // reset the originals
+ origName = null;
+ origProperty = null;
+ origParamProperty = null;
}
-
- /* do the tag */
- return super.doStartTag();
- }
-
- /**
- * Complete the processing of the tag. The nested tags here will restore
- * all the original value for the tag itself and the nesting context.
- * @return int to describe the next step for the JSP processor
- * @throws JspException for the bad things JSP's do
- */
- public int doEndTag() throws JspException {
- // do the super's ending part
- int i = super.doEndTag();
-
- // reset the properties
- setName(origName);
- setProperty(origProperty);
- setParamProperty(origParamProperty);
-
- // continue
- return i;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- super.release();
- // reset the originals
- origName = null;
- origProperty = null;
- origParamProperty = null;
- }
-
-
- /* hold original property */
- private String origName = null;
- private String origProperty = null;
- private String origParamProperty = null;
}
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedMessagesTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedMessagesTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedMessagesTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedMessagesTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,69 +17,77 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.MessagesTag;
-import org.apache.struts.taglib.nested.NestedPropertySupport;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
+import org.apache.struts.taglib.nested.NestedPropertySupport;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
/**
* NestedMessagesTag.
+ *
+ * @version $Rev$ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004)
+ * $
* @since Struts 1.1
- * @version $Rev$ $Date$
*/
-public class NestedMessagesTag extends MessagesTag implements NestedPropertySupport {
-
- /**
- * Overriding method of the heart of the matter. Gets the relative property
- * and leaves the rest up to the original tag implementation. Sweet.
- * @return int JSP continuation directive.
- * This is in the hands of the super class.
- */
- public int doStartTag() throws JspException {
- // get the original properties
- originalName = getName();
- originalProperty = getProperty();
-
- // request
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- // set the properties
- NestedPropertyHelper.setNestedProperties(request, this);
-
- // let the super do it's thing
- return super.doStartTag();
- }
-
- /**
- * Complete the processing of the tag. The nested tags here will restore
- * all the original value for the tag itself and the nesting context.
- * @return int to describe the next step for the JSP processor
- * @throws JspException for the bad things JSP's do
- */
- public int doEndTag() throws JspException {
- // do the super's ending part
- int i = super.doEndTag();
-
- // reset the properties
- setName(originalName);
- setProperty(originalProperty);
-
- // continue
- return i;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- super.release();
- // reset the originals
- originalName = null;
- originalProperty = null;
- }
-
- /* the usual private member variables */
- private String originalName = null;
- private String originalProperty = null;
+public class NestedMessagesTag extends MessagesTag
+ implements NestedPropertySupport {
+ /* the usual private member variables */
+ private String originalName = null;
+ private String originalProperty = null;
+
+ /**
+ * Overriding method of the heart of the matter. Gets the relative
+ * property and leaves the rest up to the original tag implementation.
+ * Sweet.
+ *
+ * @return int JSP continuation directive. This is in the hands of the
+ * super class.
+ */
+ public int doStartTag() throws JspException {
+ // get the original properties
+ originalName = getName();
+ originalProperty = getProperty();
+
+ // request
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // set the properties
+ NestedPropertyHelper.setNestedProperties(request, this);
+
+ // let the super do it's thing
+ return super.doStartTag();
+ }
+
+ /**
+ * Complete the processing of the tag. The nested tags here will restore
+ * all the original value for the tag itself and the nesting context.
+ *
+ * @return int to describe the next step for the JSP processor
+ * @throws JspException for the bad things JSP's do
+ */
+ public int doEndTag() throws JspException {
+ // do the super's ending part
+ int i = super.doEndTag();
+
+ // reset the properties
+ setName(originalName);
+ setProperty(originalProperty);
+
+ // continue
+ return i;
+ }
+
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ super.release();
+
+ // reset the originals
+ originalName = null;
+ originalProperty = null;
+ }
}
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedMultiboxTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedMultiboxTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedMultiboxTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedMultiboxTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,69 +17,76 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.MultiboxTag;
import org.apache.struts.taglib.nested.NestedNameSupport;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+
/**
* NestedMultiboxTag.
+ *
+ * @version $Rev$ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004)
+ * $
* @since Struts 1.1
- * @version $Rev$ $Date$
*/
public class NestedMultiboxTag extends MultiboxTag implements NestedNameSupport {
-
- /**
- * Overriding method of the heart of the matter. Gets the relative property
- * and leaves the rest up to the original tag implementation. Sweet.
- * @return int JSP continuation directive.
- * This is in the hands of the super class.
- */
- public int doStartTag() throws JspException {
- // get the original properties
- originalName = getName();
- originalProperty = getProperty();
-
- // request
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- // set the properties
- NestedPropertyHelper.setNestedProperties(request, this);
-
- // let the super do it's thing
- return super.doStartTag();
- }
-
- /**
- * Complete the processing of the tag. The nested tags here will restore
- * all the original value for the tag itself and the nesting context.
- * @return int to describe the next step for the JSP processor
- * @throws JspException for the bad things JSP's do
- */
- public int doEndTag() throws JspException {
- // do the super's ending part
- int i = super.doEndTag();
-
- // reset the properties
- setName(originalName);
- setProperty(originalProperty);
-
- // continue
- return i;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- super.release();
- // reset the originals
- originalName = null;
- originalProperty = null;
- }
-
- /* the usual private member variables */
- private String originalName = null;
- private String originalProperty = null;
+ /* the usual private member variables */
+ private String originalName = null;
+ private String originalProperty = null;
+
+ /**
+ * Overriding method of the heart of the matter. Gets the relative
+ * property and leaves the rest up to the original tag implementation.
+ * Sweet.
+ *
+ * @return int JSP continuation directive. This is in the hands of the
+ * super class.
+ */
+ public int doStartTag() throws JspException {
+ // get the original properties
+ originalName = getName();
+ originalProperty = getProperty();
+
+ // request
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // set the properties
+ NestedPropertyHelper.setNestedProperties(request, this);
+
+ // let the super do it's thing
+ return super.doStartTag();
+ }
+
+ /**
+ * Complete the processing of the tag. The nested tags here will restore
+ * all the original value for the tag itself and the nesting context.
+ *
+ * @return int to describe the next step for the JSP processor
+ * @throws JspException for the bad things JSP's do
+ */
+ public int doEndTag() throws JspException {
+ // do the super's ending part
+ int i = super.doEndTag();
+
+ // reset the properties
+ setName(originalName);
+ setProperty(originalProperty);
+
+ // continue
+ return i;
+ }
+
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ super.release();
+
+ // reset the originals
+ originalName = null;
+ originalProperty = null;
+ }
}
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedOptionsCollectionTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedOptionsCollectionTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedOptionsCollectionTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedOptionsCollectionTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,70 +17,76 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.OptionsCollectionTag;
import org.apache.struts.taglib.nested.NestedNameSupport;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+
/**
* NestedOptionsCollectionTag.
- * @since Struts 1.1
+ *
* @version $Rev$
+ * @since Struts 1.1
*/
public class NestedOptionsCollectionTag extends OptionsCollectionTag
- implements NestedNameSupport {
-
- /**
- * Overriding method of the heart of the matter. Gets the relative property
- * and leaves the rest up to the original tag implementation. Sweet.
- * @return int JSP continuation directive.
- * This is in the hands of the super class.
- */
- public int doStartTag() throws JspException {
- // get the original properties
- originalName = getName();
- originalProperty = getProperty();
-
- // request
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- // set the properties
- NestedPropertyHelper.setNestedProperties(request, this);
-
- // let the super do it's thing
- return super.doStartTag();
- }
-
- /**
- * Complete the processing of the tag. The nested tags here will restore
- * all the original value for the tag itself and the nesting context.
- * @return int to describe the next step for the JSP processor
- * @throws JspException for the bad things JSP's do
- */
- public int doEndTag() throws JspException {
- // do the super's ending part
- int i = super.doEndTag();
-
- // reset the properties
- setName(originalName);
- setProperty(originalProperty);
-
- // continue
- return i;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- super.release();
- // reset the originals
- originalName = null;
- originalProperty = null;
- }
-
- /* the usual private member variables */
- private String originalName = null;
- private String originalProperty = null;
+ implements NestedNameSupport {
+ /* the usual private member variables */
+ private String originalName = null;
+ private String originalProperty = null;
+
+ /**
+ * Overriding method of the heart of the matter. Gets the relative
+ * property and leaves the rest up to the original tag implementation.
+ * Sweet.
+ *
+ * @return int JSP continuation directive. This is in the hands of the
+ * super class.
+ */
+ public int doStartTag() throws JspException {
+ // get the original properties
+ originalName = getName();
+ originalProperty = getProperty();
+
+ // request
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // set the properties
+ NestedPropertyHelper.setNestedProperties(request, this);
+
+ // let the super do it's thing
+ return super.doStartTag();
+ }
+
+ /**
+ * Complete the processing of the tag. The nested tags here will restore
+ * all the original value for the tag itself and the nesting context.
+ *
+ * @return int to describe the next step for the JSP processor
+ * @throws JspException for the bad things JSP's do
+ */
+ public int doEndTag() throws JspException {
+ // do the super's ending part
+ int i = super.doEndTag();
+
+ // reset the properties
+ setName(originalName);
+ setProperty(originalProperty);
+
+ // continue
+ return i;
+ }
+
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ super.release();
+
+ // reset the originals
+ originalName = null;
+ originalProperty = null;
+ }
}
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedOptionsTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedOptionsTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedOptionsTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedOptionsTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,88 +17,92 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.Constants;
import org.apache.struts.taglib.html.OptionsTag;
import org.apache.struts.taglib.nested.NestedNameSupport;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+
/**
* NestedOptionsTag.
+ *
+ * @version $Rev$ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004)
+ * $
* @since Struts 1.1
- * @version $Rev$ $Date$
*/
public class NestedOptionsTag extends OptionsTag implements NestedNameSupport {
+ /* the usual private member variables */
+ private String originalName = null;
+ private String originalProperty = null;
+ private String originalLabelProperty = null;
+
+ /**
+ * Overriding method of the heart of the matter. Gets the relative
+ * property and leaves the rest up to the original tag implementation.
+ * Sweet.
+ *
+ * @return int JSP continuation directive. This is in the hands of the
+ * super class.
+ */
+ public int doStartTag() throws JspException {
+ // get the original properties
+ originalName = getName();
+ originalProperty = getProperty();
+ originalLabelProperty = getLabelProperty();
+
+ // request
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // if we have a label property
+ if (originalLabelProperty != null) {
+ // do the label property first
+ if ((getName() == null) || Constants.BEAN_KEY.equals(getName())) {
+ super.setLabelProperty(NestedPropertyHelper.getAdjustedProperty(
+ request, originalLabelProperty));
+ } else {
+ super.setLabelProperty(originalLabelProperty);
+ }
+ }
- /**
- * Overriding method of the heart of the matter. Gets the relative property
- * and leaves the rest up to the original tag implementation. Sweet.
- * @return int JSP continuation directive.
- * This is in the hands of the super class.
- */
- public int doStartTag() throws JspException {
- // get the original properties
- originalName = getName();
- originalProperty = getProperty();
- originalLabelProperty = getLabelProperty();
-
- // request
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
-
- // if we have a label property
- if (originalLabelProperty != null) {
- // do the label property first
- if (getName() == null|| Constants.BEAN_KEY.equals(getName())) {
- super.setLabelProperty(NestedPropertyHelper.getAdjustedProperty(request,
- originalLabelProperty));
- } else {
- super.setLabelProperty(originalLabelProperty);
- }
- }
+ // set the other properties
+ NestedPropertyHelper.setNestedProperties(request, this);
- // set the other properties
- NestedPropertyHelper.setNestedProperties(request, this);
+ // let the super do it's thing
+ return super.doStartTag();
+ }
+ /**
+ * Complete the processing of the tag. The nested tags here will restore
+ * all the original value for the tag itself and the nesting context.
+ *
+ * @return int to describe the next step for the JSP processor
+ * @throws JspException for the bad things JSP's do
+ */
+ public int doEndTag() throws JspException {
+ // do the super's ending part
+ int i = super.doEndTag();
+
+ // reset the properties
+ setName(originalName);
+ setProperty(originalProperty);
+ setLabelProperty(originalLabelProperty);
+ // continue
+ return i;
+ }
- // let the super do it's thing
- return super.doStartTag();
- }
-
- /**
- * Complete the processing of the tag. The nested tags here will restore
- * all the original value for the tag itself and the nesting context.
- * @return int to describe the next step for the JSP processor
- * @throws JspException for the bad things JSP's do
- */
- public int doEndTag() throws JspException {
- // do the super's ending part
- int i = super.doEndTag();
-
- // reset the properties
- setName(originalName);
- setProperty(originalProperty);
- setLabelProperty(originalLabelProperty);
-
- // continue
- return i;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- super.release();
- // reset the originals
- originalName = null;
- originalProperty = null;
- originalLabelProperty = null;
- }
-
- /* the usual private member variables */
- private String originalName = null;
- private String originalProperty = null;
- private String originalLabelProperty = null;
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ super.release();
+
+ // reset the originals
+ originalName = null;
+ originalProperty = null;
+ originalLabelProperty = null;
+ }
}
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedPasswordTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedPasswordTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedPasswordTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedPasswordTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,69 +17,76 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.PasswordTag;
import org.apache.struts.taglib.nested.NestedNameSupport;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+
/**
* NestedPasswordTag.
+ *
+ * @version $Rev$ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004)
+ * $
* @since Struts 1.1
- * @version $Rev$ $Date$
*/
public class NestedPasswordTag extends PasswordTag implements NestedNameSupport {
-
- /**
- * Overriding method of the heart of the matter. Gets the relative property
- * and leaves the rest up to the original tag implementation. Sweet.
- * @return int JSP continuation directive.
- * This is in the hands of the super class.
- */
- public int doStartTag() throws JspException {
- // get the original properties
- originalName = getName();
- originalProperty = getProperty();
-
- // request
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- // set the properties
- NestedPropertyHelper.setNestedProperties(request, this);
-
- // let the super do it's thing
- return super.doStartTag();
- }
-
- /**
- * Complete the processing of the tag. The nested tags here will restore
- * all the original value for the tag itself and the nesting context.
- * @return int to describe the next step for the JSP processor
- * @throws JspException for the bad things JSP's do
- */
- public int doEndTag() throws JspException {
- // do the super's ending part
- int i = super.doEndTag();
-
- // reset the properties
- setName(originalName);
- setProperty(originalProperty);
-
- // continue
- return i;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- super.release();
- // reset the originals
- originalName = null;
- originalProperty = null;
- }
-
- /* the usual private member variables */
- private String originalName = null;
- private String originalProperty = null;
+ /* the usual private member variables */
+ private String originalName = null;
+ private String originalProperty = null;
+
+ /**
+ * Overriding method of the heart of the matter. Gets the relative
+ * property and leaves the rest up to the original tag implementation.
+ * Sweet.
+ *
+ * @return int JSP continuation directive. This is in the hands of the
+ * super class.
+ */
+ public int doStartTag() throws JspException {
+ // get the original properties
+ originalName = getName();
+ originalProperty = getProperty();
+
+ // request
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // set the properties
+ NestedPropertyHelper.setNestedProperties(request, this);
+
+ // let the super do it's thing
+ return super.doStartTag();
+ }
+
+ /**
+ * Complete the processing of the tag. The nested tags here will restore
+ * all the original value for the tag itself and the nesting context.
+ *
+ * @return int to describe the next step for the JSP processor
+ * @throws JspException for the bad things JSP's do
+ */
+ public int doEndTag() throws JspException {
+ // do the super's ending part
+ int i = super.doEndTag();
+
+ // reset the properties
+ setName(originalName);
+ setProperty(originalProperty);
+
+ // continue
+ return i;
+ }
+
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ super.release();
+
+ // reset the originals
+ originalName = null;
+ originalProperty = null;
+ }
}
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedRadioTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedRadioTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedRadioTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedRadioTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,69 +17,76 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.RadioTag;
import org.apache.struts.taglib.nested.NestedNameSupport;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+
/**
* NestedRadioTag.
+ *
+ * @version $Rev$ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004)
+ * $
* @since Struts 1.1
- * @version $Rev$ $Date$
*/
public class NestedRadioTag extends RadioTag implements NestedNameSupport {
-
- /**
- * Overriding method of the heart of the matter. Gets the relative property
- * and leaves the rest up to the original tag implementation. Sweet.
- * @return int JSP continuation directive.
- * This is in the hands of the super class.
- */
- public int doStartTag() throws JspException {
- // get the original properties
- originalName = getName();
- originalProperty = getProperty();
-
- // request
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- // set the properties
- NestedPropertyHelper.setNestedProperties(request, this);
-
- // let the super do it's thing
- return super.doStartTag();
- }
-
- /**
- * Complete the processing of the tag. The nested tags here will restore
- * all the original value for the tag itself and the nesting context.
- * @return int to describe the next step for the JSP processor
- * @throws JspException for the bad things JSP's do
- */
- public int doEndTag() throws JspException {
- // do the super's ending part
- int i = super.doEndTag();
-
- // reset the properties
- setName(originalName);
- setProperty(originalProperty);
-
- // continue
- return i;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- super.release();
- // reset the originals
- originalName = null;
- originalProperty = null;
- }
-
- /* the usual private member variables */
- private String originalName = null;
- private String originalProperty = null;
+ /* the usual private member variables */
+ private String originalName = null;
+ private String originalProperty = null;
+
+ /**
+ * Overriding method of the heart of the matter. Gets the relative
+ * property and leaves the rest up to the original tag implementation.
+ * Sweet.
+ *
+ * @return int JSP continuation directive. This is in the hands of the
+ * super class.
+ */
+ public int doStartTag() throws JspException {
+ // get the original properties
+ originalName = getName();
+ originalProperty = getProperty();
+
+ // request
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // set the properties
+ NestedPropertyHelper.setNestedProperties(request, this);
+
+ // let the super do it's thing
+ return super.doStartTag();
+ }
+
+ /**
+ * Complete the processing of the tag. The nested tags here will restore
+ * all the original value for the tag itself and the nesting context.
+ *
+ * @return int to describe the next step for the JSP processor
+ * @throws JspException for the bad things JSP's do
+ */
+ public int doEndTag() throws JspException {
+ // do the super's ending part
+ int i = super.doEndTag();
+
+ // reset the properties
+ setName(originalName);
+ setProperty(originalProperty);
+
+ // continue
+ return i;
+ }
+
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ super.release();
+
+ // reset the originals
+ originalName = null;
+ originalProperty = null;
+ }
}
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedSelectTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedSelectTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedSelectTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedSelectTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,69 +17,76 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.SelectTag;
import org.apache.struts.taglib.nested.NestedNameSupport;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+
/**
* NestedSelectTag.
+ *
+ * @version $Rev$ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004)
+ * $
* @since Struts 1.1
- * @version $Rev$ $Date$
*/
public class NestedSelectTag extends SelectTag implements NestedNameSupport {
-
- /**
- * Overriding method of the heart of the matter. Gets the relative property
- * and leaves the rest up to the original tag implementation. Sweet.
- * @return int JSP continuation directive.
- * This is in the hands of the super class.
- */
- public int doStartTag() throws JspException {
- // get the original properties
- originalName = getName();
- originalProperty = getProperty();
-
- // request
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- // set the properties
- NestedPropertyHelper.setNestedProperties(request, this);
-
- // let the super do it's thing
- return super.doStartTag();
- }
-
- /**
- * Complete the processing of the tag. The nested tags here will restore
- * all the original value for the tag itself and the nesting context.
- * @return int to describe the next step for the JSP processor
- * @throws JspException for the bad things JSP's do
- */
- public int doEndTag() throws JspException {
- // do the super's ending part
- int i = super.doEndTag();
-
- // reset the properties
- setName(originalName);
- setProperty(originalProperty);
-
- // continue
- return i;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- super.release();
- // reset the originals
- originalName = null;
- originalProperty = null;
- }
-
- /* the usual private member variables */
- private String originalName = null;
- private String originalProperty = null;
+ /* the usual private member variables */
+ private String originalName = null;
+ private String originalProperty = null;
+
+ /**
+ * Overriding method of the heart of the matter. Gets the relative
+ * property and leaves the rest up to the original tag implementation.
+ * Sweet.
+ *
+ * @return int JSP continuation directive. This is in the hands of the
+ * super class.
+ */
+ public int doStartTag() throws JspException {
+ // get the original properties
+ originalName = getName();
+ originalProperty = getProperty();
+
+ // request
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // set the properties
+ NestedPropertyHelper.setNestedProperties(request, this);
+
+ // let the super do it's thing
+ return super.doStartTag();
+ }
+
+ /**
+ * Complete the processing of the tag. The nested tags here will restore
+ * all the original value for the tag itself and the nesting context.
+ *
+ * @return int to describe the next step for the JSP processor
+ * @throws JspException for the bad things JSP's do
+ */
+ public int doEndTag() throws JspException {
+ // do the super's ending part
+ int i = super.doEndTag();
+
+ // reset the properties
+ setName(originalName);
+ setProperty(originalProperty);
+
+ // continue
+ return i;
+ }
+
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ super.release();
+
+ // reset the originals
+ originalName = null;
+ originalProperty = null;
+ }
}
Modified: struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedSubmitTag.java
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedSubmitTag.java?rev=376843&r1=376842&r2=376843&view=diff
==============================================================================
--- struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedSubmitTag.java (original)
+++ struts/taglib/trunk/src/java/org/apache/struts/taglib/nested/html/NestedSubmitTag.java Fri Feb 10 13:02:56 2006
@@ -1,14 +1,14 @@
/*
- * $Id$
+ * $Id$
*
* Copyright 1999-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.
@@ -17,63 +17,72 @@
*/
package org.apache.struts.taglib.nested.html;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.jsp.JspException;
-
import org.apache.struts.taglib.html.SubmitTag;
import org.apache.struts.taglib.nested.NestedPropertyHelper;
import org.apache.struts.taglib.nested.NestedPropertySupport;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+
/**
* NestedSubmitTag.
+ *
+ * @version $Rev$ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004)
+ * $
* @since Struts 1.1
- * @version $Rev$ $Date$
*/
public class NestedSubmitTag extends SubmitTag implements NestedPropertySupport {
+ /* the usual private member variables */
+ private String originalProperty = null;
- /**
- * Overriding method of the heart of the matter. Gets the relative property
- * and leaves the rest up to the original tag implementation. Sweet.
- * @return int JSP continuation directive.
- * This is in the hands of the super class.
- */
- public int doStartTag() throws JspException {
- // get the original properties
- originalProperty = getProperty();
-
- // request
- HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
- // set the properties
- NestedPropertyHelper.setNestedProperties(request, this);
-
- // let the super do it's thing
- return super.doStartTag();
- }
-
- /**
- * Complete the processing of the tag. The nested tags here will restore
- * all the original value for the tag itself and the nesting context.
- * @return int to describe the next step for the JSP processor
- * @throws JspException for the bad things JSP's do
- */
- public int doEndTag() throws JspException {
- // do the super's ending part
- int i = super.doEndTag();
- // reset the properties
- setProperty(originalProperty);
- // continue
- return i;
- }
-
- /**
- * Release the tag's resources and reset the values.
- */
- public void release() {
- super.release();
- // reset the originals
- originalProperty = null;
- }
-
- /* the usual private member variables */
- private String originalProperty = null;
+ /**
+ * Overriding method of the heart of the matter. Gets the relative
+ * property and leaves the rest up to the original tag implementation.
+ * Sweet.
+ *
+ * @return int JSP continuation directive. This is in the hands of the
+ * super class.
+ */
+ public int doStartTag() throws JspException {
+ // get the original properties
+ originalProperty = getProperty();
+
+ // request
+ HttpServletRequest request =
+ (HttpServletRequest) pageContext.getRequest();
+
+ // set the properties
+ NestedPropertyHelper.setNestedProperties(request, this);
+
+ // let the super do it's thing
+ return super.doStartTag();
+ }
+
+ /**
+ * Complete the processing of the tag. The nested tags here will restore
+ * all the original value for the tag itself and the nesting context.
+ *
+ * @return int to describe the next step for the JSP processor
+ * @throws JspException for the bad things JSP's do
+ */
+ public int doEndTag() throws JspException {
+ // do the super's ending part
+ int i = super.doEndTag();
+
+ // reset the properties
+ setProperty(originalProperty);
+
+ // continue
+ return i;
+ }
+
+ /**
+ * Release the tag's resources and reset the values.
+ */
+ public void release() {
+ super.release();
+
+ // reset the originals
+ originalProperty = null;
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org