10 Replies Latest reply on Oct 18, 2010 11:40 PM by eswaramoorthy1986

    Clear cache

    eswaramoorthy1986
      How to clear cache, If i click cancel button in the application then i want to clear cache.

      <s:link id="cancelAdd"
            value="Cancel"
            propagation="end"
            immediate="true"
            view="/data/dimensionsList.xhtml" />

      If i click this cancel button it navigate to dimensionsList.xhtml page
      but the cache not clear


      Please give me some suggestion

      Thanks

      Eswar
                         
        • 1. Re: Clear cache
          lvdberg

          Hi,


          If you make clear what cache (the Hibernate one, the browser, the....) , maybe we can help you.


          Leo

          • 2. Re: Clear cache
            eswaramoorthy1986

            Hi Leo


            It is browser cache.



            Please give me some suggestion



            Thanks


            Eswar

            • 3. Re: Clear cache
              lvdberg

              Hi,


              Another question. Do you mean that you want to clear the form values in that page, or really clearing the browser's cached pages/images etc. The first is just a questioon of rerendering the page contents, but the second can't be done programmatically, but you can use Metada in the page header to remove cached values after a specfied time. If it's the latter look at IE or FireFox documentation to see how that's done.


              Leo

              • 4. Re: Clear cache
                eswaramoorthy1986
                Hi Leo


                I want to clear the cache in browser address bar

                For Example

                In this address, I want to clear  "?cid=108077"  this value after the cancel button click.
                http://seamframework.org/Community/ClearCache?cid=108077




                Please give me some suggestion

                Thanks

                Eswar
                • 5. Re: Clear cache
                  lvdberg

                  Hi,


                  Add a navigation rule to pages.xml and rerender the page when you click cancel.


                  Leo

                  • 6. Re: Clear cache
                    eswaramoorthy1986
                    Hi Leo

                    Even though i add a navigation rule to pages.xml and rerender the page when i click cancel.
                    It have same problem.
                    The address bar still have that cid.

                    This is my code

                    In DimensionEdit.xhtml

                    <s:link id="cancelAdd"
                                               value="Cancel"
                                               propagation="end"
                                               immediate="true"
                                               action="#{dimensionHome.cancel}"
                                               rendered="#{!dimensionHome.managed}">
                         </s:link>


                    In DimensionHome.java

                    public String cancel()
                            {
                                    return "dimensionBack";
                            }

                    pages.xml
                    <rule if-outcome="dimensionBack">
                                    <redirect view-id="/data/DimensionList.xhtml"/>
                                </rule>




                    Please give me some suggestion

                    Thanks

                    Eswar

                    • 7. Re: Clear cache
                      lvdberg

                      Hi,


                      The documentation has a chapter on natural conversations. I never used it, but maybe it is useful to you


                      (in my Seam doc version 2.1.2 it's in chapter 7)



                      Leo

                      • 8. Re: Clear cache
                        eswaramoorthy1986

                        Hi Leo


                        I cant find solution in that.....






                        Please give me some suggestion


                        Thanks


                        Eswar

                        • 9. Re: Clear cache
                          lvdberg

                          Hi,


                          have you looked at the URL-rewriting filter  in the documentation?


                          Leo

                          • 10. Re: Clear cache
                            eswaramoorthy1986
                            Hi Leo


                              Thanks for your information .
                              I found the solution.




                            Thanks & Regards

                            Eswar