Yes, it is all about the possibility to decide! In Struts, everything had to be in your action-controller-thingy, in JSF, you can decide. It is up to you to put your actions either into a central place, right into your bean, or alongside your bean in a separate managed object.
regards, Martin On 8/23/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote: > As another alternative, the practice we've been following is to have an > XyzAction class and a separate XyzBean class. The Action class has a > managed reference to the Bean class and has all the logic in it. The > Bean class is just a straight JavaBean and contains all the data needed > by the JSF page. > > - Brendan > > -----Original Message----- > From: Martin Marinschek [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 23, 2005 4:07 PM > To: MyFaces Discussion > Subject: Re: confusion on best practices in regard to a VO in > BackingBean > > > Yes. > > this is exactly how I handle this. If naming convention strikes you as > a problem, you can always name the retrieveInvoice method a > retrieveInvoiceAction method or something in the like. > > From the method signature it will be clear that this is an action > method and not the getter anyways, cause you return a string. > > regards, > > Martin > > On 8/23/05, Rick Reumann <[EMAIL PROTECTED]> wrote: > > For sake of this discussion imagine a case where user needs to click > on a > > button to "get and invoice" based off an invoice ID. > > > > Now coming from struts I'm used to going to a 'getInvoice' dispatch > method > > which would return to me an "Invoice" object (after making a backend > call) > > and then that "Invoice" would be stuffed into the request for use on > the > > page we forward to. > > > > With JSF, I'm assuming you'd typically want an "InvoiceBackingBean" > and > > nested in there possibly an "Inovice" value object? So then on a JSP > you > > could have invoiceBackingBean.invoice.id This would obviously mean > your > > InvoiceBackingBean would need a "getInvoice" method that would return > the > > instance of the Invoice object in the backing bean. > > > > Where I'm now confused is what do you call the actual action method > in your > > BackingBean that would do the true "get" (dao/service/delegate call) > that > > would populate the Invoice object in the backing bean. Aren't you > going to > > run into some odd naming conventions? Do you make another method > called > > "retrieveInvoice" ? So looking at the backingBean you'll have > "getInvoice" - > > returns the invoice object in backing bean, and then you'll also have > > "retrieveInvoice" - which is what your forms will call when submitted > to > > populate the actual invoice in the backing bean? > > > > How do you gurus handle this? > > > > -- > > Rick > > > -- > > http://www.irian.at > Your JSF powerhouse - > JSF Trainings in English and German > -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German

