You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Brill Pappin <br...@pappin.ca> on 2009/02/02 16:08:03 UTC

Bug? RenderedDynamicImageResource.render only called once?

Ok, I've tracked down the problem, but don't know how to resolve it  
(I've been playing with it a bit).

the render method is only being called once per session despite the  
cache==false
(RenderedDynamicImageResource. render(Graphics2D)

This doesn't jive with what I understand for the documentation.
Is this a bug or by design?

If its by design, what *should* I be using instead?

- Brill

On 30-Jan-09, at 5:26 PM, Brill Pappin wrote:

> I have a RenderedDynamicImageResource thats rendering a barcode,  
> however I'm having trouble with it in that it only ever renders one  
> image per session.
>
> The resource has been added to:
> [Application].getSharedResources().add(
> 				CommonPage.class,
> 				"barcodeResource",
> 				null,
> 				null,
> 				new BarcodeImageResource(UnitConv.mm2px(100, 73), UnitConv
> 						.mm2px(100, 73)));
>
> I have set the resource up as:
> setCacheable(false)
>
> and i reset the last modified time when i render as:
> setLastModifiedTime(Time.now());
>
> I'm using 1.4-SNAPSHOT
>
> Doe anyone have any idea how I can get this darn thing to return a  
> new image on every request
>
> - Brill


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Bug? RenderedDynamicImageResource.render only called once?

Posted by Jonas <ba...@gmail.com>.
I think RenderedDynamicImageResource is for images that don't change during
one jvm runtime. The displayed image is basically 'static'.
If you want to change the contents of the image,
extend DynamicImageResource directly instead of RenderedDynamicImageResource,
that should do the trick.

cheers,
Jonas

On Mon, Feb 2, 2009 at 4:08 PM, Brill Pappin <br...@pappin.ca> wrote:
> Ok, I've tracked down the problem, but don't know how to resolve it (I've
> been playing with it a bit).
>
> the render method is only being called once per session despite the
> cache==false
> (RenderedDynamicImageResource. render(Graphics2D)
>
> This doesn't jive with what I understand for the documentation.
> Is this a bug or by design?
>
> If its by design, what *should* I be using instead?
>
> - Brill
>
> On 30-Jan-09, at 5:26 PM, Brill Pappin wrote:
>
>> I have a RenderedDynamicImageResource thats rendering a barcode, however
>> I'm having trouble with it in that it only ever renders one image per
>> session.
>>
>> The resource has been added to:
>> [Application].getSharedResources().add(
>>                                CommonPage.class,
>>                                "barcodeResource",
>>                                null,
>>                                null,
>>                                new
>> BarcodeImageResource(UnitConv.mm2px(100, 73), UnitConv
>>                                                .mm2px(100, 73)));
>>
>> I have set the resource up as:
>> setCacheable(false)
>>
>> and i reset the last modified time when i render as:
>> setLastModifiedTime(Time.now());
>>
>> I'm using 1.4-SNAPSHOT
>>
>> Doe anyone have any idea how I can get this darn thing to return a new
>> image on every request
>>
>> - Brill
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org