Re: Is fireModelChanged mandatory ?
Franck Routier <[email protected]> Sat, 17 Sep 2005 09:25:03 +0200
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format... ------------=_1126941938-5037-5 Content-Type: multipart/alternative; boundary=Apple-Mail-2-458332338 --Apple-Mail-2-458332338 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi Christian, in fact I'm trying to leverage Diez's repopulation form map using the=20 more "standard" FormUtil.repopulate facilities (and ErrorManager as=20 well). What is cool is Diez work is that the FormMap acts also as a=20 TempalteModel for the form. That's what I am doing as well. So I have to re-implement both FormMap and TemplateModel in my class...=20 I choosed to extend from FormMap as it seems to me is does quite a lot=20 of things, so what I have to is implement TemplateModel, that is=20 TemplateModel itself, Model and Contextual. None of these interfaces specifies a fireModelChanged method. But all=20 implementations have it ! So my question is finally : should I implement it also ? If so, why=20 isn't it part of Model interface ? Thanks a lot, Franck Le 16 sept. 05, =E0 22:54, Christian Cryder a =E9crit : > If you are implementing by extending from one of the abstract=20 > implementations, then you won't need to. If you are implementing from=20 > scratch, then should look at the abstract implementations for=20 > guidance. > > Typically, all the end programmer needs to do is the former, not the=20 > latter. But I don't know exactly what you are doing so I can't say for=20 > sure... > > That help? If you are still unsure, send some more info and I will=20 > try and answer it better for your specific needs. > > Christian > > Franck Routier wrote:So, if I'm implementing Model interface, should=20 > I add such a method (cut and paste from say DefaultTemplateModel),=20 > although it is not really part of the interface contract ? >> >> >> Le 16 sept. 05, =E0 15:40, Christian Cryder a =E9crit : >> >>> >>> >>> fireModelChanged is an internal method - you should never need to=20 >>> invoke it. Basically, it is defined in the various model=20 >>> implementations - when you change data to the model (eg. adding=20 >>> data, removing data, etc), then the model notifies any listeners=20 >>> "hey, something has happened - better refresh yourselves" >>> >>> So this method is an internal communication mechanism for models to=20 >>> talk to the components that use them. >>> >>> THat help? >>> >>> Christian >>> >>> Franck Routier wrote:Hi Barracudans, >>>> >>>> I was just wondering if / where fireModelChanged is defined ? >>>> Is it defined in an interface ? >>>> >>>> I which to implement TemplateModel, which means also implementing=20 >>>> Model and Contextual, but I cannot see fireModelChanged anywhere.=20 >>>> However, all AbstractxxxModel I see are providing a=20 >>>> fireModelChanged() method. >>>> >>>> I was just wondering what this is for, and why it's not defined in=20 >>>> the interfaces if mandatory. >>>> >>>> Thanks, >>>> >>>> Franck >>>> >>>> >>>> >>>> -- >>>> Barracuda mailing list >>>> [email protected] >>>> http://www.objectweb.org/wws/lists/projects/barracuda >>>> >>> >>> >>> -- >>> Christian Cryder >>> Internet Architect, ATMReports.com >>> >>> "Coffee? I could quit anytime, just not today" >>> http://seelifedifferently.blogspot.com >>> >>> >>> -- >>> >>> Barracuda mailing list >>> >>> [email protected] >>> >>> http://www.objectweb.org/wws/lists/projects/barracuda >>> >> >> >> -- >> Barracuda mailing list >> [email protected] >> http://www.objectweb.org/wws/lists/projects/barracuda >> > > > --=20 > Christian Cryder > Internet Architect, ATMReports.com > > "Coffee? I could quit anytime, just not today" > http://seelifedifferently.blogspot.com > > > -- > > Barracuda mailing list > > [email protected] > > http://www.objectweb.org/wws/lists/projects/barracuda > --Apple-Mail-2-458332338 Content-Transfer-Encoding: quoted-printable Content-Type: text/enriched; charset=ISO-8859-1 Hi Christian, in fact I'm trying to leverage Diez's repopulation form map using the more "standard" FormUtil.repopulate facilities (and ErrorManager as well). What is cool is Diez work is that the FormMap acts also as a TempalteModel for the form. That's what I am doing as well. So I have to re-implement both FormMap and TemplateModel in my class... I choosed to extend from FormMap as it seems to me is does quite a lot of things, so what I have to is implement TemplateModel, that is TemplateModel itself, Model and Contextual. None of these interfaces specifies a fireModelChanged method. But all implementations have it ! So my question is finally : should I implement it also ? If so, why isn't it part of Model interface ? Thanks a lot, Franck Le 16 sept. 05, =E0 22:54, Christian Cryder a =E9crit : <excerpt> If you are implementing by extending from one of the abstract implementations, then you won't need to. If you are implementing from scratch, then should look at the abstract implementations for guidance. Typically, all the end programmer needs to do is the former, not the latter. But I don't know exactly what you are doing so I can't say for sure... That help? If you are still unsure, send some more info and I will try and answer it better for your specific needs. Christian Franck Routier wrote:So, if I'm implementing Model interface, should I add such a method (cut and paste from say DefaultTemplateModel), although it is not really part of the interface contract ? <excerpt> Le 16 sept. 05, =E0 15:40, Christian Cryder a =E9crit : <excerpt> fireModelChanged is an internal method - you should never need to invoke it. Basically, it is defined in the various model implementations - when you change data to the model (eg. adding data, removing data, etc), then the model notifies any listeners "hey, something has happened - better refresh yourselves" So this method is an internal communication mechanism for models to talk to the components that use them. THat help? Christian Franck Routier wrote:Hi Barracudans, <excerpt> I was just wondering if / where fireModelChanged is defined ? Is it defined in an interface ? I which to implement TemplateModel, which means also implementing Model and Contextual, but I cannot see fireModelChanged anywhere. However, all AbstractxxxModel I see are providing a fireModelChanged() method. I was just wondering what this is for, and why it's not defined in the interfaces if mandatory. Thanks, Franck <fixed> --</fixed> <fixed> Barracuda mailing list</fixed> <fixed><color><param>0000,0000,EEEE</param>[email protected]</color> = </fixed> <fixed><color><param>0000,0000,EEEE</param>http://www.objectweb.org/wws/lis= ts/projects/barracuda</color> </fixed> </excerpt> -- Christian Cryder Internet Architect, ATMReports.com <italic>"Coffee? I could quit anytime, just not today"</italic>=20 <italic><color><param>0000,0000,EEEE</param><smaller>http://seelifedifferen= tly.blogspot.com</smaller></color></italic>=20 -- Barracuda mailing list <color><param>0000,0000,EEEE</param>[email protected]</color>=20 <color><param>0000,0000,EEEE</param>http://www.objectweb.org/wws/lists/proj= ects/barracuda</color>=20 </excerpt><fixed> -- Barracuda mailing list <color><param>0000,0000,EEEE</param>[email protected]</color> <color><param>0000,0000,EEEE</param>http://www.objectweb.org/wws/lists/proj= ects/barracuda</color> </fixed> </excerpt> --=20 <fontfamily><param>Arial</param>Christian Cryder</fontfamily> <fontfamily><param>Arial</param> Internet Architect, <color><param>0000,0000,EEEE</param>ATMReports.com</color></fontfamily> <italic>"Coffee? I could quit anytime, just not today"</italic> <italic><color><param>0000,0000,EEEE</param><smaller>http://seelifedifferen= tly.blogspot.com</smaller></color></italic> -- Barracuda mailing list [email protected] http://www.objectweb.org/wws/lists/projects/barracuda </excerpt>= --Apple-Mail-2-458332338-- ------------=_1126941938-5037-5 Content-Type: text/plain; name="message-footer.txt" Content-Disposition: inline; filename="message-footer.txt" Content-Transfer-Encoding: 8bit -- Barracuda mailing list [email protected] http://www.objectweb.org/wws/lists/projects/barracuda ------------=_1126941938-5037-5--