I have to use JSF to pop up a window from the parent
window.  In the popup window, I have to pass the value
that is entered in a <h:inputText> back to a text
field in the parent window.

In order to make sure that I know the way to
communicate between the parent window and the popup
window, I have tried coding it in HTML.  And I have
done it successfully.

Then, I try to convert the HTML code to JSF.  I have
searched the internet and I have tried different
specifications myself.  I am stuck.  This is the line
that I have been struggling with:

[CODE]
window.opener.document.forms[0].form["dataManagement:textField"].value
=
document.forms[0].form["externalFile:inputField"].value;
[/CODE]

If textField is in HTML parent window <input
name=textField .... /> and the inputField is in HTML
popup window <input name=inputField .... />, the
JavaScript can recognize (No problem! the datum is
passed.):

[CODE]
window.opener.document.forms[0].textField.value =
document.forms[0].inputField.value;
[/CODE]

Now, the dataManagement is the "id" attribute in my
JSF parent <h:form> tag.  The externalFile is the "id"
attribute in my JSF popup <h:form> tag.

The textField is in the JSF parent window as both the
"id" attribute and a "property" name (i.e.
value="#{dataManagementBean.textField}" )in the
<h:inputText> tag.

The inputField is in the JSF popup window as both the
"id" attribute and a "property" name (i.e.
value="#{accessExternalFileBean.inputField}" ) in the
<h:inputText> tag.

No matter how I experiment with different
specifications, I cannot get the textField and
inputField in the JavaScript.  I got that "it is null
or not an object" JavaScript error.  Please advise if
you have done it successfully.




                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

Reply via email to