You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Lisa <ap...@purpleblade.net> on 2007/02/05 05:04:54 UTC
ActionListener gets executed but Action does not
I have a button that is rendered based on a boolean variable. The button (a
save button) gets rendered on the page. I enter information into the form
and click the [Save] button.
I then get an exception in my browser:
---
javax.servlet.ServletException: Error calling action method of component
with id idMainAddressForm:btnSave
javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:181)
root cause
javax.faces.FacesException: Error calling action method of component with id
idMainAddressForm:btnSave
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
javax.faces.component.UICommand.broadcast(UICommand.java:106)
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:181)
note
---
I go to my xhtml file and check the spelling and syntax of the action method
(as well as the backing bean syntax and correctness). Everything is
correct. I put print statements at the beginning and end of my
ActionListener and it gets executed completely all the way through.
For the life of me, I can not figure out why the Action method does not get
executed. It has the correct signature: public String mainViewAction() {
<code> }
My xhtml button code looks like this:
---
<t:commandLink
rendered="#{addressBean.showSaveBtn}"
actionListener="#{addressBean.saveListener}"
action="#{addressBean.mainViewAction}"
id="btnSave"
onmouseover="BtnSaveImg.src='../../images/SaveButton-Blue.gif';
return true;"
onmouseout="BtnSaveImg.src='../../images/SaveButton-Silver.gif';
return true;"
>
../../images/SaveButton-Silver.gif
</t:commandLink>
--
any ideas?
--
View this message in context: http://www.nabble.com/ActionListener-gets-executed-but-Action-does-not-tf3172510.html#a8800759
Sent from the MyFaces - Users mailing list archive at Nabble.com.