简体   繁体   中英

is there a tab control in RichFaces or JSF that doesn't render ugly nested tables?

The RichFaces 3.3.3 tabPanel control that I'm currently using renders 4 level nested tables. Is there any other tab control to render clean HTML or atleast allow me to control it? Like a <ul> ?

This kind of ugly code (and it is not only related to the <rich:tab> component) is used in order to assure a compatibilities and identical behaviors among all browsers, including all IE (and IE6 also), Firefox, Safari, Chrome, and so on...

That's why the HTML code, as well as the Javascript code, is not optimized by the Richfaces components.

If it is a problem for you, you can try to use your own components (some examples have been provided by org.life.java ).

Eventually you can also simulate this behavior with buttons and some Javascript (that will hide or show different panels) or using one <a4j:commandButton> per tab to refresh the content of a basic panel.

RichFaces 4将切换到div,以便在许多组件中进行布局。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM