How to refresh the contents in another JSF Page?

Hi, i have to page A.jsp and B.jsp, B.jsp is opened from a commandLink in A.jsp. On B.jsp, i am editing the data of managed session beans, and there is a " Submit and Close" button there. When i click this button, i want to do these things:

1 close B.jsp

2 refresh the content in A.jsp

How to do this please?

Best Regards:)

Robin

[366 byte] By [@smile@a] at [2007-10-2 3:54:39]
# 1
maybe this can be done with javascript code?
@smile@a at 2007-7-15 23:15:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
If your needed is to have a popup page (running B.jsp into a popup having A.jsp in the main borwser window), a good solution is to use the popupFrame component of the jenia4faces popup family. http://www.jenia.org
famagostaa at 2007-7-15 23:15:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

hi,famagosta, i downloaded the jar file from www.jenia.org, and in the document of the PopupFrame, there is a limitation about myfaces, at the end of the document it says:

With MyFaces you need to configure the javax.faces.STATE_SAVING_METHOD to client to avoid wrong IFRAME content

i am not familiar with the configuration work with myfaces, so where should i put it?and please send me a sample configuration code, thanks:)

@smile@a at 2007-7-15 23:15:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

hi,i downloaded the sample, so i know how to config it now.

But i got some trouble in using this component. Except the jar files, these files are needed, but they don't work, please help me with it:

1 web.xml, i just simly copied the one in sample, and use the same welcome file.

2 test.TestBean.javapublic class TestBean

{

public String open()

{

return "jeniaOpenPopupFrame";

}

public String close()

{

return "close";

}

}

3 faces-config.xml

<faces-config>

<managed-bean>

<description> Test bean

</description>

<managed-bean-name>TestBean</managed-bean-name>

<managed-bean-class>test.TestBean</managed-bean-class>

<managed-bean-scope>session</managed-bean-scope>

</managed-bean>

<navigation-rule>

<from-view-id>/jsp/home.jsp</from-view-id>

<navigation-case>

<from-outcome>open</from-outcome>

<to-view-id>/jsp/popup.jsp</to-view-id>

</navigation-case>

</navigation-rule>

</faces-config>

4 jsp files: i just simply used the ones in sample, but i removed most content of jsp files to keep it simple as possible, but left enough tags for testing the popup frame out.the most important one is home.jsp,and here it is:

<f:view>

<h:form>

<head>

<link rel="stylesheet" href="../css/stylesheet.css" type="text/css">

</head>

<body bgcolor="#FFFFFF" background="../img/bg.gif">

<jp:popupFrame scrolling="no" height="450px" width="550px"

actionOpen="#{TestBean.open}" center="true" >

<h:outputText value="Popup frame"/>

</jp:popupFrame>

</body>

</h:form>

</f:view>

But very strange, it gives me a javascript error, and the popup frame is not shown, very puzzled, please help!

Best Regards:)

Robin

@smile@a at 2007-7-15 23:15:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
Hi Robin.Try to download the nightly build of the library.There was a fixed bug putting the popupFrame outside an h:panelGrid (directly into the h:form).
famagostaa at 2007-7-15 23:15:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
Hello, I was wondering, how the javascript would look like to refresh the frame and where should I put it, and also on the body of the source of my page I was able to set the property of target but it didn磘 work.Any comments..
pbarrigaa at 2007-7-15 23:15:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...