Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Installation startingPageId at initialization ApplicationLifecycleAdvisor

  1. #1
    Join Date
    Nov 2005
    Posts
    9

    Default Installation startingPageId at initialization ApplicationLifecycleAdvisor

    Why obligatory installation startingPageId is required at initialization ApplicationLifecycleAdvisor?
    In some situations in it there is no necessity.

  2. #2
    Join Date
    Nov 2005
    Posts
    9

    Default

    It is possible to remove or bypass this restriction?

  3. #3
    Join Date
    Aug 2005
    Location
    Austin, TX
    Posts
    425

    Default

    The current implementation classes expect there to be an "initial" page (view) to display. How is your UI organized if this is not the case? If your UI model is sufficiently different, you may need to override some of the initial application construction logic to remove the use of an initial page id. I can't really provide much help without knowing what you're trying to accomplish.

    Larry.

  4. #4
    Join Date
    Aug 2005
    Location
    London (the English one!)
    Posts
    378

    Default

    One possibility, an MDI application may not need to have 1 internal frame on startup.
    Rgds
    Benoit

  5. #5
    Join Date
    Nov 2005
    Posts
    9

    Default

    Thanks all for the answer!

    Larry, possible some variants of usecase application. Therefore it is impossible to set starting page. It is possible to make certainly something like " Welcome page ", but it only one of variants to bypass necessity of the use of an initial page id.
    Where I need to override some of the initial application construction logic to remove the use of an initial page id?

    Ivan.

  6. #6
    Join Date
    Nov 2005
    Posts
    9

    Default

    Quote Originally Posted by benoitx
    One possibility, an MDI application may not need to have 1 internal frame on startup.
    Rgds
    Benoit
    StartingPageId required in the ApplicationLifecycleAdvisor.
    Code:
    public abstract class ApplicationLifecycleAdvisor implements InitializingBean {
    ...
        public void afterPropertiesSet() throws Exception {
            final Properties systemProperties = System.getProperties();
            if (systemProperties.get(EXCEPTION_HANDLER_KEY) == null) {
                systemProperties.put(EXCEPTION_HANDLER_KEY, getEventExceptionHandler().getName());
            }
            Assert.state(startingPageId != null,
                    "startingPageId must be set: it must point to a page descriptor, or a view descriptor for a single view per page");    }
    ...
    }

  7. #7
    Join Date
    Aug 2005
    Location
    Austin, TX
    Posts
    425

    Default

    The answer to "what needs to be overridden" depends on what you want your application to do when it first starts up. That's why I asked the question.

    But, since you quoted Benoit's comment about MDI applications, then you should probably do a search on this forum for MDI support. There have been several threads on the topic and they may have the answers you're looking for.

    Larry.

  8. #8
    Join Date
    Aug 2004
    Posts
    109

    Default

    lifecycle advisor is one place but there is also DefaultApplicationWindow that will implicitly require pageId that wil have to refer to an element (view or page descriptor) in your app context.

    It is not that simple to bypass it. Some of the methods that you would needto overwrite are final so you would have to come up with your own hieararchy.

    The way of least resistance for me was to create a NoBannerPage and NoBannerCapablePageApplicationWindow. Then just declare the empty page in your app context and empty page is displayed.

    If you want code for those pages and instructions on how to set them up, let me know and I will zip them up for you.
    Thanks,
    Alex.

  9. #9
    Join Date
    Nov 2005
    Posts
    9

    Default

    Thanks for the reply, Larry.

    I do not want to set View by default since in this case it is not present
    There are two variants of the decision of a problem:
    1) ApplicationWindow 0..1 ApplicationPage (now ApplicationWindow 1..1 ApplicationPage)
    2) ApplicationPage 0..* View (now ApplicationPage 1..* View)

    Ivan.

  10. #10
    Join Date
    Nov 2005
    Posts
    9

    Default

    Thanks for the reply!

    Quote Originally Posted by bpolka
    lifecycle advisor is one place but there is also DefaultApplicationWindow that will implicitly require pageId that wil have to refer to an element (view or page descriptor) in your app context.
    I know. But mdi DesktopApplicationWindow (about which spoke benoitx) not required default view.

    Quote Originally Posted by bpolka
    It is not that simple to bypass it. Some of the methods that you would needto overwrite are final so you would have to come up with your own hieararchy.

    The way of least resistance for me was to create a NoBannerPage and NoBannerCapablePageApplicationWindow. Then just declare the empty page in your app context and empty page is displayed.

    If you want code for those pages and instructions on how to set them up, let me know and I will zip them up for you.
    I with gratitude shall take part your help.

    P.S. Sorry for english. I use PROMT.

Posting Permissions

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