The component is called <j4j:idProxy />
You use it like this:
<h:inputText>
<j4j:idProxy id="myInput" />
</h:inputText>
Then, you get your component in _javascript_ like this:
document.getElementById(document.getElementById('myInput').title);
We are using this tag all over our app because we needed a solution to the problem long before forceId came around. As some point, hopefully we will convert ourselves over to forceId.
On 4/13/05, Stefan Langer <[EMAIL PROTECTED]> wrote:
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
>>>/>
>
>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 _javascript_proxy
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
--
-Heath Borders-Wing
[EMAIL PROTECTED]

