Search in sources :

Example 6 with CheckBoxModel

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

the class CheckBoxForm method getFieldWithCachedModelWM.

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

Example 7 with CheckBoxModel

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

the class CheckBoxForm method setFieldLinkedToCCAndCachedWV.

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

Example 8 with CheckBoxModel

use of org.jaffa.presentation.portlet.widgets.model.CheckBoxModel 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 9 with CheckBoxModel

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

the class UserGridForm method createNewModel.

private GridModel createNewModel() {
    GridModel model = new GridModel();
    GridModelRow row;
    row = model.newRow();
    row.addElement("field1", new EditBoxModel("Field11Value"));
    row.addElement("field2", new EditBoxModel("Field12Value"));
    row.addElement("field3", new DateTimeModel());
    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("Value1"));
    row = model.newRow();
    row.addElement("field1", new EditBoxModel("Field21Value"));
    row.addElement("field2", new EditBoxModel("Field22Value"));
    row.addElement("field3", new DateTimeModel(new DateTime()));
    row.addElement("field4", new CheckBoxModel(false));
    row.addElement("field5", new ImageModel(ImageComponent.getImageBytes("C:\\Sandbox\\Jaffa\\source\\httpunittest\\html\\widgets\\tests\\testimage1_down.gif")));
    row.addElement("field6", new DropDownModel("Value2"));
    row = model.newRow();
    row.addElement("field1", new EditBoxModel("Field31Value"));
    row.addElement("field2", new EditBoxModel("Field32Value"));
    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"));
    return model;
}
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 10 with CheckBoxModel

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

the class CheckBoxForm method setFieldWithCachedModelWV.

public void setFieldWithCachedModelWV(String value) {
    CheckBoxModel m = (CheckBoxModel) getFieldWithCachedModelWM();
    CheckBoxController.updateModel(value, m);
}
Also used : CheckBoxModel(org.jaffa.presentation.portlet.widgets.model.CheckBoxModel)

Aggregations

CheckBoxModel (org.jaffa.presentation.portlet.widgets.model.CheckBoxModel)19 GridModelRow (org.jaffa.presentation.portlet.widgets.model.GridModelRow)9 ApplicationExceptions (org.jaffa.exceptions.ApplicationExceptions)7 EditBoxModel (org.jaffa.presentation.portlet.widgets.model.EditBoxModel)7 GridModel (org.jaffa.presentation.portlet.widgets.model.GridModel)6 Iterator (java.util.Iterator)4 FrameworkException (org.jaffa.exceptions.FrameworkException)4 FormSelectionMaintenanceOutRowDto (org.jaffa.modules.printing.components.formselectionmaintenance.dto.FormSelectionMaintenanceOutRowDto)4 FormKey (org.jaffa.presentation.portlet.FormKey)4 DateTime (org.jaffa.datatypes.DateTime)3 FormSelectionException (org.jaffa.modules.printing.components.formselectionmaintenance.FormSelectionException)3 DateTimeModel (org.jaffa.presentation.portlet.widgets.model.DateTimeModel)3 DropDownModel (org.jaffa.presentation.portlet.widgets.model.DropDownModel)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 org.jaffa.components.maint (org.jaffa.components.maint)2 ApplicationException (org.jaffa.exceptions.ApplicationException)2 FormSelectionMaintenanceOutDto (org.jaffa.modules.printing.components.formselectionmaintenance.dto.FormSelectionMaintenanceOutDto)2 ImageModel (org.jaffa.presentation.portlet.widgets.model.ImageModel)2 Method (java.lang.reflect.Method)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1