Uploaded image for project: 'Click'
  1. Click
  2. CLK-239

form.copyTo() does not handle Map's

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      1.4RC1

      Description

      When using a Map with form.copyTo(map) does not work hence form.copyFrom(map) works well. The problem
      is in ensureObjectPathNotNull which tries to do a getInvoice() on a map.

      Example:
      Map map = new HashMap();
      map.put("invoice", invoice);
      ....
      form.copyFrom(map)
      Form <- HashMap.invoice.invoiceNumber: 1234
      ....
      form.copyTo(map)
      java.lang.RuntimeException: java.lang.RuntimeException: Getter method not found for path value : invoice
      at net.sf.click.util.ClickUtils.ensureObjectPathNotNull(ClickUtils.java:1763)
      at net.sf.click.util.ClickUtils.copyFormToObject(ClickUtils.java:641)

        Attachments

          Activity

            People

            • Assignee:
              sabob Bob Schellink
              Reporter:
              harry.wissiak@audatex.ch harryw
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: