myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Goodin (JIRA)" <>
Subject [jira] Commented: (MYFACES-213) commandLink does not work in dataList
Date Mon, 02 May 2005 19:34:21 GMT
     [ ]
Brandon Goodin commented on MYFACES-213:

Hey all, just thought i'd bring this bug up again. I'm trying to write a sample app for the
iBatis project. Getting this resolved would be really cool. If I could receive more assitance
on this I'd be grateful. My hope is that i can better understand the underlying architecture
that myfaces uses to accomplish the jsf spec. This would allow me to contribute to the myfaces
effort. Thanks again!

> commandLink does not work in dataList
> -------------------------------------
>          Key: MYFACES-213
>          URL:
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9 beta
>  Environment: Tomcat 5.0, Win2k, JDK 1.4.2_06
>     Reporter: Brandon Goodin
>     Priority: Critical

> I've been trying to get a simple commandLink to work in a dataList. I have the dataList
bound to a UIData component (binding="#{categoryAdmin.ancestorTree}") on the backing bean.
It properly displays links. However, when i select the link it fails to call the appropriate
action method (action="#{categoryAdmin.ancestor}")and returns back to the page. No error meassages
are written to the screen or logs.
> Things i have tried with no success are:
> - placing my backing bean in session rather than request
> - placed <h:messages/> on the jsp to see any error messages (none appear)
> - Debugged the phases in the LifeCycleImpl. It hits all the full LifeCycle phases (restoreView,applyRequestValues,processValidations,updateModelValues,invokeApplication).
However, i am not able to determine what is really happening in these phases to result in
the outcome.
> - used h:commandLink and x:commandLink (both with session and request backing bean)
> - set a breakpoint in my action method (public String ancestor(){...}) method and it
never gets called.
> Following is my page code. I provided the whole page to give context in case there are
other conflicts that may be taking place. I'd be happy to provide a small app to reproduce
this if my explanation is not enough.
> <%@ taglib uri=""; prefix="f"%>
> <%@ taglib uri=""; prefix="h"%>
> <%@ taglib uri=""; prefix="x"%>
> <h:form>
> <x:dataList 
> id="ancestorTree"
> var="ancestor"
> binding="#{categoryAdmin.ancestorTree}">
> <x:commandLink action="#{categoryAdmin.ancestor}" value="#{ancestor.title}"/>
> </x:dataList>
> <h:commandButton  styleClass="buttonnormal"
> action="#{categoryAdmin.add}" value="Add Category"/>
> <h:inputHidden id="categoryAdmin_parentCategoryId"
> value="#{categoryAdmin.parentCategoryId}"/>
> <!-- category list -->
> <h:dataTable style="margin: 10px; border: 1px solid black"
> var="category" binding="#{categoryAdmin.categoryTable}">
> <h:column>
> <f:facet name="header">
> <h:outputText value="Title" style="border-bottom: 1px solid black"/>
> </f:facet>
> <h:commandLink action="#{categoryAdmin.child}">
> <h:outputText value="#{category.title}"/>
> </h:commandLink>
> <f:facet name="footer">
> <h:outputText value="" style="border-top: 1px solid black"/>
> </f:facet>
> </h:column>
> <h:column>
> <f:facet name="header">
> <h:outputText value="" style="border-bottom: 1px solid black"/>
> </f:facet>
> <h:commandLink action="#{categoryAdmin.edit}"><h:outputText
> value="Edit"/></h:commandLink>
> <f:facet name="footer">
> <h:outputText value="" style="border-top: 1px solid black"/>
> </f:facet>
> </h:column>
> <h:column>
> <f:facet name="header">
> <h:outputText value="Tree" style="border-bottom: 1px solid black"/>
> </f:facet>
> <h:outputText value="#{category.ancestorTree}"/>
> <f:facet name="footer">
> <h:outputText value="" style="border-top: 1px solid black"/>
> </f:facet>
> </h:column>
> </h:dataTable>
> <h:commandButton  styleClass="buttonnormal"
> action="#{categoryAdmin.add}" value="Add Category"/>
> </h:form>

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message