Reputation: 10288
I have a few jsp files with different content but with the same sidebar.
How can I reuse the sidebar code?
The sidebar is currently a rich:panelMenu
.
Thank you!
Upvotes: 0
Views: 472
Reputation: 8550
Put the sidebar in an extra jsp file and include it with facelets . Here is a nice article about facelets and jsf: Facelets fits JSF like a glove.
You can also use subviews:
<f:subview id="sidebar">
<jsp:include page="sidebar.jsp" />
</f:subview>
Upvotes: 1