-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
When I use Hflex property in a included page in a MVVM approach, it doesn't work.
The problem happens when I include some page inside another, and this page has components whose sizes are controlled by hflex property. I already tried to force the rendering of the components using invalidate on parent window load, or Clients.resize(component) when it is created inside the viewmodel class, but with no success. It just happens in this case: pages included in a MVVM scenario.
If I explicitly resize the browser window, then the components are correctly sized.
Example on fiddle : http://zkfiddle.org/sample/3bj6e5j/9-Hflex-not-working-with-include-pages-inside-div#source-1
To see the problem, click in the "Open" label, then click in the combobox. You can see that its size is only updated after resizing the browser window or after clicking in the dropdown button
Could anyone give any idea on how to solve it?
It's actually the javascript who does the fault,
Let me explain more. First you set the src of the include correct.
This is before the javascript is called, and your div don't really have a width at that moment.
So it takes that size, what you see.
Then the javascript is called and and actually he show's the div, but with the rendered with of the include at that moment.
How can you fix it : use zUtl.fireSized
.
Greetz chill.
Asked: 2016-04-22 17:47:05 +0800
Seen: 38 times
Last updated: Apr 30 '16
Databinding and auto-complete on combobox
Composite component and bind in ZK 6
How to detach / reattach MVVM windows?
Is there a way to resolve view model properties as input to client side javascripts?
How can I synchronize data in a ListBox in MVVM ? [closed]
MVVM Validator: class not found ? [closed]
How to Call Child ViewModel Method from Parent Window? [closed]
It's not zk, it's the fade in javascript who is making the fault., remove it and you see it.
chillworld ( 2016-04-29 19:04:14 +0800 )editNot true. If you remove it, the div won't appear since its style has "display:none", as well the included page. It seems the div component won't properly render its children in this case. Would there be a way to force its rendering in the javascript "fadeDivIn" function? Thanks in advance.
ericksperandio ( 2016-04-29 20:34:02 +0800 )edit