Hey everyone,

I've floundered enough.

I would like to dynamically create a link that has an associated actionListener. I understand how to do it using the tags... but dynamically, I'm getting stumped... could someone help me over the hump? (my hump, my hump, ... ok shoot me.) I'm creating the link as follows:

UICommand link = new UICommand();
link.setRendererType("javax.faces.Link");
link.setId("myLink");

I've also defined the following method:

public void listen(ActionEvent e){
        String id = e.getComponent().getClientId(getContext());
        System.out.println("Link Id: " + id);
    }

Now the question is.. how the heck to I hood the two together? I would like the "listen" method to be called when anyone clicks on the link...

Any help would be greatly appreciated.

Bobby

Reply via email to