Tuesday, August 23, 2005

Refactored the model of returning HTML to client

Previously, the IAttrInput and IAttrView objects only had a ToHtml() method. The caller of these methods needed to determine which DOM id (e.g. ‘xxx’ is the DOM id of <div id=”xxx”>) should have its HTML replaced with the ToHtml() return value.
This limited the ability of input and view objects to control the changes to the client. It could only return one HTML block and could not request the client “close popout window”.
Now, the HtmlResponse object is passed into these objects, and they can add multiple Content and Close actions. That is, they can tell the client to change the Content of multiple DOM ids, and tell the client to Close other DOM ids (remove the id from the parent).
Also, instead of passing returnIDs between the client and the server, now the appropriate DOM id is calculated/derived from the atttrId.

0 Comments:

Post a Comment

<< Home