Hi all,
I have an input text component on the parent page, and open a pop-up page with showModalDialog. Then the input text can present the value from pop-up window while closing window. But when I do some another event on this page, this value will be cleaned up. How can I keep this value in the form lifecycle.
This is some snippet from the parent page:
<script>
function openPicker(productType,selectMode) {
if (window.showModalDialog) {
var retVal = window.showModalDialog(url, myObject);
var test = getSelectedPickerData(val.ID);
}
}
function getSelectedPickerData(pickedData){
document.getElementById("pickedGenreId").value = pickedData;
return pickedData;
}
</script>
<h:inputText value="#{criterionItem.fieldValue}" styleClass="centerAlign" id="PickedproductId">
<a4j:support event="onchange" ajaxSingle="true"/>
</h:inputText>