Comments (6)
Yes... the row height is calculated on the client and send to the server with the next request. I can only suggest a workaround here (re-layout the editor with timerExec):
@Override
protected void createContents( Composite parent ) {
parent.setLayout( null );
Grid grid = new Grid( parent, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL );
grid.setData( RWT.MARKUP_ENABLED, true );
grid.setAutoHeight( true );
grid.setBounds( 100, 100, 500, 500 );
GridColumn actionCol = new GridColumn( grid, SWT.NONE );
actionCol.setText( "Action" );
actionCol.setMinimumWidth( 200 );
GridColumn textCol = new GridColumn( grid, SWT.NONE );
textCol.setText( "Textcolumn" );
textCol.setWidth( 200 );
generateItem( grid, "multi <br/> line" );
generateItem( grid, "single line" );
parent.getDisplay().timerExec( 100, new Runnable() {
@Override
public void run() {
for( GridItem item : grid.getItems() ) {
( ( GridEditor )( item.getData( "editor" ) ) ).layout();
}
}
} );
}
void generateItem( Grid grid, String txt ) {
GridItem item = new GridItem( grid, SWT.NONE );
item.setText( 1, txt );
Button b = new Button( grid, SWT.PUSH );
b.setText( "button" );
GridEditor editor = new GridEditor( grid );
editor.minimumWidth = 150;
editor.minimumHeight = 10;
editor.setEditor( b, item, 0 );
item.setData( "editor", editor );
}
}```
from org.eclipse.rap.
Thanks for the hint regarding the workaround.
This used to work when the row-hight was calculated immediatly on the client, but because height-calculation is now performed somehow asynchronous ( #75 ) sometimes the 100ms delay is enough and sometimes even 500ms is too short (large page, garbage collection hick-up, etc).
from org.eclipse.rap.
I'm about to fix issue #75 today.
from org.eclipse.rap.
The timerExec
is only needed to start a server push request and trigger another UI request with updated item "height" property. The actual delay here is not important. Of course, this workaround will work after issue #75 is fixed (pull request is created).
from org.eclipse.rap.
About the workaround: To eliminate editor flickering when resizing it, you can create the editors in timerExec
instead of calling layout
.
from org.eclipse.rap.
Did you try the workaround? Can we close this issue as wontfix?
from org.eclipse.rap.
Related Issues (20)
- Retry on connection error doesn't work with CSP enabled
- Handling network connection error with SeverPush active HOT 7
- Missing requirement: org.eclipse.rap.rwt.osgi 3.22.0.20220708-1200 requires 'java.package; javax.servlet [4.0.0,5.0.0)' but it could not be found HOT 3
- RAP version which support jboss8 and openjdk17 HOT 7
- Ampersand character ommited from label text HOT 1
- selection in not yet focused multiline Text widget HOT 2
- CSRF security HOT 2
- Focus issues with ContextMenu in Chrome/Edge browser
- pack column for Tableviewer
- Copy of photo is stored on server and never cleaned up
- Support for SVG Images for Actions, Commands and Menu's for HighDPI and zooming support
- Missing RAP artifacts in maven central HOT 2
- JS crash in rwt.event.DomEvent.isAltGrPressed() while drag'n'drop HOT 1
- [Grid] Index out of bounds exception when using cell selection and setItemCount HOT 2
- org.eclipse.rap.rwt.client.service.ClientInfo.getClientTimezoneOffset() returns invalid value after a daylight saving change
- Infinite loop in RAPDragTracker
- Memory leaks using Display.timerExec with push session active
- Mouse up / down event not triggering on table header click or select HOT 7
- Improve deployment of realease artefacts to Maven Central
- Wrong handling error in ServerPush.js / Connections.js HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org.eclipse.rap.