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

zhtml.Widget setDynamicProperty bug

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 8.0.3
    • Fix Version/s: None
    • Component/s: ZK Client Engine
    • Labels:
      None

      Description

      zhtml.Widget method "setDynamicProperty" has a bug. If you are trying to set disabled / readOnly property to null (remove state) after having the property set to true, it does not get updated.
      I have fixed this issue in my project by overriding the method and changing

      case 'disabled':
      case 'readOnly':
      	n[nm] = 'true' == val;
      	break;
      

      to:

      case 'disabled':
      case 'readOnly':
      	if ('true' == val) {
      		n.setAttribute(nm, val);
      	} else {
      		n.removeAttribute(nm);
      	}
      	break;
      

      Bug is still present in 8.0.3.1 version.

        Activity

        Hide
        PhaNtoM PhaNtoM added a comment -

        Just checked and the same applies to checked property, needs the same fix.

        Show
        PhaNtoM PhaNtoM added a comment - Just checked and the same applies to checked property, needs the same fix.
        Hide
        cor3000 cor3000 added a comment - - edited

        just tested on zk fiddle:

        http://zkfiddle.org/sample/1re2a05/3-zhtml-remove-disabled-checked-attributes

        can you provide a non working example?

        Show
        cor3000 cor3000 added a comment - - edited just tested on zk fiddle: http://zkfiddle.org/sample/1re2a05/3-zhtml-remove-disabled-checked-attributes can you provide a non working example?

          People

          • Assignee:
            Unassigned
            Reporter:
            PhaNtoM PhaNtoM
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: