Igor,

Igor,

Thank you for taking the time to answer my questions.  The light bulb
went on.

I changed my Image to a NonCachingImage and all is well.

I can see the URL that wicket generates with
"&wicket:antiCache=1218739227530" added, the random number changing each
time the Model is updated.

Your help is very much appreciated.

Jon

Jonathan A. Goldstein
Software Engineer

Xerox Corporation
800 Phillips Rd., 0300-12S
Webster, NY 14580

Phone 585.422.4161
Internal 8*702-4161

Ease of Use Common Room   585.422.0731
Internal 8*702.0731

Fax 585.422.8116

[EMAIL PROTECTED]


PSG.Workflow Business Unit.Workflow Business Team.FFPS Ease of Use Team

www.xerox.com

-----Original Message-----
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 14, 2008 11:25 AM
To: [email protected]
Subject: Re: Problem updating an image via Ajax

the Image constructs a url

<img src="someurl"/>

then you update this tag via ajax, but if you do not change the value
of the src attribute the browser will simply pull the image from cache

nonecachingimage alters the src attribute on every render by appending
random noise to it, eg

<img src="someurl?rand=0.20934850234"/>

so even during ajax updates the src attribute changes and browser
re-requests the resource.

-igor

On Thu, Aug 14, 2008 at 8:02 AM, Goldstein, Jonathan A
<[EMAIL PROTECTED]> wrote:
> Igor,
>
> Thanks for your reply, but I don't understand what you're suggesting.
> The BufferedDynamicImageResource I am creating is different from the
> original resource (it's a different image).  What is it that I need to
> change to get the browser to recognize it as a difference?
>
> Jon
>
> Jonathan A. Goldstein
> Software Engineer
>
> Xerox Corporation
> 800 Phillips Rd., 0300-12S
> Webster, NY 14580
>
> Phone 585.422.4161
> Internal 8*702-4161
>
> Ease of Use Common Room   585.422.0731
> Internal 8*702.0731
>
> Fax 585.422.8116
>
> [EMAIL PROTECTED]
>
>
> PSG.Workflow Business Unit.Workflow Business Team.FFPS Ease of Use
Team
>
> www.xerox.com
> -----Original Message-----
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 13, 2008 5:45 PM
> To: [email protected]
> Subject: Re: Problem updating an image via Ajax
>
> use NonCachingImage
>
> if you do not change the src value the browser will not redownload the
> image
>
> -igor
>
> On Wed, Aug 13, 2008 at 2:30 PM, Goldstein, Jonathan A
> <[EMAIL PROTECTED]> wrote:
>> I have a Model that returns a BufferedDynamicImageResource.  When my
> page
>> initially loads, the image is displayed.  But when I update a
> DropDownChoice
>> and invoke the
>>
>
AjaxFormComponentUpdatingBehavior("onchange").onUpdate(AjaxRequestTarget
>> target) which adds the image component to the target, the image is
not
>> updated.  I can see, via a debugger, the Model's getObject() method
> being
>> invoked and the correct object being returned.
>>
>>
>>
>> The resource I am trying to return exists on the classpath, but not
> relative
>> to a class I can reference.  So I can't return a ResourceReference
> from my
>> Model?  I tried returning a ResourceReference using the constructor
> that
>> passes only a name and providing a path relative to a directory on
the
>> classpath, but that didn't work.
>>
>>
>>
>> I am able to have Ajax updated images when my Model returns a
>> ResourceReference is for an image relative to a class on the
> classpath.  But
>> I am trying to share images from another application and the images
> are
>> located in a directory relative to a directory on the classpath.
>>
>>
>>
>> Can someone suggest how I do this?
>>
>>
>>
>> Jon
>>
>> Jonathan A. Goldstein
>> Software Engineer
>>
>> Xerox Corporation
>> 800 Phillips Rd., 0300-12S
>> Webster, NY 14580
>>
>> Phone 585.422.4161
>> Internal 8*702-4161
>>
>> Ease of Use Common Room   585.422.0731
>> Internal 8*702.0731
>>
>> Fax 585.422.8116
>>
>> [EMAIL PROTECTED]
>>
>>
>> PSG.Workflow Business Unit.Workflow Business Team.FFPS Ease of Use
> Team
>>
>> www.xerox.com
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to