-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I have a scenario where I need to store the state of a Portallayout in a cookie when the user changes the portal components and restore it back at a later time (portal behaviour). This seems to work OK, and I use the onClose/onMaximize/onMinimize/onMove events to store the state of the Portalchildren. I have a PortalController that does:
List<Portalchildren> children = (List<Portalchildren>) SerializationHelper.fromString(userCookie.getValue()); for (Portalchildren child : children) { comp.appendChild(child); }
in the doAfterCompose(comp) method. If there is no cookie (default setup) I create the components using
Executions.createComponents("/someportal.zul", parent, null);
and adding all the eventlisteners to this component after creation.
The contents of someportal.zul:
<?component name="clientInfoPanel" inline="true" macroURI="/WEB-INF/macros/clientInfoPanel.zul"?> <portalchildren apply="my.company.com.ClientController" style="padding: 5px" width="25%"> <clientInfoPanel title="Client info"/> </portalchildren>
The problems are:
-When the components are restored in the PortalController above, the ClientController defined in the "apply" attribute is not invoked
-The events are not propagated to the restored components.
Am I doing this the wrong way, or can I expect this to work somehow?
Thanks
Asked: 2009-04-27 09:15:26 +0800
Seen: 112 times
Last updated: Apr 27 '09