Author: chris.laprun(a)jboss.com
Date: 2011-09-27 12:49:08 -0400 (Tue, 27 Sep 2011)
New Revision: 7535
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
Log:
- If an error occurs in getConsumer, bypass processing and redisplay page.
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2011-09-27
15:38:59 UTC (rev 7534)
+++
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2011-09-27
16:49:08 UTC (rev 7535)
@@ -92,6 +92,12 @@
private DataModel existingExports;
private ExportInfoDisplay currentExport;
+ private static void bypassAndRedisplay()
+ {
+ // bypass the rest of the life cycle and re-display page
+ FacesContext.getCurrentInstance().renderResponse();
+ }
+
public void setManager(ConsumerManagerBean manager)
{
this.manager = manager;
@@ -157,6 +163,7 @@
if (id == null)
{
beanContext.createErrorMessage(NULL_ID_CONSUMER);
+ bypassAndRedisplay();
}
else
{
@@ -170,6 +177,7 @@
else
{
beanContext.createErrorMessage(CANNOT_FIND_CONSUMER, id);
+ bypassAndRedisplay();
}
}
@@ -850,16 +858,14 @@
}
}
- // bypass the rest of the life cycle and re-display page
- FacesContext.getCurrentInstance().renderResponse();
+ bypassAndRedisplay();
}
public void selectCurrentWindow(ValueChangeEvent event)
{
window = (String)event.getNewValue();
- // bypass the rest of the life cycle and re-display page
- FacesContext.getCurrentInstance().renderResponse();
+ bypassAndRedisplay();
}
public List<SelectItem> getPages()
@@ -887,8 +893,7 @@
{
selected = (Boolean)event.getNewValue();
- // bypass the rest of the life cycle and re-display page
- FacesContext.getCurrentInstance().renderResponse();
+ bypassAndRedisplay();
}
public int compareTo(SelectablePortletHandle o)