Tapestry 5
  1. Tapestry 5
  2. TAP5-425

When attempting to reference a property whose name is a single letter, Tapestry fails with a wierd exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.0
    • Fix Version/s: 5.1.0.0
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      In our code we used some single letter properties. This used to work in tapestry 5.0.15 or so.. but when we upgraded to 5.1-SNAPSHOT, tapestry now fails at runtime with a very weird execption. Any clues to get this fixed in tapestry would be appreciated.

      Below is the getter we have in the page, the tml of the page, and below that we have the exception throws by tapestry at runtime.

        1. .java
          public boolean isK() {
          return true; // if is of kicker type
          }
        1. .tml
          <t:if test="K">
          ...
          </t:if>
        1. exception (runtime)
          Could not convert 'K' into a component parameter binding: Node <unexpected: [@-1,0:0='<no text>',<-1>,0:-1], resync=null> (within expression 'K') was type <invalid>, but was expected to be (one of) IDENTIFIER, INVOKE, LIST, RANGEOP.

      The weird thing is that this keeps failing, even if I change the tml:

      <t:if test="prop:K">
      ...
      </t:if>

        Issue Links

          Activity

          Hide
          Howard M. Lewis Ship added a comment -

          The lexer was wrong, it indicated an identifier was always at least two characters.

          Show
          Howard M. Lewis Ship added a comment - The lexer was wrong, it indicated an identifier was always at least two characters.

            People

            • Assignee:
              Howard M. Lewis Ship
              Reporter:
              Fernando Padilla
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development