File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Listening for a link selection

 
Michael Zellmann
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to JSF, and working on an application where the user is shown a DataTable of possible links. Each is represented in an <hutputLink component. When that link is chosen, the user sees the requested page in a new window - all behavior as intended. I want to implement a Listener that will capture what link the user chose. When I try to add a <f:actionListener type=... component, I get an error that an action listener can only be nested within a component that is a Faces ActionSource. (that make sense) However, the only components that do that are HtmlCommandButton, HtmlCommandLink and UICommand. I don't see how to accomplish what I am looking for. What can I do?
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why can't you use a commandLink?
 
Michael Zellmann
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. With your suggestion, I got it to work! Had to do some fiddling to get the href link and the title to work out. Also had to wrap it in a <h:form tag> even though I don't need any servlet handling.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic