Pivot
  1. Pivot
  2. PIVOT-745

Illegal argument exception on tristate checkbox using stateKey binding

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.1
    • Component/s: wtk
    • Labels:
      None
    • Environment:
      Windows XP SP3, JDK 1.6.0_16

      Description

      Button.store on a tristate checkbox using "stateKey" binding gets an error:
      java.lang.IllegalArgumentException: path is null.
      at org.apache.pivot.json.JSON.parse(JSON.java:259)
      at org.apache.pivot.json.JSON.put(JSON.java:137)
      at org.apache.pivot.wtk.Button.store(Button.java:772)
      Due to the following code:
      if (stateKey != null
      && stateBindType != BindType.LOAD) {
      JSON.put(context, selectedKey, (stateBindMapping == null) ?
      The put should be using "stateKey" not "selectedKey".

      1. button.diff
        0.7 kB
        Roger Whitcomb

        Activity

        Roger Whitcomb created issue -
        Hide
        Roger Whitcomb added a comment -

        Here is a patch that fixes the problem.

        Show
        Roger Whitcomb added a comment - Here is a patch that fixes the problem.
        Roger Whitcomb made changes -
        Field Original Value New Value
        Attachment button.diff [ 12479657 ]
        Greg Brown made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Roger Whitcomb
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.5h
              0.5h
              Remaining:
              Remaining Estimate - 0.5h
              0.5h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development