This documentation is for an old version of fiftyfive-wicket (2.0.9).
Class FeedbackStyle

  extended by org.apache.wicket.behavior.AbstractBehavior
      extended by
All Implemented Interfaces:
Serializable, IBehavior, IComponentConfigurationBehavior, IClusterable, IHeaderContributor

public class FeedbackStyle
extends AbstractBehavior

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="feedbackPanelERROR" />

Notice how the <input> gains the appropriate CSS class.

See Also:
Serialized Form

Field Summary
static FeedbackStyle INSTANCE
Constructor Summary
Method Summary
protected  String getCssClass(FeedbackMessage msg)
protected  FeedbackMessagesModel newFeedbackMessagesModel(Component c)
 void onComponentTag(Component c, ComponentTag tag)
Methods inherited from class org.apache.wicket.behavior.AbstractBehavior
afterRender, beforeRender, bind, cleanup, detach, detachModel, exception, getStatelessHint, isEnabled, isTemporary, onConfigure, onException, onRendered, rendered, renderHead
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final FeedbackStyle INSTANCE
Constructor Detail


public FeedbackStyle()
Method Detail


public void onComponentTag(Component c,
                           ComponentTag tag)
Specified by:
onComponentTag in interface IBehavior
onComponentTag in class AbstractBehavior


protected FeedbackMessagesModel newFeedbackMessagesModel(Component c)


protected String getCssClass(FeedbackMessage msg)

Copyright © 2011 55 Minutes. All Rights Reserved.