Results 1 to 2 of 2

Thread: showView and ShowViewMenu

  1. #1
    Join Date
    Sep 2006
    Location
    Belgium
    Posts
    70

    Default 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. #2
    Join Date
    Sep 2006
    Location
    Belgium
    Posts
    70

    Default

    Hi,

    I found my misstake, If have to use

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

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •