1 2 Previous Next 19 Replies Latest reply on Aug 2, 2008 10:51 AM by Julien Martin

    <rich:paint2D />; cacheable attribute not honoured...(?)

    Bob Brown Newbie

      I have the following:

      <rich:panel header="Graphics">
       <rich:paint2D paint="#{paintBean.paint}" data="#{dataBean}"
       width="640" height="480" format="jpeg" cacheable="false"
       bgcolor="white" />
      </rich:panel>
      


      It seems to me that the cacheable attribute is not being honoured.

      Here is the HTTP response:

      HTTP/1.1 200 OK
      Server: Apache-Coyote/1.1
      X-Powered-By: Servlet 2.4; JBoss-4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)/Tomcat-5.5
      X-Powered-By: JSF/1.2
      Last-Modified: Wed, 26 Sep 2007 11:20:37 GMT
       Cache-control: max-age=86400
       Expires: Thu, 27 Sep 2007 11:24:40 GMT
      Content-Type: image/jpeg
      Content-Length: 82686
      Date: Wed, 26 Sep 2007 11:24:40 GMT
      


      Note the bolding...not what I would expect to see...

      The doco says:

      "Caching on client supported by properly
      sending and processing of HTTP headers (Last-
      Modified, Expires, If-Modified-Since, etc.)"


      I have tried setting the 'value' attribute to a key (== 'fred') in an attempt to see if server-side caching is involved, but I see no difference.

      Is this a bug or am I missing something?

      Suggestions/etc. gratefully received.

      Cheers,

      Alph

        • 1. Re: <rich:paint2D />; cacheable attribute not honoured...(?)
          Sergey Smirnov Master

          did you try to have a variable value for 'value' (i.e. not a constant)?

          • 2. Re: <rich:paint2D />; cacheable attribute not honoured...(?)
            Bob Brown Newbie

            I have just tried making value aString variable:

             private String value = "";
            
             public String getValue() {
             System.out.println("getValue()");
             return value;
             }
            
             public void setValue(String value) {
             System.out.println("setValue(" + value + ')');
             this.value = value;
             }
            


            With:

            <rich:panel header="Graphics">
             <rich:paint2D paint="#{paintBean.paint}" data="#{dataBean}"
             width="640" height="480" format="jpeg" cacheable="false"
             bgcolor="white" value="#{dataBean.value}" />
            </rich:panel>
            


            This had no effect...

            As far as i can see, the caching must be happening on the server:

            + I have the browsers I use set to not use a local cache.
            + if I open the page in IE, I get the image. If I then open the same page in another browser instance (either a second instance of IE [not just a new window] or an instance of FireFox), I see the same image.
            + My log tells me that the "#{paintBean.paint}" method is NOT called for subsequent requests (ie: no fresh output for each request). Nor are the get/set methods above.

            Cheers,

            Alph

            • 3. Re: <rich:paint2D />; cacheable attribute not honoured...(?)
              Sergey Smirnov Master

              Does #{dataBean.value} always return the same value ?

              • 4. Re: <rich:paint2D />; cacheable attribute not honoured...(?)
                Bob Brown Newbie

                Fast reply! Impressive!

                I can't see get/set value EVER being called.

                FYI, the image URL is:

                http://grendel:8080/TEST/a4j_3_1_0org.richfaces.renderkit.html.Paint2DResource/DATA/eAF1U89LFVEY.WbqaT9c2DOECEEsahN36lESmBSm2KNRoxeBBT3um.mcGZsftzv3-aakqEUJCW2qXQuhIAJrUav-gxDa-BeIBNGiTQQu7bszlmZ0mcXAPfec85177uJ3KKUS-hPpMRk4.hR3MGUSYxflzUAxX0Uhu8SDWFWGL2OaNKWDh6sR93CYKz74aXm1c.3NOxPaqrCr3vDOJ2Eiq9Ben0pkxJX-8zHwfPprq7cCV.k2lOouHVVQtqf5DLdCHnvWRGMaHTVgE0posVtwD4xMrNMCAIO-FQDzPjnd72KUsBxU-NI-CKOXYcIOoigUFXRtEajGCj2UpFCa4WET.5avKRnEnt7MPWr1nZkgtX3aItMW2QZDeXXh1dqDudMmGNUNrkxC5yZuvBk1UD5afN6z99nKvAmQCbJWUdCRx6jtXhyZTLVGO224pHJEn85Ykb2TRCKJMVasRinhhSSkq6jxGZSTSx8Gn774PGaCacNuJ-RpOs4j1EwlG.akhHHzMwq6i9GDxKqhDHgY3OGNEAcyoYc6ShIsbca5YIgqZRgyGz3u3B5D5SfuUBC7lIeOlBalathgRAoO5qyZhaFVAEcyITFNgyQm6v8xX-HednRBDEYHpSPhQDE-mdiOe28tzX9ZO.lEpyih6w9uU.flw8e1H9eWz-Q5k4M-XWQuuOOjnmo7YTUS4dzC2Y83Xv-c0OI6u65WN5QPzeaVGkIeF-W6C9Akyev5yEUDNlrydvnq1289s6O.r9akpuXXz1uKjUou.MBJK8NqaymKfguRtY4DswQ9nwrL9NvqPVfpP3bqRG-uPtj3r42-7BdUGDjK.faces
                


                • 5. Re: <rich:paint2D />; cacheable attribute not honoured...(?)
                  Bob Brown Newbie

                  Ialso tried giving the value property a default value:

                  private String value = "PaintDataKEY";
                  


                  No change in behaviour.

                  Cheers,

                  Alph

                  • 6. Re: <rich:paint2D />; cacheable attribute not honoured...(?)
                    Sergey Smirnov Master

                    are we speaking about updating image on ajax or when the whole page is reloaded ?

                    • 7. Re: <rich:paint2D />; cacheable attribute not honoured...(?)
                      Bob Brown Newbie

                      also should have said that I am using release 3.1.0.

                      • 8. Re: <rich:paint2D />; cacheable attribute not honoured...(?)
                        Sergey Smirnov Master

                         

                        "alpheratz-jb" wrote:
                        also should have said that I am using release 3.1.0.

                        I am not sure it is important

                        • 9. Re: <rich:paint2D />; cacheable attribute not honoured...(?)
                          Bob Brown Newbie

                          Currently, when the whole page is refreshed with ctrl-F5 (in IE) and a repost of data.

                          But note what I saw with separate browsers (equivalent to a full refresh...(?)).

                          I'll see If I can "knock up" an ajax refresh...

                          Cheers,

                          Alph

                          • 10. Re: <rich:paint2D />; cacheable attribute not honoured...(?)
                            Bob Brown Newbie

                            OK: a very quick hack using code I already had "lying around"

                             <rich:panel header="Graphics">
                             <h:selectOneMenu id="masterMenu"
                             value="#{masterBean.selectedOption}">
                             <a4j:support event="onchange" reRender="paint2D" />
                             <f:selectItems value="#{masterBean.options}" />
                             </h:selectOneMenu>
                            
                             <br />
                            
                             <rich:paint2D id="paint2D" paint="#{paintBean.paint}" data="#{dataBean}"
                             width="640" height="480" format="jpeg" cacheable="false"
                             bgcolor="white" value="#{dataBean.value}" />
                             </rich:panel>
                            


                            I can see the AJAX request and all looks OK, butI see no change in the image and the "#{paintBean.paint}" method is not called still.

                            Here is the client-side log (from <a4j:log />):

                            debug[9:49:08,187]: Have Event [object Object] with properties: target: undefined, srcElement: [object], type: change
                            debug[9:49:08,187]: NEW AJAX REQUEST !!! with form :form
                            debug[9:49:08,203]: Append hidden control form with value [form] and value attribute [form]
                            debug[9:49:08,203]: Append select-one control form:masterMenu with value [0] and value attribute [0]
                            debug[9:49:08,218]: Append hidden control javax.faces.ViewState with value [H4sIAAAAAAAAAK1XW2wUVRg+u6W03TZIITQ1UO2FctF2tt3dbksrgZbeVreXdAtBSCyns6e7U2ZnxpkzuwMNpJIgiSSKUYjRJhI18QVf9MHLk4Y3EjCS+KIvhJgYEy+JMUF9UM85M7Mzs51tC/E8nD0z+9/O/3/nO//c+AVUairol9UMBxehEVvUFjioKKLAQyzIEjdIXqYwxGgCSjCD1N2zKkIprOpYV9GknEYXXvvtrZsL7W/XAWAoZwEIHgdtHmu8nFNkCUmY2TomoMKMLGNQM5e3l+YIgLZFmIcGtwB5pLnUsjgncuNkGpXVHNi0QGdzVJR1xXSov6ScAZWLc0I6Auyxh+qoAp8t62gaSkg01aLF6J5aJ7ojci4HpXRSkE6bqrFH8xi3lIKgYx2PKSQiHk9JaAJJOgjloIaRytY03hZvTcmCSx2dnp6amZUlPgulDAJPr5U96oFVX1cUWcVmcL3AGWULdjRhRpbAKKeZen1FrX0byIUg4cgwqFKshTUMXQXbTyapT04k8XNT84vEy8CVO8ff3artF4MUgTRx+ovgPEmfe1XtrBTFDT76uoqcgHrH7JAsiwhKt5vV5W9X/v41CAInQGUeijoylIBGFaoBNRIan51Izg0NphJHMKgLK+R4RDiDboPY28rs6VgQuaTMQxGd/7P+1ErXXz8HwaYEqM5CLcuT05MEVbysS1g9g8E2trUwjSFMTpggZQaSoJo+6sQ09buFiOehKkCJxb3FUP4lA4Pg4FEykSQC4N1KQsKIHNpt969/8OClS31kKwl7K3aITG5Sz80j9eUbV5tq37x32U5kraIoxbxV0kWITYqzLP4d8El6g5P0YlgsI+Nk9xNQqaz67qubDae+qQDBURASZZgehTyW1QSowVkVaVlZTBvKocOs+psL1dQQdYBBI4ENp+kSg56IsMZNDM48N5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7PIWUWQG1MoiIgu4SRBzoiPsjwjbUarjPe5913vuc3FmpCbsLvn7H75Orxke/6KIRLy312h8JboyU+cbQONe3haudcNd7ddOYQviL4YtXr332aayCNWJ1NDIrzgAufjIYVlsCmKWNrE2F7cvEjv8zi2zeY7ekAL5974YS2c37cicDImko0xDD1aTpxmM7qG9bomIMRAxYZbAYBp1eLEbjHT3dDhZLjNiU5HX3JKh1JMs42gf2+DmiWm4/DOl1DEJW7ZwqumHUVNrkMQkHOGa5SHqWmRbjDvtd4J7zjkC0kCVdhauONYpzD/l2REmUgfwZszexSNK+iMgXVRIEcqQJZf2GEUZiuLSJGbDQOErst67d79Br6NL1Q5+/8OEfU06z0wC2tS2xnLDKsNU5q7OwLlnWa3GwgDn7+qeJ9C1MF+D8CsOs0sqUOqIF2rSooAyD+393tnqxMRIAAA==]
                            debug[9:49:08,234]: parameter form:j_id7 with value form:j_id7
                            debug[9:49:08,234]: Start XmlHttpRequest
                            debug[9:49:08,250]: Reqest state : 1
                            debug[9:49:08,265]: QueryString: AJAXREQUEST=_viewRoot&form=form&form%3AmasterMenu=0&javax.faces.ViewState=H4sIAAAAAAAAAK1XW2wUVRg%2Bu6W03TZIITQ1UO2FctF2tt3dbksrgZbeVreXdAtBSCyns6e7U2ZnxpkzuwMNpJIgiSSKUYjRJhI18QVf9MHLk4Y3EjCS%2BKIvhJgYEy%2BJMUF9UM85M7Mzs51tC%2FE8nD0z%2B9%2FO%2F3%2FnO%2F%2Fc%2BAVUairol9UMBxehEVvUFjioKKLAQyzIEjdIXqYwxGgCSjCD1N2zKkIprOpYV9GknEYXXvvtrZsL7W%2FXAWAoZwEIHgdtHmu8nFNkCUmY2TomoMKMLGNQM5e3l%2BYIgLZFmIcGtwB5pLnUsjgncuNkGpXVHNi0QGdzVJR1xXSov6ScAZWLc0I6Auyxh%2BqoAp8t62gaSkg01aLF6J5aJ7ojci4HpXRSkE6bqrFH8xi3lIKgYx2PKSQiHk9JaAJJOgjloIaRytY03hZvTcmC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CYtMP7p77MefmpbGbHoDRmEvaHef4%2BbDkUhH9EAzYSHi%2FGCr7aLVcJEfHSWPq8f%2FewwifV5ExS1ExR1E0amXor16TIVKVuA1%2F3j8Lsem4mqLD7lsNMZeo8R00uRq874hcnbb4Ygxy0cY8Msg8RjVLQfExiLASsQKoeWT97785%2FWghZdx4qHFi7QSjQQh%2F5buZ6%2B8J1wI2ihbKHSBXW1LZls1RDoCTmNtDUpPKRQf59zIM3sRRTEK%2FaCvBFO9HT2RZpaFg61r2Ws1zIRg0OfPAyVBs8chQUoTdA%2BmoULMOrnFoLa%2FCJhebPZdPr3eSJ7MbksYPMb0nHYSu3vLsiRG%2F%2FQcDVev4J69mA2tc5q8%2F60J4%2BDDQrar2w%2ByTAg6l4MNUvqD2Jwt7Ac7PIWUWQG1MoiIgu4SRBzoiPsjwjbUarjPe5913vuc3FmpCbsLvn7H75Orxke%2F6KIRLy312h8JboyU%2BcbQONe3haudcNd7ddOYQviL4YtXr332aayCNWJ1NDIrzgAufjIYVlsCmKWNrE2F7cvEjv8zi2zeY7ekAL5974YS2c37cicDImko0xDD1aTpxmM7qG9bomIMRAxYZbAYBp1eLEbjHT3dDhZLjNiU5HX3JKh1JMs42gf2%2BDmiWm4%2FDOl1DEJW7ZwqumHUVNrkMQkHOGa5SHqWmRbjDvtd4J7zjkC0kCVdhauONYpzD%2Fl2REmUgfwZszexSNK%2BiMgXVRIEcqQJZf2GEUZiuLSJGbDQOErst67d79Br6NL1Q5%2B%2F8OEfU06z0wC2tS2xnLDKsNU5q7OwLlnWa3GwgDn7%2BqeJ9C1MF%2BD8CsOs0sqUOqIF2rSooAyD%2B393tnqxMRIAAA%3D%3D&form%3Aj_id7=form%3Aj_id7&
                            debug[9:49:08,265]: Reqest state : 1
                            debug[9:49:08,312]: Reqest state : 2
                            debug[9:49:08,312]: Reqest state : 3
                            debug[9:49:08,312]: Reqest state : 4
                            debug[9:49:08,328]: Reqest end with state 4
                            debug[9:49:08,328]: Response with content-type: text/xml;charset=UTF-8
                            debug[9:49:08,328]: Full response content: <?xml version="1.0"?>
                            <html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><link type="text/css" rel="stylesheet" href="/TEST/a4j_3_1_0css/panel.xcss/DATB/eAGLZKr5DAADWQHL.faces" /><script type="text/javascript" src="/TEST/a4j_3_1_0org.ajax4jsf.javascript.AjaxScript.faces">
                            </script></head><body><img src="/TEST/a4j_3_1_0org.richfaces.renderkit.html.Paint2DResource/DATA/eAF1U89LFVEY.WbqaT9cmIYQIYhFbeJOvUoCk8IUezRq9CIwocd9M58zY.Pjduc-35QUtSghoU21ayEURGAtatV.EEIb.wKRIFq0icClfXfG0owusxi4555zvnPPXfwOpVRCXyI9JgPHn-IOpkxi7KK8GSjmqyhkl3kQq.LQFUyThnTwcCXiHg5xxQc-La-2r795Z0JLBXbV6t6FJExkBVprU4mMuNJ.PgaeT38ttWbgKt-GUs2lowo67Gk-w62Qx541Xp9GR.XbhBJa7BbcAyMT67QAwKBvBcC8T073uxglLAcVvrQPwuhlmLCDKApFBZ1bBCqxQg8lKZRmeNjAv-WrSgaxpzdzj1p9ZyZIbZ-2yLRFtsHQsbrwau3B3BkTjMoGVyahfRM31ojqKB8tPu.e-2xl3gTIBFkrK2jLY9R2Lw1PpFqjlTZcUjmiT2esyN5JIpHEGCtWpZTwYhLSVVT5DMqJpQ8DT198HjXBtGG3E.I0HeMRaqaSDXtSwrj5GQVdxehBYlVRBjwM7vB6iP2Z0EMdJQmWNuJcMESVMgyZjR53bo-i8hN3MIhdykNHSotSNWwwIgUHc9bMwtAqgMOZkJimQRIT9f-Yr3JvO7ogBqON0pFwoBifTGzHvbeW5r-snXqiU5TQ-Qe3qfvy4ePqj-vLZ.OcyUGvLjIX3PFRT7WdsBKJcG7h3Mcbr3-Oa3GdXWezCzoOzeaVGkQeF-W6C9Agycl85KIBGy15u3zt67fu2ZHfV2tS0.Lr503FRiQXfuCk5SG1tRRFv4XImseBWYKeT5ll-m31nD.Zd-z0iZ5cfaD3Xxu92S9UOTjL.faces" class="rich-paint2D" id="form:paint2D" bgcolor="white" height="480" width="640" /><meta name="Ajax-Update-Ids" content="form:paint2D" /><span id="ajax-view-state"><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4sIAAAAAAAAAK1XW2wUVRg+u6W0XRpsITQ1UO2FctF2tt3dbksrgZbeVreXdAtBSCyns6e7U2ZnxpkzuwMNpJIgiSSKUYjRJhI18QVf9MHLk4Y3EjCS+KIvhJgYEy+JMUF9UM85M7Mzs51tC/E8nD0z+9/O/3/nO//c+AVUairol9UMBxehEVvUFjioKKLAQyzIEjdIXqYwxGgCSjCD1N2zKkIprOpYV9GknEYXXvvtrZsL7W/XAmAoZwEIHgdtHmu8nFNkCUmY2TomoMKMLGNQM5e3l+YIgLZFmIcGtwB5pLnUsjgncuNkGpXVHNi0QGdzVJR1xXSov6ScAZWLc0I6Auyxh+qoAp8t62gaSkg01aLF6J5aJ7ojci4HpXRSkE6bqrFH8xi3lIKgYx2PKSQiHk9JaAJJOgjloIaRytY03hZvTcmCSx2dnp6amZUlPgulDAJPr5U96oFVX1cUWcVmcL3AGWULdjRhRpbAKKeZen1FrX0byIUg4cgwqFKshTUMXQXbTyapT04k8XNT84vEy8CVO8ffrdP2i0GKQJo4/UVwnqTPvap2VoriBh99XUVOQL1jdkiWRQSl283q8rcrf/8aBIEToDIPRR0ZSkCjCtWAGgmNz04k54YGU4kjGNSGFXI8IpxBt0Hs1TF7OhZELinzUETn/6w/tdL1189BsCkBqrNQy/Lk9CRBFS/rElbPYLCNbS1MYwiTEyZImYEkqKaPOjFN/W4l4nmoClBicW81lH/JwCA4eJRMJIkAeLeSkDAih3bb/esfPHjpUh/ZSsLeih0ik5vUc/NIffnG1aYtb967bCeyTlGUYt4q6SLEJsVZFv8O+CS9wUl6MSyWkXGy+wmoVFZ999XNhlPfVIDgKAiJMkyPQh7LagLU4KyKtKwspg3l0GFW/c2FamqIOsCgkcCG03SJQU9EWOMmBmeem0sMY1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N++d0OJ7OZ9uZMBkTSUaYjhatJ047Ed1LctUTEGIgasMlgMg04vFqPxjp5uB4slRmxK8rp7EmxxJMs42gf2+DmiWm4/DOm1DEJW7ZwqumHUVNrkMQkHOGa5SHqWmRbjDvtd4J7zjkC0kCVdhauONYpzD/l2REmUgfwZszexSNK+iMgXVRIEcqQJZf2GEUZiuLSJGbDQOErst67d79Br6NL1Q5+/8OEfU06z0wC2tS2xnLDKsNU5q7OwLlnWa3GwgDn7+qeJ9C1MF+D8CsOs0sqUOqIF2rSooAyD+38MPugWMRIAAA==" /></span><meta id="Ajax-Response" name="Ajax-Response" content="true" /></body></html>
                            debug[9:49:08,343]: Header Ajax-Expired not found, search in <meta>
                            debug[9:49:08,343]: search for elements by name 'meta' in element #document
                            debug[9:49:08,359]: selectNodes found 2
                            debug[9:49:08,375]: Find <meta name='Ajax-Update-Ids' content='form:paint2D'>
                            debug[9:49:08,375]: Find <meta name='Ajax-Response' content='true'>
                            debug[9:49:08,375]: Header Ajax-Update-Ids not found, search in <meta>
                            debug[9:49:08,390]: search for elements by name 'meta' in element #document
                            debug[9:49:08,390]: selectNodes found 2
                            debug[9:49:08,390]: Find <meta name='Ajax-Update-Ids' content='form:paint2D'>
                            debug[9:49:08,406]: Update page by list of rendered areas from response form:paint2D
                            debug[9:49:08,406]: search for elements by name 'script' in element #document
                            debug[9:49:08,406]: selectNodes found 1
                            debug[9:49:08,421]: <script> in response with src=/TEST/a4j_3_1_0org.ajax4jsf.javascript.AjaxScript.faces
                            debug[9:49:08,421]: Such element exist in document
                            debug[9:49:08,437]: search for elements by name 'link' in element #document
                            debug[9:49:08,437]: selectNodes found 1
                            debug[9:49:08,437]: <link> in response with src=/TEST/a4j_3_1_0css/panel.xcss/DATB/eAGLZKr5DAADWQHL.faces
                            debug[9:49:08,453]: Such element exist in document
                            debug[9:49:08,453]: Attempt to update part of page for Id: form:paint2D
                            debug[9:49:08,453]: call selectSingleNode for id= form:paint2D
                            debug[9:49:08,468]: Replace content of node by outerHTML()
                            error[9:49:08,468]: Error to clear node content by innerHTML
                            debug[9:49:08,484]: search for elements by name 'script' in element img
                            debug[9:49:08,484]: selectNodes found 0
                            debug[9:49:08,484]: Scripts in updated part count : 0
                            debug[9:49:08,500]: Update part of page for Id: form:paint2D successful
                            debug[9:49:08,515]: call selectSingleNode for id= ajax-view-state
                            debug[9:49:08,515]: Hidden JSF state fields:
                            debug[9:49:08,515]: Namespace for hidden view-state input fields is undefined
                            debug[9:49:08,531]: search for elements by name 'input' in element span
                            debug[9:49:08,531]: selectNodes found 1
                            debug[9:49:08,531]: Replace value for inputs: 2 by new values: 1
                            debug[9:49:08,546]: Input in response: javax.faces.ViewState
                            debug[9:49:08,546]: Found same input on page with type: hidden
                            debug[9:49:08,562]: search for elements by name 'INPUT' in element span
                            debug[9:49:08,562]: selectNodes found 0
                            debug[9:49:08,562]: Replace value for inputs: 2 by new values: 0
                            debug[9:49:08,578]: call selectSingleNode for id= _A4J.AJAX.focus
                            debug[9:49:08,578]: No focus information in response
                            debug[9:49:08,593]: call selectSingleNode for id= org.ajax4jsf.oncomplete
                            


                            I have hilighted the one error, but I don't think it is significant?

                            Cheers

                            • 11. Re: <rich:paint2D />; cacheable attribute not honoured...(?)
                              Bob Brown Newbie

                              When I look at the HTTP interaction, I see the following for the AJAX reply

                              HTTP/1.1 200 OK
                              Server: Apache-Coyote/1.1
                              X-Powered-By: Servlet 2.4; JBoss-4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)/Tomcat-5.5
                              X-Powered-By: JSF/1.2
                              Ajax-Response: true
                              Cache-Control: no-cache, must-revalidate, max_age=0, no-store
                              Expires: 0
                              Pragma: no-cache
                              Content-Type: text/xml;charset=UTF-8
                              Content-Length: 3892
                              


                              THis looks OK.

                              Perhaps it is the actual IMAGE URL that is not being served correctly w.r.t. cacheing?

                              Cheers,

                              Alph

                              • 12. Re: <rich:paint2D />; cacheable attribute not honoured...(?)
                                Sergey Smirnov Master

                                 

                                "alpheratz-jb" wrote:
                                Ialso tried giving the value property a default value:

                                private String value = "PaintDataKEY";
                                


                                No change in behaviour.

                                Cheers,

                                Alph


                                just for the testing purpose, try to initiate the value not with "PaintDataKEY" constant, but with different values. For example, use the system clock.
                                Does it change the picture on Ctrl-F5 ?

                                • 13. Re: <rich:paint2D />; cacheable attribute not honoured...(?)
                                  Bob Brown Newbie

                                  I have used:

                                   public String getValue() {
                                   System.out.println("getValue(): " + value);
                                   return System.currentTimeMillis() + "";
                                   }
                                  


                                  However: I never see the appropriate message in my server log...

                                  Alph

                                  • 14. Re: <rich:paint2D />; cacheable attribute not honoured...(?)
                                    Bob Brown Newbie

                                    Again, FYI here is my PaintBean class:

                                    public class PaintBean {
                                     private final StopWatch sw = new StopWatch("PaintBean");
                                    
                                     public void paint(Graphics2D g2, Object obj) {
                                    
                                     System.out.println("paint() start");
                                     sw.start("paint()");
                                    
                                     g2.drawString(System.currentTimeMillis() + "", 50, 50);
                                    
                                     sw.stop();
                                     System.out.println("TIME: " + sw.toString());
                                     }
                                    }
                                    


                                    1 2 Previous Next