|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.binding.form.support.CachingFieldFaceSource
org.springframework.binding.form.support.MessageSourceFieldFaceSource
public class MessageSourceFieldFaceSource
An implementation of FieldFaceSource that resolves the FieldFace from the MessageSourceAccessor
provided to the setMessageSourceAccessor method or from the ApplicationServices
singleton if none is
provided.
The various properties of the FieldFace are resolved from a message source using message codes. These codes where
generated by a MessageCodeStrategy
. If no other MessageCodeStrategy
is defined an instance of
DefaultMessageCodeStrategy
will be used
Constructor Summary | |
---|---|
MessageSourceFieldFaceSource()
Constructs a new MessageSourcePropertyFaceDescriptorSource. |
Method Summary | |
---|---|
protected IconSource |
getIconSource()
|
protected String |
getMessage(String contextId,
String fieldPath,
String[] faceDescriptorProperty)
Returns the value of the required property of the FieldFace. |
protected String |
getMessage(String contextId,
String fieldPath,
String[] faceDescriptorProperties,
String defaultValue)
Returns the value of the required property of the FieldFace. |
protected String[] |
getMessageKeys(String contextId,
String fieldPath,
String[] faceDescriptorProperties)
Returns an array of message keys that are used to resolve the required property of the FieldFace. |
MessageCodeStrategy |
getMessageKeyStrategy()
|
protected MessageSourceAccessor |
getMessageSourceAccessor()
If a message source was provided to the setMessageSourceAccessor method returns that otherwise returns the default message source located using the ApplicationServices singleton |
protected FieldFace |
loadFieldFace(String field,
Object context)
Loads the FieldFace for the given field path and context id. |
protected FieldFace |
loadFieldFace(String field,
String contextId)
|
void |
setIconSource(IconSource iconSource)
Set the icon source that will be used to resolve the FieldFace's icon property. |
void |
setMessageKeyStrategy(MessageCodeStrategy messageKeyStrategy)
|
void |
setMessageSourceAccessor(MessageSourceAccessor messageSourceAccessor)
Set the message source that will be used to resolve the FieldFace's properties. |
Methods inherited from class org.springframework.binding.form.support.CachingFieldFaceSource |
---|
getFieldFace, getFieldFace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageSourceFieldFaceSource()
Method Detail |
---|
public void setMessageSourceAccessor(MessageSourceAccessor messageSourceAccessor)
protected MessageSourceAccessor getMessageSourceAccessor()
ApplicationServices
singleton
public void setIconSource(IconSource iconSource)
protected IconSource getIconSource()
protected String getMessage(String contextId, String fieldPath, String[] faceDescriptorProperty)
protected String getMessage(String contextId, String fieldPath, String[] faceDescriptorProperties, String defaultValue)
protected String[] getMessageKeys(String contextId, String fieldPath, String[] faceDescriptorProperties)
Subclasses my override this method to provide an alternative to the default message key generation strategy.
protected FieldFace loadFieldFace(String field, String contextId)
protected FieldFace loadFieldFace(String field, Object context)
CachingFieldFaceSource
loadFieldFace
in class CachingFieldFaceSource
field
- the form field pathcontext
- optional context for which the FieldFace is being resolved
public MessageCodeStrategy getMessageKeyStrategy()
public void setMessageKeyStrategy(MessageCodeStrategy messageKeyStrategy)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |