Tree - RTL

Tree has built-in support for RTL languages.

<h:form>
    <p:tree value="#{treeIconView.root}" var="doc" dir="rtl">
        <p:treeNode expandedIcon="pi pi-folder-open" collapsedIcon="pi pi-folder">
            <h:outputText value="#{doc.name}"/>
        </p:treeNode>

        <p:treeNode type="document" icon="pi pi-file">
            <h:outputText value="#{doc.name}" />
        </p:treeNode>

        <p:treeNode type="picture" icon="pi pi-image">
            <h:outputText value="#{doc.name}" />
        </p:treeNode>

        <p:treeNode type="mp3" icon="pi pi-video">
            <h:outputText value="#{doc.name}" />
        </p:treeNode>
    </p:tree>
</h:form>