String lastValue = pref.getValue(TOTAL_COLUMNS, "" + DEFAULT_COLUMNS);
if (uiInput.getValue() == null || uiInput.getValue().length() == 0)
{
uiInput.setValue(lastValue);
throw new MessageException(new ApplicationMessage("EmptyFieldValidator.msg.empty-input", args));
}
int totalCols = 0;
try
{
totalCols = Integer.parseInt(uiInput.getValue());
if (totalCols < 1 || totalCols > MAX_COLUMNS)
throw new Exception();
}
catch (Exception e)
{
uiInput.setValue(lastValue);
throw new MessageException(new ApplicationMessage("NumberFormatValidator.msg.Invalid-number", args));
}
uiInput = uiForm.getUIStringInput(DashboardParent.ISPRIVATE);
pref.setValue(DashboardParent.ISPRIVATE, uiInput.getValue());