|
|
Re: pagecode sync in Eclipse [message #665380 is a reply to message #665230] |
Thu, 14 April 2011 09:51  |
Eclipse User |
|
|
|
Thank you Ian! I was wondering, could you describe how you guys architect your web pages? Perhaps we need to change what we do to match more closely what the community does.
On our site, we have primarily .jsp pages (with jsf components) where there is a backing bean for each page. When you navigate to a page where you want to display a list of parts for example, we have a before phase listener such as this...
<f:view beforePhase="#{pc_Parts.beforePhase}">
... and in the backing bean (Parts.java is a managed bean defined in faces-config.xml as pc_Parts), we've got a phase listener like this where we hit our DB for parts info and put a List<PartBean> into the session.
public void beforePhase(PhaseEvent pe) {
List<PartBean> parts = getParts();
setPartsList(parts);
}
Our parts.jsp page then has a t:dataTable that builds the list of parts from the session and displays them on the page.
If you have time (or anyone else for that matter), how does this differ from how you would structure a jsf page without using a backing bean?
Thanks all for your input!
|
|
|
Powered by
FUDForum. Page generated in 0.03622 seconds