Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with commandLink

 
Marc Kruze
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

On a JSP page, I have a dataTable and a few buttons on top (not inside the dataTable). These buttons are commandLink(s); when the user clicks on one of them (form example) a pdf report opens in a new window (target=_blank).

The problem is that once the user clicks on the commandLink button to open the new report page and closes it, clicking on other components on the same (original) page also run the action from the commandLink button. For example, clicking on the next page button of a pagerDeluxe at the bottom of the page will not advance the dataTable to the next page but open the pdf report window again.

Has anyone encountered this behavior, and what was your solution?

Thank you!
 
Sai Hegde
security forum advocate
Ranch Hand
Posts: 210
1
Android Flex Google App Engine
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post your code so that anyone on the forum could check for stuff that should have been written some other way.
 
Marc Kruze
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Sai,

The solution to this problem can be found here:

http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14547937

Basically, if you are using sub-JSF 1.2, it's best to use a requestLink rather than a commandLink if you run into the problem described on this thread.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic