Thanks very much. You solved my problem:-)
~Sandeep
________________________________________
From: Simon Lessard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 01, 2007 8:10 PM
To: MyFaces Discussion
Subject: Re: [Trinidad] Page refresh on return from dialog
Hello,
However, some components like f:param were not getting updated. Not sure why?
Strange...
Example (or some piece of code) for option-1 will be appreciated!
In the page:
<tr:commandButton partialSubmit="true" useWindow="true"
returnListener="#{myBean.redirectToSelf}"/>
In MyBean.java
public void redirectToSelf(ReturnEvent ev)
{
FacesContext context = FacesContext.getCurrentInstance();
ExternalContext eContext = context.getExternalContext();
String contextPath = eContext.getRequestContextPath();
String servletPath = eContext.getRequestServletPath();
String viewId = context.getViewRoot().getViewId();
eContext.sendRedirect(eContext.encodeActionUrl(contextPath + servletPath +
viewId));
}
Regards,
~ Simon
On 8/1/07, sandeep gururaj <[EMAIL PROTECTED] > wrote:
Thanks Simon, I tried the option-2. However, some components like
f:param were not getting updated. Not sure why?
Example (or some piece of code) for option-1 will be appreciated!
Thanks.
~Sandeep
________________________________________
From: Simon Lessard [mailto:[EMAIL PROTECTED] ]
Sent: Wednesday, August 01, 2007 7:28 PM
To: MyFaces Discussion
Subject: Re: [Trinidad] Page refresh on return from dialog
There's two ways, both are poor man's solution though.
1. Do a sendRedirect on the same page in your returnListener (you'll
lose the messages and request scoped variables though, like any
redirect);
2. Set a partialTriggers on the first component under trh:body (most
likely tr:form)
Regards,
Simon
On 8/1/07, sandeep gururaj < [EMAIL PROTECTED]> wrote:
Hello All,
I would like to know if anyone has any idea to refresh the complete page
on returning from a dialog window.
I have a tr:commandlink, on click of which a dialog window opens up, the
necessary operation is performed and then the dialog is closed. At this
point, I want to refresh the entire main page. Currently, I am updating
only one field in the page using returnListener on the command link and
partial triggers on the field. However, there are many other fields. So,
instead of having partial triggers for all the fields, I would like to
load that page once again.
Some more information on my usage:
I have a parent jsp file which includes child jsp page through
<ui:include>. The command link, I mentioned above, is in the child jsp.
Now, my need is to refresh both parent and child.
Any ideas? Please share.
Thanks.
~Sandeep