public class FieldProvider<U extends Ujo> extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static String |
PASSWORD_KEY_NAME
Password key name to create a component PasswordField
|
| Constructor and Description |
|---|
FieldProvider(org.apache.wicket.markup.repeater.RepeatingView repeatingView) |
FieldProvider(String repeatingViewId) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Field field)
Add any field to a repeating view
|
void |
add(Key key)
Add new field to a repeating view
|
<T extends OrmUjo> |
add(Key<U,T> key,
org.ujorm.criterion.Criterion<T> crn,
Key<T,?> display)
Add a Combo-box for a persistent entity
|
protected U |
cloneDomain(U domain,
OrmSessionProvider session)
Clone the domain object of reload the persistent object from database.
|
protected U |
copyToFields(U domain)
Assign values to required component fields in a transaction for a lazy loading case
|
U |
getDomain()
Copy new value to the result and return the result
|
Field |
getField(Key key)
Return field
|
Collection<Field> |
getFields()
Return all fields
|
U |
getInputDomain()
Get original domain
|
protected Set<String> |
getKeyNames()
Return all keys in a String format
|
protected OrmHandler |
getOrmHandler()
Returns OrmHandler
|
org.apache.wicket.markup.repeater.RepeatingView |
getRepeatingView()
Returns the repeating view
|
int |
getTextAreaLimit()
Returns a miminal text length to create a TextArea component.
|
<T> T |
getValue(Key<U,T> key)
Get Value
|
protected boolean |
isMandatory(Key<U,?> key)
Is the key mandatory ?
|
protected boolean |
isPasswordKey(Key<U,?> key)
Is the key type of PasswordField ?
The default condition is: the last key name must be 'PASSWORD'.
|
void |
onChange(Key<U,?> source)
Refresh component
|
void |
onChange(Key<U,?> source,
String action)
Refresh component
|
void |
setDomain(U domain)
Copy domain attributes to fields and clone the arguments to internal parameters.
|
void |
setEnabled(Key<U,?> key,
boolean enabled)
Set an enabled attribute for a required filed.
|
<T> void |
setNewCssStyle(Key<U,T> key,
String cssStyle)
Add a CSS style to the field of required key.
|
protected void |
setValidator(Key<U,?> key,
Field field)
Set a validator of the Key to the Field from argument
|
<T> void |
setValidator(Key<U,T> key,
org.apache.wicket.validation.IValidator<T> validator)
Set a visible attribute for a required filed.
|
<T> void |
setValidator(Key<U,T> key,
Validator<T> validator)
Set a visible attribute for a required filed.
|
<T> void |
setValidatorOld(Key<U,T> key,
Validator validator)
Set a visible attribute for a required filed, where validator have not generic type.
|
<T> void |
setValue(Key<U,T> key,
T value)
Set Value
|
<T> void |
setValue(Key<U,T> key,
T value,
org.apache.wicket.ajax.AjaxRequestTarget target)
Set Value and repaing component
|
void |
setVisible(Key<U,?> key,
boolean visible)
Set a visible attribute for a required filed.
|
public static final String PASSWORD_KEY_NAME
public FieldProvider(String repeatingViewId)
public FieldProvider(org.apache.wicket.markup.repeater.RepeatingView repeatingView)
public void add(Field field)
public void add(Key key)
public <T extends OrmUjo> void add(Key<U,T> key, org.ujorm.criterion.Criterion<T> crn, Key<T,?> display)
public <T> void setValue(Key<U,T> key, T value, org.apache.wicket.ajax.AjaxRequestTarget target)
public Collection<Field> getFields()
public org.apache.wicket.markup.repeater.RepeatingView getRepeatingView()
protected OrmHandler getOrmHandler()
protected void setValidator(Key<U,?> key, Field field)
public void setDomain(U domain)
protected U cloneDomain(U domain, OrmSessionProvider session) throws NoSuchElementException, IllegalStateException
protected U copyToFields(U domain)
public U getDomain()
public U getInputDomain()
public int getTextAreaLimit()
protected boolean isPasswordKey(Key<U,?> key)
public void setEnabled(Key<U,?> key, boolean enabled)
public void setVisible(Key<U,?> key, boolean visible)
public <T> void setValidator(Key<U,T> key, Validator<T> validator)
public <T> void setValidatorOld(Key<U,T> key, Validator validator)
public <T> void setValidator(Key<U,T> key, org.apache.wicket.validation.IValidator<T> validator)
Copyright © 2013. All Rights Reserved.