> [EMAIL PROTECTED] wrote the following on 8/23/2005 4:39 PM:
> 
> > Funny, I was *just* thinking that! And then I figured it is because in the 
> > Struts world, we are typically used to thinking of a form bean as being 
> > shared by many jsps. But I think in the Faces world perhaps the backing 
> > bean and the jsp are supposed to be really tightly integrated..(almost the 
> > same (one) thing..?)
> 
> If that's the case, though, I'd find that as a severe limitation of JSF. 
> In Struts my DispatchActions can be called from anywhere and there isn't 
> really a need for a tight coupling. "getEmployee" returns "success" and 
> any form or JSP can use this Action (assuming they also use the 
> ActionForm also).
> 

I think an important distinction between the two is that in JSF, managed beans 
are an instance that don't need to be thread save like a struts action.  In JSF 
you can combine the Action and ActionForm into a single managed bean or you 
could separate them. Whatever works the best in your application.   There is 
nothing to stop you from registering multiple managed beans names with the same 
backing class.  

The catch is when you want to reuse a jsp fragment in more than one page since 
the binding expression is tied to a single managed bean.
 

> In JSF I keep wishing there was a way I can through in a "use this 
> managed bean" in the navigation rules - but I'm guessing that's because 
> I've been using Struts for so long. Hopefully this will all start to 
> "click" at some point.
> 

Isn't the relationship between the ViewController/ "managed bean" and the JSF 
view as you have described?

Maybe something like this where invoiceId is a query parameter:     

<managed-bean>
   <managed-bean-name>profile$login</managed-bean-name>
   <managed-bean-scope>request</managed-bean-scope>
   <managed-property>
      <property-name>invoiceId</property-name>

      <value>#{param['invoiceId']}</value>
   </managed-property>
</managed-bean>


Gary

> -- 
> Rick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to