Hi all,
Iam having some problem in running the javascript with internet explorer and firefox which opens a popup, in the popup after selecting the data and
cliking ok, the parent window must refresh and the selected rows must b added automatically in the dataTable. the jsf code containing javascript is:
In parent page:
<h:dataTable align="center" border="1" id="data"
value="#{parentBean.nameList}" var="beanvar"
binding="#{parentBean.myDataTable}">
<h:column>
<f:facet name="header">
<h:outputText value="First Name"/>
</f:facet>
<h:outputText value="#{beanvar.firstName}" />
</h:column>
<h:column >
<f:facet name="header">
<h:outputText value="Last Name" />
</f:facet>
<h:outputText value="#{beanvar.lastName}"/>
</h:column>
</h:dataTable>
<h:commandLink value="open popup" onclick="window.open('popWindow.faces','mywindow','height=300,width=250,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes');" />
The popup jsf code is:
<h:dataTable align="center" border="1" id="data"
value="#{childBean.nameList1}" var="beanvar"
binding="#{childBean.myDataTable}">
<h:column>
<f:facet name="header">
<h:outputText value="Select" />
</f:facet>
<h:selectBooleanCheckbox valueChangeListener="#{childBean.cbClicked}" value="#{childBean.selected}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="First Name" />
</f:facet>
<h:outputText value="#{beanvar.firstName}" />
</h:column>
<h:column >
<f:facet name="header">
<h:outputText value="Last Name" />
</f:facet>
<h:outputText value="#{beanvar.lastName}"/>
</h:column>
</h:dataTable>
<h:commandButton id="kk" value="ok" action="#{parentBean.refresh}" onclick="opener.location.reload();self.close();"/>
I hv given the h:form tags in the respective places.
The above code is working fine in internet explorer 7.0 ie the parent window is also refreshed automatically after clicking the "ok" button.
But in the firefox 2.0.0.5, its not working fine. The parent window is not refreshed but the popup closes automatically. Can any body hv some idea how to solve this problem?
Message was edited by:
JayKV