xhtml view and caf.cid...

Hi,
I create a view in CAF and migrate the file in JSF 2x with extension xhtml.

In JS I need to refer to a specific control (in caf_h namespace).
When I did this code

var var1 = $('#{activePageBean.clientIds["myControl"]');
alert(var1);

Actually I know if I do this in view, that works but in xhtml the windows alert give null.
So I expect I have something else to do but I dont know what.