Is it okay to wrap JSF components generated by html with native divs using jQuery after page loading?

Using RichFaces 3.3.3, JSF 1.2, and Facelets.

For some presentation purposes, I need to wrap the contents of some divs with other divs in order to be able to style them in a certain way.

I use jquery to make it clean when writing HTML, and it can be controlled in one place, otherwise I need to hard-coded divsevery additional place that I want to use.

eg. source JSF generated HTML:

<div id="j_id4:main-container">
    <div id="j_id4:j_id5:nav">...</div>
</div>

after using jquery, the HTML now looks like this:

<div id="j_id4:main-container">

    <div class="top"><div></div></div>

    <div class="middle">
            <div id="j_id4:j_id5:nav">...</div>
    </div>

    <div class="bottom"><div></div></div>

</div>

Could this cause problems? I am going against the rule from the jboss rich documentation which states:

Ajax , . , , . - , ( ). , "AjaxOutput" ( ).

, ?

1:

: tabPanel ajax, ( ) , divs dom, jQuery. , , divs . , , js dom ready, richfaces rerendering of tabPanel rerenders, div. ?

0
1

, . RichFaces, , , , . , " ", " ".

: JSF, , HTML HTML . , "" HTML DOM JSF. , , ( XHTML), , , , , .

+1

Source: https://habr.com/ru/post/1768919/


All Articles