You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by dpmihai <dp...@yahoo.com> on 2013/01/17 12:16:38 UTC

How to repaint a component on browser resize?

I have a panel with a RenderedDynamicImageResource which has width and height
as parameters.
I have a modal window with this panel and I want when I resize the window to
have a repaint of the inner panel with the new width and height?

Is it possible to achieve this in wicket 1.5?




--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-repaint-a-component-on-browser-resize-tp4655456.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: How to repaint a component on browser resize?

Posted by dpmihai <dp...@yahoo.com>.
I understand.

I wondered if it is possible that to have a behavior inside my panel and
inside renderOnLoadJavaScript (from renderHead) to call a javascript like :

"wicketAjaxGet('" + getCallbackUrl()  + "&width=...'"

I have to get the width from javascript somehow with a function, and I have
no idea where to call it.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-repaint-a-component-on-browser-resize-tp4655456p4655462.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: How to repaint a component on browser resize?

Posted by Martin Grigorov <mg...@apache.org>.
You can register JS event listener on resize event for window. You can
manipulate the image size with pure JS so no need to use Wicket at all.


On Thu, Jan 17, 2013 at 1:16 PM, dpmihai <dp...@yahoo.com> wrote:

> I have a panel with a RenderedDynamicImageResource which has width and
> height
> as parameters.
> I have a modal window with this panel and I want when I resize the window
> to
> have a repaint of the inner panel with the new width and height?
>
> Is it possible to achieve this in wicket 1.5?
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/How-to-repaint-a-component-on-browser-resize-tp4655456.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


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