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

htmlBasedComponent.getTabIndex causes null pointer exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 8.0.3
    • 8.0.3
    • None
    • Security Level: Jimmy
    • None
    • None

      If a HtmlBasedComponent auxInfo are not empty, but tabIndex is not set, getTabIndex causes NPI.

      Reproduce with:

      <zk>
      	<textbox id="tb" width="500px"/>
      	<zscript>
      		System.out.println(tb.getTabindex());
      		System.out.println(tb.getTabindexInteger());
      	</zscript>
      </zk>
      
      	public int getTabindex() {
      		return _auxinf != null ? _auxinf.tabindex : 0;
      	}
      
      
      could be changed to:
      
      
      	public int getTabindex() {
      		return (_auxinf != null && _auxinf.tabindex != null) ? _auxinf.tabindex : 0;
      	}
      

            wenninghsu wenninghsu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m