myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Marinschek <martin.marinsc...@gmail.com>
Subject Re: confusion on best practices in regard to a VO in BackingBean
Date Tue, 23 Aug 2005 21:06:56 GMT
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 <rick.reumann@gmail.com> 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

Mime
View raw message