Bug 401517 - [Tree] Not able to deal with expand and topItemIndex in same request
Summary: [Tree] Not able to deal with expand and topItemIndex in same request
Status: ASSIGNED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 397590
Blocks:
  Show dependency tree
 
Reported: 2013-02-22 06:30 EST by Moritz Post CLA
Modified: 2013-06-26 04:14 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Post CLA 2013-02-22 06:30:50 EST
When scrolling down to the last item on the first level of a tree and expanding the last item we send a request that has both the expansion as well as the topItemIndex property:

{"head":{"requestCounter":37},"operations":[["set","w1",{"focusControl":"w6"}],["set","w120",{"expanded":true}],["notify","w6","Expand",{"item":"w120"}],["set","w6",{"topItemIndex":97}]]}

The server does not honor the topItemIndex so it only sends one or two items that would fit into the viewport as if the tree is still srolled to the bottom.

Sending the expand and topItemIndex in two requests works as expected.
Comment 1 Ivan Furnadjiev CLA 2013-02-22 06:41:40 EST
(In reply to comment #0)
> When scrolling down to the last item on the first level of a tree and
> expanding the last item we send a request that has both the expansion as
> well as the topItemIndex property:
> 
> {"head":{"requestCounter":37},"operations":[["set","w1",{"focusControl":
> "w6"}],["set","w120",{"expanded":true}],["notify","w6","Expand",{"item":
> "w120"}],["set","w6",{"topItemIndex":97}]]}
> 
> The server does not honor the topItemIndex so it only sends one or two items
> that would fit into the viewport as if the tree is still srolled to the
> bottom.
> 
> Sending the expand and topItemIndex in two requests works as expected.

Currently, topItemIndex property is handled by TreeLCA and expanded property by TreeItemLCA. As TreeLCA is visited first, topItemIndex is set before the item is been expanded. I think that it's not possible (or too hard) for the web client to set these two properties in a same request (click on the expand sign and scroll with mouse wheel before the request is sent).
Anyway... we have plans to process the message sent by the client directly (respecting the order) and not using LCAs in the future. But probably this will happen in RAP 2.2.