| 1 |
|
package org.trails.component; |
| 2 |
|
|
| 3 |
|
import java.util.List; |
| 4 |
|
|
| 5 |
|
import org.apache.tapestry.annotations.InjectObject; |
| 6 |
|
import org.apache.tapestry.annotations.Parameter; |
| 7 |
|
import org.apache.tapestry.form.IOptionRenderer; |
| 8 |
|
import org.apache.tapestry.form.IPropertySelectionModel; |
| 9 |
|
import org.apache.tapestry.form.PropertySelection; |
| 10 |
|
import org.apache.tapestry.form.ValidatableFieldSupport; |
| 11 |
|
import org.trails.descriptor.IPropertyDescriptor; |
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
3 |
public abstract class AbstractPropertySelection extends PropertySelection |
| 19 |
|
{ |
| 20 |
|
|
| 21 |
|
@Parameter(defaultValue = "buildSelectionModel()") |
| 22 |
|
public abstract IPropertySelectionModel getModel(); |
| 23 |
|
|
| 24 |
|
public abstract void setModel(IPropertySelectionModel PropertySelectionModel); |
| 25 |
|
|
| 26 |
|
@InjectObject("service:tapestry.form.ValidatableFieldSupport") |
| 27 |
|
public abstract ValidatableFieldSupport getValidatableFieldSupport(); |
| 28 |
|
|
| 29 |
|
@Parameter(cache = false, defaultValue = "ognl:@org.apache.tapestry.form.DefaultOptionRenderer@DEFAULT_INSTANCE") |
| 30 |
|
public abstract IOptionRenderer getOptionRenderer(); |
| 31 |
|
|
| 32 |
|
@Parameter(name = "id", defaultValue = "id") |
| 33 |
|
public abstract String getIdParameter(); |
| 34 |
|
|
| 35 |
|
@Parameter(required = true) |
| 36 |
|
public abstract IPropertyDescriptor getPropertyDescriptor(); |
| 37 |
|
|
| 38 |
|
public abstract void setPropertyDescriptor(IPropertyDescriptor PropertyDescriptor); |
| 39 |
|
|
| 40 |
|
@Parameter(defaultValue = "not(propertyDescriptor.required)") |
| 41 |
|
public abstract boolean isAllowNone(); |
| 42 |
|
|
| 43 |
|
public abstract void setAllowNone(boolean allowNone); |
| 44 |
|
|
| 45 |
|
@Parameter(defaultValue = "literal:" + AbstractPropertySelectionModel.DEFAULT_NONE_LABEL) |
| 46 |
|
public abstract String getNoneLabel(); |
| 47 |
|
|
| 48 |
|
public abstract void setNoneLabel(String noneLabel); |
| 49 |
|
|
| 50 |
|
@Parameter |
| 51 |
|
public abstract List getInstances(); |
| 52 |
|
|
| 53 |
|
public abstract void setInstances(List instances); |
| 54 |
|
|
| 55 |
|
@Parameter |
| 56 |
|
public abstract Object getValue(); |
| 57 |
|
|
| 58 |
|
public abstract void setValue(Object value); |
| 59 |
|
|
| 60 |
|
public abstract IPropertySelectionModel buildSelectionModel(); |
| 61 |
|
|
| 62 |
|
} |