org.apache.beehive.netui.tags.html
Class BindingUpdateErrors

Object
  extended by SimpleTagSupport
      extended by AbstractSimpleTag
          extended by BindingUpdateErrors
All Implemented Interfaces:
JspTag, SimpleTag, INetuiTag

public class BindingUpdateErrors
extends AbstractSimpleTag

Renders the set of error messages found during processPopulate when the values to be updated cannot be resolved. These errors are treated as warnings. By default, this tag is only on in Iterative Dev mode and the warning are not displayed in production mode. The tag is intended for development use.

Example

In this first sample, because the <netui:bindingUpdateErrors/> tag is unqualified, messages will be displayed if any data binding errors occurred when a form was posted. The messages are displayed on the page and the command window.

<netui:bindingUpdateErrors />

In this next sample, only binding errors for the expression {actionForm.firstName} will be displayed on the page and the command window.

<netui:bindingUpdateErrors expression="actionForm.firstName"/>

Note, the expression used in this tag needs to match the expressions used to POST form data. This tag's expression attribute must resolve to a valid NetUI expression.


Constructor Summary
BindingUpdateErrors()
           
 
Method Summary
 void doTag()
          Render the specified error messages if there are any.
 String getTagName()
          Return the name of the Tag.
 void setAlwaysReport(boolean alwaysReport)
          Set the value which will override the default behavior of not showing errors in production mode.
 void setExpression(String expression)
          Sets the expression to match for binding errors.
 
Methods inherited from class AbstractSimpleTag
getBufferBody, getHtmlTag, getIdForTagId, getInlineError, getPageContext, getScriptReporter, getUserLocale, hasErrors, registerTagError, registerTagError, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write
 
Methods inherited from class SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindingUpdateErrors

public BindingUpdateErrors()
Method Detail

getTagName

public String getTagName()
Return the name of the Tag.

Specified by:
getTagName in interface INetuiTag
Specified by:
getTagName in class AbstractSimpleTag
Returns:
the name of the tag.

setExpression

public void setExpression(String expression)
                   throws JspException
Sets the expression to match for binding errors. If an expression is set, only binding errors for that expression will be displayed. Otherwise, all errors will be displayed.

Parameters:
expression - The expression to match against.
Throws:
JspException

setAlwaysReport

public void setAlwaysReport(boolean alwaysReport)
Set the value which will override the default behavior of not showing errors in production mode.

Parameters:
alwaysReport - a boolean that if true will cause the errors to always be displayed. The default is false

doTag

public void doTag()
           throws JspException
Render the specified error messages if there are any.

Specified by:
doTag in interface SimpleTag
Overrides:
doTag in class SimpleTagSupport
Throws:
JspException - if a JSP exception has occurred