[OT] Re: ActionForm implementing Map
Ted, Sigh! LOL ;-) I have added the following thought to my signature (below): "You can lead a horse to water but you cannot make it float on its back". LOL I just want to say that I picked on Vic because he generally thinks out-of-the-box, has a sense of humor, actually reads non-committer questions through before answering, etc. I also have really enjoyed your book and your submissions to the list. Thanks. You both are a credit to this community. I have taken this issue to bugzilla in beanutils on PropertyUtils instead of to struts on the request processor, where it really belongs. See some minor notes below. Thanks, again. Jack On Mon, 13 Dec 2004 07:02:01 -0500, Ted Husted <[EMAIL PROTECTED]> wrote: > The Dev lists are like appellate courts. If the answer on the User list is > "you can't get there from here", then you can "appeal" to the Dev list to see > if we can change "the lay of the land". I am not coming with a user issue. I am working on a thing I have called JerichoState. > Often, people have already solved the same problem in a different way. In > programming terms, describe the interface of the problem first, and then ask > if anyone sees why your suggested implementation doesn't work. Doesn't work because the design of beanutils and request processor is faulty. I am fully cognizant of this particular problem area in design issues, previous submissions, and so on, perhaps more so, according to recent evidence, than the committers. > In any event, please check the mailing list archives for ActionForm and Map, > and ask any followup questions on the User list, until you get to the point > where people say that the current codebase doesn't support the behavior. I am going to ask a question on the user list about changing the request processor logic? That is going to get a predictable response, wouldn't you think? LOL > Then when someone does suggest moving a thread, please just trust us and do > it. The correct analogy, then, would not be a court of appeals but a commanding officer. ;-) In a court of appeals, you get to have your briefs read and you have time to speak too. But, as I said, "sigh". -- "You can lead a horse to water, but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm implementing Map
On Fri, 10 Dec 2004 13:58:48 -0800, Dakota Jack wrote: > But, this is a damned > confusing list and very hard difficult to grasp the rules. Is > there an insider requirement or something? We run our lists the same way most other Apache projects do. * http://struts.apache.org/mail.html The Dev lists are like appellate courts. If the answer on the User list is "you can't get there from here", then you can "appeal" to the Dev list to see if we can change "the lay of the land". Regardless of where you post, it is often best to concisely explain *why* you want to do something rather than jump to *how* you think you might want to do it. Often, people have already solved the same problem in a different way. In programming terms, describe the interface of the problem first, and then ask if anyone sees why your suggested implementation doesn't work. Often, the easiest solution is an alternate implementation. A lot of support threads spend three or four posts defining the problem because people jump to what they (think they) want to do without explaining why they want to do it. In any event, please check the mailing list archives for ActionForm and Map, and ask any followup questions on the User list, until you get to the point where people say that the current codebase doesn't support the behavior. Then when someone does suggest moving a thread, please just trust us and do it. -Ted - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm implementing Map
Usually, the Map is exposed through composition rather than inheritance, but yes. As of Struts 1.1, you can use a Map with rather an ActionForm. I'm sure this has been discussed on the User List several times, and so you might want to check the list archives. The DynaActionForm uses a Map. It doesn't extend Map, but included a Map through composition. The conventional Struts tags see the Map entries as properties. You can also reference the Map from standard JSTL tags. You should not need to make any changes to the Struts codebase to use Maps now, and so the best place to continue this thread is the User list, where there are more people who can help you. -Ted. On Fri, 10 Dec 2004 11:18:45 -0800, Dakota Jack wrote: > Do the newer versions of commons utils allow an ActionForm to > implement Map? Thanks! > > Jack - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm implementing Map
Hi, Vic, I am talking about a potential change to RequestProcessor in Struts. If that is not Struts dev related, I really don't know what is. Is it that nothing but standard work is supposed to be discussed on this list or something? I don't want to be difficult. But if this is not Struts dev stuff, I am completely at a loss as to what is. My itch is that I want an ActionForm that implements Map to be able to be processed in Struts. Currently that would seem to be impossible. My itch beyond this is building a state control app for Struts. That is definitely on topic in my view. I would like to be able to talk to people interested in developing Struts. Isn't this the list for that? I hope you don't take this as personal in any way. It is not. Everyone seems to be fine fellows and gals. But, this is a damned confusing list and very hard difficult to grasp the rules. Is there an insider requirement or something? Jack On Fri, 10 Dec 2004 15:29:55 -0600, Vic <[EMAIL PROTECTED]> wrote: > You can email me direct if you want as this becomes OT. > I am not sure what your itch is. > My itch was that I wanted easy Multirow CRUD, validation and eventualy > display tag support, with same Formbean I used for single row. So I used > a List. My code is on sf.net under infonoia (since I do not do much html > anymore I have not touched it in a while). > > I can only take a guess as to why you want Map as formbean: "no > getters/setters" so you can just get a row from DAO as Map (for example > iBatis) so you are more loosley coupled. > If I am wrong then... my suggestion is bs. > > Contribute to Struts? The express way IMO is to fix bugs and submit diff > in bugzila. Or to have a popular Struts sub project on sf.net. > I am not a comitter, just so you know. > > .V > > > > Dakota Jack wrote: > > >Thanks, Vic, > > > >Your assistance is a little dark to me. It seems as if you are > >suggesting solutions other than using a Map implementation of > >ActionForm. Is that right? If so, then I would rather first see what > >I can do to make this possible. The RequestProcessor should not, I > >think, make this impossible. If I misunderstand you, please let me > >know. I do know that I could just not configure an ActionForm, write > >my own population, etc. and have no trouble at all. I would prefer, > >however, to act within the Struts context if possible and to > >contribute. > > > >Jack > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm implementing Map
You can email me direct if you want as this becomes OT. I am not sure what your itch is. My itch was that I wanted easy Multirow CRUD, validation and eventualy display tag support, with same Formbean I used for single row. So I used a List. My code is on sf.net under infonoia (since I do not do much html anymore I have not touched it in a while). I can only take a guess as to why you want Map as formbean: "no getters/setters" so you can just get a row from DAO as Map (for example iBatis) so you are more loosley coupled. If I am wrong then... my suggestion is bs. Contribute to Struts? The express way IMO is to fix bugs and submit diff in bugzila. Or to have a popular Struts sub project on sf.net. I am not a comitter, just so you know. .V Dakota Jack wrote: Thanks, Vic, Your assistance is a little dark to me. It seems as if you are suggesting solutions other than using a Map implementation of ActionForm. Is that right? If so, then I would rather first see what I can do to make this possible. The RequestProcessor should not, I think, make this impossible. If I misunderstand you, please let me know. I do know that I could just not configure an ActionForm, write my own population, etc. and have no trouble at all. I would prefer, however, to act within the Struts context if possible and to contribute. Jack - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm implementing Map
Thanks, Vic, Your assistance is a little dark to me. It seems as if you are suggesting solutions other than using a Map implementation of ActionForm. Is that right? If so, then I would rather first see what I can do to make this possible. The RequestProcessor should not, I think, make this impossible. If I misunderstand you, please let me know. I do know that I could just not configure an ActionForm, write my own population, etc. and have no trouble at all. I would prefer, however, to act within the Struts context if possible and to contribute. Jack On Fri, 10 Dec 2004 14:20:58 -0600, Vic <[EMAIL PROTECTED]> wrote: > HTML tag lib for getters. (Else you could do some funky EL) > Request processor you should look at for setters. Also look at Joda > beans on sf.net. > > My implement ion made a FormBean into a List (for mutirow CRUD). > > .V > > > > Dakota Jack wrote: > > >Perhaps I should be clearer on this. I would like to have an > >ActionForm implement Map, but when I do this, it chokes as follows. I > >would like to change this. I am not sure whether the place to do this > >is the request processor in Struts or the implementation in commons > >beanutils. I do know that the present code will not populate a form > >which implements Map. > > > >Here is the choke "webmasterOptions" is > > > >public ActionForward webmasterOptions(ActionMapping am, ActionForm af, > >HttpServletRequest hsreq, HttpServletResponse shres) > > > >Thanks for any assistance on this. I am willing, of course, to make > >or to help make whatever changes are necessary to allow the Struts > >controller to use ActionForms that implement Map. > > > >Jack > > > > > > > > > >1. HTML browser exception report > > > >Exception report > > > >message > > > >description The server encountered an internal error () that prevented > >it from fulfilling this request. > > > >exception > > > >javax.servlet.ServletException: BeanUtils.populate > > org.apache.struts.util.RequestUtils.populate(RequestUtils.java:497) > > > > org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798) > > > > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205) > > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) > > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:763) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:23) > > > >root cause > > > >java.lang.IllegalArgumentException: Null property value for > >'webmasterOptions' > > > > org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:755) > > > > org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) > > org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881) > > org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808) > > org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495) > > > > org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798) > > > > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205) > > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) > > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:763) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:23) > > > >note The full stack trace of the root cause is available in the Tomcat logs. > > > > > > > >2. catalina2004-12-10.log > > > > > >java.lang.IllegalArgumentException: Null property value for > >'webmasterOptions' > > at > > org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:755) > > at > > org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) > > at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881) > > at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808) > > at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495) > > at > > org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798) > > at > > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205) > > at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) > > at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284) > > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) > > at com.crackwillow.filter.GZIPFilter.doFilter(GZIP
Re: ActionForm implementing Map
HTML tag lib for getters. (Else you could do some funky EL) Request processor you should look at for setters. Also look at Joda beans on sf.net. My implement ion made a FormBean into a List (for mutirow CRUD). .V Dakota Jack wrote: Perhaps I should be clearer on this. I would like to have an ActionForm implement Map, but when I do this, it chokes as follows. I would like to change this. I am not sure whether the place to do this is the request processor in Struts or the implementation in commons beanutils. I do know that the present code will not populate a form which implements Map. Here is the choke "webmasterOptions" is public ActionForward webmasterOptions(ActionMapping am, ActionForm af, HttpServletRequest hsreq, HttpServletResponse shres) Thanks for any assistance on this. I am willing, of course, to make or to help make whatever changes are necessary to allow the Struts controller to use ActionForms that implement Map. Jack 1. HTML browser exception report Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: BeanUtils.populate org.apache.struts.util.RequestUtils.populate(RequestUtils.java:497) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:23) root cause java.lang.IllegalArgumentException: Null property value for 'webmasterOptions' org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:755) org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881) org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808) org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:23) note The full stack trace of the root cause is available in the Tomcat logs. 2. catalina2004-12-10.log java.lang.IllegalArgumentException: Null property value for 'webmasterOptions' at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:755) at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) at com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:23) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
Re: ActionForm implementing Map
Perhaps I should be clearer on this. I would like to have an ActionForm implement Map, but when I do this, it chokes as follows. I would like to change this. I am not sure whether the place to do this is the request processor in Struts or the implementation in commons beanutils. I do know that the present code will not populate a form which implements Map. Here is the choke "webmasterOptions" is public ActionForward webmasterOptions(ActionMapping am, ActionForm af, HttpServletRequest hsreq, HttpServletResponse shres) Thanks for any assistance on this. I am willing, of course, to make or to help make whatever changes are necessary to allow the Struts controller to use ActionForms that implement Map. Jack 1. HTML browser exception report Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: BeanUtils.populate org.apache.struts.util.RequestUtils.populate(RequestUtils.java:497) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:23) root cause java.lang.IllegalArgumentException: Null property value for 'webmasterOptions' org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:755) org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881) org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808) org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:23) note The full stack trace of the root cause is available in the Tomcat logs. 2. catalina2004-12-10.log java.lang.IllegalArgumentException: Null property value for 'webmasterOptions' at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:755) at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) at com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:23) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java