[jboss-jira] [JBoss JIRA] Created: (JBSEAM-333) UI Labels and displaying the hash sign #

Lawrence Li (JIRA) jira-events at jboss.com
Tue Aug 15 18:26:22 EDT 2006


UI Labels and displaying the hash sign #
----------------------------------------

                 Key: JBSEAM-333
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-333
             Project: JBoss Seam
          Issue Type: Bug
          Components: JSF
    Affects Versions: 1.0.1
            Reporter: Lawrence Li


I can't seem to display the hash character

In my JSP page, I have the following:

<h:outputText escape="true" value="#{messages['TestNumber']}" />	

In my messages.properties file, I have:

TestNumber=Test #	

Seam cannot evaluate the EL...

Cannot get value for expression '#{messages['RequestNumber.Short']}'	

I've also tried the Unicode character for the hash sign:

TestNumber=Test \u0023	

According to user raja05, the bug is due to code in Interpolator.interpolate which looks for a token after the hash sign - which in my case, is nonexistent since the hash sign is the last character in my label:

      FacesContext context = FacesContext.getCurrentInstance();
      StringTokenizer tokens = new StringTokenizer(string, "#{}", true);
      StringBuilder builder = new StringBuilder(string.length());
      while ( tokens.hasMoreTokens() )
      {
         String tok = tokens.nextToken();
         if ( "#".equals(tok) )
         {
            String nextTok = tokens.nextToken();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list