Matt I haven't checked this yet (running to a meeting right now) but I am sure that is the problem. DERF!!
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Matt Woodward Sent: Monday, April 11, 2005 1:31 PM To: [email protected] Subject: Re: setProperty() trouble That's interesting Eric--the only thing I can think of off the top of my head is that maybe you have Mach-II in development mode, in which case it would re-read the XML file on every request, thereby overwriting the properties you set with the XML file's values. I'd have to do some experimentation to see what's up if that isn't the case. Matt On Apr 11, 2005 1:12 PM, Knipp, Eric <[EMAIL PROTECTED]> wrote: > I have a Mach-II question .. so all you Mach-II experts gather round .. > > In my application I want to dynamically set a couple of datasources, which > are coming into the application as form variables from a "launcher" type > page. The reason for this is so that datasources can be programatically > changed based on which environment we are in. I don't want to use the > appConstants plugin that already exists, in fact I don't want to use a > plugin for this at all, as currently the data is stored in server variables > which I don't want the app to have to be aware of .. would just be so much > easier if they could be passed in. > > I decided the best place to store this information would be in the > propertyManager. This should be easy using setProperty() to accomplish. For > some reason, however, I am unable to do this. I have tried implementing this > as a filter, which returns true if the 2 form variables have been supplied, > and uses setProperty() to stick them in the propertyManager so that I can > reference them later. The trouble is that within the filter things seem to > be fine. When I dump getProperties() before returning I see my new > properties all happy in the propertyManager as they should be. But when I > attempt to retrieve those properties with getProperty() from a listener > later on, they are gone. I dumped getProperties() from my listener and the > properties are not there .. only the ones defined in the mach-ii.xml exist > anymore. > > Does anybody know what I am doing wrong? I am guessing it has something to > do with the context or something. In the past I have directly interacted > with the aforementioned server variables in a plugin, which has worked fine, > but that is not the approach I want to take this time. > > This application is session aware so another option is to store them in my > SessionManager listener that I've created but I'd prefer to store them in > the propertyManager instead. > > Thanks, > > Eric > > ----------------------------------------- > CONFIDENTIALITY NOTICE: The information contained in this e-mail and > attached document(s) may contain confidential information that is intended > only for the addressee(s). If you are not the intended recipient, you are > hereby advised that any disclosure, copying, distribution or the taking of > any action in reliance upon the information is prohibited. If you have > received this e-mail in error, please immediately notify the sender and > delete it from your system. > > ---------------------------------------------------------- > To post, send email to [email protected] > To unsubscribe: > http://www.dfwcfug.org/form_MemberUnsubscribe.cfm > To subscribe: > http://www.dfwcfug.org/form_MemberRegistration.cfm > > -- Matt Woodward [EMAIL PROTECTED] http://www.mattwoodward.com ---------------------------------------------------------- To post, send email to [email protected] To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm ---------------------------------------------------------- To post, send email to [email protected] To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm
