Search in sources :

Example 1 with StringFieldMetaData

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);
    }
}
Also used : StringFieldMetaData(org.jaffa.metadata.StringFieldMetaData)

Example 2 with StringFieldMetaData

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;
}
Also used : FieldMetaData(org.jaffa.metadata.FieldMetaData) StringFieldMetaData(org.jaffa.metadata.StringFieldMetaData) IntegerFieldMetaData(org.jaffa.metadata.IntegerFieldMetaData) DateOnlyFieldMetaData(org.jaffa.metadata.DateOnlyFieldMetaData) DateTimeFieldMetaData(org.jaffa.metadata.DateTimeFieldMetaData) DecimalFieldMetaData(org.jaffa.metadata.DecimalFieldMetaData) StringFieldMetaData(org.jaffa.metadata.StringFieldMetaData) EditBoxModel(org.jaffa.presentation.portlet.widgets.model.EditBoxModel)

Example 3 with StringFieldMetaData

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;
}
Also used : EditBoxModel(org.jaffa.presentation.portlet.widgets.model.EditBoxModel) StringFieldMetaData(org.jaffa.metadata.StringFieldMetaData)

Example 4 with StringFieldMetaData

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;
}
Also used : FieldMetaData(org.jaffa.metadata.FieldMetaData) StringFieldMetaData(org.jaffa.metadata.StringFieldMetaData) IntegerFieldMetaData(org.jaffa.metadata.IntegerFieldMetaData) DateOnlyFieldMetaData(org.jaffa.metadata.DateOnlyFieldMetaData) DateTimeFieldMetaData(org.jaffa.metadata.DateTimeFieldMetaData) DecimalFieldMetaData(org.jaffa.metadata.DecimalFieldMetaData) StringFieldMetaData(org.jaffa.metadata.StringFieldMetaData) EditBoxModel(org.jaffa.presentation.portlet.widgets.model.EditBoxModel)

Aggregations

StringFieldMetaData (org.jaffa.metadata.StringFieldMetaData)4 EditBoxModel (org.jaffa.presentation.portlet.widgets.model.EditBoxModel)3 DateOnlyFieldMetaData (org.jaffa.metadata.DateOnlyFieldMetaData)2 DateTimeFieldMetaData (org.jaffa.metadata.DateTimeFieldMetaData)2 DecimalFieldMetaData (org.jaffa.metadata.DecimalFieldMetaData)2 FieldMetaData (org.jaffa.metadata.FieldMetaData)2 IntegerFieldMetaData (org.jaffa.metadata.IntegerFieldMetaData)2