On Tue, Feb 7, 2012 at 3:53 PM, Daniel Watrous <daniel.watr...@gmail.com> wrote:
> Thanks Martin,
>
> I did make that much progress yesterday after sending this, but I
> can't figure out how to get the Application inside the onBeginRequest
> method that I override. In the other examples they call
> getApplication()
>
>    @Override
>    protected void onBeginRequest() {
>        if 
> (getApplication().getConfigurationType().equals(Application.DEVELOPMENT))
> {
>            final GaeModificationWatcher resourceWatcher =
> (GaeModificationWatcher) getApplication()
>                    .getResourceSettings().getResourceWatcher(true);
>            resourceWatcher.checkResources();
>        }
>    }
>
> How can I get the Application object?

Application.get()

>
> Daniel
>
> On Mon, Feb 6, 2012 at 11:43 PM, Martin Grigorov <mgrigo...@apache.org> wrote:
>> Hi,
>>
>> On Tue, Feb 7, 2012 at 1:32 AM, Daniel Watrous <daniel.watr...@gmail.com> 
>> wrote:
>>> Hi,
>>>
>>> I'm following up on a previous thread that's still unresolved. I would
>>> like GAE to automatically reload my HTML when I save changes. Classes
>>> are reloaded when I save (compile) them, but I have to restart each
>>> time for HTML changes.
>>>
>>> There are some old articles that show how to do this, but they deal
>>> with older versions of Wicket and GAE. For example:
>>> http://agilewombat.blogspot.com/2010/01/wicket-on-google-app-engine.html
>>> http://apache-wicket.1842946.n4.nabble.com/How-can-I-reload-HTML-in-app-engine-td3005241.html
>>> http://code.google.com/p/kickat26/source/browse/trunk/src/de/kickat26/ui/wicket/GAEModificationWatcher.java
>>>
>>> Those suggest creating a class MyWebRequestCycle extends
>>> WebRequestCycle, but wicket 1.5 doesn't have WebRequestCycle.
>>>
>>> How can I accomplish this same thing in the current version of wicket?
>>
>> application.getRequestCycleListeners().add(new MyRequestCycleListener())
>>
>> class MyRequestCycleListener extends AbstractRequestCycleListener {
>>  // override the method you need here
>> }
>>
>> Once you have it you can contribute it to gae-initializer project so
>> other people can re-use it and improve it.
>>
>>>
>>> Daniel
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> 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
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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

Reply via email to