Re: ERXSwitchComponent
Robin Smith <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <CAHmZkDsSO4mGmqk+ogZ4zox6w0D5Hv3FTYEALXBOTpJnWrL=AQ@mail.gmail.com> |
Hi Thanks for the feed back. I'll do a bunch of changes and submit them as a patch for review. Thanks Robin On 13 December 2012 21:43, Johann Werner <[email protected]> wrote: > Hi Robin, > > Am 13.12.2012 um 21:44 schrieb Robin Smith <[email protected]>: > >> Hi All >> >> I have a question regarding ERXSwitchComponent and its componentCache. >> What i have noticed by stepping through the code is that it caches the >> components by name so if i call the same component more than once then >> it returns the cached version. >> >> This sounds great unless i then try edit a different object using the >> same component, as the cache is preserving state from that last time >> it was used. For example if i edit Person1 using EditPerson.wod then i >> decide i want to edit Person2 which will also use EditPerson.wod any >> state from the first use is preserved (this really isnt the easiest >> thing to explain in an email) >> >> So i have two questions >> >> 1. Was this designed only to be used with stateless components? If so >> this is fine i will update the JavaDoc and move onto another solution. > > Stateless would be one (and probably cleanest) solution but you can always manually get the current binding value by calling valueForBinding(name) for your person object or just use a nonsynchronizing component so you have complete control on binding synchronization. > >> >> 2. If not even better, but am i missing something maybe >> ERXSwitchComponent is supposed take an "id" that can make each use of >> a component unique. I dont mind the cache, if in my example i went >> back again to edit Person1 then it would be great for the cached >> values to be used. The class calls >> "paramWOContext.appendElementIDComponent(id);" repeatedly but i dont >> really know what this is supposed to be doing as it doesn't seem to >> change the "id" value. >> >> If nobody has any input i will see about doing this work myself and >> submitting it to you guys >> >> >> Many Thanks >> >> Robin >> >> P.S. Why does ERXSwitchComponent not extend ERXDynamicElement > > Because ERXDynamicElement exists only since this year's WOWODC but feel free to update it and get the pull requests coming :-) > >> >> -- >> >> ------------------------------ >> Click Travel Ltd >> Taking business travel and expenses one step further >> http://www.clicktravel.com >> >> Winner of "Best Business Travel Management Company" at the Business Travel >> Awards (2012 & 2009) and the Travel Trade Gazette Awards (2011). We're also ranked >> 22nd in the 2012 Sunday Times Hiscox Tech Track 100. >> >> For all the latest Click news please visit our blog: >> http://clicktravel.com/blog >> >> Think: Do you really need to print this email? >> >> ------------------------------------------------------------------------------ >> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >> Remotely access PCs and mobile devices and provide instant support >> Improve your efficiency, and focus on delivering more value-add services >> Discover what IT Professionals Know. Rescue delivers >> http://p.sf.net/sfu/logmein_12329d2d >> _______________________________________________ >> Wonder-disc mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/wonder-disc >> > -- Robin Smith Engineering Team Leader BEng (Hons) MBCS -- ------------------------------ Click Travel Ltd Taking business travel and expenses one step further http://www.clicktravel.com Winner of "Best Business Travel Management Company" at the Business Travel Awards (2012 & 2009) and the Travel Trade Gazette Awards (2011). We're also ranked 22nd in the 2012 Sunday Times Hiscox Tech Track 100. For all the latest Click news please visit our blog: http://clicktravel.com/blog Think: Do you really need to print this email? ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d