Search in sources :

Example 1 with DropDownModel

use of org.jaffa.presentation.portlet.widgets.model.DropDownModel in project jaffa-framework by jaffa-projects.

the class GridComponent method getGridChildren.

public void getGridChildren(String rowNo, String field, GridForm myForm) {
    GridModel w_model1 = (GridModel) myForm.getWidgetCache().getModel(field);
    GridModelRow row;
    System.out.println("The row number is " + rowNo);
    row = w_model1.getRowById(new Integer(rowNo).intValue());
    if ((row.getElement("isExpanded") != null) && (Boolean.TRUE.equals((Boolean) row.getElement("isExpanded")))) {
        return;
    }
    row.addElement("isExpanded", new Boolean(true));
    row.addElement("isDisplayed", new Boolean(true));
    w_model1.setTarget(row);
    row = w_model1.newRow(new Integer(rowNo).intValue() + 1);
    row.addElement("isDisplayed", new Boolean(true));
    row.addElement("isTarget", new Boolean(false));
    row.addElement("isParent", new Boolean(false));
    row.addElement("level", new Integer(4));
    row.addElement("field1", new EditBoxModel("Field91Value"));
    row.addElement("field2", new EditBoxModel("Field92Value"));
    row.addElement("field3", new DateTimeModel(DateTime.addMonth(new DateTime(), 1)));
    row.addElement("field4", new CheckBoxModel(true));
    row.addElement("field5", new ImageModel(ImageComponent.getImageBytes("C:\\Sandbox\\Jaffa\\source\\httpunittest\\html\\widgets\\tests\\testimage1_up.gif")));
    row.addElement("field6", new DropDownModel("Value3"));
}
Also used : GridModel(org.jaffa.presentation.portlet.widgets.model.GridModel) DateTimeModel(org.jaffa.presentation.portlet.widgets.model.DateTimeModel) DropDownModel(org.jaffa.presentation.portlet.widgets.model.DropDownModel) EditBoxModel(org.jaffa.presentation.portlet.widgets.model.EditBoxModel) GridModelRow(org.jaffa.presentation.portlet.widgets.model.GridModelRow) ImageModel(org.jaffa.presentation.portlet.widgets.model.ImageModel) DateTime(org.jaffa.datatypes.DateTime) CheckBoxModel(org.jaffa.presentation.portlet.widgets.model.CheckBoxModel)

Example 2 with DropDownModel

use of org.jaffa.presentation.portlet.widgets.model.DropDownModel in project jaffa-framework by jaffa-projects.

the class DropDownForm method getFieldWithCachedModelWM.

public WidgetModel getFieldWithCachedModelWM() {
    if (w_fieldWithCachedModel == null) {
        w_fieldWithCachedModel = (DropDownModel) getWidgetCache().getModel("fieldWithCachedModel");
        if (w_fieldWithCachedModel == null) {
            w_fieldWithCachedModel = new DropDownModel(getFieldWithCachedModel());
            getWidgetCache().addModel("fieldWithCachedModel", w_fieldWithCachedModel);
        }
    }
    return w_fieldWithCachedModel;
}
Also used : DropDownModel(org.jaffa.presentation.portlet.widgets.model.DropDownModel)

Example 3 with DropDownModel

use of org.jaffa.presentation.portlet.widgets.model.DropDownModel in project jaffa-framework by jaffa-projects.

the class DropDownForm method getFieldWithValidationWM.

public WidgetModel getFieldWithValidationWM() {
    if (w_fieldWithValidation == null) {
        w_fieldWithValidation = new DropDownModel(getFieldWithValidation());
        // add some dynamic options
        w_fieldWithValidation.addOption("FredLabel", "FredValue");
    }
    return w_fieldWithValidation;
}
Also used : DropDownModel(org.jaffa.presentation.portlet.widgets.model.DropDownModel)

Example 4 with DropDownModel

use of org.jaffa.presentation.portlet.widgets.model.DropDownModel in project jaffa-framework by jaffa-projects.

the class DropDownForm method setFieldLinkedToCCAndCachedWV.

public void setFieldLinkedToCCAndCachedWV(String value) {
    DropDownModel m = (DropDownModel) getFieldLinkedToCCAndCachedWM();
    DropDownController.updateModel(value, m);
}
Also used : DropDownModel(org.jaffa.presentation.portlet.widgets.model.DropDownModel)

Example 5 with DropDownModel

use of org.jaffa.presentation.portlet.widgets.model.DropDownModel in project jaffa-framework by jaffa-projects.

the class DropDownForm method setFieldLinkedToCCWV.

public void setFieldLinkedToCCWV(String value) {
    DropDownModel m = (DropDownModel) getFieldLinkedToCCWM();
    DropDownController.updateModel(value, m);
}
Also used : DropDownModel(org.jaffa.presentation.portlet.widgets.model.DropDownModel)

Aggregations

DropDownModel (org.jaffa.presentation.portlet.widgets.model.DropDownModel)13 DateTime (org.jaffa.datatypes.DateTime)3 CheckBoxModel (org.jaffa.presentation.portlet.widgets.model.CheckBoxModel)3 DateTimeModel (org.jaffa.presentation.portlet.widgets.model.DateTimeModel)3 EditBoxModel (org.jaffa.presentation.portlet.widgets.model.EditBoxModel)3 GridModel (org.jaffa.presentation.portlet.widgets.model.GridModel)3 GridModelRow (org.jaffa.presentation.portlet.widgets.model.GridModelRow)3 ImageModel (org.jaffa.presentation.portlet.widgets.model.ImageModel)2 CodeHelperOutCodeDto (org.jaffa.components.codehelper.dto.CodeHelperOutCodeDto)1 CodeHelperOutElementDto (org.jaffa.components.codehelper.dto.CodeHelperOutElementDto)1