Hi everybody. I'm developing a JEE application (JSF2 + richfaces 3.3.3 + facelets).
I want to disable my h:selectOneMenu when loading my page, and when it finishes loading (using the funtion onload()), i want to re-enable my component. I have something like this:
<ui:define name="infosHead">
<script type="text/javascript">
window.onload = function() {
document.getElementById("forme1_myform:valueCh").disabled = false;
alert("here");
}
</script>
</ui:define>
<ui:define name="infosBody">
<h:form id="forme1_myform" target="_blank">
<h:selectOneMenu id="valueCh" value="#{mybean.value}" disabled="true" >
<f:selectItems value="#{mybean.values}" />
<a4j:support event="onchange"
ajaxSingle="true"
limitToList="true"
reRender="id1,id2,...."
ignoreDupResponses="true"
action="#{mybean.actionme}"
oncomplete="getId();"/>
</h:selectOneMenu>
</h:form>
</ui:define>
this is working fine. But my bean is getting nothing (mybean.value == null).
It's like he thinks that the component is still disabled.
how can i make this works ?