|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.model.AbstractReadOnlyModel
org.apache.wicket.model.ResourceModel
public class ResourceModel
A model that represents a localized resource string. This is a lightweight version of the
StringResourceModel. It lacks parameter substitutions, but is generally easier to use.
If you don't use this model as primary component model (you don't specify it in component
constructor and don't assign it to component using Component.setModel(IModel)), you will
need to connect the model with a component using wrapOnAssignment(Component).
| Constructor Summary | |
|---|---|
ResourceModel(java.lang.String resourceKey)
Constructor |
|
ResourceModel(java.lang.String resourceKey,
java.lang.String defaultValue)
Constructor |
|
| Method Summary | |
|---|---|
java.lang.Object |
getObject()
Gets the model object. |
IWrapModel |
wrapOnAssignment(Component component)
This method is called when the component gets its model assigned. |
| Methods inherited from class org.apache.wicket.model.AbstractReadOnlyModel |
|---|
detach, getObject, setObject, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.wicket.model.IModel |
|---|
setObject |
| Methods inherited from interface org.apache.wicket.model.IDetachable |
|---|
detach |
| Constructor Detail |
|---|
public ResourceModel(java.lang.String resourceKey)
resourceKey - key of the resource this model represents
public ResourceModel(java.lang.String resourceKey,
java.lang.String defaultValue)
resourceKey - key of the resource this model representsdefaultValue - value that will be returned if resource does not exist| Method Detail |
|---|
public java.lang.Object getObject()
IModel
getObject in interface IModelgetObject in class AbstractReadOnlyModelAbstractReadOnlyModel.getObject()public IWrapModel wrapOnAssignment(Component component)
IComponentAssignedModel
wrapOnAssignment in interface IComponentAssignedModelIComponentAssignedModel.wrapOnAssignment(org.apache.wicket.Component)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||