hmm...I guess I'm not being clear enough.

Say in your run of the mill Java CLI programs. If I would like this
program to start in demo mode to show certain messages, then I would
do:
java programName demo
The program would see the 'demo' argument in the main method.

In the GWT case, I would like to be able to do the same to the server.
The client's GUI can already act in normal or demo mode based on one
initial "is-the-server-running-in-demo-mode" GWT-RPC call to the
server. At the moment the RPC implementation is just hardcoded to
return a static final boolean. The server's code also looks at this
variable in various places to decide whether a piece of functionality
should act in normal or demo mode.

Obviously using a variable in this way is pointless as I would have to
recompile the code and redeploy the WAR file if I wanted to change
modes. Hence, if I was able to use something like argv[] in the CLI
example, it would just be a matter of restarting the server with
different arguments.

I hope thats made my use case a bit clearer.


Sunny



On Apr 22, 12:12 pm, Ian Bambury <[email protected]> wrote:
> If the user is logging in, just have a mode-flag in the user record and pass
> it back to the client. Or am I missing something?
>
> Ian
>
> http://examples.roughian.com
>
> On 22 April 2010 01:53, [email protected] <[email protected]> wrote:
>
>
>
>
>
> > Thanks for the reply. Having read through the deferred binding I can
> > see how it can be useful on the client side to determine whether the
> > normal/demo is loaded.
>
> > However, whats bothering me more is how to determine this on the
> > server side. I guess this is not exactly specific to GWT. Say I have
> > my application compiled and deployed from a WAR file. What approach
> > can I take to "tell" the server side code to use the demo workflow and
> > logic? If I can do this, then the client can also determine what mode
> > to run in using a simple GWT-RPC call.
>
> > Sunny
>
> > On Apr 22, 4:57 am, Stefan Bachert <[email protected]> wrote:
> > > Hi,
>
> > > you can use "deferred binding" to compile different instances for your
> > > webapp. "Help facility" behaves like an other browser or locale
> > > More onhttp://
> > code.google.com/intl/de-DE/webtoolkit/doc/latest/DevGuideCodin...
>
> > > Stefan Bacherthttp://gwtworld.de
>
> > > On 21 Apr., 14:32, "[email protected]" <[email protected]> wrote:
>
> > > > Hi all,
>
> > > > After a little guidance on this topic - not quite sure what approach
> > > > should/would work. In the GWT app I'm developing, I'd like both the
> > > > server/client side to have a "demo mode" that enables certain help
> > > > features and enforce certain beginner workflows.
>
> > > > I know I can get the parameters of the URL using GWT, but the user can
> > > > simply remove the demo parameter to disable it (www.../index.html?
> > > > demo=1), so I'm after some way to enforce this at the application
> > > > level. At the same time, I don't want to be having a boolean flag in
> > > > the code/HTML and recompiling/deploying it each time.
>
> > > > Whats the best way to implement something like this so that the enable/
> > > > disable switch can be easily configured without recompiling/deploying?
> > > > (Can an argument be passed to the server side by the application
> > > > server when it starts? Can there be a config file outside of the WAR
> > > > file?)
>
> > > > thanks
> > > > Sunny
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups "Google Web Toolkit" group.
> > > > To post to this group, send email to
> > [email protected].
> > > > To unsubscribe from this group, send email to
> > [email protected]<google-web-toolkit%2Bunsubs 
> > [email protected]>
> > .
> > > > For more options, visit this group athttp://
> > groups.google.com/group/google-web-toolkit?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > > To post to this group, send email to [email protected]
> > .
> > > To unsubscribe from this group, send email to
> > [email protected]<google-web-toolkit%2Bunsubs 
> > [email protected]>
> > .
> > > For more options, visit this group athttp://
> > groups.google.com/group/google-web-toolkit?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-web-toolkit%2Bunsubs 
> > [email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to