- This topic has 1 reply, 2 voices, and was last updated 18 years, 8 months ago by
Riyad Kalla.
-
AuthorPosts
-
sandesh_kotangaleMemberI am working on jsf & oracle Adf from one month before.
I have problem in JSF & ADF. from one page button open new window & that
window close & return the value.
New window is close but value is not returning. (means that old page is not
rendering)
MY CODE
lov.jsp
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
“http://www.w3.org/TR/html4/loose.dtd”>
<%@ page contentType=”text/html;charset=windows-1252″%>
<%@ taglib uri=”http://java.sun.com/jsf/html” prefix=”h”%>
<%@ taglib uri=”http://java.sun.com/jsf/core” prefix=”f”%>
<%@ taglib uri=”http://xmlns.oracle.com/adf/faces” prefix=”af”%>
<%@ taglib uri=”http://xmlns.oracle.com/adf/faces/html” prefix=”afh”%>
<f:view>
<afh:html>
<afh:head title=”lov”>
<meta http-equiv=”Content-Type”
content=”text/html; charset=windows-1252″/>
</afh:head>
<afh:body>
<af:messages/>
<af:form>
<af:inputText label=”User ID” value=”#{user.adumUserId}” /><af:inputText label=”User Name”
value=”#{user.adumUserName}”/>
<af:commandLink useWindow=”false” id=”cmdLink” text=”User Name”
action=”process:show”
launchListener=”#{user.handleLaunch}”
returnListener=”#{user.handleReturn}”
partialSubmit=”true” windowHeight=”200″
windowWidth=”500″ />
<br>
<br>
<af:commandLink useWindow=”true” id=”cmdLink1″ text=”New user?”
onclick=”openWindow(window,’popup.jsp’,’popupWindow’,{width:450,height:400},true,’dialog’,null);”launchListener=”#{user.handleLaunch}”
returnListener=”#{user.handleReturn}”
partialSubmit=”true” windowHeight=”200″
windowWidth=”500″/></af:form>
</afh:body>
</afh:html>
</f:view>popup.jsp
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
“http://www.w3.org/TR/html4/loose.dtd”>
<%@ page contentType=”text/html;charset=windows-1252″%>
<%@ taglib uri=”http://java.sun.com/jsf/html” prefix=”h”%>
<%@ taglib uri=”http://java.sun.com/jsf/core” prefix=”f”%>
<%@ taglib uri=”http://xmlns.oracle.com/adf/faces” prefix=”af”%>
<%@ taglib uri=”http://xmlns.oracle.com/adf/faces/html” prefix=”afh”%>
<f:view>
<afh:html>
<afh:head title=”popup”>
<meta http-equiv=”Content-Type”
content=”text/html; charset=windows-1252″/>
</afh:head>
<afh:body>
<af:messages/>
<h:form>
<af:inputText label=”User Name :” value=”#{user.adumUserName}” simple=”true”/>
<af:commandButton id=”cmdBtn” text=”Close” useWindow=”false”action=”#{user.commandButton_action}” >
</af:commandButton>
</h:form>
</afh:body>
</afh:html>
</f:view>user.java
package view;
import java.util.HashMap;
import java.util.Map;import oracle.adf.view.faces.context.AdfFacesContext;
import oracle.adf.view.faces.event.LaunchEvent;
import oracle.adf.view.faces.event.ReturnEvent;public class user
{
private String adumUserId ;
private String adumUserName ;
public user()
{
}public void setAdumUserId(String adumUserId)
{
this.adumUserId = adumUserId;
}public String getAdumUserId()
{
return adumUserId;
}public void setAdumUserName(String adumUserName)
{
this.adumUserName = adumUserName;
}public String getAdumUserName()
{
return adumUserName;
}public void handleReturn(ReturnEvent event)
{
user cst = new user();
if (event.getReturnValue() != null)
{
cst = (user)event.getReturnValue();
}
AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
Map maou = new HashMap();
maou.put(“user”, cst);
afContext.returnFromDialog(“maou”,maou);
afContext.getProcessScope().clear();
}public void handleLaunch(LaunchEvent event)
{
Object usr = adumUserName;
// event.get getProcessParameters().put(“adumUserName”, usr);
event.getDialogParameters().put(“adumUserName”, usr);
}public String commandButton_action()
{
String retValue;
retValue = “process:lov”;
return retValue;
}
}give me solutions.
SANDESH KOTANGALE
sandesh_kotangale@gmail.com[/b]
Riyad KallaMemberSandesh,
Be sure to post your question to the MyFaces/ADF forums as well as some folks here might have a better idea what you are asking. -
AuthorPosts