Example usage for org.apache.wicket.model StringResourceModel toString

List of usage examples for org.apache.wicket.model StringResourceModel toString

Introduction

In this page you can find the example usage for org.apache.wicket.model StringResourceModel toString.

Prototype

@Override
public String toString() 

Source Link

Document

This method just returns debug information, so it won't return the localized string.

Usage

From source file:gr.interamerican.wicket.utils.WicketUtils.java

License:Open Source License

/**
 * Triggers error on a component./* w w  w.  j  a v a 2s.c o m*/
 * 
 * @param component
 *        Component on which error is triggered.  
 * @param resourceKey
 *        Resource key for the resource message. The resource key must be
 *        relevant to the component.
 */
public static void error(Component component, String resourceKey) {
    StringResourceModel model = new StringResourceModel(resourceKey, component, null);
    String message = model.toString();
    component.error(message);
}