Revision history [back]

click to hide/show revision 1
initial version

answered 2010-01-22 09:33:41 +0800

terrytornado gravatar image terrytornado flag of Germany

@goldfish the earliest time for migrating to zk5 is when zk5 is in the maven- rep. @mordor, @all

Hmmmmm, we have in mind to make an own security system for our needs because there's much trouble with synchronizing the zk multithread architecture with spring security. (If you study the code you will find the place and the method where we catch the @Secured annotation self and not by Spring-sec. if needed )

If you are a big fan on debugging and on solving such problems than you can made 4 changes and help us to find the ground or a workaround for such a misbehavior. I hope the zk guys can have a look on it if they have time after the zk5 release.

  1. de.forsthaus. webui.
  2. *change *the BaseController from which is extended.

from: public class InitApplicationCtrl extends WindowBaseCtrl implements Serializable { to: public class InitApplicationCtrl extends GFCBaseCtrl implements Serializable {

than change *ALL* getters for the DAOs and Services in this class (at the end of the file)

sample: from:
public GuestBookService getGuestBookService() { if (guestBookService == null) { guestBookService = (GuestBookService) SpringUtil.getBean("guestBookService"); setGuestBookService(guestBookService); } return guestBookService; }

to: public GuestBookService getGuestBookService() { return guestBookService; }

  1. zkoss/src/main/resources/applicationContext-zkoss.xml

    *insert *the bean definition:

    <bean id="initApplicationCtrl" class="de.forsthaus.webui.InitApplicationCtrl" parent="basisCtrl" scope="prototype"> <property name="customerService" ref="customerService"/> <property name="brancheService" ref="brancheService"/> <property name="officeService" ref="officeService"/> <property name="ipToCountryService" ref="ipToCountryService"/> <property name="articleService" ref="articleService"/> <property name="orderService" ref="orderService"/> <property name="guestBookService" ref="guestBookService"/> <property name="securityService" ref="securityService"/> <property name="userService" ref="userService"/> <property name="loginLoggingService" ref="loginLoggingService"/> <property name="sysCountryCodeService" ref="sysCountryCodeService"/> </bean>

  2. change *the controller access in the zul file: zkoss/src/main/webapp/index.zul

    *from: <window id="startWindow" border="none" width="100%" height="100%" use="de.forsthaus.webui.InitApplicationCtrl">

to: <window id="startWindow" border="none" width="100%" height="100%" apply="${initApplicationCtrl}">

With these changes we have following problem: 1. start application 2. get LoginDialog 3. do a login (you can see in the console-log that i.e. you are logged in correct as admin) 4. after login Spring-security is now threw an Error: no authorization. ?????????? 5. by refreshing the web page in the browser the app runs normal away.

Have fun and let us know if you find some solution.

best Stephan

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More