Ticket #11 (closed defect: fixed)
registerRequiresPostBack
| Reported by: | xue | Owned by: | xue |
|---|---|---|---|
| Priority: | major | Milestone: | 3.0beta |
| Component: | Prado Framework v3 | Version: | |
| Severity: | Keywords: | ||
| Cc: |
Description (last modified by xue) (diff)
Currently, if a control wants to use postback functionality, it has to use the following lines, sometimes with a few inline javascript code (such as Event.stop(e);),
$options = $this->getAutoPostBackOptions(); $scripts = $page->getClientScript(); $postback = $scripts->getPostBackEventReference($this,'',$options,false); $scripts->registerClientEvent($this, "click", $postback);
I suggest we eliminate the inline javascript code and simplify the above lines into the following line only,
$this->getPage()->registerRequiresPostBack($this->getPostBackOptions());
To do so, TPostBackOptions need a few more properties, including EventTarget, EventParameter, and EventName.
Change History
Note: See
TracTickets for help on using
tickets.
