com.pmease.quickbuild.plugin.report.engine.web.feedback
Class FeedbackStyle
java.lang.Object
org.apache.wicket.behavior.Behavior
com.pmease.quickbuild.plugin.report.engine.web.feedback.FeedbackStyle
- All Implemented Interfaces:
- java.io.Serializable, org.apache.wicket.IClusterable, org.apache.wicket.IComponentAwareEventSink, org.apache.wicket.markup.html.IComponentAwareHeaderContributor
public class FeedbackStyle
- extends org.apache.wicket.behavior.Behavior
Automatically adds an appropriate CSS feedback class to a component if that
component or any of its descendants have feedback messages.
For example, let's say our Java looks like this:
add(new RequiredTextField("username").add(FeedbackStyle.INSTANCE));
Our HTML is:
<input type="text" wicket:id="username" />
Now, when our text field has a validation message to report, for example when
the user submits the form without filling in the required value, our
component will render like this:
<input type="text" class="feedback-ERROR" />
Notice how the <input>
gains the appropriate CSS class.
- Since:
- 2.0
- See Also:
- Serialized Form
Method Summary |
protected java.lang.String |
getCssClass(org.apache.wicket.feedback.FeedbackMessage msg)
|
protected org.apache.wicket.feedback.FeedbackMessagesModel |
newFeedbackMessagesModel(org.apache.wicket.Component c)
|
void |
onComponentTag(org.apache.wicket.Component c,
org.apache.wicket.markup.ComponentTag tag)
|
Methods inherited from class org.apache.wicket.behavior.Behavior |
afterRender, beforeRender, bind, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onConfigure, onEvent, onException, renderHead, unbind |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final FeedbackStyle INSTANCE
FeedbackStyle
public FeedbackStyle()
onComponentTag
public void onComponentTag(org.apache.wicket.Component c,
org.apache.wicket.markup.ComponentTag tag)
- Overrides:
onComponentTag
in class org.apache.wicket.behavior.Behavior
newFeedbackMessagesModel
protected org.apache.wicket.feedback.FeedbackMessagesModel newFeedbackMessagesModel(org.apache.wicket.Component c)
getCssClass
protected java.lang.String getCssClass(org.apache.wicket.feedback.FeedbackMessage msg)
Copyright © 2005-2010 PMEase Inc. All Rights Reserved.