incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Causevic, Dzenan" <>
Subject Must refresh page to get returnListener value from dialogs
Date Thu, 22 Feb 2007 15:22:37 GMT

I use dialogs for user to be able to retrieve his password if he forgets it. On the login
page I have a link 'forgot your password' that opens up external window via dialogs where
the user can enter his username and click on the 'Send' button for his password to be sent
to him. Now I want the external window to close automatically upon clicking on Submit button,
and the message (success or failure) to be displayed in the parent window from which external
window was originally called. I use returnListener for this however my problem is I have to
refresh the page to see the message. After I submit send button, external window closes, but
the message is not being displayed on the parent page. I have to refresh the page it in order
to be able to see it.

loginJSF.jsp is a parent page:
                          <tr:outputText value=""                                     
                          <tr:commandLink id="buddonId"
                                          text="Forgot your password?" 
                                          useWindow="true" windowWidth="500" 

passwordRetrJSF.jsp is JSF page that opens in external window:
                          <h:outputText escape="false" value="<!--Enter E-mail -->"
                          <h:outputText id="userName2L" styleClass="labelText" value="E-mail*"
                          <h:inputText id="User_Name2TI_R" styleClass="inputText" value="#{passwordRetr.userName}"
                          <tr:commandButton id="retrieveB" action="#{passwordRetr.send}"
text="Submit" inlineStyle="margin-left:10px;" />
import org.apache.myfaces.trinidad.context.RequestContext;

public class PasswordRetrBean {
    private String _userName;
    /** Creates a new instance of PasswordRetrBean */
    public PasswordRetrBean() {

    public String getUserName() {
        return _userName;

    public void setUserName(String userName) {
        this._userName = userName;
    public String send()
        String firstPart = "first part ";
        String secondPart = " second part";
        // check if user name is valid using getUserName()
        // if yes then
            // firstPart = "something ";
            // secondPart = " something";
        // if no then
            // firstPart = "something else ";
            // secondPart = " something else";
        // end of if statement
        return null;
import org.apache.myfaces.trinidad.event.ReturnEvent;
import org.apache.myfaces.trinidad.component.UIXOutput;

public class PasswordRetrDialogBean {
    private UIXOutput _output;
    /** Creates a new instance of PasswordRetrDialogBean */
    public PasswordRetrDialogBean() {
    public UIXOutput getOutput() {
        return _output;

    public void setOutput(UIXOutput output) {
        _output = output;
    public void returned(ReturnEvent event)
        if (event.getReturnValue() != null)



This e-mail is the property of NaviSite, Inc. It is intended only
for the person or entity to which it is addressed and may contain
information that is privileged, confidential, or otherwise protected
from disclosure. Distribution or copying of this e-mail, or the
information contained herein, to anyone other than the intended
recipient is prohibited.

  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message