Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Grid jumps to beginning (topIndex == 0)
Grid jumps to beginning (topIndex == 0) [message #1288289] Tue, 08 April 2014 12:39 Go to next message
Joachim Butz is currently offline Joachim ButzFriend
Messages: 7
Registered: June 2011
Junior Member
I am having the following problem in a Grid in RAP.
I am selecting a value from a CellEditor (dropDown).
After this selection my Grid always jumps back to the beginning (topIndex == 0).

I found out, that, when selecting a value from the CellEditor, TextSizeRecalculation.forceShellRecalculations(Shell) is triggered.
This calls TextSizeRecalculation.enlargeShell(Shell), which also increments the height of the grid by 1000 pixels.
As a result the grid thinks it is big enough to display its content and that's why the topIndex becomes 0 (see Grid.updateScrollBars()).

When I uncomment the following lines from TextSizeRecalculation.forceShellRecalculations(Shell), it works, i.e. the my Grid does not jump to the beginning.
// enlargeShell( shell );
// enlargeScrolledCompositeContent( shell );

I have two questions regarding this problem:
*) What is the purpose behind enlargeShell( shell ) and enlargeScrolledCompositeContent( shell ) ?
*) What possibilities do I have to workaround this problem?
- I have tried to buffer and restore the topIndex of the Grid (analogous to bufferScrolledCompositeOrigins and restoreScrolledCompositeOrigins), but this did not work.

Re: Grid jumps to beginning (topIndex == 0) [message #1288317 is a reply to message #1288289] Tue, 08 April 2014 13:01 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 1872
Registered: July 2009
Senior Member
Hi Joachim,
are you talking about Nebula Grid component from the incubator or RWT
Tree/Table? I believe that this issue does not exist in RWT Tree/Table.
Which RAP version are you using?
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Grid jumps to beginning (topIndex == 0) [message #1288362 is a reply to message #1288317] Tue, 08 April 2014 13:55 Go to previous messageGo to next message
Joachim Butz is currently offline Joachim ButzFriend
Messages: 7
Registered: June 2011
Junior Member
Yes, I was talking about the Nebula Grid from the incubator. I am using RAP 2.2.
Re: Grid jumps to beginning (topIndex == 0) [message #1288371 is a reply to message #1288362] Tue, 08 April 2014 13:59 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 1872
Registered: July 2009
Senior Member
Hi Joachim,
please open a bugzilla and I'll take care about it. Will be good, if you
provide a snippet to reproduce the issue.
Thanks,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Grid jumps to beginning (topIndex == 0) [message #1290651 is a reply to message #1288371] Thu, 10 April 2014 09:59 Go to previous messageGo to next message
Joachim Butz is currently offline Joachim ButzFriend
Messages: 7
Registered: June 2011
Junior Member
Hi Ivan,

I found out that the jumping was due to customizations in the target platform, which my company did to implement GridColumn.setWordWrap(boolean).
When I disable our wordwrap customizations and use the unchanged RAP 2.2 platform, everything works fine, no jumping occurs.
I'm sorry for the inconvenience, I should have checked that beforehand.

In RCP GridColumn.setWordWrap(boolean) is implemented via GridCellRenderer.
Is it planned in the near future, that GridColumn.setWordWrap(boolean) is implemented for RAP also?

Regards,
Joachim
Re: Grid jumps to beginning (topIndex == 0) [message #1290702 is a reply to message #1290651] Thu, 10 April 2014 10:55 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 1872
Registered: July 2009
Senior Member
Hi Joachim,
I'm sorry to say, but this feature it's not in our plans in close
future. Nevertheless, if you want to contribute an implementation
(preferable with JUnit tests), that will be great.
Best,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Form based login & Session expiry
Next Topic:Restart workbench in a new VM process
Goto Forum:
  


Current Time: Thu Dec 18 20:17:38 GMT 2014

Powered by FUDForum. Page generated in 0.01659 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software