Johan, I don't know what you have been drinking, but it must have
contained alot of alcohol ;).

To determine at runtime if the application is running in development
mode we use the following code in Application.init. Note that this
code runs before super.init(), unfortunately we cannot place this code
in the constructor because it uses some field that have not been set
at that time.

WicketServlet wicketServlet = getWicketServlet();
String configuration =
wicketServlet.getInitParameter(Application.CONFIGURATION);
if (configuration == null)
configuration =
wicketServlet.getServletContext().getInitParameter(Application.CONFIGURATION);
development = configuration != null &&
configuration.equals(Application.DEVELOPMENT);

development is a global boolean field we added so we can now ask the
application at anytime if we are in development mode.
This code btw came from Johan.

On 7/21/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> The problem is that you want to know at code time
>
> This is also something Maurice wanted to know. He does it do now by checking
> another value
> that he knows is there in development but not in deployment.
>
> johan
>
>
>
> On 7/21/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> > I think it is logged in the log4j log.
> >
> > Martijn
> >
> > On 7/21/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > > This can't be done that easily at the moment.
> > > If you don't alter this:
> > > getAjaxSettings().setAjaxDebugModeEnabled(true);
> > > yourself then you could ask for the ajax debug model enable property..
> > >
> > > We should have an settings.getModel() i guess would be nice.
> > > Can you make a RFE for this?
> > >
> > > johan
> > >
> > >
> > >
> > > On 7/21/06, Paolo Di Tommaso < [EMAIL PROTECTED]> wrote:
> > > >
> > >
> > > How to know if an application is in Deployment or Development mode?
> > >
> > > Thank for helping.
> > >
> > > - Paolo
> > >
> > >
> > >
> -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > > opinions on IT & business topics through brief surveys -- and earn cash
> > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > >
> > > _______________________________________________
> > > Wicket-user mailing list
> > >  Wicket-user@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> > >
> > >
> > >
> -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > > opinions on IT & business topics through brief surveys -- and earn cash
> > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > >
> > > _______________________________________________
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> > >
> >
> >
> > --
> > Download Wicket 1.2 now! Write Ajax applications without touching
> JavaScript!
> > -- http://wicketframework.org
> >
> >
> -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys -- and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to