This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Returning Objects from ManagedBeans - Sequence diagrams Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Returning Objects from ManagedBeans - Sequence diagrams" Watch "Returning Objects from ManagedBeans - Sequence diagrams" New topic
Author

Returning Objects from ManagedBeans - Sequence diagrams

Sam Carlac
Greenhorn

Joined: Oct 05, 2011
Posts: 18
As we all know, JSF Managed beans basically help the UI components, bind values, etc, etc.

So if we have this in our sequence diagram:

JSF <---> FacesServlet <---> ManagedBean <---> xyx

Would the ManagedBean actually "return" values (e.g "return List<Object>") to the FacesController or "bind" / "process" them.

Please clarify.
Eduardo Mineo
Ranch Hand

Joined: Sep 26, 2011
Posts: 63

Hi Sam,

I think there is no problem doing this, but I'd rather try to let it more high level in order to keep it very understandable. Since I'm waiting for results, I can't give you sure, but I haven't even included FacesServet on my Sequences. I put a direct conversation between my XHTML files and ManagedBeans and the return was mostly a message saying "Render page X".

--eduardo
Sam Carlac
Greenhorn

Joined: Oct 05, 2011
Posts: 18
Thanks Eduardo. I think I've come too far to remove the FacesServlet now

I think it's a good way of showing the main MVC concepts, thus the reason I put it there.

Thanks again.
Tamal Guha
Greenhorn

Joined: Jun 28, 2011
Posts: 9

Sam Carlac wrote:As we all know, JSF Managed beans basically help the UI components, bind values, etc, etc.

So if we have this in our sequence diagram:

JSF <---> FacesServlet <---> ManagedBean <---> xyx

Would the ManagedBean actually "return" values (e.g "return List<Object>") to the FacesController or "bind" / "process" them.

Please clarify.


Hi Sam

If your ManagedBean method signature is List<Object> methodXYZ(param) , I think in sequence diagram you should show the return object to FacesServlet.
Take an example, List<Product> findByCategory(categoryCode) -> where you are listing list of Products by category code. - here if you show ManagedBean returning a list of
Products (and so it is clear that managed bean is not returning just product names.... and hence controller can redirect to Product Detail page, when a product is selected ) - this seems good idea to me.




SCJP 1.4, SCJD-1.4, SCBCD-5, OCMJEA-5.
 
 
subject: Returning Objects from ManagedBeans - Sequence diagrams
 
Similar Threads
HttpSession in JSF
Retrieving form values from requestmap using icefaces
collection binding with input text
FacesServlet in a sequence / class diagrams
JSF Managed Bean in class diagram