PrimeFaces Goes Bidirectional

PrimeFaces Goes Bidirectional

One of the highlights of PrimeFaces 3.5 is the RTL support. Initially commonly used components tabview, accordion, datatable, tree, menus and more would be RTL aware. In future versions RTL support would be improved with each iteration just like accessibility.

To configure PrimeFaces to use RTL, one way is setting the context param that also accepts EL expressions.

That’s it, if you have a regular tabview like;

RTL mode renders like;

  • Mossaab
    1 November 2012 at 19:07

    Adding RTL support is a big plus to primefaces. Thanks!

    I have a request. Can’t you add an attribute to the primefaces tags instead?

    I’m thinking of something as simple as .

    In fact I have a website that serves bilingual content (Arabic / English), and I prefer to be able to dynamically decide, for a given view, whether the orientation should be RTL or LTR.

    Many thanks!

    • David
      1 November 2012 at 21:36

      Agree with Mossaab, it could be better if this cofiguration can be made at component scope and not application scope.

      • Moayad Abu Jaber
        3 November 2012 at 12:53

        That mean every component that support RTL have dir attribute ? very interesting 🙂
        finally primefaces do that!

  • lucaster
    3 November 2012 at 12:56

    But the text is stil left to right…

      • Luca
        5 November 2012 at 11:36

        I tought RTL would affect any language. Probably arabic character are alighed RTL correctly though.

Post a Comment