Hmmm... This has me thinking. Maybe we could allow command driven actions to specify the method to call (defaulting to doCommandName) to execute the action for that command?
What do we do if the method doesn't return String? Should we try to catch exceptions, then return ERROR if we catch one, or return SUCCESS if not? Do we need the Action interface in this case? Jason -----Original Message----- From: 顾天扬 [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 12:25 AM To: Jason Carreira Subject: RE: RE: [OS-webwork] re: some suggestion about ww2.0 Why could we call common methods of a POJO javabean from some new tags? My problem comes from below situation: My system is a 3-tier system, web tier - middle tier - database. In the middle tier, system is composed of entities and business logic. An example of a business logic like this: public class AccountManager { //create account public void createAccount(Account account) { ... } //transfer amount between accounts public void transferAccount(String acct1,String acct2, long amount) { ... } //get account balance public balance getAccountBalance(String acct1) { ... } ... } In ww1.x, AccountManager cant be directly used as "Control" for webwork view technologies. I must translate AccountManager to many "Action"s. Each action spreads method params and result to action fields, like this: public class CreateAccountAction extends ActionSupport { Account account; public Account getAccount(){}; public void setAccount(Account account){}; public void execute() { //call middle tier logic getAccountManger().createAccount(account); } } I know the tedious translation work could be automatically by xdoclet. But if ww2.0 view technologies could support POJO such as AccountManager as "Logic" layer, it'll be preferred for programmers like me. ----- Original Message ----- From:"Jason Carreira" <[EMAIL PROTECTED]> To:<[EMAIL PROTECTED]> Subject:RE: [OS-webwork] re: some suggestion about ww2.0 Date:Wed, 19 Feb 2003 12:33:27 +0800 >> >> >> >> Maybe I asked a foolish question or my english is poor >> ( I am not a native English Speaker). But please correct >> me if I am wrong. >> >> My main suggestion is remove the restriction of Action layer. >> Could we just use POJO as "Action"? If it's possible, we >> could say proundly, " No formbeans, No actions " :) >> >> Gu Tianyang >> [EMAIL PROTECTED] > >The problem here is that you'll want your web app to DO something. >Without an Action, how will it be triggered to do something? Is >populating a javabean the only thing you're looking to do? > >Jason > > >------------------------------------------------------- >This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. >The most comprehensive and flexible code editor you can use. >Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. >www.slickedit.com/sourceforge >_______________________________________________ >Opensymphony-webwork mailing list >[EMAIL PROTECTED] >https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > ______________________________________ =================================================================== 手机语音聊天国内长途5分钟/1元、帅哥美女靓照尽在爱情快递 (http://love.sina.com.cn) 手机短信发送m到888810,免费获得新浪15M任你邮邮箱! (http://vip.sina.com/love_send/lover.html) 缤纷下载俱乐部 每月5元图片铃声随心换 (http://sms.sina.com.cn/act/member.html) ------------------------------------------------------- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork