From: Goldsack, P. <pat...@hp...> - 2006-10-05 15:23:34
|
=20 Omer =20 There are two ways to handle an update to an attribute, and I think (if I understood correctly) that you mentioned them both in your email: =20 1) to re-read just before the value needs to be used and not to cache it in an variable, or at least to re-read on a sufficiently frequent basis in a thread, say, and update the cached variable =20 2) to overwrite the sfReplaceAttribute method not only call the "super" method, but also to look at the attribute to decide if some special action needs to be taken - such as update a variable, or start a thread to carry out some action, and so on. =20 Patrick =20 ________________________________ From: sma...@li... [mailto:sma...@li...] On Behalf Of Omer Khalid Sent: 04 October 2006 15:12 To: Smartfrog Support Subject: [Smartfrog-support] Updating an attribute ! Hi, I am wondering is it possible to update an attribute for an already deployed component e.g. lets suppose in the component configuration I have an attribute named "save" which is set to "false".=20 During the deployment process of component its being resolved, and the value "false" is set to a local variable with in that component. Then at later stage, if a user wants to update attribute "save" using the managementConsole, and set its to "true".=20 Would following be the right approach to read the new value by simply resolving the attributing again in a certain function to use the later "save" value or the sfReplaceAttribute have to be called rather than resolving the attibute!=20 Regards Omer --=20 --------------------------------------------------------------- =20 CERN - European Organization for Nuclear Research=20 Information Technology Department CH-1211 Geneva 23=20 Phone: +41 (0) 22 767 7996 Fax: +41 (0) 22 767 4900 E-mail : Ome...@ce...=20 |