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

createPage makes htm-to-class duplicates

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.3.0-M1
    • core
    • None

    Description

      We have

      • ControlListenerType1Page.htm - in web root
        and
        ControlListenerType1Page.java with:

      @Bindable protected ActionLink bugMaker = new ActionLink(this, "makeBug");

      public boolean makeBug () {
      Page p = getContext().createPage("ControlListenerType1Page.htm");// without leading /
      if (!(p instanceof ControlListenerType1Page))

      { throw new Error("very bad"); }

      //successfully! BUT now htm-to-class map contains two mappings for ControlListenerType1Page.class:
      // ControlListenerType1Page.htm->ControlListenerType1Page.class and
      // /ControlListenerType1Page.htm->ControlListenerType1Page.class

      p = getContext().createPage(ControlListenerType1Page.class);
      //^^^throws java.lang.IllegalArgumentException with message:
      //Page class resolves to multiple paths: net.sf.apr.cui.ControlListenerType1Page -> [/ControlListenerType1Page.htm, ControlListenerType1Page.htm]

      setForward(p); return true;
      }

      Attachments

        1. CLK-625.patch
          0.7 kB
          Md. Jahid Shohel

        Activity

          People

            sabob Bob Schellink
            andreyrybin Andrew Fink
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: