Update the Client view any time later after the first time? [message #1062194] |
Thu, 06 June 2013 13:27 |
Ferran Siles Vila Messages: 11 Registered: March 2013 |
Junior Member |
|
|
Hello,
I am struggling with an issue, after loading through the Client's Desktop object some inner specific objects (subclasses of AbstractMenu), which make displaying menu options, and just like that, their drill down suboptions inside of them (which are implemented with the same AbstractMenu superclass), why when the parent menu´s execAction() method is executed, which is called from within any of its suboptions, can't fulfill the reloading of text in these submenus through the respective call of their own getConfiguredText()?
In order to get the expected changes at the display of Desktop after the first load of it, what has to be called instead from the menu's (SwitchLDAPLibrary) method 'execAction()' when this is called from any of the submenu's widgets.
Thank you for your time.
Here it is the "Desktop" class'code snippet to clarify my question:
...
import org.eclipse.scout.rt.client.ui.action.menu.AbstractMenu;
import org.eclipse.scout.rt.client.ui.action.menu.IMenu;
import org.eclipse.scout.rt.client.ui.desktop.AbstractDesktop;
import org.eclipse.scout.rt.client.ui.desktop.IDesktop;
import org.eclipse.scout.rt.client.ui.desktop.outline.IOutline;
import org.eclipse.scout.rt.client.ui.desktop.outline.pages.IPage;
....
public class Desktop extends AbstractDesktop implements IDesktop {
private static IScoutLogger logger = ScoutLogManager.getLogger(Desktop.class);
public Desktop() {
}
...
@Override
protected void execOpened() throws ProcessingException {
...
}
...
@Order(22.0)
//option in Menu Bar
public class SwitchLDAPLibrary extends AbstractMenu {
private boolean mozillaL = true;
@Override
protected String getConfiguredText() {
return "Switch LDAP Library";
}
//// //!!Why does this not work, later after loading the Desktop View the first time, when we try to load again this Desktop View!!?
@Override
public void execAction() throws ProcessingException {
//!! maybe "getChildActions()" is the misused critical one
MozillaLibrary mozL = (MozillaLibrary) this.getChildActions().get(0);
ApacheLibrary apaL = (ApacheLibrary) this.getChildActions().get(1);
mozL.getConfiguredText();
apaL.getConfiguredText();
ArrayList<IMenu> newChildActions = new ArrayList<IMenu>();
newChildActions.add(0, mozL);
newChildActions.add(1, apaL);
this.setChildActions(newChildActions);
}
@Order(100.0)
//suboption1 in Menu Bar
public class MozillaLibrary extends AbstractMenu {
@Override
protected String getConfiguredText() {
...
return text;// variable 'text' is different depending on the casuistry
}
@Override
//!!!when this MozillaLibrary submenu is clicked calls this execAction(),
// which calls parent SwitchLDAPLibrary.this.execAction(); ->
public void execAction() throws ProcessingException {
mozillaL = true;
SERVICES.getService(ILDAPOutlineService.class).switchToMozillaLDAPLibrary();
SwitchLDAPLibrary.this.execAction();
}
}
@Order(120.0)
//subtion2 (analogous to the suboption2) in Menu Bar
public class ApacheLibrary extends AbstractMenu {
....
}
}
}
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03591 seconds