Johan Compagner wrote:
still the question remains how random is random ;)
right. maybe one shared atomically increased integer would do better job?
On 5/9/06, *Igor Vaynberg* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
just checked it into core
the param looks like this wicket:antiCache=random
-Igor
On 5/8/06, * Bruno Borges* < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
This could go to Wicket Core. But before this happens, one note:
The 'rand' parameter should be renamed to something like
.wicket_rand. 'rand' is too simple... :)
Regardsm
On 5/8/06, *Eelco Hillenius* < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Fine with me. If something thinks of a nice API.
Eelco
On 5/8/06, Martijn Dashorst <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
> This seems common enough, shouldn't we add this to core
(of course, only
> when it works :-))?
>
> Martijn
>
>
>
> On 5/8/06, Igor Vaynberg < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
> >
> > try this:
> >
> > Image image = new Image("image", resource) {
> > protected void onComponentTag(final ComponentTag tag) {
> > super.onComponentTag(tag);
> > String src= tag.getAttributes().get("src");
> > src=src+"&rand="+Math.random();
> > tag.set("src", src);
> > };
> >
> > if it works you can encapsulate it into a
NonCachingImage or something
> >
> >
> > -Igor
> >
> >
> >
> >
> > On 5/8/06, Potje rode kool < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
> > >
> > > How are you adding those parameters the the image URL?
> > > In html I have an image tag like this:
> > >
> > > <img wicket:id="image"/>
> > >
> > > and in code:
> > >
> > > Resource resource = ....
> > > Image image = new Image("image", resource);
> > >
> > > I also tried:
> > >
> > > Image image = new Image("image", new
Model("/images/sunshine.png"));
> > >
> > > But than it tries to find the images in the package
(as package
> resource).
> > >
> > > How can I simple create an Image object which loads
the image relative
> from the webcontext root, and how do I add a random
parameter so that the
> browser
> > > will allways reload the image.
> > >
> > > Thanks,
> > > Evert
> > >
> > >
> > > 2006/5/7, Anatol Pomozov < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>:
> > >
> > > >
> > > > I usually do such thing
> > > >
> > > > /<path_to_img>.png?<random_number>
> > > >
> > > > so example image path is /images/logo.png?32342342342 or
> /images/logo.png?rand=32342342342
> > > >
> > > >
> > > >
> > > > On 5/7/06, Bruno Borges < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
> > > > >
> > > > > Make random URLs for the image. You can do that
simply adding dummy
> parameters, like /image.ext?foo=bar1, bar2, bar3... etc.
The browser cache
> resources per URL.
> > > > >
> > > > > I think this will work.
> > > > >
> > > > > See ya
> > > > >
> > > > >
> > > > >
> > > > > On 5/7/06, Igor Vaynberg <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
> > > > > >
> > > > > > well, if the browser ignores that then you
should change the url.
> > > > > >
> > > > > >
> > > > > > -Igor
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 5/7/06, Potje rode kool <
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
> > > > > > >
> > > > > > > Yes, its a caching problem, when I disable
caching in Firefox
> (doing this with the web developer toolbar) it works fine.
> > > > > > > How do I add those headers for the images I
want to disable
> caching for. I tried to set some headers on my
WebResource subclass
> > > > > > > I use like this:
> > > > > > >
> > > > > > > response.setDateHeader("Expires",
> System.currentTimeMillis());
> > > > > > > response.setHeader("Cache-Control",
"no-store, no-cache,
> must-revalidate, post-check=0, pre-check=0, max-age=0");
> > > > > > >
> > > > > > > But that doesn't seems to work.
> > > > > > >
> > > > > > > Thanks in advance,
> > > > > > > Evert
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > 2006/5/7, Igor Vaynberg <
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:
> > > > > > >
> > > > > > > >
> > > > > > > > are you updating img's src attribute in the
ajax call? or is
> the image streamed from somewhere and reflects a property
you changed with
> ajax?
> > > > > > > >
> > > > > > > > the first should work
> > > > > > > >
> > > > > > > > the lettter might not unless the url changes
- because the
> browser would have the cached version and no reason to
reload it. so you
> either have to update the url and add a &rand=randomnumber
parameter to
> force the browser to reload the image or add no-cache
no-store headers when
> you are streaming the image.
> > > > > > > >
> > > > > > > >
> > > > > > > > -Igor
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On 5/6/06, Potje rode kool <
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
> > > > > > > > >
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > I am trying to change an image after an
AjaxLink is clicked
> but I can't get it working.
> > > > > > > > > The images are on a Panel, when I click on
the AjaxLink I
> create a new Panel and replace the old one (by calling
> getPage().replace(Component) ).
> > > > > > > > > I also have put an Label on the Panel and
the Label gets
> updated when I click on the AjaxLink, but not the images.
> > > > > > > > >
> > > > > > > > > Do I have to do something extra to let
images update or does
> Wicket doesn't support updating images by Ajax?
> > > > > > > > >
> > > > > > > > > Thanks in advance.
> > > > > > > > > Evert
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Bruno Borges
> > > > > [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
> > > > > Sun Certified Java Programmer for 1.4
> > > > > Sun Certified Web Component Developer for 1.4
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > anatol ( http://pomozov.info)
> > >
> > >
> > >
> >
> >
>
>
>
> --
> Wicket 1.2 is coming! Write Ajax applications without
touching JavaScript!
> -- http://wicketframework.org <http://wicketframework.org>
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
<http://sel.as-us.falkag.net/sel?cmdlnk&kid%120709&bid&3057&dat%121642>
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
<mailto:Wicket-user@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/wicket-user
<https://lists.sourceforge.net/lists/listinfo/wicket-user>
--
Bruno Borges
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Sun Certified Java Programmer for 1.4
Sun Certified Web Component Developer for 1.4
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user