In wdDoInit of view controller set value of "visibility" attribute (related to TextView) to WDVisibility.NONE and "enabled" ( Timer) to false.Create and assign action for Timer OnTimeout event.Create Timer control bind its "enabled" property to context attribute of type boolean set interval of timer to 1 (one second, the lowest possible value).Create TextView for message bind its "visibility" property to context attribute of type Vsibility either set text of TextView to some static value, or bind it to string context attribute.Let us imaging that you in fact have to display explanatory message when user invokes long-running operation. Most importantly, you can't add any descriptive message/explanation for currently executed action, kind of "Importing CSV file (10 Mb), please wait." To overcome this limitation (up to certain extent, sure), you may use WD Timer control (do not confuse with JavaScript timer). The first issue is that you can not alter indicator in any way. However, there are some situations when this functionality is not enough or even not available at all. Anyway, WD HTML client provides good enough implementation of "progress indicator" out of the box. Note that it's just internal details of current implementation, things may change in future releases. If server-side processing takes more then one second, the timer fires and WD client shows well-known animated image centered on page that stays until operation completes and response is returned. Second, client-side JavaScript timer is set for approximately one second. Technically, size of region reserved for scroll bars is not subtracted, so you can see how scrollbar(s) appears when you are invoking certain action and disappears afterwards. By the way, certain WD versions have small CSS/JavaScript bug - the DIV used as glass pane has larger size then necessary. This is well-known "glass pane" trick - user still sees content of page but may not interact with it while all events (key press, mouse clicks etc) are "eaten" by glass pane. First, the whole HTML page is covered with transparent DIV element. Moreover, certain changes to client UI is done. When user invokes operation that requires server action ( Button or LinkToAction click, Tablelead selection change etc), client-side JavaScript issues HTTP request to server. WebDynpro HTML client is not an exception here (probably, SmartClient as well). Typically, UI developers use some kind of progress indicator or just an animation that informs user about long-running operation and (optionally) provides progress information either as percent of job done, or number of items processed, or both. Actually, this is a time before user gets nervous and tries to resubmit data or to perform other "destructive" actions. In real-life applications there are some operations that take more then "user-thinking" time (up to half a second for desktop applications, two seconds for web applications).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |