myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From OrlandoJim <>
Subject Unexpected Phases with CommandLink using immediate attrib
Date Mon, 26 Jan 2009 21:52:35 GMT

I am using <h:CommandLink> with an action, actionListener, and

I was of the understanding that, after my actionListener and action finished
executing, processing would continue with the Process Validation, validating
non-immediate components, unless I called renderResponse() in the action
listener or returned a non-null String from the action or method.  

Instead, what I am seeing is that it goes to Render Response even though I
do not call renderResponse( ) in the action listener method and do return
null from the action.  (I have a PhaseListener to print which phases I'm
starting and ending). When I remove the immediate attribute, it does call
the other validator(s). Any ideas why?

<body onload="doOnload();">
	<h:form id="custSearchForm">
	<h:outputText id="pageHeader" value="Customer Search" />
	<h:messages styleClass="error" infoStyle="color:orange"
showDetail="#{true}" showSummary="#{false}" />
	  <h:inputText id="name" value="#{}" required="true"
onkeypress="return KeyPressed(event)" >
	     <f:converter converterId="jimdl.UpperNameConverter"/>
		 <f:validateLength minimum="2" maximum="25" />
	  <h:commandButton style="width:80px" value="Search"
action="#{customerSearchBean.loadCustomer}" />
	  <h:commandLink immediate="true" action="#{customerSearchBean.doNothing}"
actionListener="#{customerSearchBean.toggleHeader}"  value="ToggleHeader"/>

In CustomerSearchBean:

	public void toggleHeader(ActionEvent actionEvent) {
	public String doNothing() {
		return null;

I am using MyFaces 1.1.6 on Apache Tomcat 5.5.

Incidentally, I downloaded the source for MyFaces, and the the
ActionListenerImpl class, which calls the action method calls
application.getNavigationHandler().handleNavigation(...), which does nothing
because my action method returned a null.  Then, the ActionListenerImpl
calls renderResponse()!

        navigationHandler.handleNavigation(facesContext, fromAction,

        //Render Response if needed

Any idea why?

View this message in context:
Sent from the MyFaces - Users mailing list archive at

View raw message