Galen Dunkleberger wrote:

Is there a good way to pull the client id of a particular component in
the jsp? What I'm trying to do is pass the id to javascript calls. I
know how to figure out the id manually but is would be nice to be able
to do something like this...

<h:someComponent onclick="somejavascriptcall('<%=someothercomponent.getClientId()%>')"
/>


Anyone have any ideas how this might work?
Thanks,
Galen


A while back I found a component from someone else on jsfcentral.com that provides a proxytag for ids. I think it was call javascriptproxy but I'm not sure and can't seem to find it at the moment. Basically it provides a tag that can retrieve the id and assigns it to a defined javascript variable. The nice thing about it, it can be used with standard components also. The bad thing: more writing and it isn't as nicely integrated as forceid is.
Maybe myfaces could provide some component like this for means of providing ids for standard components.


Regards
Stefan



Reply via email to