Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,356 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
A UI component<h:selectOneRadio> with onclick event (javascript to bind data) works fine in an application deployed from one JBoss server in Edge, however it doesn't work in the same application deployed from another JBoss server in the same Edge browser.
Code snippet
<rich:column>
<h:selectOneRadio
id="code_radio"
layout="lineDirection"
onclick="uncheck(this);updateSelected()">
<f:selectItem itemValue="#{item.getValue()}" />
</h:selectOneRadio>
<a4j:jsFunction name="updateSelected"
action="#{updateAction.updateSelected()}"
data=""
ajaxSingle="true">
</a4j:jsFunction>
</rich:column>
<script type="text/javascript">
function uncheck(radio) {
var name = radio.name.substring(radio.name.lastIndexOf(':'));
var elements = radio.form.elements;
for (let i = 0; i < elements.length ; i++) {
if (elements[i].name.substring(elements[i].name.lastIndexOf(':')) == name) {
elements[i].checked = false;
}
}
if (document.getElementById('create_form:selected_value')) { document.getElementById('create_form:selected_value').value = radio.value.split('-')[0].trim();
document.getElementById('create_form:code_details').value = radio.value;
radio.checked = true;
}
}
</script>