| Author |
Listening for a link selection
|
Michael Zellmann
Greenhorn
Joined: Dec 17, 2004
Posts: 18
|
|
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 <h utputLink 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
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
|
Why can't you use a commandLink?
|
 |
Michael Zellmann
Greenhorn
Joined: Dec 17, 2004
Posts: 18
|
|
|
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.
|
 |
 |
|
|
subject: Listening for a link selection
|
|
|