myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lim Hock-Chai <Lim.Hock-C...@usamobility.com>
Subject commandlink not working in panelgrid
Date Wed, 09 May 2012 16:27:27 GMT
I'm currently using myfaces 1.1.9 for my web app.  I'm having some problems with commandlink
not working correctly for me.  It appears that when commandlink is inside of the panelgrid,
it is not calling the method specified in the action attr.  But it works fine if I put it
outside of the panelgrid.  Strange part is that I've had other jsp that have commandlink inside
datatable and they work fine also.  This is the first time I use it inside a panelgrid.

See code below.  The first commandlink is, which is not inside of panelgrid, works fine. 
The 2nd commandlink is inside of panelgrid and it is not working (not calling back-end bean
method)

<jsp:root version="2.0"
    xmlns:jsp="http://java.sun.com/JSP/Page"
     xmlns:c="http://java.sun.com/jsp/jstl/core"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:t="http://myfaces.apache.org/tomahawk"
     xmlns:a4j="http://richfaces.org/a4j">
 
<f:subview>
	<f:loadBundle var="resources" basename="com.arch.myaccount.jsf.Resources"/>
	<h:form id="MSAMHeaderOtherForm">

		<!-- commandlink below works fine -->
		<h:outputText value="|"/>
		<h:commandLink  immediate="true" style="CURSOR: pointer"  action="#{commonTaskBean.fromMSAMBackToMyAccount}"
>
			<h:outputText value="My Account"/>
		</h:commandLink>
		<h:outputText value="|"/>

		<!-- commandlink below does not work -->
		<h:panelGroup  
				rendered="#{not empty sessionScope.MyAccountLoginType and
									sessionScope.MyAccountLoginType==resources.LOGIN_TYPE_MY_ACCOUNT }">
			<h:outputText value=" "/>
			<h:outputText value="|"/>
			<h:commandLink  immediate="true" style="CURSOR: pointer"  action="#{commonTaskBean.fromMSAMBackToMyAccount}">
				<h:outputText value="My Account"/>
			</h:commandLink>
			<h:outputText value="|"/>
		</h:panelGroup>
	</h:form>
</f:subview>
</jsp:root>	

Mime
View raw message