|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.woody.formmodel.AbstractWidget org.apache.cocoon.woody.formmodel.Messages
public class Messages
A widget to output one or messages. This widget doesn't respond to input from the user, except that on each form submit the messages are cleared.
This widget is typically used to communicate extra validation errors or other messages to the user, that aren't associated with any other widget in particular.
Constructor Summary | |
---|---|
protected |
Messages(MessagesDefinition definition)
|
Method Summary | |
---|---|
void |
addMessage(String message)
Adds a string message. |
void |
addMessage(XMLizable message)
Adds a message in the form an object that implements the XMLizable interface. |
void |
generateLabel(ContentHandler contentHandler)
Generates SAX events for the label of this widget. |
void |
generateSaxFragment(ContentHandler contentHandler,
Locale locale)
Generates an XML representation of this widget. |
String |
getId()
Gets the id of this widget. |
void |
readFromRequest(FormContext formContext)
Lets this widget read its data from a request. |
boolean |
validate(FormContext formContext)
Validates this widget and returns the outcome. |
Methods inherited from class org.apache.cocoon.woody.formmodel.AbstractWidget |
---|
addValidator, broadcastEvent, generateItemSaxFragment, generateSaxFragment, getForm, getFullyQualifiedId, getLocation, getNamespace, getParent, getValue, getWidget, isRequired, removeValidator, setDefinition, setLocation, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Messages(MessagesDefinition definition)
Method Detail |
---|
public String getId()
AbstractWidget
getId
in interface Widget
getId
in class AbstractWidget
public void readFromRequest(FormContext formContext)
Widget
public boolean validate(FormContext formContext)
Widget
Widget.generateSaxFragment(ContentHandler, Locale)
method.
validate
in interface Widget
validate
in class AbstractWidget
public void addMessage(String message)
public void addMessage(XMLizable message)
A useful implementation is I18nMesage
.
public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException
Widget
SAXException
public void generateLabel(ContentHandler contentHandler) throws SAXException
Widget
generateLabel
in interface Widget
generateLabel
in class AbstractWidget
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |