use of org.jaffa.presentation.portlet.widgets.model.SimpleWidgetModel in project jaffa-framework by jaffa-projects.
the class TaskMaintenanceForm method getOftenHoursWM.
/**
* Getter for property oftenHours. This is invoked by the custom tag, when the jsp is rendered, to get the current value.
* @return Value of property oftenHours.
*/
public SimpleWidgetModel getOftenHoursWM() {
SimpleWidgetModel w_oftenHours = (SimpleWidgetModel) getWidgetCache().getModel("oftenHours");
if (w_oftenHours == null) {
// Allow positive integers only
IntegerFieldMetaData fieldMetaData = new IntegerFieldMetaData("OftenHours", "[label.Jaffa.Scheduler.ScheduledTask.Recurrence.OFTEN.Hours]", Boolean.FALSE, null, new Long(0), null, null);
w_oftenHours = new SimpleWidgetModel(getOftenHours(), fieldMetaData);
getWidgetCache().addModel("oftenHours", w_oftenHours);
}
return w_oftenHours;
}
use of org.jaffa.presentation.portlet.widgets.model.SimpleWidgetModel in project jaffa-framework by jaffa-projects.
the class TaskMaintenanceForm method getMonthlyWeekDayWM.
/**
* Getter for property monthlyWeekDay. This is invoked by the custom tag, when the jsp is rendered, to get the current value.
* @return Value of property monthlyWeekDay.
*/
public SimpleWidgetModel getMonthlyWeekDayWM() {
SimpleWidgetModel w_monthlyWeekDay = (SimpleWidgetModel) getWidgetCache().getModel("monthlyWeekDay");
if (w_monthlyWeekDay == null) {
w_monthlyWeekDay = new SimpleWidgetModel(getMonthlyWeekDay());
addWeekDayOptions(w_monthlyWeekDay);
getWidgetCache().addModel("monthlyWeekDay", w_monthlyWeekDay);
}
return w_monthlyWeekDay;
}
use of org.jaffa.presentation.portlet.widgets.model.SimpleWidgetModel in project jaffa-framework by jaffa-projects.
the class TaskMaintenanceForm method getYearlyFrequencyWM.
/**
* Getter for property yearlyFrequency. This is invoked by the custom tag, when the jsp is rendered, to get the current value.
* @return Value of property yearlyFrequency.
*/
public SimpleWidgetModel getYearlyFrequencyWM() {
SimpleWidgetModel w_yearlyFrequency = (SimpleWidgetModel) getWidgetCache().getModel("yearlyFrequency");
if (w_yearlyFrequency == null) {
// Allow positive integers only
IntegerFieldMetaData fieldMetaData = new IntegerFieldMetaData("YearlyFrequency", "[label.Jaffa.Scheduler.ScheduledTask.Recurrence.YEARLY.Frequency]", Boolean.FALSE, null, new Long(0), null, null);
w_yearlyFrequency = new SimpleWidgetModel(getYearlyFrequency(), fieldMetaData);
getWidgetCache().addModel("yearlyFrequency", w_yearlyFrequency);
}
return w_yearlyFrequency;
}
use of org.jaffa.presentation.portlet.widgets.model.SimpleWidgetModel in project jaffa-framework by jaffa-projects.
the class LabelEditorForm method getSourceFragmentNameWM.
/**
* Getter for property sourceFragmentName. This is invoked by the custom tag, when the jsp is rendered, to get the current value.
* @return Value of property sourceFragmentName.
*/
public SimpleWidgetModel getSourceFragmentNameWM() {
SimpleWidgetModel sourceFragmentNameModel = (SimpleWidgetModel) getWidgetCache().getModel("sourceFragmentName");
if (sourceFragmentNameModel == null) {
sourceFragmentNameModel = new SimpleWidgetModel(getSourceFragmentName());
getWidgetCache().addModel("sourceFragmentName", sourceFragmentNameModel);
}
return sourceFragmentNameModel;
}
use of org.jaffa.presentation.portlet.widgets.model.SimpleWidgetModel in project jaffa-framework by jaffa-projects.
the class LabelEditorForm method doValidate.
/**
* This method should be invoked to copy the fields from the FormBean to the component.
* @return true of the values are copied successfully
*/
public boolean doValidate() {
String value = null;
value = getLabelFilterWM().getStringValue();
if (value != null && value.trim().length() == 0)
value = null;
setLabelFilter(value);
setDisplayOverridesOnly(getDisplayOverridesOnlyWM().getBooleanValue());
value = getSearchPathForSourceFragmentsWM().getStringValue();
if (value != null && value.trim().length() == 0)
value = null;
setSearchPathForSourceFragments(value);
value = getSourceFragmentNameWM().getStringValue();
if (value != null && value.trim().length() == 0)
value = null;
setSourceFragmentName(value);
Map labels = ((LabelEditorComponent) getComponent()).getLabels();
GridModel rows = getRowsWM();
for (Iterator itr = rows.getRows().iterator(); itr.hasNext(); ) {
GridModelRow row = (GridModelRow) itr.next();
String label = (String) row.get(LabelEditorComponent.LABEL);
String override = ((SimpleWidgetModel) row.get(LabelEditorComponent.OVERRIDE)).getStringValue();
if (override != null && override.length() == 0)
override = null;
Map map = (Map) labels.get(label);
map.put(LabelEditorComponent.OVERRIDE, override);
}
return true;
}
Aggregations