tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manuel Sugawara (JIRA)" <j...@apache.org>
Subject [jira] Created: (TAP5-905) Properties should be any valid java identifier
Date Thu, 22 Oct 2009 23:49:59 GMT
Properties should be any valid java identifier
----------------------------------------------

                 Key: TAP5-905
                 URL: https://issues.apache.org/jira/browse/TAP5-905
             Project: Tapestry 5
          Issue Type: Improvement
          Components: tapestry-core
            Reporter: Manuel Sugawara


Valid java identifiers allows some special characters. So, a valid classes in java with properties
such as número cannot be referenced from tapestry templates using the notation ${número}.
The following patch fixes the problem:

*** ./tapestry-core/src/main/antlr/org/apache/tapestry5/internal/antlr/PropertyExpressionLexer.g~
2009-10-22 18:48:23.000000000 -0500
--- ./tapestry-core/src/main/antlr/org/apache/tapestry5/internal/antlr/PropertyExpressionLexer.g
2009-10-22 17:13:19.000000000 -0500
***************
*** 91,97 ****
  THIS	:	T H I S;
  
  IDENTIFIER 
! 	:	LETTER (LETTER | DIGIT | '_')*;
  
  // The Safe Dereference operator understands not to de-reference through
  // a null.
--- 91,122 ----
  THIS	:	T H I S;
  
  IDENTIFIER 
!     :   JAVA_ID_START (JAVA_ID_PART)*
!     ;
! 
! fragment
! JAVA_ID_START
!     :  '\u0024'
!     |  '\u0041'..'\u005a'
!     |  '\u005f'
!     |  '\u0061'..'\u007a'
!     |  '\u00c0'..'\u00d6'
!     |  '\u00d8'..'\u00f6'
!     |  '\u00f8'..'\u00ff'
!     |  '\u0100'..'\u1fff'
!     |  '\u3040'..'\u318f'
!     |  '\u3300'..'\u337f'
!     |  '\u3400'..'\u3d2d'
!     |  '\u4e00'..'\u9fff'
!     |  '\uf900'..'\ufaff'
!     ;
! 
! fragment
! JAVA_ID_PART
!     :  JAVA_ID_START
!     |  '\u0030'..'\u0039'
!     ;
! 
  
  // The Safe Dereference operator understands not to de-reference through
  // a null.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message