org.barracudamvc.contrib.sam.models
Class ErrorModel
java.lang.Object
org.barracudamvc.core.comp.AbstractTemplateModel
org.barracudamvc.contrib.dbroggisch.display.IterativeCollectionModel
org.barracudamvc.contrib.sam.models.ErrorModel
- All Implemented Interfaces:
- Contextual, IterativeModel, Model, TemplateModel
public class ErrorModel
- extends IterativeCollectionModel
ErrorModel is a special Model for displaying form validation errors.
During the control events, the model if filled by calling the static create(org.barracudamvc.core.event.EventContext, java.lang.Exception)
methods with the form validation exceptions
During the view phase, the model acts as a IterativeModel and displays the error
messages.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static org.apache.log4j.Logger logger
DEFAULT_ERRORMODEL
public static final String DEFAULT_ERRORMODEL
- See Also:
- Constant Field Values
DIRECTIVE_VISIBLE
public static final String DIRECTIVE_VISIBLE
- See Also:
- Constant Field Values
ErrorModel
public ErrorModel(ViewContext vc)
ErrorModel
public ErrorModel(String name,
ViewContext vc)
getItem
public Object getItem(String key)
- Description copied from class:
AbstractTemplateModel
- Convenience method to get an item based on the key name (extracted
from the TemplateDirective).
- Overrides:
getItem
in class AbstractTemplateModel
processDirective
public boolean processDirective(TemplateDirective td)
- Description copied from class:
AbstractTemplateModel
- process any directives. return false to indicate a the node
containing this directive should be skipped.
- Specified by:
processDirective
in interface TemplateModel
- Overrides:
processDirective
in class AbstractTemplateModel
create
public static void create(EventContext context,
Exception ex)
create
public static void create(String name,
EventContext context,
Exception ex)
remove
public static void remove(EventContext context)
remove
public static void remove(String name,
EventContext context)
exists
public static boolean exists(EventContext context)
exists
public static boolean exists(String name,
EventContext context)
Copyright © 2006 BarracudaMVC.org All Rights Reserved.