| Summary: | [Grid] Selection comes before creation events | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Ian Bull <irbull> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ivan |
| Version: | unspecified | ||
| Target Milestone: | 2.3 M2 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
We had the same situation with topItemIndex, which is already fixed. We could use the same technique (in Tree/TableLCA#renderAfterItems) to render the selection after all items. Fixed with change https://git.eclipse.org/r/21745. Now Tree/Table selection/focus item/sort column are rendered after all items/columns operations. |
I got the following set of operations from the RAP Server: [SetOperation [getTarget()=w440, getProperties()=Properties [propertiesMap={focusItem=w461, selection=[w461]}]]] [CreateOperation [type=rwt.widgets.GridItem, getTarget()=w458, ...] [CreateOperation [type=rwt.widgets.GridItem, getTarget()=w459, ...] [CreateOperation [type=rwt.widgets.GridItem, getTarget()=w460, ...] [CreateOperation [type=rwt.widgets.GridItem, getTarget()=w461, ...] As you can see, the selection event (for w461) comes before the creation event for w461. This becomes tricky to handle. While I can queue this up, it's not clear if this is still relevant when the create operation finally comes (let's say the user has selected something else in the mean-time). Furthermore, because selection is actually an array, should we wait for some of the create events to come, all of the create events to come, or somehow handle appending the selection as they comes (keeping in mind that the user may also change the selection during the period). Is it possible to change the logic and only fire selection events to the client for elements that have already been created?