Hi,

Maybe you do this with the WebClientInfo.
See how http://www.wicket-library.com/wicket-examples/hellobrowser
extracts client info like browser dimensions.
You can use this information to calculate the size of the div and
respetivelly the image that you have to generate.

HTH

On Thu, Mar 8, 2012 at 5:06 PM, jarnis <[email protected]> wrote:
> Hey Guys
>
> I'm using an Image rendered with a DynamicImageResource (in this case a
> JFreeChart chart, but it could have been anything). I would like the image
> to fill the panel it is placed in which is sized relatively to the web page
> it is on. For the rendering to work I have to know the width and height when
> Image.getImageResource() is called, or at least inside my
> DynamicImageResource.getImageData(Attributes atrbts) method. I have searched
> for a while now, but I can't find a good way to get the image's dimensions
> at runtime.
>
> Am I using the classes wrong, or should I use a different kind of component?
> I am open to alternative suggestions, as long as it produces a clean
> solution (preferably, but not necessarily, without depending on
> AJAX/js/jQuery directly).
>
> Thanks in advance.
>
> Jarnis Bertelsen
> Developer
> Exedio
>
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Dynamically-sized-image-tp4456657p4456657.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to