Hi
I am trying to generate programmatically this
HtmlJQuery jq = (HtmlJQuery)application.createComponent(HtmlJQuery.COMPONENT_TYPE);
jq.setSelector(target);
The problem is that the target is one item of a selectManyCheckbox
I can´t find how to set individual IDs for each item, since SelectItem does not have such a method. Instead, it seems to always generate an ID like
form:id:1
form:id:2
form:id:3
...
if I set target = "id:2", it generates a javascript like
function xxx(elm, param) {
var selector = "#form\\:id:2";
try {
selector = eval("#form\\:id:2");
} catch (e) {}
jQuery(elm || selector).attr( 'disabled' , 'disabled' );
}
but it obviously does not work, because jquery would understand
selector = eval("#form\\:id\\:2");
and if I set target="id\\\\:2"
it generatesselector = eval("#form\\:id\\\\:2");
and if I set target="id\\:2"
it raisesjavax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:612)
ps. notice that if I manually insert the following javascript in the page withselector = eval("#form\\:id\\:2");
the script just works.
Any ideas?
TIA
Leo K.