Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 957 → Rev 958

/sun/hostadmiral/trunk/src/ak/strutsx/taglib/ErrorsIteratorTag.java
0,0 → 1,46
/**
* Extends and based on Apache Struts source code.
*
* Copyleft Anatoli Klassen (anatoli@aksoft.net)
*/
package ak.strutsx.taglib;
 
import javax.servlet.jsp.JspException;
 
import org.apache.struts.action.ActionErrors;
import org.apache.struts.taglib.html.ErrorsTag;
import org.apache.struts.util.RequestUtils;
 
public class ErrorsIteratorTag
extends ErrorsTag
{
protected String id = null;
 
public String getId()
{
return this.id;
}
 
public void setId(String id)
{
this.id = id;
}
 
public int doStartTag()
throws JspException
{
ActionErrors errors = RequestUtils.getActionErrors(pageContext, name);
 
if(errors != null)
pageContext.setAttribute(id, (property == null) ? errors.get() : errors.get(property));
 
return EVAL_BODY_INCLUDE;
}
 
public void release()
{
super.release();
 
id = null;
}
}