use of org.jaffa.metadata.StringFieldMetaData in project jaffa-framework by jaffa-projects.
the class StringFieldValidator method validate.
/**
* The RulesEngine will invoke this method to perform the field validation.
* @throws ValidationException if any validation rule fails.
* @throws FrameworkException if any framework error occurs.
*/
public void validate() throws ValidationException, FrameworkException {
Object value = getValue();
if (value != null) {
StringFieldMetaData meta = new StringFieldMetaData(null, getLabelToken(), null, getPattern(), getLength(), getCaseType(), getMinLength());
FieldValidator.validateData(value.toString(), meta);
}
}
use of org.jaffa.metadata.StringFieldMetaData in project jaffa-framework by jaffa-projects.
the class EditBoxForm method getFieldLinkedToCCAndCachedWM.
public WidgetModel getFieldLinkedToCCAndCachedWM() {
if (w_fieldLinkedToCCAndCached == null) {
w_fieldLinkedToCCAndCached = (EditBoxModel) getWidgetCache().getModel("fieldLinkedToCCAndCached");
if (w_fieldLinkedToCCAndCached == null) {
FieldMetaData meta = new StringFieldMetaData("SomeName1", "SomeToken1", Boolean.FALSE, null, null, FieldMetaData.LOWER_CASE);
w_fieldLinkedToCCAndCached = new EditBoxModel(meta);
getWidgetCache().addModel("fieldLinkedToCCAndCached", w_fieldLinkedToCCAndCached);
w_fieldLinkedToCCAndCached.setValue(getFieldLinkedToCCAndCached());
}
}
return w_fieldLinkedToCCAndCached;
}
use of org.jaffa.metadata.StringFieldMetaData in project jaffa-framework by jaffa-projects.
the class EditBoxForm method getDataTypeStringWM.
public WidgetModel getDataTypeStringWM() {
if (w_dataTypeString == null) {
w_dataTypeString = new EditBoxModel(new StringFieldMetaData("StringVal", "StringVal", Boolean.TRUE, "[0-9]+", new Integer("8"), FieldMetaData.UPPER_CASE, new Integer("4")));
w_dataTypeString.setValue(getDataTypeString());
}
return w_dataTypeString;
}
use of org.jaffa.metadata.StringFieldMetaData in project jaffa-framework by jaffa-projects.
the class EditBoxForm method getFieldLinkedToCCWM.
public WidgetModel getFieldLinkedToCCWM() {
if (w_fieldLinkedToCC == null) {
FieldMetaData meta = new StringFieldMetaData("SomeName2", "SomeToken2", Boolean.FALSE, null, null, FieldMetaData.UPPER_CASE);
w_fieldLinkedToCC = new EditBoxModel(meta);
w_fieldLinkedToCC.setValue(getFieldLinkedToCC());
}
return w_fieldLinkedToCC;
}
Aggregations