{
@Override
public void onSubmit()
{
PortletPreferences prefs = ((ApplicationsListApplication)this.getApplication()).getPortletRequest().getPreferences();
FeedbackPanel feedback = (FeedbackPanel)this.getParent().get("feedback");
try
{
prefs.setValue("appRows", Integer.toString(EditModeForm.this.getAppRows()));
prefs.setValue("portletRows", Integer.toString(EditModeForm.this.getPortletRows()));
prefs.store();
ActionResponse ar = (ActionResponse)((ApplicationsListApplication)this.getApplication()).getPortletResponse();
ar.setPortletMode(PortletMode.VIEW);
}
catch (ReadOnlyException e)
{
feedback.error(getString("pam.details.message.errorReadonly"));
}
catch (Exception oe)
{
feedback.error(getString("pam.details.message.errorPrefs") + oe.getMessage());
}
}
});
FeedbackPanel feedback = new FeedbackPanel("feedback");
add(feedback);
}