File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes h:commandLink will not work inside a h:dataTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "h:commandLink will not work inside a h:dataTable" Watch "h:commandLink will not work inside a h:dataTable" New topic
Author

h:commandLink will not work inside a h:dataTable

Steven Gray
Greenhorn

Joined: Mar 26, 2006
Posts: 8
I have a JaveServer Faces page called setupUserLogin.jsp (code below.) I want the user to click on a command link for the row the user wants to edit. Clicking on the link would navigate them to the edit screen editUserLogin.jsp.

If I place the link outside of a row in my datatable it works as expected. See code labeled "This Works" The same code when placed in a column for the datatable never invokes the backing bean and just navigates to http://localhost:8080/TEC/# which displays index.jsp - the main web page for the application. See code below labeled "This does not work"

Any idea what I am doing wrong?


setupUserLogin.jsp



Relative portion of SetupUserLogin.java



Relative portions of faces-config.xml
Steven Gray
Greenhorn

Joined: Mar 26, 2006
Posts: 8
After doing some more searching, I found the problem. I am using MyEclipse for doing my JSF development. MyEclipse includes the JSF 1.1.01 Reference Implementation. This version of JSF has a known bug where h:commandLinks do not work inside an h:dataTable. Changing the h:commandLink to an h:commandButton solves the problem. My next step is to visit the MyEclipse forums to see if there are any issues with including a later version of the JSF libraries in my project.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: h:commandLink will not work inside a h:dataTable