Re: What should get method return types be??
Vic Cekvenich <[email protected]> Mon, 12 May 2003 11:36:17 -0400
| Newsgroups | gmane.comp.java.mvc.devel |
|---|---|
| Organization | baseBeans Engineering |
| Message-ID | <[email protected]> |
Regarding "update": Update means update db with list info. A user could do several inserts and several filed updates, so an update would sync. with db. Regarding finaly: You are right, finaly sounds good. Even taking transactions to a DAO interface level, as a todo. I was just trying to clear up any possible "locks" that happen outside of DAO. Regarding "doing": Check out how list backed bean can talk easily to Flash, Rich UI apps. Regarding bean return types: http and struts html tag are String based. But, JSTL is native, as it formats in JSP. So... a bit of gray area, 2 returns are possible. Setters are string, as per Struts HTML, and validation must make sure it's right. Regarding LabelBean, I do not think it ideal that Bean know any SQL, DAO should do SQL> I am not sure wha your Setup Init Servlet idea is.... it does not look lyered. It looks like you are aching, but DAO does data cacing in Model layer, caching in Servlet is not ideal, IMO. hth, .V Rick Reumann wrote: > On Mon, 12 May 2003 01:56:47 -0400, Rick Reumann wrote: > > >>The easiest (and it seems to work fine) is to simply return type Object >>for the getters. > > > Well, I just realized this doesn't follow the contract necessary to > convert the Bean into a FormBean in the actions, so I guess I better stick > to String return types. I'll have to think about how to best handle this > for my generic LabelValueBean - although for that one, in theory, I could > stick to Object return types since it 'probably' won't ever be used as a > type of ActionForm (then again you never know:). >