Helper on ActionBean isn't being called
---------------------------------------

                 Key: STS-384
                 URL: http://mc4j.org/jira/browse/STS-384
             Project: Stripes
          Issue Type: Bug
          Components: ActionBean Dispatching
    Affects Versions: Release 1.4.3, Release 1.4.2
         Environment: TomCat 6, Java 5.0, Hibernate 3
            Reporter: Tom Wirschell
         Assigned To: Tim Fennell


Below is the log output of a form submission to a Stripes actionbean:

2007-06-11 02:15:01,968 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.StripesFilter - Intercepting request to URL: 
/arkanoid/admin/eiercase/MenuGerecht.action
2007-06-11 02:15:01,968 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.StripesFilter - LocalePicker selected 
locale: en_US
2007-06-11 02:15:01,969 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.StripesFilter - LocalePicker did not pick a 
character encoding, using default: null
2007-06-11 02:15:01,969 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.DispatcherServlet - Dispatching request to 
URL: /arkanoid/admin/eiercase/MenuGerecht.action
2007-06-11 02:15:01,969 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.ExecutionContext - Transitioning to 
lifecycle stage ActionBeanResolution
2007-06-11 02:15:01,969 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.ExecutionContext - Transitioning to 
lifecycle stage HandlerResolution
2007-06-11 02:15:01,969 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.DispatcherHelper - Resolved event: saveNew; 
will invoke: MenuGerechtActionBean.saveNew()
2007-06-11 02:15:01,969 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.ExecutionContext - Transitioning to 
lifecycle stage BindingAndValidation
2007-06-11 02:15:01,970 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder - Running 
required field validation on bean class 
nl.radrace.web.admin.eiercase.MenuGerechtActionBean
2007-06-11 02:15:01,971 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder - Running 
binding for property with name: menuGerechtNaam
2007-06-11 02:15:01,972 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder - Converting 
1 value(s) using converter [EMAIL PROTECTED]
2007-06-11 02:15:01,979 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder - Running 
binding for property with name: menuGerechtPrijs
2007-06-11 02:15:01,979 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder - Converting 
1 value(s) using converter [EMAIL PROTECTED]
2007-06-11 02:15:01,979 [http-8080-2] DEBUG 
nl.radrace.web.admin.eiercase.MenuGerechtActionBean - ENTER: setMenuGerechtPrijs
2007-06-11 02:15:01,979 [http-8080-2] DEBUG 
nl.radrace.web.admin.eiercase.MenuGerechtActionBean - EXIT: setMenuGerechtPrijs
2007-06-11 02:15:01,980 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder - Running 
binding for property with name: menuGerechtMenuId
2007-06-11 02:15:01,980 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder - Converting 
1 value(s) using converter [EMAIL PROTECTED]
2007-06-11 02:15:01,980 [http-8080-2] DEBUG 
nl.radrace.web.admin.eiercase.MenuGerechtActionBean - ENTER: 
setMenuGerechtMenuId
2007-06-11 02:15:01,980 [http-8080-2] DEBUG 
nl.radrace.web.admin.eiercase.MenuGerechtActionBean - EXIT: setMenuGerechtMenuId
2007-06-11 02:15:01,980 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder - Running 
binding for property with name: menuGerechtGerechtId
2007-06-11 02:15:01,980 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder - Converting 
1 value(s) using converter [EMAIL PROTECTED]
2007-06-11 02:15:01,980 [http-8080-2] DEBUG 
nl.radrace.web.admin.eiercase.MenuGerechtActionBean - ENTER: 
setMenuGerechtGerechtId
2007-06-11 02:15:01,980 [http-8080-2] DEBUG 
nl.radrace.web.admin.eiercase.MenuGerechtActionBean - EXIT: 
setMenuGerechtGerechtId
2007-06-11 02:15:01,981 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.ExecutionContext - Transitioning to 
lifecycle stage CustomValidation
2007-06-11 02:15:01,982 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.ExecutionContext - Transitioning to 
lifecycle stage ResolutionExecution
2007-06-11 02:15:01,983 [http-8080-2] DEBUG 
net.sourceforge.stripes.action.ForwardResolution - Forwarding to URL: 
/WEB-INF/jsp/admin/eiercase/MenuGerecht.jsp

The DispatcherHelper claims that it will invoke the 
MenuGerechtActionBean.saveNew() handler, however it never does. In fact, it 
doesn't even call the configured validationmethod, as evidenced by the logs 
above.
When I invoke the actionbean's create handler via a stripes:link the following 
is logged:

2007-06-11 02:14:48,335 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.StripesFilter - Intercepting request to URL: 
/arkanoid/admin/eiercase/MenuGerecht.action
2007-06-11 02:14:48,335 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.StripesFilter - LocalePicker selected 
locale: en_US
2007-06-11 02:14:48,335 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.StripesFilter - LocalePicker did not pick a 
character encoding, using default: null
2007-06-11 02:14:48,335 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.DispatcherServlet - Dispatching request to 
URL: /arkanoid/admin/eiercase/MenuGerecht.action
2007-06-11 02:14:48,336 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.ExecutionContext - Transitioning to 
lifecycle stage ActionBeanResolution
2007-06-11 02:14:48,339 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.ExecutionContext - Transitioning to 
lifecycle stage HandlerResolution
2007-06-11 02:14:48,340 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.DispatcherHelper - Resolved event: create; 
will invoke: MenuGerechtActionBean.create()
2007-06-11 02:14:48,340 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.ExecutionContext - Transitioning to 
lifecycle stage BindingAndValidation
2007-06-11 02:14:48,340 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder - Running 
required field validation on bean class 
nl.radrace.web.admin.eiercase.MenuGerechtActionBean
2007-06-11 02:14:48,340 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.ExecutionContext - Transitioning to 
lifecycle stage CustomValidation
2007-06-11 02:14:48,341 [http-8080-2] ERROR 
nl.radrace.web.admin.eiercase.MenuGerechtActionBean - Ping
2007-06-11 02:14:48,411 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.ExecutionContext - Transitioning to 
lifecycle stage EventHandling
2007-06-11 02:14:48,411 [http-8080-2] DEBUG 
nl.radrace.web.admin.eiercase.MenuGerechtActionBean - ENTER: create
2007-06-11 02:14:48,411 [http-8080-2] DEBUG 
nl.radrace.web.admin.eiercase.MenuGerechtActionBean - EXIT: create
2007-06-11 02:14:48,412 [http-8080-2] DEBUG 
net.sourceforge.stripes.controller.ExecutionContext - Transitioning to 
lifecycle stage ResolutionExecution
2007-06-11 02:14:48,412 [http-8080-2] DEBUG 
net.sourceforge.stripes.action.ForwardResolution - Forwarding to URL: 
/WEB-INF/jsp/admin/eiercase/MenuGerecht.jsp

Note the presence of the Ping ERROR line from the validationmethod and the 
ENTER and EXIT lines from the create method.
The mentioned methods look like this:

    public Resolution create() {
        logger.debug("ENTER: create");
        setViewMode(ViewMode.CREATE);
        logger.debug("EXIT: create");
        return forwardToAdminMenuGerechtDetailPage();
    }

    @HandlesEvent("saveNew")
    public Resolution saveNew() {
        logger.debug("ENTER: saveNew");
        menuGerecht = new MenuGerecht();
        menuGerecht = fillMenuGerecht(menuGerecht);
        menuGerecht = 
AvailableServices.getEiercase().saveMenuGerecht(getContext(), menuGerecht);
        if (menuGerecht == null) {
            menuGerecht = new MenuGerecht();
            menuGerecht = fillMenuGerecht(menuGerecht);
            setViewMode(ViewMode.CREATE);
        } else {
            setViewMode(ViewMode.READ);
        }
        logger.debug("EXIT: saveNew");
        return forwardToAdminMenuGerechtDetailPage();
    }

    @ValidationMethod
    public void verifyAuthorization(ValidationErrors errors) {
        logger.error("Ping");
        if (verifyAuthorization() == false) {
            addGlobalError(errors,"Access denied.");
        }
    }

The HandlesEvent annotation was my most recent attempt at getting this method 
called.
I'm seeing this problem with both Stripes 1.4.2 and 1.4.3. No difference, and 
no hint as to why it's not doing what it should be doing. I've generated this 
class along with a whole slew of other classes, and none of them exhibit this 
behaviour. I've run out of things to try. It's as if a ValidationMethod is 
being run before the one I provide (which is the only one I have in my code), 
fails in such a way that my own ValidationMethod isn't called anymore and sends 
the user back to the sourcePage. Hopefully someone here knows something I could 
try to investigate this issue further, as currently I'm completely stuck.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to