You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mario Laureti <Ma...@rcmp-grc.gc.ca> on 2001/04/23 19:12:57 UTC

Multi-Lingual collections with Struts HTML tags?

Hello,

  I created a GetCodeTable Tag that loads data from a database table into a collection.
  This way I can re-use struts html tags... Great!

      <myApplicationTag:getCodeTable tableName="Country"/>

      <html:select property="description">
        <html:options collection="Country" property="value"
                   labelProperty="label"/>
      </html:select>

  But now I want to support two languages: english_description and french_description

  Do I have create a new tag, extend it from the Struts OptionsTag  to allow this:

      <html:select property="description">
        <html:options collection="country" property="value"
                   labelFrenchProperty="frenchLabel", labelEnglishProperty="englishLabel"/>
      </html:select>

  Or is there a cleaner way to do this?

Thanks in advance.

Mario L.