Announcement Announcement Module
Collapse
No announcement yet.
showView and ShowViewMenu Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • showView and ShowViewMenu

    Hi,

    I started a new application from the archetype. In this application I added a menu with some commands. Here an example of a command.


    Code:
    package test.command;
    
    import org.springframework.richclient.command.support.ApplicationWindowAwareCommand;
    
    public class Test1Command extends ApplicationWindowAwareCommand {
    
    	public Test1Command() {
    		super("testCommand");
    	}
    
    	public Test1Command(String arg0) {
    		super(arg0);
    		// TODO Auto-generated constructor stub
    	}
    
    	@Override
    	protected void doExecuteCommand() {
    		this.getApplicationWindow().showPage("test1");
    	}
    
    }
    I have few commands like this one.(test1,test2,...) and there corresponding views (Those view are copy of the Archetype InitialView)

    Now, in the other hand I kept the ShowViewMenu. The strange behavior is when I select a view via the ShowViewMenu, the requested via appear but I can't change it from my testx command. After selecting the command testx corresponding to the current view, I can again navigate through all views via the testx commands.

    Isn't it strange?

    Also when I select a command testx I get the message
    Creating new DefaultApplicationPage
    is it normal too?

    Thanks
    Dominique

  • #2
    Hi,

    I found my misstake, If have to use

    Code:
    		this.getApplicationWindow().getPage().showView("test1");
    instead of

    Code:
    		this.getApplicationWindow().showPage("test1");

    Comment

    Working...
    X