tag:blogger.com,1999:blog-5396570633771229267.post8330189643822964162..comments2024-03-03T14:43:52.399+01:00Comments on The BalusC Code: POST-Redirect-GET patternBalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.comBlogger54125tag:blogger.com,1999:blog-5396570633771229267.post-76107047016617744332018-07-27T07:56:10.709+02:002018-07-27T07:56:10.709+02:00Hi BaluSc,
Thanks for posting this. I have a quer...Hi BaluSc,<br /><br />Thanks for posting this. I have a query. I want to get the FacesMessages of Validators and Converters in a <h:inputTextarea instead of <h:Messages .How can I achieve that.<br />Sandhyahttps://www.blogger.com/profile/01487015430068828933noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-67959491837918130262015-06-01T17:03:35.752+02:002015-06-01T17:03:35.752+02:00Thank you,
I have question about request param...Thank you,<br /> I have question about request parameters after PRG.<br /> <br /> <br /><br /><br /> <br /> <br />After PRG request.getParameter("pageRetour") return nullAnonymoushttps://www.blogger.com/profile/02827430689671892222noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-49433947505504107492014-11-12T19:49:55.915+01:002014-11-12T19:49:55.915+01:00Thank you so much! This fits perfectly in my solut...Thank you so much! This fits perfectly in my solution.<br /><br />Regards,Diego R. Ferreirahttps://www.blogger.com/profile/16247075358695442744noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-8977407107444618822014-03-24T20:37:45.498+01:002014-03-24T20:37:45.498+01:00This looks like it will not work if the user has m...This looks like it will not work if the user has multiple browser tabs/windows open on the same session. If page loads is slow, user could switch tabs and navigate in other tab and could get the wrong saved values.Don Kleppingerhttps://www.blogger.com/profile/02266023115878336856noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-47590128884705552342012-04-10T17:36:38.423+02:002012-04-10T17:36:38.423+02:00On IBM WAS, using JSF 1.1 the code causes an excep...On IBM WAS, using JSF 1.1 the code causes an exception. After the reponse is rendered, the next interaction with the page generates the exception: <br /><br />[INFO] [Servlet Error]-[Faces Servlet]: java.lang.NullPointerException<br />[INFO] at com.ibm.ws.webcontainer.srt.SRTServletRequest$SRTServletRequestHelper.access$1600(SRTServletRequest.java:2573)<br />[INFO] at Mhttps://www.blogger.com/profile/06659920029358894485noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-31534018430225114022011-09-28T23:01:05.768+02:002011-09-28T23:01:05.768+02:00BalusC,
I attempted to remove the listener (as I ...BalusC,<br /><br />I attempted to remove the listener (as I said I would in my previous post on this page), and my ajax behavior stopped working, and PrimeFaces commandbuttons were NOT rendered correctly, as they are rendered, when I have this listener of yours in place. So, the listener stays. :)<br /><br />HowardHoward Smithhttps://www.blogger.com/profile/01594886342056798831noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-27286542929294958162011-09-28T18:11:28.448+02:002011-09-28T18:11:28.448+02:00BalusC,
I've been getting the following error...BalusC,<br /><br />I've been getting the following error message ever since I renamed my NetBeans (v7.0.1) JSF web app (context-root), persistent unit, etc...<br /><br />My app is Ajaxified, i'm using commandLink/Button actionListener and returning NULL outcome (always) and dynamic ui:include to display JSF pages. I read this post and related posts on stackoverflow, and I don't thinkHoward Smithhttps://www.blogger.com/profile/01594886342056798831noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-82346470578262601942011-09-18T14:22:05.672+02:002011-09-18T14:22:05.672+02:00BalusC, I arried to this post and solution of your...BalusC, I arried to this post and solution of yours after experiencing problems with my PrimeFaces 3.0M3, Mojarra 2.1.2 JSF web app, copied and pasted this as you stated in this post, and it solved my problem. I also configured the faces.STATE_SAVING_METHOD, PARTIAL_STATE and FULL_STATE in web.xml per other related posts I found on primefaces.org site, and other posts you posted on stackoverflowHoward Smithhttps://www.blogger.com/profile/01594886342056798831noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-26893887747420700062011-08-22T08:21:31.647+02:002011-08-22T08:21:31.647+02:00Just want to say thank you!
@Archan: As it is wri...Just want to say thank you!<br /><br />@Archan: As it is written in the text: "Copyright - There is no copyright on the code. You can copy, change and distribute it freely. Just mentioning this site should be fair."Alfonssockenhttps://www.blogger.com/profile/04245119417670551316noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-34001197715576453442011-06-27T08:40:24.180+02:002011-06-27T08:40:24.180+02:00Hi BalusC,
I am using your Phase Listener in my co...Hi BalusC,<br />I am using your Phase Listener in my code. <br />I want to know a bit more about the copyright of code.<br />Can it be used for both free and commercial purposes.<br />Thank you once AgainArchan Mishrahttps://www.blogger.com/profile/03991115196085819299noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-63316654187759043252011-02-28T04:39:02.196+01:002011-02-28T04:39:02.196+01:00This is a really great concept and I like the impl...This is a really great concept and I like the implementation! I've spent a week trying various approaches to get post-redirect-get to work in a JSF application where all managed beans are managed by Spring. I really didn't want to use the flash scope and lose the automatic property mapping that JSF offers so I tried creating custom scopes and other techniques to try and hang onto my Erik Gillespiehttps://www.blogger.com/profile/01015371201279887066noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-30001350130911036442010-08-26T10:50:56.335+02:002010-08-26T10:50:56.335+02:00can you please suggest a solution to double-click ...can you please suggest a solution to double-click problem in JSF.<br /><br />i.e when a commandlink is double clicked it submits the request twice. can this be solved using PRG ? pls suggest a solution.Unknownhttps://www.blogger.com/profile/04766202004569249781noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-69717361042975374002010-07-01T16:25:35.290+02:002010-07-01T16:25:35.290+02:00I removed the code to save and restore the ViewRoo...I removed the code to save and restore the ViewRoot and now it's working. I'm using JSF 2. If you could explain why I will be very thankfull.Kadu Diógeneshttps://www.blogger.com/profile/03789466609919560549noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-28089762830615150282010-07-01T16:13:51.801+02:002010-07-01T16:13:51.801+02:00Hi BalusC,
Your code is working fine, but in one ...Hi BalusC,<br /><br />Your code is working fine, but in one situation I'm having a problem.<br /><br />I have a page that render a data list with commandlinks to delete the data.<br /><br />The first delete works fine and the page is re-rendered. The next time I try to delete a item I get the following error:<br /><br />com.sun.faces.application.view.StateHolderSaver cannot be cast to [Kadu Diógeneshttps://www.blogger.com/profile/03789466609919560549noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-5066987487952049902010-06-21T14:02:39.705+02:002010-06-21T14:02:39.705+02:00Hi,
I'm trying to implement PRG in my JSF 1.2...Hi,<br /><br />I'm trying to implement PRG in my JSF 1.2 app. I have some troubles retrieving request attributes. <br /><br />I have a MyDataBean request scoped which provide a DataModel property to a t:datatable.<br />When the action handler is called, it retrive the data with the DataModel.getRowData() function. But it seams that the redirect handle another request dans the retrieved data Mathieu Le Cainhttps://www.blogger.com/profile/16506380045945949830noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-27000725749487817122010-04-16T08:42:53.282+02:002010-04-16T08:42:53.282+02:00Hi I am getting an exception on exactly redirect p...Hi I am getting an exception on exactly redirect page line.<br /><br />WARNING: phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@bf711e) threw exception: java.lang.IllegalStateException null<br />org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435)<br />com.sun.faces.context.ExternalContextImpl.redirect(ExternalContextImpl.java:419)<br />J.Naveenhttps://www.blogger.com/profile/13131590220135493721noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-83199630033849425222010-04-16T08:40:47.649+02:002010-04-16T08:40:47.649+02:00This comment has been removed by the author.J.Naveenhttps://www.blogger.com/profile/13131590220135493721noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-47553106146197574782010-03-16T15:04:00.250+01:002010-03-16T15:04:00.250+01:00http://forums.sun.com/thread.jspa?threadID=5432075...http://forums.sun.com/thread.jspa?threadID=5432075Jigarhttps://www.blogger.com/profile/06621764775608336291noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-25219323369274713282010-03-16T14:50:49.421+01:002010-03-16T14:50:49.421+01:00hello i have an issue, my footer is polling ajax r...hello i have an issue, my footer is polling ajax request,<br />so if i use your Phase listerner, it is handling all ajax request also, more over i have user PRG in menu navigation,i am setting some data in menu item 's action which is in request scope , but as its PGR it is getting lost in the target view, how to resolve this, i dont want to go for putting data in session scope,if i dnt use Jigarhttps://www.blogger.com/profile/06621764775608336291noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-32390475147314695262010-01-02T10:54:35.391+01:002010-01-02T10:54:35.391+01:00Hi,
I am using JSF with RichFaces & i applied...Hi,<br /><br />I am using JSF with RichFaces & i applied the 'POST-Redirect-GET pattern', now, all my ajax requests are submiting the whole page and form. Please provide any solution to this problem.Unknownhttps://www.blogger.com/profile/10491885855964039077noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-85066599883053191162009-12-15T11:30:32.804+01:002009-12-15T11:30:32.804+01:00Hello,
I've tried this listener with JSF 1.2 a...Hello,<br />I've tried this listener with JSF 1.2 and JSP and it doesn't work. During debugging I see that the ViewRoot before "render responce" phase is null so there is nothing to save there.<br />What is wrong there?Mishahttps://www.blogger.com/profile/10558886271879137543noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-21282671962762379262009-11-12T08:07:00.270+01:002009-11-12T08:07:00.270+01:00I think for JSF related query Balus is the correct...I think for JSF related query Balus is the correct person, <br />I have probelm with </redirect> for PRG, it worked well on http, but not on https, I mean if we deploy it in secured server redirection will get timeout. please share me if you have any work arround on this.R Buy | Smart Refillhttps://www.blogger.com/profile/08040132146148584897noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-41539697249465269622009-06-18T22:02:12.408+02:002009-06-18T22:02:12.408+02:00BalusC, Just adding PostRedirectGetListener to app...BalusC, Just adding PostRedirectGetListener to application and activating this <br />phaselistener in faces-config.xml didn't worked for me. So, i tried to do this to a simple application found in the book Core JavaServer Faces called login. Changing the scope of the backing bean to request makes the application seems just like using the tag redirect. What am i doing wrong? Thanks.guimahttps://www.blogger.com/profile/12002797854653906174noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-67381656607040332972009-05-15T22:58:00.000+02:002009-05-15T22:58:00.000+02:00Best what you can do is to let the phaselistener s...Best what you can do is to let the phaselistener skip the PRG pattern based on some request parameter or attribute which indicates that such a dialog is to be fired.BalusChttps://www.blogger.com/profile/00299057045960008647noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-45402988206683374172009-05-15T20:45:00.000+02:002009-05-15T20:45:00.000+02:00We are using Trinidad. A dialog page can be opene...We are using Trinidad. A dialog page can be opened up as a pop up. Instead of page flow to a jspx, you can have a page flow to a dialog simply by returning a prefixed String dialog:String. In the faces-config you define the navigation case for dialog:String.spandhttps://www.blogger.com/profile/09927113614781094348noreply@blogger.com