Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-2079

Component class type is lost when it is passed outside Tapestry application pages or components package

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: Framework
    • Labels:
      None

      Description

      I obtain component container inside one component (e.g. call ComponentResources.getContainer()) and when i check the class type inside the same component method everything is ok but when i decide to pass the same component to an utility class that do the same there it fails.

      E.g. i have two methods inside my component class and the first one returns true, the second one false although the code should be the same for both (only different package/class):

      public boolean isInsideTestContainerLocally(){
      Component comp = resources.getContainer();
      return (comp instanceof TestContainer);
      }

      public boolean isInsideTestContainerWithCall(){
      Component comp = resources.getContainer();
      return Util.isInstanceOfTestContainer(comp);
      }

      ---->>--Util class contains the method-->---
      public static boolean isInstanceOfTestContainer(Component _comp)

      { return _comp instanceof TestContainer; }

        Attachments

        1. example.ZIP
          10 kB
          Priit Karu

          Activity

            People

            • Assignee:
              hlship Howard M. Lewis Ship
              Reporter:
              karu Priit Karu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: