3 Replies Latest reply on Feb 5, 2008 4:07 AM by ilya_shaikovsky

    How do you customize components labels?

    phread

      Hi,

      I would like to override the default button values for rich:listShuttle (copy all, remove etc...). Instead of setting copyAllControlLabel and so on in every page, is there a way to define the default labels in a property file?

      thx

        • 1. Re: How do you customize components labels?
          danielstokowski

          Hi
          For each button or label in rich:listShuttle there is property in tag that define value so you can override it simply.
          Check documentation or Richfaces demo for details. As I remember properties with ending 'label'.
          My code (only for source and target lists):

           <rich:listShuttle id="shuttle" sourceValue="#{sciezkaToolBar.dzialy}"
           targetValue="#{sciezkaToolBar.items}" var="items" listHeight="300" listWidth="300"
           sourceCaptionLabel="Available Items"
           targetCaptionLabel="Currently Active Items"
           converter="listShuttleconverter">
          

          Cheers
          Daniel

          • 2. Re: How do you customize components labels?
            phread

            Actually, I already did what you suggested before posting here. I had a look at the richfaces demo site but i'm not quite satisfied.

            I know I can do something like that (in Seam)
            <rich:listShuttle ...
            bottomControlLabel="#{messages.listShuttle.bottomControlLabel}"
            copyAllControlLabel="#{messages.listShuttle.copyAllControlLabel}"
            ...>

            Oh, it supports I18N. Neat.

            But I'm a lazy ass, so I was wondering if there was a way to avoid duplicating the label overriding part in every page (DRY principle, neater)

            So, any custom richfaces_fr_FR.properties to put in the classpath? If not, I can live without.


            Thank you for your time Daniel.

            Regards,

            Fred

            • 3. Re: How do you customize components labels?
              ilya_shaikovsky

              we have such possibility in calendar control. And I filled jira RFC for implementation such feature in List Shuttle. Just vote.

              http://jira.jboss.com/jira/browse/RF-2164