Re: Wicket on Google App Engine

2012-01-05 Thread Ernesto Reinaldo Barreiro
Thanks for sharing!

On Thu, Jan 5, 2012 at 7:35 PM, Daniel Watrous wrote:

> Thanks for all your help. I've just posted the steps required to get
> current versions of wicket and gae to work together.
>
>
> http://software.danielwatrous.com/software-engineering/wordpress-plugin-licensing-wicket-on-google-app-engine
>
> Daniel
>
> On Thu, Jan 5, 2012 at 12:46 AM, Ernesto Reinaldo Barreiro
>  wrote:
> > I think the class to use is
> >
> >
> http://code.google.com/p/kickat26/source/browse/trunk/src/de/kickat26/ui/wicket/GAEModificationWatcher.java
> >
> >
> >
> > On Thu, Jan 5, 2012 at 8:31 AM, Ernesto Reinaldo Barreiro <
> > ernesto.reina...@jweekend.com> wrote:
> >
> >> You could use a modified version of resource watcher that does not use
> >> threads and modify request cycle so that watcher is executed before each
> >> request cycle. I remember there was some blog somewhere explaining this
> >> technique... Maybe it was this...
> >>
> >>
> >>
> http://stronglytypedblog.blogspot.com/2009/07/wicket-spring-jdo-on-google-app-engine.html
> >>
> >>
> >>
> >> On Wed, Jan 4, 2012 at 11:18 PM, Daniel Watrous <
> daniel.watr...@gmail.com>wrote:
> >>
> >>> I tried putting in this:
> >>> getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND);
> >>>
> >>> But the resource still doesn't update without restarting the google
> >>> app engine environment. I just tried it by running Start and that no
> >>> longer updates automatically either.
> >>>
> >>> In the process of trying to make it work with GAE, I changed the
> >>> pom.xml to have these lines in the build section
> >>>src/main/webapp/WEB-INF
> >>>
> >>>  src/main/webapp/WEB-INF/classes
> >>>
> >>> That means files are no longer placed in the target directory, but in
> >>> the WEB-INF folder. Could this affect it? Have I missed another
> >>> setting somewhere that relates to changing where the compiled classes
> >>> are placed?
> >>>
> >>> Daniel
> >>>
> >>> On Wed, Jan 4, 2012 at 3:01 PM, Sven Meier  wrote:
> >>> > Read here:
> >>> >
> >>> >https://cwiki.apache.org/WICKET/faqs.html#FAQs-Deployment
> >>> >
> >>> > The relevant setting is:
> >>> >getResourceSettings().setResourcePollFrequency(duration);
> >>> >
> >>> > Sven
> >>> >
> >>> >
> >>> > On 01/04/2012 10:31 PM, Daniel Watrous wrote:
> >>> >>
> >>> >> Great. I now have it working with either the jar download or the
> >>> >> dependency in the pom.xml file. In the dependency xml snippet I
> didn't
> >>> >> realize that I needed to manually provide the version, but after I
> did
> >>> >> then it worked fine.
> >>> >>
> >>> >> Whenever I update a class and save it in Eclipse, that class is
> >>> >> updated in the running server and I don't have to restart to see the
> >>> >> changes. This is great.
> >>> >>
> >>> >> However, when I change an HTML page, it's not updated in the running
> >>> >> server, so I have to restart everything. I know that when I run a
> >>> >> quickstart app directly (using the Start class) that updates to the
> >>> >> HTML are updated without requiring a restart.
> >>> >>
> >>> >> Do you know how to make it so the HTML files are updated in the live
> >>> >> server?
> >>> >>
> >>> >> Thanks so much.
> >>> >>
> >>> >> Daniel
> >>> >>
> >>> >> On Wed, Jan 4, 2012 at 1:38 PM, Sven Meier  wrote:
> >>> >>>
> >>> >>> With maven it's very easy, just add the dependency to your pom as
> >>> >>> suggested
> >>> >>> and forget about it.
> >>> >>>
> >>> >>> Alternatively you can download the jar form maven central manually
> and
> >>> >>> add
> >>> >>> it to your project:
> >>> >>>
> >>> >>>
> >>> >>>
> >>> >>>
> >>>
> http://repo2.maven.org/maven2/org/wicketstuff/wicketstuff-gae-initializer/
> >>> >>>
> >>> >>> Hope this helps
> >>> >>> Sven
> >>> >>>
> >>> >>>
> >>> >>> On 01/04/2012 09:28 PM, Daniel Watrous wrote:
> >>> 
> >>>  I'm still not sure how to create the jar file. No one is
> commenting
> >>> on
> >>>  it so I feel a bit silly. Should it be obvious?
> >>> 
> >>>  Am I supposed to include the source with my project or a jar. If a
> >>>  jar, how should I build the jar?
> >>> 
> >>>  On Wed, Jan 4, 2012 at 1:11 PM, Sven Meier
> >>>  wrote:
> >>> >
> >>> > Hi,
> >>> >
> >>> > make sure you have compatible versions for Wicket and
> >>> gae-initializer,
> >>> > i.e.
> >>> > they should be the same.
> >>> >
> >>> > Sven
> >>> >
> >>> >
> >>> >
> >>> > On 01/04/2012 08:49 PM, Daniel Watrous wrote:
> >>> >>
> >>> >> I'm slowly making progress.
> >>> >>
> >>> >> I see now that what Sven replied with goes in the pom.xml.
> >>> >>
> >>> >> What I'm not sure of is if I still need a jar file or the
> source as
> >>> >> part of my project. I have made the update to my pom.xml, and
> I'm
> >>> now
> >>> >> getting this error when I attempt to run my application:
> >>> >>
> >>> >> java.lang.NoClassDefFoundError:
> >>> >> org/apache/wicket/pageStore

Re: Wicket on Google App Engine

2012-01-05 Thread Daniel Watrous
Thanks for all your help. I've just posted the steps required to get
current versions of wicket and gae to work together.

http://software.danielwatrous.com/software-engineering/wordpress-plugin-licensing-wicket-on-google-app-engine

Daniel

On Thu, Jan 5, 2012 at 12:46 AM, Ernesto Reinaldo Barreiro
 wrote:
> I think the class to use is
>
> http://code.google.com/p/kickat26/source/browse/trunk/src/de/kickat26/ui/wicket/GAEModificationWatcher.java
>
>
>
> On Thu, Jan 5, 2012 at 8:31 AM, Ernesto Reinaldo Barreiro <
> ernesto.reina...@jweekend.com> wrote:
>
>> You could use a modified version of resource watcher that does not use
>> threads and modify request cycle so that watcher is executed before each
>> request cycle. I remember there was some blog somewhere explaining this
>> technique... Maybe it was this...
>>
>>
>> http://stronglytypedblog.blogspot.com/2009/07/wicket-spring-jdo-on-google-app-engine.html
>>
>>
>>
>> On Wed, Jan 4, 2012 at 11:18 PM, Daniel Watrous 
>> wrote:
>>
>>> I tried putting in this:
>>> getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND);
>>>
>>> But the resource still doesn't update without restarting the google
>>> app engine environment. I just tried it by running Start and that no
>>> longer updates automatically either.
>>>
>>> In the process of trying to make it work with GAE, I changed the
>>> pom.xml to have these lines in the build section
>>>            src/main/webapp/WEB-INF
>>>
>>>  src/main/webapp/WEB-INF/classes
>>>
>>> That means files are no longer placed in the target directory, but in
>>> the WEB-INF folder. Could this affect it? Have I missed another
>>> setting somewhere that relates to changing where the compiled classes
>>> are placed?
>>>
>>> Daniel
>>>
>>> On Wed, Jan 4, 2012 at 3:01 PM, Sven Meier  wrote:
>>> > Read here:
>>> >
>>> >    https://cwiki.apache.org/WICKET/faqs.html#FAQs-Deployment
>>> >
>>> > The relevant setting is:
>>> >    getResourceSettings().setResourcePollFrequency(duration);
>>> >
>>> > Sven
>>> >
>>> >
>>> > On 01/04/2012 10:31 PM, Daniel Watrous wrote:
>>> >>
>>> >> Great. I now have it working with either the jar download or the
>>> >> dependency in the pom.xml file. In the dependency xml snippet I didn't
>>> >> realize that I needed to manually provide the version, but after I did
>>> >> then it worked fine.
>>> >>
>>> >> Whenever I update a class and save it in Eclipse, that class is
>>> >> updated in the running server and I don't have to restart to see the
>>> >> changes. This is great.
>>> >>
>>> >> However, when I change an HTML page, it's not updated in the running
>>> >> server, so I have to restart everything. I know that when I run a
>>> >> quickstart app directly (using the Start class) that updates to the
>>> >> HTML are updated without requiring a restart.
>>> >>
>>> >> Do you know how to make it so the HTML files are updated in the live
>>> >> server?
>>> >>
>>> >> Thanks so much.
>>> >>
>>> >> Daniel
>>> >>
>>> >> On Wed, Jan 4, 2012 at 1:38 PM, Sven Meier  wrote:
>>> >>>
>>> >>> With maven it's very easy, just add the dependency to your pom as
>>> >>> suggested
>>> >>> and forget about it.
>>> >>>
>>> >>> Alternatively you can download the jar form maven central manually and
>>> >>> add
>>> >>> it to your project:
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> http://repo2.maven.org/maven2/org/wicketstuff/wicketstuff-gae-initializer/
>>> >>>
>>> >>> Hope this helps
>>> >>> Sven
>>> >>>
>>> >>>
>>> >>> On 01/04/2012 09:28 PM, Daniel Watrous wrote:
>>> 
>>>  I'm still not sure how to create the jar file. No one is commenting
>>> on
>>>  it so I feel a bit silly. Should it be obvious?
>>> 
>>>  Am I supposed to include the source with my project or a jar. If a
>>>  jar, how should I build the jar?
>>> 
>>>  On Wed, Jan 4, 2012 at 1:11 PM, Sven Meier
>>>  wrote:
>>> >
>>> > Hi,
>>> >
>>> > make sure you have compatible versions for Wicket and
>>> gae-initializer,
>>> > i.e.
>>> > they should be the same.
>>> >
>>> > Sven
>>> >
>>> >
>>> >
>>> > On 01/04/2012 08:49 PM, Daniel Watrous wrote:
>>> >>
>>> >> I'm slowly making progress.
>>> >>
>>> >> I see now that what Sven replied with goes in the pom.xml.
>>> >>
>>> >> What I'm not sure of is if I still need a jar file or the source as
>>> >> part of my project. I have made the update to my pom.xml, and I'm
>>> now
>>> >> getting this error when I attempt to run my application:
>>> >>
>>> >> java.lang.NoClassDefFoundError:
>>> >> org/apache/wicket/pageStore/memory/IDataStoreEvictionStrategy
>>> >>        at java.lang.Class.getDeclaredConstructors0(Native Method)
>>> >>        at java.lang.Class.privateGetDeclaredConstructors(Unknown
>>> >> Source)
>>> >>        at java.lang.Class.getConstructor0(Unknown Source)
>>> >>        at java.lang.Class.getDeclaredConstructor(Unknown Source)
>>> >>        at
>>> >>
>>> >>
>

RE: AjaxFormComponentUpdatingBehavior, required fields and validation

2012-01-05 Thread Michal Wegrzyn
Right, using AjaxFormSubmitBehavior (extending AjaxFormValidatingBehavior 
precisely) and removing all AjaxFormComponentUpdatingBehaviors  did the trick 
in this case.

After checking JavaDoc I thought that AjaxFormSubmitBehavior can be used only 
at exact submit phase, but after checking code everything was clear.

Thanks for your help.

Michal

> -Original Message-
> From: Sven Meier [mailto:s...@meiers.net]
> Sent: Tuesday, January 03, 2012 11:45
> To: users@wicket.apache.org
> Subject: Re: AjaxFormComponentUpdatingBehavior, required fields and
> validation
> 
> AjaxFormComponentUpdatingBehavior processes a single component only
> (change input, validate, convert), so it doesn't make sense to validate
> all components.
> In that case you should use AjaxFormSubmitBehavior, which processes the
> whole form.
> 
> Sven
> 
> 
> Am 03.01.2012 10:26, schrieb Michal Wegrzyn:
> > Hi Sven,
> >
> > When event is triggered I check all components with #isValid().
> > I am not sure if validation is performed after every ajax update or
> only after submit?
> >
> > I am aware of AjaxFormSubmitBehavior, but I want to check fields
> after every user action, so user can know error immediately and not
> only after submit.
> >
> > Best regards,
> > Michal
> >
> >> -Original Message-
> >> From: Sven Meier [mailto:s...@meiers.net]
> >> Sent: Tuesday, January 03, 2012 10:13
> >> To: users@wicket.apache.org
> >> Subject: Re: AjaxFormComponentUpdatingBehavior, required fields and
> >> validation
> >>
> >> Hi,
> >>
> >> are you validating all form components or just the one which
> triggered
> >> the ajax request?
> >>
> >> You know AjaxFormSubmitBehavior?
> >>
> >> Sven
> >>
> >> Am 03.01.2012 09:32, schrieb Michal Wegrzyn:
> >>> Any ideas here? Should I provide a quickstart?
> >>>
> >>> Best regards,
> >>> Michal Wegrzyn
> >>>
>  -Original Message-
>  From: Michal Wegrzyn [mailto:michal.wegr...@onior.com]
>  Sent: Monday, December 19, 2011 23:07
>  To: users@wicket.apache.org
>  Subject: AjaxFormComponentUpdatingBehavior, required fields and
>  validation
> 
>  Hi,
> 
>  I have form with few TextField and DropDownChoice components. All
> of
>  them have added AjaxFormComponentUpdatingBehavior( "onkeyup" ) and
> >> are
>  set as required. Some of them are wrapped in my custom objects,
> but
> >> it
>  does not matter (validation and processing logic is in behavior).
> 
>  With this setup after every ajax update triggered with behaviour's
>  onUpdate( AjaxRequestTarget ) or onError( AjaxRequestTarget ) I
> try
> >> to
>  check if form components are valid and give instant feedback to
> >> user.
>  Unfortunately results obtained from component's isValid() are
> wrong.
>  Empty TextFields are almost always valid.
>  Only after clearing TextField error is added to component, but
> after
>  changing for example other TextField to whatever value (and thus
>  triggering next validation check) isValid() on blank, required
>  TextField returns true.
> 
>  Is this approach incorrect or am I missing something?
> 
>  Best regards,
>  Michal Wegrzyn
> 
> >>> ---
> --
> >>> 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
> >
> > -
> > 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


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



Re: Migrating 1.4->1.5. Need no page version parameters

2012-01-05 Thread Machera li
protected void init() {
super.init();

this.getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.RenderStrategy.ONE_PASS_RENDER);
}


2012/1/5 Chris Colman 

> We are porting from 1.4 -> 1.5 and for SEO purposes we don't want the
> page version parameter to appear in the URL.
>
> What's the best way to turn this off in 1.5 so that the 1.5 version of
> the app will operate in the same way as the existing 1.4 version of the
> app - i.e. without page versions appearing in the URLs?
>
> I understand there are consequences for the 'Back' button operation but
> these must already be present in the 1.4 version so moving to 1.5 with
> no page versions is not stepping backwards in relation to this. I can
> mull over this issue once we've happily deployed the 1.5 version of the
> app.
>
> Yours sincerely,
>
> Chris Colman
>


Migrating 1.4->1.5. Need no page version parameters

2012-01-05 Thread Chris Colman
We are porting from 1.4 -> 1.5 and for SEO purposes we don't want the
page version parameter to appear in the URL.
 
What's the best way to turn this off in 1.5 so that the 1.5 version of
the app will operate in the same way as the existing 1.4 version of the
app - i.e. without page versions appearing in the URLs?
 
I understand there are consequences for the 'Back' button operation but
these must already be present in the 1.4 version so moving to 1.5 with
no page versions is not stepping backwards in relation to this. I can
mull over this issue once we've happily deployed the 1.5 version of the
app.
 
Yours sincerely,
 
Chris Colman 


Re: Numeric Filter on TextField

2012-01-05 Thread Rain... Is wet!
In the markup, add the attribute "onkeypress="YOURFUNCTION(event)" to your
textfield.

In your function get the keycode from the event and then use if/else or
switch/case to return true on every keycode from 47 to 57 (ASCII-codes for 0
to 9) or to return false for any other keycode.
Get yourself an ASCII-table to find other keycodes that might be worth to be
lettin through (ENTER on IE8, or ctrl on FF and others).

-
Never forget your umbrella ! In case You did, try to find a shelter ;)
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Numeric-Filter-on-TextField-tp4264649p4265030.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Numeric Filter on TextField

2012-01-05 Thread François Meillet
Have a look to 
http://stackoverflow.com/questions/469357/html-text-input-allow-only-numeric-input

François


Le 5 janv. 2012 à 09:16, codix a écrit :

> I have a TextField for filtering the data in a DataTable. However, the rows
> in the table is purely numeric. How do I prevent users from entering
> non-numeric input on the TextField by using an onKeyUp event?
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Numeric-Filter-on-TextField-tp4264649p4264649.html
> Sent from the Users forum mailing list archive at Nabble.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



RE: Handling POST, PUT and DELETE from a resource

2012-01-05 Thread Wilhelmsen Tor Iver
> Look into restlet.org

Reference implementation for JAX-RS (ignore that it sorts under the "Glassfish" 
section, it runs fine in other containers too):

http://jersey.java.net/

An older REST implementation that started before the JAX-RS spec but has been 
modified to conform (AFAIK):

http://www.jboss.org/resteasy

- Tor Iver

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