-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hi...
my name is rqabonk, i have a problem with multiuser... my application cannot run if some user join to used.
can anybody help me to explain how to fix it....
thx
you should not store component in static way, (precisely , you should not store any non-application scope object in static way in j2ee application)
why did you do this?
Same my problem.
main.zul:
<borderlayout id="main" apply="com.zkdesktop.web.MainLayoutComposer" width="100%" height="100%"> <north border="0" flex="true" margins="0,0,0,0"><label>Header</label></north> <center id="mainContent" autoscroll="true" border="normal" flex="true" margins="0,0,0,0"></center> <south border="0" flex="true" margins="0,0,0,0"><label>Footer</label> </south> </borderlayout>
MainLayoutComposer:
public class MainLayoutComposer extends GenericForwardComposer { .... public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); ZKPageUtil.setComponent(comp); Map<String, Object> params = new HashMap<String, Object>(); params.put("url", "main"); ZKPageUtil.sendRedirectURL("/pages/main.zul", params); } ..... }
ZKPageUtil:
public class ZKPageUtil { ..... public static void setComponent(Component component) { ZKPageUtil.component = component; } public static void sendRedirectURL(String filename, Map<String, Object> params) { String bookmark = (String) params.get("url"); try { if(component != null) { final Center mainContent = (Center) component.getRoot().getFellow("mainContent"); Components.removeAllChildren(mainContent); Executions.getCurrent().getDesktop().setBookmark(bookmark); Executions.createComponents(filename, mainContent, params); } } catch (Exception e) { _log.warn(e.getMessage(), e); } } .... }
This show error message: "You don't access components to another desktop". Maybe you know what is this problem...
Thanks.
It's not related to which edition you use. CE, PE or EE are working fine for multi-user applications.
Can you try to build and post an simple example which shows the problem?
Cheers, Maik
@Maik,
tq so much for your explanation... but when i saw my source code, i don't found anything about decaration static component.
i use PE license, maybe i have to upgrade to EE License... what do u think?
the problem is... if anyone join my application... there is an error message.... then old user cannot access the current application...
thx maik...
cheers, rqabonk
Sounds like you've used a shared component in your code. Maybe you did declare a field referencing a ZK-component as static. If so, remove the static qualifier.
Cheers, Maik
Asked: 2011-04-20 23:17:31 +0800
Seen: 304 times
Last updated: Apr 25 '11