5 Replies Latest reply on Jul 27, 2012 7:51 AM by Nitesh S

    rich:listShuttle arrow icons for arabic mode

    Nitesh S Newbie

      In Richfaces 3.3.1, rich:listShuttle component for Arabic mode is showing component from Right to Left as expected,

      but it is not aligning sourceCaptionLabel & targetCaptionLabel properly.

      Also copyAllControl, removeAllControl etc. arrow icons are not swapped as expected in arabic.

       

      There is no attribute by which arrow icons can be specified explicitly for control buttons.

       

      Is there any way to align caption labels correctly and change these arrow icons ?

        • 1. Re: rich:listShuttle arrow icons for arabic mode
          Siva P Master

          Hi,

           

          Arrow icons are images so you have to check for the image in css or application.

          • 2. Re: rich:listShuttle arrow icons for arabic mode
            Nikhil Silveira Newbie

            The images are created by the RichFaces ListShuttle renderer using Graphics2D objects.

            For dir=RTL languages like Arabic, the Source and Target boxes are interchanged, but the arrows are not reversed (continue to point in the LTR direction where source is on the left). This is actually a bug in the component / renderer.

            But how does one get around it?

            If one writes their own renderer, they'd have to [quoting Core JSF 2/e] 'Modify your tag class to return the renderer’s ID from the getRendererType'.

            -- Doesn't that mean mean you're forced to rebuild richfaces jars from source ?

            Is there any way to hook in your own renderer without modifying the tag class.

             

            Also do you know the location of the tag class for ListShuttle in the RF sources? I find it a little confusing.

            • 3. Re: rich:listShuttle arrow icons for arabic mode
              Nikhil Silveira Newbie

              the source and caption target labels can be styled in the locale specific stylesheet as such:

               

                 .rich-shuttle-source-caption, .rich-shuttle-target-caption {

                      text-align: right;

                  }

               

              Getting the arrows to be RTL is another matter though

              1 of 1 people found this helpful
              • 4. Re: rich:listShuttle arrow icons for arabic mode
                Nikhil Silveira Newbie

                ok. you can get around this by using facets as such:

                <f:facet name="copyControl">

                     <h:panelGroup>

                          ... your image and label

                     </h:panelGroup>

                </f:facet>

                 

                the other facets to override are: copyControlDisabled, removeControl, removeControlDisabled, copyAllControl, copyAllControlDisabled, removeAllControl, and removeAllControlDisabled.

                 

                The centre buttons for shuttling between the source and target lists will be overridden (replaced) with what you provide in the facets. The only downside is, the styling is now completely up to you (to recreate).

                • 5. Re: rich:listShuttle arrow icons for arabic mode
                  Nitesh S Newbie

                  Thanks Nikhil, it solved the issue.