| Forum: Remote Application Platform (RAP) |
|---|
| Topic: How to get install folder of the application? |
|---|
| Re: How to get install folder of the application? [message #1060300 is a reply to message #1060146] |
Fri, 24 May 2013 00:07 |
Yury Mising name Messages: 55 Registered: May 2010 Location: Russia |
Member |
|
|
Hello, Ralf!
First of all - thank you for the links!
Lazy initialization is a way to resolve the problem, but in this case I have to call lazy initialization method from many places, because our application works not only with UISessions users, but with users connected by http to some our HttpServlets also that do not care about RAP 
Julia Kurde wrote on Thu, 23 May 2013 16:20Hi Yuri,
If you read them in the PluginActivator.start() they are only read when the application starts the first time.
Regards,
Julia
That is what I want - read settings on application (not workbench or UISession) initialization. I suppose solution of the https://bugs.eclipse.org/bugs/show_bug.cgi?id=401219 will help me.
Best regards,
Yury.
|
|
|
| Topic: MenuItems have a wrong order in Menu |
|---|
| MenuItems have a wrong order in Menu [message #1060301] |
Fri, 24 May 2013 00:24 |
Yury Mising name Messages: 55 Registered: May 2010 Location: Russia |
Member |
|
|
Hello, RAP community!
Try to describe the problem here. If menu has a show event listener which add some menu items in specified positions - they will be added with +1 position shift.
It seems to me the problem is here (Menu.js):
_menuShown : function() {
if( !rwt.remote.EventUtil.getSuspended() ) {
if( this._hasShowListener ) {
// create preliminary item
if( this._preItem == null ) {
this._preItem = new rwt.widgets.MenuItem( "push" );
this._preItem.setText( "..." );
this._preItem.setEnabled( false );
this.addMenuItemAt( this._preItem, 0 );
}
...
}
}
We add the _preItem on show event and hide all menu children for a time.
The listener add some menu items with specified positions - it calls the method Menu.addMenuItemAt(...).
addMenuItemAt : function( menuItem, index ) {
// seperator does not have this function:
if( menuItem.setParentMenu ) {
// it is essential that this happens before the menuItem is added
menuItem.setParentMenu( this );
}
this._layout.addAt( menuItem, index );
}
But the specified position does not correspond the real position in children list, because the _preItem has been added to the top (and it will not be removed) which create +1 position shift.
Thin we must check _preItem in addMenuItemAt to correct insert position.
PS It takes more time to provide a snippet, but I hope my description is clear. The same code works fine in RCP.
Best regards,
Yury.
|
|
|
Powered by
FUDForum. Page generated in 0.02247 seconds