Results 1 to 4 of 4

Thread: Change title of pages using AbstractWizard FormController

  1. #1
    Join Date
    Jan 2009
    Posts
    2

    Default Change title of pages using AbstractWizard FormController

    Hi, im using AbstractWizardFormController for little flow of portlet pages. I have defined MessageSourceResourceBundle in my application context for localization purposes.

    I want to set each page's title according to message in message source. When i was using simple Controller i just had to put something like response.setTitle( messageSource.getMessage ("label.mainTitle", null, renderRequest.getLocale())) in handleRenderRequest(..) of my controller.

    But how can I set each page title with AbstractWizardFormController? I didn't find suitable method for this.
    Thnx for any help.

  2. #2
    Join Date
    Sep 2004
    Location
    Arizona, USA
    Posts
    383

    Default

    Do it in showPage for each of the form pages, and then potentially in renderFinish and renderCancel.

  3. #3
    Join Date
    Jan 2009
    Posts
    2

    Default

    thnx for reply.
    But showPage(HttpServletRequest request,
    BindException errors,
    int page)
    don't have any kind of Response, so i cannot use response.setTitle(...)

  4. #4
    Join Date
    Sep 2004
    Location
    Arizona, USA
    Posts
    383

    Default

    Ugh. Good point. I don't see any clear way to do it for page displays. So, I think that leaves you with two options: 1) Use an interceptor. 2) Write an annotation-based controller instead so you have much more flexibility. I can point you at some sample code for an "AbstractWizardFormController"-style annotation-based controller if you need it.

Tags for this Thread

Posting Permissions

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