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 Thu, 28 Apr 2005 13:20:46 GMT
     [ ]
Brandon Goodin commented on MYFACES-213:

I noticed that when i click the commandLink in the previously stated scenario that the UIViewRoot
does not have it's queueEvent called. Therefore by the time _broadcastForPhase method is called
there are no events to iterate over and therefore the action method on my backing bean is
never called. I'm continuing to debug this issue and hoping i can provide a patch soon. If
there is any assistance i can get from the developers on where i might look further that would
be great. Thanks.

> 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