Community
Participate
Working Groups
The MultiCellWidget tries to load images that are not yet set for a cell. This causes GET requests without path against the servlet and confuses the request counter. We should not set the background image style if we don't have any image. public class DemoWorkbench implements IEntryPoint { public int createUI() { try { Display display = new Display(); Shell shell = new Shell( display ); shell.setLayout( new FillLayout() ); Composite c1 = new Composite( shell, SWT.BORDER ); c1.setSize( 100, 100 ); Menu menu = new Menu( shell, SWT.POP_UP ); createItem( display, menu ); c1.setMenu( menu ); shell.setSize( 300, 300 ); shell.open(); while( !shell.isDisposed() ) { if( !display.readAndDispatch() ) display.sleep(); } } catch( Exception e ) { e.printStackTrace(); } return 0; } private void createItem( Display display, Menu menu ) { MenuItem item = new MenuItem( menu, SWT.CHECK ); item.setText( "Popup" ); item.setImage( display.getSystemImage( SWT.ICON_ERROR ) ); item.setSelection( true ); item.addSelectionListener( new SelectionAdapter() { public void widgetSelected( SelectionEvent e ) { super.widgetSelected( e ); System.out.println("selection"); } }); } }
Just right click to open the menu, this will cause the GET request and kills the session. So when selecting the item afterwards the session is already dead.
Created attachment 145658 [details] Fix for MultiCellWidget Using "background-image:none" instead of "background-image:URL()"
Applied patch to CVS HEAD.