class mypage extends webpage {
  public mypage() {
     service.reset();
     getsession().info(..);
     throw new restartResponseException(getapplication().gethomepage());
  }
}

-igor

2011/2/12 Marcin Zajączkowski <msz...@wp.pl>:
> Hi,
>
>
> In the application I need to have an util page which reloads application
> configuration. No markup is required, page implementation calls reload
> from service layer, set info message in a session and redirect to a
> homepage.
>
> I did it by creating EmptyMarkup class and returning it from
> getMarkupResourceStream (IMarkupResourceStreamProvider interface) in my
> page implementation.
>
> public class EmptyMarkup extends TextTemplate {
>
>    @Override
>    public String getString() {
>        return "";
>    }
>
>    @Override
>    public TextTemplate interpolate(Map<String, Object> variables) {
>        return this;
>    }
>
>
> It works, but looks quite artificial. I think many applications need
> that functionality, so I suspect it can be done more native with Wicket,
> can it?
>
>
> Regards
> Marcin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to