[ http://issues.apache.org/jira/browse/MYFACES-213?page=comments#action_63691 ] Brandon Goodin commented on MYFACES-213: ----------------------------------------
Actually, they are. Sorry, I didn't mention that i am using the tiles integration. Here is the tiles tag that contains the page i provided earlier. ... <f:subview id="body"> <tiles:insert attribute="body" flush="false" /> </f:subview> ... Here are the tiles definitions: ... <definition name="layout.main" path="/layout/main.jsp" > <put name="header" value="/common/header.jsp" /> <put name="menu" value="/common/menu.jsp" /> <put name="footer" value="/common/footer.jsp" /> </definition> ... <definition name="/pages/admin/category.tiles" extends="layout.admin.main" > <put name="body" value="/pages/admin/category.jsp" /> </definition> ... Following is the full page page that is the main layout page. <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %> <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %> <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;CHARSET=iso-8859-1" /> <title>JGameStore Admin</title> <link rel="stylesheet" type="text/css" href="../../css/style.css"/> </head> <f:view> <body style="margin: 0px; padding: 0px"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="2"> <f:subview id="header"> <tiles:insert attribute="header" flush="false"/> </f:subview> </td> </tr> <tr> <td style="border-right: 1px solid black; width: 100px" valign="top"> <f:subview id="menu"> <tiles:insert attribute="menu" flush="false" /> </f:subview> </td> <td> <f:subview id="body"> <tiles:insert attribute="body" flush="false" /> </f:subview> </td> </tr> <tr> <td colspan="2"> <f:subview id="footer"> <tiles:insert attribute="footer" flush="false" /> </f:subview> </td> </tr> </table> </body> </f:view> </html> > commandLink does not work in dataList > ------------------------------------- > > Key: MYFACES-213 > URL: http://issues.apache.org/jira/browse/MYFACES-213 > 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="http://java.sun.com/jsf/core"; prefix="f"%> > <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%> > <%@ taglib uri="http://myfaces.apache.org/extensions"; 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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
