ChenilleKit
  1. ChenilleKit
  2. CHEN-53

Chenillekit Tapestry 1.3.3 and Tapestry 5.3.2 using CK mixin OnEvent produces error "Illegal field modifiers in class org/chenillekit/tapestry/core/base/EventMixin"

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      1

      Description

      to reproduce do the following:
      create a quickstart tapestry app 5.3.2: "mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org"
      add chenillekit 1.3.3 dependancies to pom.xml:


      <dependency>
      <groupId>org.chenillekit</groupId>
      <artifactId>chenillekit-tapestry</artifactId>
      <version>1.3.3</version>
      </dependency>


      create a java file called Test.java:


      package test.pages;

      import org.apache.tapestry5.annotations.OnEvent;
      import org.apache.tapestry5.json.JSONObject;
      import org.apache.tapestry5.ioc.internal.util.TapestryException;

      public class Test {
      @OnEvent(component = "textfield", value = "blur")
      public JSONObject onBlurEvent(String value)
      {
      String translatedValue = "Please welcome me before speek!";

      if (value.equalsIgnoreCase("hello"))

      { translatedValue = "Hello to you, too!"; }

      return new JSONObject().put("translatedValue", translatedValue);
      }

      }


      create a tml file Test.tml:


      <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
      <body>
      <h1>Hello Guys and Dolls</h1>

      <form t:type="Form">
      <input t:type="TextField" value="textFieldValue" t:mixins="ck/OnEvent"
      event="blur" onCompleteCallback="onCompleteFunction"/>;
      </form>

      <p>
      for text field the javascript event returns : <span id="onTextFieldChangeResult"></span>
      </p>

      <script type="text/javascript">
      function onTextFieldCompleteFunction(response)

      { $('onTextFieldChangeResult').update("<strong>" + response.translatedValue + "</strong>"); }

      </body>
      </html>

      compile and open the Test page.

      Will produce the following error:
      "Illegal field modifiers in class org/chenillekit/tapestry/core/base/EventMixin"

      added the exception output as textfile

        Activity

        Hide
        Antal van Kalleveen added a comment - - edited

        A quick fix is to move the interface OnEvent to the internal package, interfaces are no longer allowed in the base package.

        See: https://issues.apache.org/jira/browse/TAP5-1851

        Show
        Antal van Kalleveen added a comment - - edited A quick fix is to move the interface OnEvent to the internal package, interfaces are no longer allowed in the base package. See: https://issues.apache.org/jira/browse/TAP5-1851

          People

          • Assignee:
            Unassigned
            Reporter:
            Oliver Pelz
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: