Author: julien_viet
Date: 2010-03-10 19:50:04 -0500 (Wed, 10 Mar 2010)
New Revision: 2140
Modified:
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIListPermissionSelector.java
Log:
GTNPORTAL-691 : java.io.NotSerializableException in ApplicationRegistry (cluster profile
test)
Modified:
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIListPermissionSelector.java
===================================================================
---
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIListPermissionSelector.java 2010-03-11
00:33:25 UTC (rev 2139)
+++
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIListPermissionSelector.java 2010-03-11
00:50:04 UTC (rev 2140)
@@ -22,7 +22,6 @@
import java.io.Serializable;
import java.util.*;
-import org.exoplatform.commons.utils.LazyPageList;
import org.exoplatform.commons.utils.SerializablePageList;
import org.exoplatform.portal.config.UserACL;
import org.exoplatform.portal.config.UserACL.Permission;
@@ -66,7 +65,7 @@
uiGrid.setLabel("UIListPermissionSelector");
uiGrid.configure("expression", new String[]{"groupId",
"membership"}, new String[]{"Delete"});
UIFormPageIterator uiIterator = (UIFormPageIterator)uiGrid.getUIPageIterator();
- uiIterator.setPageList(new SerializablePageList(Permission.class,
Collections.emptyList(), 10));
+ uiIterator.setPageList(new SerializablePageList<Permission>(Permission.class,
Collections.<Permission>emptyList(), 10));
addChild(uiIterator);
uiIterator.setRendered(false);
UIFormPopupWindow uiPopup = addChild(UIFormPopupWindow.class, null, null);
@@ -107,9 +106,8 @@
public void clearGroups() throws Exception
{
- List<Object> list = new ArrayList<Object>();
UIPageIterator uiIterator = getChild(UIGrid.class).getUIPageIterator();
- uiIterator.setPageList(new LazyPageList(new AccessGroupListAccess(list), 10));
+ uiIterator.setPageList(new SerializablePageList<Permission>(Permission.class,
new ArrayList<Permission>(), 10));
}
@SuppressWarnings("unchecked")
@@ -156,7 +154,7 @@
list.add(permission);
}
UIPageIterator uiIterator = getChild(UIGrid.class).getUIPageIterator();
- uiIterator.setPageList(new SerializablePageList(Permission.class, list, 10));
+ uiIterator.setPageList(new SerializablePageList<Permission>(Permission.class,
list, 10));
return this;
}
@@ -175,7 +173,7 @@
break;
}
}
- uiIterator.setPageList(new LazyPageList(new AccessGroupListAccess(list), 10));
+ uiIterator.setPageList(new SerializablePageList(Permission.class, list, 10));
}
@SuppressWarnings("unchecked")
@@ -197,7 +195,7 @@
return;
}
list.add(permission);
- uiIterator.setPageList(new LazyPageList(new AccessGroupListAccess(list), 10));
+ uiIterator.setPageList(new SerializablePageList(Permission.class, list, 10));
}
public Class<String[]> getTypeValue()
@@ -236,7 +234,7 @@
uiGrid.setRendered(!publicMode_);
if (publicMode_)
{
- uiGrid.getUIPageIterator().setPageList(new LazyPageList(new
AccessGroupListAccess(null), 10));
+ uiGrid.getUIPageIterator().setPageList(new
SerializablePageList<Permission>(Permission.class, new
ArrayList<Permission>(), 10));
}
}
@@ -283,12 +281,11 @@
{
uiPermission.setRendered(false);
}
- if (uiForm != null)
- {
- uiForm.broadcast(event, event.getExecutionPhase());
- //event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
- event.getRequestContext().addUIComponentToUpdateByAjax(uicom);
- }
+
+ // julien: UIForm cannot be null otherwise the uiForm.findFirstComponentOfType
would have thrown an NPE
+ uiForm.broadcast(event, event.getExecutionPhase());
+ //event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
+ event.getRequestContext().addUIComponentToUpdateByAjax(uicom);
}
}
Show replies by date