Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3508

adding a component with vflex="1" doesn't produce an expected height

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.0.4
    • 8.0.3
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.0.4 S1

      steps to reproduce

      1. load the zul
      2. click the button

      current result

      no label is displayed

      expected result

      a label "this is my test" shows up.

      root cause

      The root cause is that ZK adds a component (and size it) before setting attributes at the client side. Therefore, When zk calculates the child window's height, the bigDiv is still visible and consumes all available space. So that newly-added window becomes 0 height.

      workaround:

      • replace the outer window with vlayout.
        Vlayout will resize its child component when its child components are removed or added.
      • detach the bigDiv
      • set height="100%"
        if there is no other sibling, apply the alternative which is the same as vflex=1
      • window2.setRenderdefer(10);
        make bigDiv invisible first

        1. T3766.java
          1 kB
        2. t3766.zul
          0.7 kB

            wenninghsu wenninghsu
            hawk hawk
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 30 minutes
                6h 30m