org.barracudamvc.core.forms
Class PrefixFormMapper
java.lang.Object
org.barracudamvc.core.forms.DefaultFormMapper
org.barracudamvc.core.forms.PrefixFormMapper
- All Implemented Interfaces:
- FormMapper
- public class PrefixFormMapper
- extends DefaultFormMapper
A PrefixFormMapFilter allows you to specify a prefix (ie. "addr1_") and
only those keys which start with that prefix will actually get mapped. When
they are mapped, they will be mapped without the prefix.
- Since:
- 2.0
- Author:
- Christian Cryder [christianc@granitepeaks.com]
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
prefix
protected String prefix
PrefixFormMapper
public PrefixFormMapper(String iprefix)
mapElement
public FormElement mapElement(FormMap fm,
String key,
Object origVal)
- Map an individual element
- Specified by:
mapElement
in interface FormMapper
- Overrides:
mapElement
in class DefaultFormMapper
setPrefix
public void setPrefix(String iprefix)
getPrefix
public String getPrefix()
getElementForMapping
protected FormElement getElementForMapping(FormMap fm,
String paramKey)
- Description copied from class:
DefaultFormMapper
- This method is used by the mapping process to look up FormElements. It
basically provides a way for the filter to determine whether or not
mapping should occur. You can override this method of control what gets
mapped and what doesn't. Based on the target key, the mapper either passes
back the appropriate FormElement to map the key to, or it returns null to
indicate the element should not be mapped.
- Overrides:
getElementForMapping
in class DefaultFormMapper
Copyright © 2004 BarracudaMVC.org All Rights Reserved.