On Fri, 28 Mar 2003 15:12:46 -0500 Vic Cekvenich <[EMAIL PROTECTED]> wrote: > > Rick Reumann wrote: > > A while back I had a problem trying to figure out why I was getting > > funky null pointer errors etc. It turns out I wasn't paying > > attention to how the ActEvent setBean() was putting my form in scope > > with the value"fb" from my Constants file. That's all well in fine > > and I can just label my form properties... > > > > <html:text name="fb" property="requestedBy" /> > > The name of the bean is set in struts-config, it is never FB. > > > > > But how on the bP ContentAdminEdit.jsp page are you able to use: > > > > <html:text property="pageURL" size="70"/> , etc. > > > > without using the name="fb" attribute?? It looks like you are using > > the same ActEvent setBean(..) method which put's all the formBeans > > in scope with "fb" as the name. > > That is base method, one can override, for R/O pages, not forms. So if > I quickly want to do somehting. > Base method are meant to be overriden.
But (see other e-mail) I'm always forced under this framework to create an Action to populate a form (even if it's blank) just so I have HashMap in my List that isn't null. So in my ItemRequestAction I created a onSetupExec(ActEvent ae) method where I can populate the bean. Problem then is I still have to call ae.setBean( itemRequest ); Which does put "fb" into request scope. I got around having to use "fb" and am able to use my normal name defined in my action mapping by then doing... HttpServletRequest req = ae.getReq(); req.setAttribute( (ae.getMapping()).getAttribute(), itemRequest); Which did the trick, but really it was a waste to have "fb" put in scope through the ActionEvent method in this case. I'm also confused because I don't see you do this anywhere in bP so I'm still trying to figure out how it works for you. I really think this whole thing could be made much simpler to get a grasp of if it dealt with a simple "User" and you had a menu: Add User Edit User View Users I'm curious at the very first stage how you can click on a link and get to a simple blank form to "Add A User." I know I can do it building normal Action classes etc but following your framework I'm having a lot more trouble. (IN other words do I build an Action with a "setUpExec" method? Currently I don't see you having one? ). Anyway, it's Friday I have a headache from looking at all of this:) -- Rick Reumann _______________________________________________ MVC-Programmers mailing list [EMAIL PROTECTED] http://www.basebeans.net:8080/mailman/listinfo/mvc-programmers