• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

problem in setting action to UICommand - HtmlCommandLink

Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am trying to add a command link to a dynamic dataTable. to achieve this I have written the code as below:

Application application = context.getApplication();
UICommand out = (UICommand) application.createComponent("javax.faces.HtmlCommandLink");

UIOutput output = new UIOutput();
ValueBinding vb = context.getApplication().createValueBinding("#{user." + cols[i] + "}");
output.setValueBinding("value", vb);


MethodBinding mb = application.createMethodBinding("#{navigate.updateUser}", new Class[0]);



Here user & navigate are backing beans.

The table is rendered and the column with command link shows the link, but on click of that link the same page is getting reloaded instead of calling the action set for the command link.

Some one please help me and let me know what's wrong in the above code. Is there any other way to achieve the above requirement.

Thanks in advance.

Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had the same problem. I managed to fix it by explicitly assigning a unique id to the command link.

eg. out.setId("myId");
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic