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

Mutual blocking setHeight-setVflex and setWidth-setHflex is not satisfactory.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 8.0.1
    • 8.0.0
    • Components
    • Windows 7 , Mozilla Firefox 41

      {{Modified methods setHeight/setVflex and setWidth/setHflex in version 8 are causing huge problems.

      Example:

      <?page title="Vflex/Height" contentType="text/html;charset=UTF-8"?>
      <zk>
      <window title="Vflex/Height" border="normal" width="300px" height="200px">
      <window vflex="1" hflex="1" border="normal" sizable="true"
      onSize='alert("height="self.height" vflex="+self.vflex); self.vflex=""'>
      Shrink me vertically!
      </window>
      </window>
      </zk>

      After resize is set height - and vflex as well!

      I suggest to change the first lines in the following methods :

      public void setHeight(String height) {
      if (height != null && height.length() == 0)
      height = null;
      if (height != null && getVflex() != null && !getVflex().equals("min"))

      { throw new UiException("Not allowed to set vflex and height at the same time except vflex=\"min\""); }

      public void setWidth(String width) {
      if (width != null && width.length() == 0)
      width = null;
      if (width != null && getHflex() != null && !getHflex().equals("min")) { throw new UiException("Not allowed to set hflex and width at the same time except hflex=\"min\""); }

      public void setVflex(String flex) {
      if (flex != null && flex.length() == 0)
      flex = null;
      if (flex != null && getHeight() != null && !"min".equals(flex)) { throw new UiException("Not allowed to set vflex and height at the same time except vflex="min""); }

      public void setHflex(String flex) {
      if (flex != null && flex.length() == 0)
      flex = null;
      if (flex != null && getWidth() != null && !"min".equals(flex))

      { throw new UiException("Not allowed to set hflex and width at the same time except hflex=\"min\""); }

      }}

            wenninghsu wenninghsu
            arismart arismart
            Votes:
            0 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 - 1 day, 7 hours
                1d 7h