Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 287681 - [Menu] causes session timeout due to emtpy image
Summary: [Menu] causes session timeout due to emtpy image
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.3   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: 1.3 M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-26 06:58 EDT by Benjamin Muskalla CLA
Modified: 2009-08-27 16:52 EDT (History)
2 users (show)

See Also:


Attachments
Fix for MultiCellWidget (4.73 KB, patch)
2009-08-26 07:45 EDT, Tim Buschtoens CLA
ivan: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2009-08-26 06:58:19 EDT
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");
      }
    });
  }
}
Comment 1 Benjamin Muskalla CLA 2009-08-26 07:01:23 EDT
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.
Comment 2 Tim Buschtoens CLA 2009-08-26 07:45:38 EDT
Created attachment 145658 [details]
Fix for MultiCellWidget

Using "background-image:none" instead of "background-image:URL()"
Comment 3 Rüdiger Herrmann CLA 2009-08-26 07:55:31 EDT
Applied patch to CVS HEAD.