How to partition the large JSF pages?
I have one big JSF page containing nearly 1000 lines using normal JSF forms and panelGrids. It would be easier if i keep them in several pages and integrate them as a single page. I would like to know how I can accomplish this in JSF.
I have several forms in that page, in which most of them are pr开发者_运维问答ependID="false"
etc.
Will that affect the flow of the page if I partition the page as several submodules?
I am using ajax extensively and mostly I update one form component from another form component.
You can split your large page in several files and use <ui:include> to merge the blocks. The <ui:include> has no effect on the component tree so this is a pure construction and compositon tool.
<ui:include src='part1.xhtml'/>
<ui:include src='part2.xhtml'/>
Read the following article to know more about all that: JSF 2 fu, Part 2: Templating and composite components
精彩评论