Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Returning Objects from ManagedBeans - Sequence diagrams

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 63
Mac OS X jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 9
VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.



 
There will be plenty of time to discuss your objections when and if you return. The cargo is this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic