Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

h:commandLink will not work inside a h:dataTable

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
    Bookmark Topic Watch Topic
  • New Topic