Announcement Announcement Module
Collapse
No announcement yet.
i18n problem in JSF tags and AA Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • i18n problem in JSF tags and AA

    Hi,

    How can I manage languages in JSF tags??

    I want to do this:

    Code:
    <a href="url_link.htm" title="Link Title with i18n">
    Link text with i18n
    </a>
    And...

    Code:
    <t:dataTable id="idTable"
            summary="Summary with i18n" ....>

    I'm trying to use like that:

    Code:
    <h:outputLink value="url_link.htm" title="<fmt:message key="key_of_message"/>">
    
    <h:outputText><fmt:message key="key_of_message"/></h:outputText>
    
    </h:outputLink>
    But I've got a problem if I use fmt tag into a JSF tag, it's fails at first line when compile title atributte of outputLink:

    Code:
    This attribute is not recognized.
    
    <h:outputLink value="url_link.htm" title="<fmt:message key="key_of_message"/>">
    
                                                                ^------------^
    I think that I can use JSF message-bundle instead of spring-bundle, like that:

    Code:
     
    <f:loadBundle basename="messages.main.page" var="page"/>  
    
    <t:dataTable id="idTable"
            summary="#{page.summaryTable}" ....>
    It's ok, but... if I use it i can't evaluate an EL expression from controller inside the key of message, like that:

    Code:
    <fmt:message key="${model.messageKey}">
    And I need it for some links, so i can't use the h:outputLink and now I'm using a, like that:

    Code:
    <a href="${submenu.name}.htm" id="${submenu.name}" title="<fmt:message key="${submenu.name}"/>">
    <fmt:message key="${submenu.name}"></fmt:message>
    </a>
    Because I can't use:

    Code:
    <f:loadBundle basename="messages.main.page" var="page"/>  
    
    
    <a href="${submenu.name}.htm" id="${submenu.name}" title="#{page.${submenu.name}}">
    #{page.${submenu.name}}
    </a>
    Is any better solutions??

    Thanks for all
Working...
X