Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Re: MVC pattern...

Expand Messages
  • Satyam
    ... AttributeProvider automatically fires xxxxChange and beforeXxxxChange whenever attribute xxxx is changed. The beforeXxxxChanged allows you to cancel
    Message 1 of 7 , Dec 6, 2008
    • 0 Attachment
      >
      >> Hello
      >>
      >> Very, very interesting:) CelsiusChange, KelvinChange, FahrenheitChange
      >> is there something like pre-defined <Element>Change event for
      >> AttributeProvider? Or do I have to 'register' it somewhere else?
      >> Forgive me my ignorance;(
      >>
      >> Regards
      >> Darek
      >>
      >>
      >>
      AttributeProvider automatically fires 'xxxxChange' and
      'beforeXxxxChange' whenever attribute xxxx is changed. The
      beforeXxxxChanged allows you to cancel the change by returning false.

      The sequence when setting an attribute is:

      1. Check readOnly and writeOnce status, reject if not allowed
      2. Call validator, reject if validator returns false
      3. Fire beforeChange event, reject if returns false
      4. Call function assigned to 'method' property.
      5. Save value
      6. Fire Change event
      7. mark property as written

      Rejection is signaled by returning false to the caller.

      Satyam
    Your message has been successfully submitted and would be delivered to recipients shortly.