This essentially is just a List of Devices, each one also an outputLink sending the user to another jsf page that has two fields bound to java variables - deviceId and deviceName.
So I need to have a way to carry over the Device data depending on which link the user clicks on. I have an idea how to do so but Im not there yet. Here is what i have been working on:
Now this is not working yet of course, particularly line 3 is underlined with this error:
Cannot cast from Component to Device
So Im not sure what needs to be changed here. Is (MouseEvent event) the correct thing to go in between the parentheses or does that need to be something else like (FacesContext event)?
If MouseEvent event will work, I'm sure all I need is some line to go before that third line that first casts event to something else that is then castable to Device.
When I did this in reference to my rich:tree I used:
This works for clicking on a tree node but I need something for clicking on a command Link
True wisdom is in knowing you know nothing - Socrates
you code will not work cause you bind an instance of outputLink to a method on the managed bean, and not an instance of
outputLink. so create a variable of type outputLink name it myOtputLink
and replcae line 3 with this
subject: Trying to figure out java code to bind to outputLinks generated from a4j:repeat tags