Hi displaytag users,
 
I've implemented code for personal use that enables the use of session-, or request- wide Locale-specific
displaytag.properties to work besides the current Locale implementation.
 
 
as an example:
 
You could now do the following:
 
<%
    //just an example: store the preferred Locale for this session in an attribute
    if (session.getAttribute("userLocale") == null)
        {
        session.setAttribute("userLocale", request.getLocale());
        }
 
    // create a long list that spans over multiple pages
    request.setAttribute("list",new TestList(123));
%>
 
 
<display:table locale="sessionScope.userLocale" name="list" pagesize="15"/>
 
 
The table menu that enables browsing of the pages in the list could then be in any Locale you want.
for backward compatibility, if you specify the locale attribute the code will search for the displaytag.properties
files in the classpath at path: i18n/ ( e.g. i18n/displaytag_nl.properties )
 
Is anybody interested in this functionality ? should I submit the code ?
 
 
Dennis Geurts
 

Reply via email to