org.wicketstuff.minis.model
Class ReplacingResourceModel
java.lang.Object
org.apache.wicket.model.AbstractReadOnlyModel<String>
org.wicketstuff.minis.model.ReplacingResourceModel
- All Implemented Interfaces:
- Serializable, org.apache.wicket.model.IComponentAssignedModel<String>, org.apache.wicket.model.IDetachable, org.apache.wicket.model.IModel<String>, org.apache.wicket.util.io.IClusterable
public class ReplacingResourceModel
- extends org.apache.wicket.model.AbstractReadOnlyModel<String>
- implements org.apache.wicket.model.IComponentAssignedModel<String>
The ReplacingResourceModel is used to replaced other keys marked up like ${key} with their
corresponding values in the given key.The replacing mechanism also uses the default way to get
the localized String.
Example:
key1=value of key1
key2=value of key2 contains ${key1}
Label label = new Label("label",new ReplacingResourceModel("key2"));
<span wicket:id="label"><span>
Output: value of key2 contains value of key1
- Author:
- Tobias Soloschenko
- See Also:
- Serialized Form
| Methods inherited from class org.apache.wicket.model.AbstractReadOnlyModel |
detach, setObject, toString |
| Methods inherited from interface org.apache.wicket.model.IModel |
setObject |
| Methods inherited from interface org.apache.wicket.model.IDetachable |
detach |
ReplacingResourceModel
public ReplacingResourceModel(String resourceKey)
getObject
public String getObject()
- Specified by:
getObject in interface org.apache.wicket.model.IModel<String>- Specified by:
getObject in class org.apache.wicket.model.AbstractReadOnlyModel<String>
- See Also:
AbstractReadOnlyModel.getObject()
wrapOnAssignment
public org.apache.wicket.model.IWrapModel<String> wrapOnAssignment(org.apache.wicket.Component component)
- Specified by:
wrapOnAssignment in interface org.apache.wicket.model.IComponentAssignedModel<String>
- See Also:
IComponentAssignedModel.wrapOnAssignment(org.apache.wicket.Component)
Copyright © 2018. All rights reserved.