SV: StringResourceModels doesn't seem to detach properly

2012-01-04 Thread Einar Bjerve
Hi,

Well, StringResourceModel#detach() is called, but since the SRM isn't attached, 
StringResourceModel#onDetach() is never called and the result is that the 
property substitution model isn't detached. I'll demonstrate with a bit of code:


IModel substitutionModel1 = ...;
IModel substitutionModel2 = ...;

add( new Label( id1, new StringResourceModel( resourceKey1, getPage(), 
substitutionModel1) ) ); // substitutionModel1 detaches properly
add( new Label( id2, new StringResourceModel( resourceKey2, 
substitutionModel2) ) ); // substitutionModel2 never detaches


In the above snippet, substitutionModel1 will be detached, but 
substitutionModel2 will not be detached when its label is detached. In 1.4.x 
both substitutionmodels would be detached

The reason this happens is that StringResourceModel is wrapped on assignment in 
a StringResourceModel.AssignmentWrapper. This assignmentwrapper never calls 
StringResourceModel#getObject() if the component constructor argument is null. 
In 1.4 StringResourceModel#getObject() would always be called (which means 
load() is called, and the enclosing SRM is attached).

The result is that the AssignmentWrapper is attached, but the enclosing 
StringResourceModel isn't. When StringResourceModel.AssignmentWrapper#detach() 
attempts to calls StringResourceModel#detach() the if(!attached) test (in 
StringResourceModel #detach()) returns false, which results in that 
StringResourceModel#onDetach() is never called.

Since detaching of property substitution models and detachable parameters is 
done in StringResourceModel#onDetach(), these objects won't be detached.


I believe this is a bug, as it was changed between 1.4 and 1.5. In 1.4 it was 
consistent, in 1.5 it isn't.


Best regards
Einar Bjerve


-Opprinnelig melding-
Fra: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sendt: 3. januar 2012 16:36
Til: users@wicket.apache.org
Emne: Re: StringResourceModels doesn't seem to detach properly

Hi,

It is intended.
IModel#detach() is called only if this model is assigned to a component.
Since no one calls #detach() on the StringResourceModel it has no idea
when to call detach() on its inner model.
You need to call SRM.detach() in #onDetach() in the component where it
is used. Then it will detach its inner model too.

On Tue, Jan 3, 2012 at 5:30 PM, Einar Bjerve einar.bje...@visma.no wrote:
 If a StringResourceModel contains a model for property substitutions, and 
 there has not been assigned a component it is relative to on construction 
 time, it will not detach the property substitution model.

 If there is assigned a component on construction time, the property 
 substitution model is detached with the StringResourceModel.

 This behavior seems kind of inconsistent to me. Is this intended and correct?


 Best regards
 Einar Bjerve



-- 
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



Re: Export Excel file containing string and rendered component

2012-01-04 Thread rainIsWet
If You try to use Frank Silbermanns suggestion this should be the normal
behavior because it breaks the RequestCycle...

Use Johan Compagners solution with something like a ByteArrayOutputstream as
the stream-source of public void write(Response output). Worked fine for
me.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/export-excel-file-via-an-OutputStream-tp1883922p4260504.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: StringResourceModels doesn't seem to detach properly

2012-01-04 Thread Martin Grigorov
Hi,

Explained this way it looks like a bug indeed.
File a ticket. If you find the differences in SRM in 1.4 vs. 1.5 then
please attach a patch too.
Thanks!

On Wed, Jan 4, 2012 at 10:44 AM, Einar Bjerve einar.bje...@visma.no wrote:
 Hi,

 Well, StringResourceModel#detach() is called, but since the SRM isn't 
 attached, StringResourceModel#onDetach() is never called and the result is 
 that the property substitution model isn't detached. I'll demonstrate with a 
 bit of code:


 IModel substitutionModel1 = ...;
 IModel substitutionModel2 = ...;

 add( new Label( id1, new StringResourceModel( resourceKey1, getPage(), 
 substitutionModel1) ) ); // substitutionModel1 detaches properly
 add( new Label( id2, new StringResourceModel( resourceKey2, 
 substitutionModel2) ) ); // substitutionModel2 never detaches


 In the above snippet, substitutionModel1 will be detached, but 
 substitutionModel2 will not be detached when its label is detached. In 1.4.x 
 both substitutionmodels would be detached

 The reason this happens is that StringResourceModel is wrapped on assignment 
 in a StringResourceModel.AssignmentWrapper. This assignmentwrapper never 
 calls StringResourceModel#getObject() if the component constructor argument 
 is null. In 1.4 StringResourceModel#getObject() would always be called (which 
 means load() is called, and the enclosing SRM is attached).

 The result is that the AssignmentWrapper is attached, but the enclosing 
 StringResourceModel isn't. When 
 StringResourceModel.AssignmentWrapper#detach() attempts to calls 
 StringResourceModel#detach() the if(!attached) test (in StringResourceModel 
 #detach()) returns false, which results in that 
 StringResourceModel#onDetach() is never called.

 Since detaching of property substitution models and detachable parameters is 
 done in StringResourceModel#onDetach(), these objects won't be detached.


 I believe this is a bug, as it was changed between 1.4 and 1.5. In 1.4 it was 
 consistent, in 1.5 it isn't.


 Best regards
 Einar Bjerve


 -Opprinnelig melding-
 Fra: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sendt: 3. januar 2012 16:36
 Til: users@wicket.apache.org
 Emne: Re: StringResourceModels doesn't seem to detach properly

 Hi,

 It is intended.
 IModel#detach() is called only if this model is assigned to a component.
 Since no one calls #detach() on the StringResourceModel it has no idea
 when to call detach() on its inner model.
 You need to call SRM.detach() in #onDetach() in the component where it
 is used. Then it will detach its inner model too.

 On Tue, Jan 3, 2012 at 5:30 PM, Einar Bjerve einar.bje...@visma.no wrote:
 If a StringResourceModel contains a model for property substitutions, and 
 there has not been assigned a component it is relative to on construction 
 time, it will not detach the property substitution model.

 If there is assigned a component on construction time, the property 
 substitution model is detached with the StringResourceModel.

 This behavior seems kind of inconsistent to me. Is this intended and correct?


 Best regards
 Einar Bjerve



 --
 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




-- 
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



It is not a good idea to reference the Session instance in models directly as it may lead to serialization problems.

2012-01-04 Thread Rahman USTA
Hi, i have a MySession.

form.add(new TextField(name,new PropertyModel(((MySession)getSession()),
user.name)));

I have a User user; in MySession, then initialized in constructor.

my Goal is to save name and surname user's own session. i did it above, but
warning ide me so that ;

*WARN  - AbstractPropertyModel  - It is not a good idea to reference
the Session instance in models directly as it may lead to serialization
problems. If you need to access a property of the session via the model use
the page instance as the model object and 'session.attribute' as the path.*

How can i handle this normally.




-- 
Rahman USTA
Computer  Control Education Technologist
0-(531)-922-28-05
www.kodcu.com


Re: It is not a good idea to reference the Session instance in models directly as it may lead to serialization problems.

2012-01-04 Thread Sven Meier

Just translate the warning into code:

  form.add(new TextField(name,new PropertyModel(this, session.user.name)));

Sven


Am 04.01.2012 10:44, schrieb Rahman USTA:

Hi, i have a MySession.

form.add(new TextField(name,new PropertyModel(((MySession)getSession()),
user.name)));

I have a User user; in MySession, then initialized in constructor.

my Goal is to save name and surname user's own session. i did it above, but
warning ide me so that ;

*WARN  - AbstractPropertyModel  - It is not a good idea to reference
the Session instance in models directly as it may lead to serialization
problems. If you need to access a property of the session via the model use
the page instance as the model object and 'session.attribute' as the path.*

How can i handle this normally.







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



RE: It is not a good idea to reference the Session instance in models directly as it may lead to serialization problems.

2012-01-04 Thread Wilhelmsen Tor Iver
// Indirection for PropertyModel object
public class MySessionModel extends AbstractReadOnlyModelMySession {

public MySession getObject() {
return (MySession) Session.get();
}
}

- Tor Iver

-Original Message-
From: Rahman USTA [mailto:rahman.usta...@gmail.com] 
Sent: 4. januar 2012 10:45
To: users@wicket.apache.org
Subject: It is not a good idea to reference the Session instance in models 
directly as it may lead to serialization problems.

Hi, i have a MySession.

form.add(new TextField(name,new PropertyModel(((MySession)getSession()),
user.name)));

I have a User user; in MySession, then initialized in constructor.

my Goal is to save name and surname user's own session. i did it above, but
warning ide me so that ;

*WARN  - AbstractPropertyModel  - It is not a good idea to reference
the Session instance in models directly as it may lead to serialization
problems. If you need to access a property of the session via the model use
the page instance as the model object and 'session.attribute' as the path.*

How can i handle this normally.




-- 
Rahman USTA
Computer  Control Education Technologist
0-(531)-922-28-05
www.kodcu.com

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



Re: Hide page version query parameters

2012-01-04 Thread armhold
You can also add a link rel=canonical
href=http://example.com/your-canonical-url/ to the head to instruct the
search engines to find the proper page.

(warning- video auto-plays on this google link:)

http://support.google.com/webmasters/bin/answer.py?hl=enanswer=139394



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Hide-page-version-query-parameters-tp4163099p4260728.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: It is not a good idea to reference the Session instance in models directly as it may lead to serialization problems.

2012-01-04 Thread Rahman USTA
Second answer is ok, very thanks.

2012/1/4 Wilhelmsen Tor Iver toriv...@arrive.no

 // Indirection for PropertyModel object
 public class MySessionModel extends AbstractReadOnlyModelMySession {

public MySession getObject() {
return (MySession) Session.get();
}
 }

 - Tor Iver

 -Original Message-
 From: Rahman USTA [mailto:rahman.usta...@gmail.com]
 Sent: 4. januar 2012 10:45
 To: users@wicket.apache.org
 Subject: It is not a good idea to reference the Session instance in models
 directly as it may lead to serialization problems.

 Hi, i have a MySession.

 form.add(new TextField(name,new PropertyModel(((MySession)getSession()),
 user.name)));

 I have a User user; in MySession, then initialized in constructor.

 my Goal is to save name and surname user's own session. i did it above, but
 warning ide me so that ;

 *WARN  - AbstractPropertyModel  - It is not a good idea to reference
 the Session instance in models directly as it may lead to serialization
 problems. If you need to access a property of the session via the model use
 the page instance as the model object and 'session.attribute' as the path.*

 How can i handle this normally.




 --
 Rahman USTA
 Computer  Control Education Technologist
 0-(531)-922-28-05
 www.kodcu.com

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




-- 
Rahman USTA
Computer  Control Education Technologist
0-(531)-922-28-05
www.kodcu.com


Re: It is not a good idea to reference the Session instance in models directly as it may lead to serialization problems.

2012-01-04 Thread Rahman USTA
Sorry not second, first.

2012/1/4 Rahman USTA rahman.usta...@gmail.com

 Second answer is ok, very thanks.


 2012/1/4 Wilhelmsen Tor Iver toriv...@arrive.no

 // Indirection for PropertyModel object
 public class MySessionModel extends AbstractReadOnlyModelMySession {

public MySession getObject() {
return (MySession) Session.get();
}
 }

 - Tor Iver

 -Original Message-
 From: Rahman USTA [mailto:rahman.usta...@gmail.com]
 Sent: 4. januar 2012 10:45
 To: users@wicket.apache.org
 Subject: It is not a good idea to reference the Session instance in
 models directly as it may lead to serialization problems.

 Hi, i have a MySession.

 form.add(new TextField(name,new
 PropertyModel(((MySession)getSession()),
 user.name)));

 I have a User user; in MySession, then initialized in constructor.

 my Goal is to save name and surname user's own session. i did it above,
 but
 warning ide me so that ;

 *WARN  - AbstractPropertyModel  - It is not a good idea to reference
 the Session instance in models directly as it may lead to serialization
 problems. If you need to access a property of the session via the model
 use
 the page instance as the model object and 'session.attribute' as the
 path.*

 How can i handle this normally.




 --
 Rahman USTA
 Computer  Control Education Technologist
 0-(531)-922-28-05
 www.kodcu.com

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




 --
 Rahman USTA
 Computer  Control Education Technologist
 0-(531)-922-28-05
 www.kodcu.com




-- 
Rahman USTA
Computer  Control Education Technologist
0-(531)-922-28-05
www.kodcu.com


Re: DefaultDataTable column style and orderbylink

2012-01-04 Thread Rain... Is wet!
Maybe You can check the actual class of the columnheaders on the pages loadup
and then add a class to your columns via javascript.
With the use of the jQuery framework this should be a quite easy task.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DefaultDataTable-column-style-and-orderbylink-tp2241495p4260952.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



hebrew text looks like ×׳—׳‘׳¨׳•

2012-01-04 Thread naorye
am using intellij for writing java web application. I am also using apache
wicket and apache Tomcat server.
When running html pages (using wicket) all my hebrew texts are looking like
׳”׳×׳—׳‘׳¨׳•׳×.

have meta http-equiv=Content-Type content=text/html; charset=UTF-8/ in
my header. I am hebrew speaker and my browser already set to hebrew (other
hebrew sites works fine). I believe this is something with the wicket page
generation. I builds the page from a template and several panels and I
believe this what currupt the text.

What can be the reason and How can fix it? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/hebrew-text-looks-like-tp4260875p4260875.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: hebrew text looks like ×׳—׳‘׳¨׳•

2012-01-04 Thread Sven Meier
You have to make sure Wicket loads your markup with the correct 
encoding, so add an xml prologue to all your markup files:


?xml version=1.0 encoding=UTF-8?

Sven

Am 04.01.2012 12:07, schrieb naorye:

am using intellij for writing java web application. I am also using apache
wicket and apache Tomcat server.
When running html pages (using wicket) all my hebrew texts are looking like
׳”׳×׳—׳‘׳¨׳•׳×.

havemeta http-equiv=Content-Type content=text/html; charset=UTF-8/  in
my header. I am hebrew speaker and my browser already set to hebrew (other
hebrew sites works fine). I believe this is something with the wicket page
generation. I builds the page from a template and several panels and I
believe this what currupt the text.

What can be the reason and How can fix it?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/hebrew-text-looks-like-tp4260875p4260875.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: AjaxFormComponentUpdatingBehavior, required fields and validation

2012-01-04 Thread Michal Wegrzyn
select elements have onchange of course.
Forgot over them at that point (ontired occurred).

Best regards,
Michal Wegrzyn

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Tuesday, January 03, 2012 10:20
 To: users@wicket.apache.org
 Subject: Re: AjaxFormComponentUpdatingBehavior, required fields and
 validation
 
 Additionally keyup for select is not the best event.
 People prefer using the mouse to change the value.
 
 On Tue, Jan 3, 2012 at 11:13 AM, Sven Meier s...@meiers.net wrote:
  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
 
 
 
 
 --
 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



Re: hebrew text looks like ×׳—׳‘׳¨׳•

2012-01-04 Thread Martin Grigorov
Setup application.getMarkupSettings().setDefaultMarkupEncoding(UTF-8)

@devs: any reason why UTF-8 is not the default ?

On Wed, Jan 4, 2012 at 2:27 PM, Sven Meier s...@meiers.net wrote:
 You have to make sure Wicket loads your markup with the correct encoding, so
 add an xml prologue to all your markup files:

 ?xml version=1.0 encoding=UTF-8?

 Sven

 Am 04.01.2012 12:07, schrieb naorye:

 am using intellij for writing java web application. I am also using apache
 wicket and apache Tomcat server.
 When running html pages (using wicket) all my hebrew texts are looking
 like
 ׳”׳×׳—׳‘׳¨׳•׳×.

 havemeta http-equiv=Content-Type content=text/html; charset=UTF-8/
  in
 my header. I am hebrew speaker and my browser already set to hebrew (other
 hebrew sites works fine). I believe this is something with the wicket page
 generation. I builds the page from a template and several panels and I
 believe this what currupt the text.

 What can be the reason and How can fix it?

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/hebrew-text-looks-like-tp4260875p4260875.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




-- 
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



Re: hebrew text looks like ×׳—׳‘׳¨׳•

2012-01-04 Thread Sven Meier

I think null is the most general default.

And a proper xml file has an explicit encoding anyway.

Sven

Am 04.01.2012 13:42, schrieb Martin Grigorov:

Setup application.getMarkupSettings().setDefaultMarkupEncoding(UTF-8)

@devs: any reason why UTF-8 is not the default ?

On Wed, Jan 4, 2012 at 2:27 PM, Sven Meiers...@meiers.net  wrote:

You have to make sure Wicket loads your markup with the correct encoding, so
add an xml prologue to all your markup files:

?xml version=1.0 encoding=UTF-8?

Sven

Am 04.01.2012 12:07, schrieb naorye:


am using intellij for writing java web application. I am also using apache
wicket and apache Tomcat server.
When running html pages (using wicket) all my hebrew texts are looking
like
׳”׳×׳—׳‘׳¨׳•׳×.

havemeta http-equiv=Content-Type content=text/html; charset=UTF-8/
  in
my header. I am hebrew speaker and my browser already set to hebrew (other
hebrew sites works fine). I believe this is something with the wicket page
generation. I builds the page from a template and several panels and I
believe this what currupt the text.

What can be the reason and How can fix it?

--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/hebrew-text-looks-like-tp4260875p4260875.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







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



Re: hebrew text looks like ×׳—׳‘׳¨׳•

2012-01-04 Thread Martin Grigorov
On Wed, Jan 4, 2012 at 3:08 PM, Sven Meier s...@meiers.net wrote:
 I think null is the most general default.

 And a proper xml file has an explicit encoding anyway.

I remember some problems with ?xml ... ? in IE that assumes this is
an XML response.


 Sven

 Am 04.01.2012 13:42, schrieb Martin Grigorov:

 Setup application.getMarkupSettings().setDefaultMarkupEncoding(UTF-8)

 @devs: any reason why UTF-8 is not the default ?

 On Wed, Jan 4, 2012 at 2:27 PM, Sven Meiers...@meiers.net  wrote:

 You have to make sure Wicket loads your markup with the correct encoding,
 so
 add an xml prologue to all your markup files:

 ?xml version=1.0 encoding=UTF-8?

 Sven

 Am 04.01.2012 12:07, schrieb naorye:

 am using intellij for writing java web application. I am also using
 apache
 wicket and apache Tomcat server.
 When running html pages (using wicket) all my hebrew texts are looking
 like
 ׳”׳×׳—׳‘׳¨׳•׳×.

 havemeta http-equiv=Content-Type content=text/html; charset=UTF-8/
  in
 my header. I am hebrew speaker and my browser already set to hebrew
 (other
 hebrew sites works fine). I believe this is something with the wicket
 page
 generation. I builds the page from a template and several panels and I
 believe this what currupt the text.

 What can be the reason and How can fix it?

 --
 View this message in context:

 http://apache-wicket.1842946.n4.nabble.com/hebrew-text-looks-like-tp4260875p4260875.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





 -
 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



Re: hebrew text looks like ×׳—׳‘׳¨׳•

2012-01-04 Thread Sven Meier

We have WebApplication#/renderXmlDecl() for that./

IIRC the markup xml declaration doesn't have an effect on the browser.

Sven

Am 04.01.2012 14:22, schrieb Martin Grigorov:

On Wed, Jan 4, 2012 at 3:08 PM, Sven Meiers...@meiers.net  wrote:

I think null is the most general default.

And a proper xml file has an explicit encoding anyway.

I remember some problems with?xml ... ?  in IE that assumes this is
an XML response.


Sven

Am 04.01.2012 13:42, schrieb Martin Grigorov:


Setup application.getMarkupSettings().setDefaultMarkupEncoding(UTF-8)

@devs: any reason why UTF-8 is not the default ?

On Wed, Jan 4, 2012 at 2:27 PM, Sven Meiers...@meiers.netwrote:

You have to make sure Wicket loads your markup with the correct encoding,
so
add an xml prologue to all your markup files:

?xml version=1.0 encoding=UTF-8?

Sven

Am 04.01.2012 12:07, schrieb naorye:


am using intellij for writing java web application. I am also using
apache
wicket and apache Tomcat server.
When running html pages (using wicket) all my hebrew texts are looking
like
׳”׳×׳—׳‘׳¨׳•׳×.

havemeta http-equiv=Content-Type content=text/html; charset=UTF-8/
  in
my header. I am hebrew speaker and my browser already set to hebrew
(other
hebrew sites works fine). I believe this is something with the wicket
page
generation. I builds the page from a template and several panels and I
believe this what currupt the text.

What can be the reason and How can fix it?

--
View this message in context:

http://apache-wicket.1842946.n4.nabble.com/hebrew-text-looks-like-tp4260875p4260875.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





-
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: StringResourceModels doesn't seem to detach properly

2012-01-04 Thread Einar Bjerve
Done

WICKET-4323

Best regards
Einar

Den 4. jan. 2012 kl. 09:49 skrev Martin Grigorov mgrigo...@apache.org:

 Hi,
 
 Explained this way it looks like a bug indeed.
 File a ticket. If you find the differences in SRM in 1.4 vs. 1.5 then
 please attach a patch too.
 Thanks!
 
 On Wed, Jan 4, 2012 at 10:44 AM, Einar Bjerve einar.bje...@visma.no wrote:
 Hi,
 
 Well, StringResourceModel#detach() is called, but since the SRM isn't 
 attached, StringResourceModel#onDetach() is never called and the result is 
 that the property substitution model isn't detached. I'll demonstrate with a 
 bit of code:
 
 
 IModel substitutionModel1 = ...;
 IModel substitutionModel2 = ...;
 
 add( new Label( id1, new StringResourceModel( resourceKey1, getPage(), 
 substitutionModel1) ) ); // substitutionModel1 detaches properly
 add( new Label( id2, new StringResourceModel( resourceKey2, 
 substitutionModel2) ) ); // substitutionModel2 never detaches
 
 
 In the above snippet, substitutionModel1 will be detached, but 
 substitutionModel2 will not be detached when its label is detached. In 1.4.x 
 both substitutionmodels would be detached
 
 The reason this happens is that StringResourceModel is wrapped on assignment 
 in a StringResourceModel.AssignmentWrapper. This assignmentwrapper never 
 calls StringResourceModel#getObject() if the component constructor argument 
 is null. In 1.4 StringResourceModel#getObject() would always be called 
 (which means load() is called, and the enclosing SRM is attached).
 
 The result is that the AssignmentWrapper is attached, but the enclosing 
 StringResourceModel isn't. When 
 StringResourceModel.AssignmentWrapper#detach() attempts to calls 
 StringResourceModel#detach() the if(!attached) test (in StringResourceModel 
 #detach()) returns false, which results in that 
 StringResourceModel#onDetach() is never called.
 
 Since detaching of property substitution models and detachable parameters is 
 done in StringResourceModel#onDetach(), these objects won't be detached.
 
 
 I believe this is a bug, as it was changed between 1.4 and 1.5. In 1.4 it 
 was consistent, in 1.5 it isn't.
 
 
 Best regards
 Einar Bjerve
 
 
 -Opprinnelig melding-
 Fra: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sendt: 3. januar 2012 16:36
 Til: users@wicket.apache.org
 Emne: Re: StringResourceModels doesn't seem to detach properly
 
 Hi,
 
 It is intended.
 IModel#detach() is called only if this model is assigned to a component.
 Since no one calls #detach() on the StringResourceModel it has no idea
 when to call detach() on its inner model.
 You need to call SRM.detach() in #onDetach() in the component where it
 is used. Then it will detach its inner model too.
 
 On Tue, Jan 3, 2012 at 5:30 PM, Einar Bjerve einar.bje...@visma.no wrote:
 If a StringResourceModel contains a model for property substitutions, and 
 there has not been assigned a component it is relative to on construction 
 time, it will not detach the property substitution model.
 
 If there is assigned a component on construction time, the property 
 substitution model is detached with the StringResourceModel.
 
 This behavior seems kind of inconsistent to me. Is this intended and 
 correct?
 
 
 Best regards
 Einar Bjerve
 
 
 
 --
 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
 
 
 
 
 -- 
 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



Re: Wicket on Google App Engine

2012-01-04 Thread Daniel Watrous
How do I create the gae-initializer.jar?

I have run mvn compile and generated the class files. I can zip those
up, but I'm not sure if there should be a META-INF folder and what it
should have.

Daniel

On Wed, Jan 4, 2012 at 12:21 AM, Martin Grigorov mgrigo...@apache.org wrote:
 Hi,

 gae-initializer project provides
 https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/gae-initializer-parent/gae-initializer/src/main/java/org/wicketstuff/gae/GaeInitializer.java
 which is an implementation of org.apache.wicket.IInitializer and declares it 
 in
 https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/gae-initializer-parent/gae-initializer/src/main/resources/wicket.properties.
 That means that when gae-initializer.jar is in the classpath Wicket
 will use it to initialize the Application instance.
 Check the source of GaeInitializer.jar to see what exactly it configures.

 On Wed, Jan 4, 2012 at 1:52 AM, Daniel Watrous daniel.watr...@gmail.com 
 wrote:
 Hi,

 I've been working for a few days to get a wicket application going for
 Google App Engine with mixed results. I hope these questions aren't
 too noobie for this list?

 There are a couple of really old articles which Google brings up first:
 http://stronglytypedblog.blogspot.com/2009/04/wicket-on-google-app-engine.html
 http://www.danwalmsley.com/2009/04/08/apache-wicket-on-google-app-engine-for-java/

 I've also found this resource after digging through the wicket users
 list, but I can't figure out how I'm supposed to use it:
 https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/gae-initializer-parent

 I'm using eclipse with the GAE plugin.

 So far this is what I have accomplished.
 1) the first link above provides a download demo as an eclipse
 project. I can get this to run, but it's working with old versions
 (wicket 1.3.5, appengine sdk 1.2.0). I haven't successfully updated.
 2) I can create a new google app engine project in eclipse. It runs
 fine and I can develop servlets.
 3) I can user the maven build script from the quickstart to get a
 functional wicket project.

 I'm really struggling trying to figure out how to use the
 gae-initializer or a base GAE project from eclipse and end up with a
 functional wicket application...

 I'm not sure what other information to include at this point. Please
 share any pointers or links to other tutorials that might help me.

 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



Re: Wicket on Google App Engine

2012-01-04 Thread Daniel Watrous
Also, where do I put the wicket.properties file, and do I need to
update any xml files to indicate that there is a wicket.properties
file

On Wed, Jan 4, 2012 at 11:30 AM, Daniel Watrous
daniel.watr...@gmail.com wrote:
 How do I create the gae-initializer.jar?

 I have run mvn compile and generated the class files. I can zip those
 up, but I'm not sure if there should be a META-INF folder and what it
 should have.

 Daniel

 On Wed, Jan 4, 2012 at 12:21 AM, Martin Grigorov mgrigo...@apache.org wrote:
 Hi,

 gae-initializer project provides
 https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/gae-initializer-parent/gae-initializer/src/main/java/org/wicketstuff/gae/GaeInitializer.java
 which is an implementation of org.apache.wicket.IInitializer and declares it 
 in
 https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/gae-initializer-parent/gae-initializer/src/main/resources/wicket.properties.
 That means that when gae-initializer.jar is in the classpath Wicket
 will use it to initialize the Application instance.
 Check the source of GaeInitializer.jar to see what exactly it configures.

 On Wed, Jan 4, 2012 at 1:52 AM, Daniel Watrous daniel.watr...@gmail.com 
 wrote:
 Hi,

 I've been working for a few days to get a wicket application going for
 Google App Engine with mixed results. I hope these questions aren't
 too noobie for this list?

 There are a couple of really old articles which Google brings up first:
 http://stronglytypedblog.blogspot.com/2009/04/wicket-on-google-app-engine.html
 http://www.danwalmsley.com/2009/04/08/apache-wicket-on-google-app-engine-for-java/

 I've also found this resource after digging through the wicket users
 list, but I can't figure out how I'm supposed to use it:
 https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/gae-initializer-parent

 I'm using eclipse with the GAE plugin.

 So far this is what I have accomplished.
 1) the first link above provides a download demo as an eclipse
 project. I can get this to run, but it's working with old versions
 (wicket 1.3.5, appengine sdk 1.2.0). I haven't successfully updated.
 2) I can create a new google app engine project in eclipse. It runs
 fine and I can develop servlets.
 3) I can user the maven build script from the quickstart to get a
 functional wicket project.

 I'm really struggling trying to figure out how to use the
 gae-initializer or a base GAE project from eclipse and end up with a
 functional wicket application...

 I'm not sure what other information to include at this point. Please
 share any pointers or links to other tutorials that might help me.

 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



Re: Wicket on Google App Engine

2012-01-04 Thread Sven Meier

Hi Daniel,

you just have to add the gae-initializer as a dependency to your project:

dependency
groupIdorg.wicketstuff/groupId
artifactIdwicketstuff-gae-initializer/artifactId
version${wicket.version}/version
/dependency

That's all.
Sven

On 01/04/2012 07:35 PM, Daniel Watrous wrote:

Also, where do I put the wicket.properties file, and do I need to
update any xml files to indicate that there is a wicket.properties
file

On Wed, Jan 4, 2012 at 11:30 AM, Daniel Watrous
daniel.watr...@gmail.com  wrote:

How do I create the gae-initializer.jar?

I have run mvn compile and generated the class files. I can zip those
up, but I'm not sure if there should be a META-INF folder and what it
should have.

Daniel

On Wed, Jan 4, 2012 at 12:21 AM, Martin Grigorovmgrigo...@apache.org  wrote:

Hi,

gae-initializer project provides
https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/gae-initializer-parent/gae-initializer/src/main/java/org/wicketstuff/gae/GaeInitializer.java
which is an implementation of org.apache.wicket.IInitializer and declares it in
https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/gae-initializer-parent/gae-initializer/src/main/resources/wicket.properties.
That means that when gae-initializer.jar is in the classpath Wicket
will use it to initialize the Application instance.
Check the source of GaeInitializer.jar to see what exactly it configures.

On Wed, Jan 4, 2012 at 1:52 AM, Daniel Watrousdaniel.watr...@gmail.com  wrote:

Hi,

I've been working for a few days to get a wicket application going for
Google App Engine with mixed results. I hope these questions aren't
too noobie for this list?

There are a couple of really old articles which Google brings up first:
http://stronglytypedblog.blogspot.com/2009/04/wicket-on-google-app-engine.html
http://www.danwalmsley.com/2009/04/08/apache-wicket-on-google-app-engine-for-java/

I've also found this resource after digging through the wicket users
list, but I can't figure out how I'm supposed to use it:
https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/gae-initializer-parent

I'm using eclipse with the GAE plugin.

So far this is what I have accomplished.
1) the first link above provides a download demo as an eclipse
project. I can get this to run, but it's working with old versions
(wicket 1.3.5, appengine sdk 1.2.0). I haven't successfully updated.
2) I can create a new google app engine project in eclipse. It runs
fine and I can develop servlets.
3) I can user the maven build script from the quickstart to get a
functional wicket project.

I'm really struggling trying to figure out how to use the
gae-initializer or a base GAE project from eclipse and end up with a
functional wicket application...

I'm not sure what other information to include at this point. Please
share any pointers or links to other tutorials that might help me.

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




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



Re: Wicket on Google App Engine

2012-01-04 Thread Daniel Watrous
Is that the same thing as adding the jar file to the build path in eclipse?

How do I build gae-initializer.jar? I tried running 'mvn jar', but it
gave an error about unknown lifecycle phase.

Daniel

On Wed, Jan 4, 2012 at 11:38 AM, Sven Meier s...@meiers.net wrote:
 Hi Daniel,

 you just have to add the gae-initializer as a dependency to your project:

 dependency
 groupIdorg.wicketstuff/groupId
 artifactIdwicketstuff-gae-initializer/artifactId
 version${wicket.version}/version
 /dependency

 That's all.
 Sven


 On 01/04/2012 07:35 PM, Daniel Watrous wrote:

 Also, where do I put the wicket.properties file, and do I need to
 update any xml files to indicate that there is a wicket.properties
 file

 On Wed, Jan 4, 2012 at 11:30 AM, Daniel Watrous
 daniel.watr...@gmail.com  wrote:

 How do I create the gae-initializer.jar?

 I have run mvn compile and generated the class files. I can zip those
 up, but I'm not sure if there should be a META-INF folder and what it
 should have.

 Daniel

 On Wed, Jan 4, 2012 at 12:21 AM, Martin Grigorovmgrigo...@apache.org
  wrote:

 Hi,

 gae-initializer project provides

 https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/gae-initializer-parent/gae-initializer/src/main/java/org/wicketstuff/gae/GaeInitializer.java
 which is an implementation of org.apache.wicket.IInitializer and
 declares it in

 https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/gae-initializer-parent/gae-initializer/src/main/resources/wicket.properties.
 That means that when gae-initializer.jar is in the classpath Wicket
 will use it to initialize the Application instance.
 Check the source of GaeInitializer.jar to see what exactly it
 configures.

 On Wed, Jan 4, 2012 at 1:52 AM, Daniel Watrousdaniel.watr...@gmail.com
  wrote:

 Hi,

 I've been working for a few days to get a wicket application going for
 Google App Engine with mixed results. I hope these questions aren't
 too noobie for this list?

 There are a couple of really old articles which Google brings up first:

 http://stronglytypedblog.blogspot.com/2009/04/wicket-on-google-app-engine.html

 http://www.danwalmsley.com/2009/04/08/apache-wicket-on-google-app-engine-for-java/

 I've also found this resource after digging through the wicket users
 list, but I can't figure out how I'm supposed to use it:

 https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/gae-initializer-parent

 I'm using eclipse with the GAE plugin.

 So far this is what I have accomplished.
 1) the first link above provides a download demo as an eclipse
 project. I can get this to run, but it's working with old versions
 (wicket 1.3.5, appengine sdk 1.2.0). I haven't successfully updated.
 2) I can create a new google app engine project in eclipse. It runs
 fine and I can develop servlets.
 3) I can user the maven build script from the quickstart to get a
 functional wicket project.

 I'm really struggling trying to figure out how to use the
 gae-initializer or a base GAE project from eclipse and end up with a
 functional wicket application...

 I'm not sure what other information to include at this point. Please
 share any pointers or links to other tutorials that might help me.

 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



 -
 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: Wicket on Google App Engine

2012-01-04 Thread Daniel Watrous
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 
com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:133)
at 
com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:131)
at java.security.AccessController.doPrivileged(Native Method)
at 
com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:130)
at 
org.apache.wicket.util.lang.WicketObjects.newInstance(WicketObjects.java:377)
at org.apache.wicket.Application.addInitializer(Application.java:577)
at org.apache.wicket.Application.load(Application.java:615)
at 
org.apache.wicket.Application.initializeComponents(Application.java:501)
at org.apache.wicket.Application.initApplication(Application.java:808)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at 
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at 
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at 
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:191)
at 
com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:239)
at 
com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:146)
at 
com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
at 
com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at 
com.google.appengine.tools.development.DevAppServerMain.init(DevAppServerMain.java:113)
at 
com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
Caused by: java.lang.ClassNotFoundException:
org.apache.wicket.pageStore.memory.IDataStoreEvictionStrategy
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at 
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:176)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 35 more

Since gae-initializer did compile when I compiled with maven I also
tried simply putting the compile classes next to my other classes for
the deployment, but it still gives this error.

Thanks for all your help.

Daniel

On Wed, Jan 4, 2012 at 11:45 AM, Daniel Watrous
daniel.watr...@gmail.com wrote:
 Is that the same thing as adding the jar file to the build path in eclipse?

 How do I build gae-initializer.jar? I tried running 'mvn jar', but it
 gave an error about unknown lifecycle phase.

 Daniel

 On Wed, Jan 4, 2012 at 11:38 AM, Sven Meier s...@meiers.net wrote:
 Hi Daniel,

 you just have to add the gae-initializer as a dependency to your project:

 dependency
 groupIdorg.wicketstuff/groupId
 artifactIdwicketstuff-gae-initializer/artifactId
 version${wicket.version}/version
 /dependency

 That's all.
 Sven


 On 01/04/2012 07:35 PM, Daniel Watrous wrote:

 Also, where do I put the wicket.properties file, and do I need to
 update any xml files to indicate that there is a wicket.properties
 file

 On Wed, Jan 4, 2012 at 11:30 

Re: Wicket on Google App Engine

2012-01-04 Thread Sven Meier

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 
com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:133)
at 
com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:131)
at java.security.AccessController.doPrivileged(Native Method)
at 
com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:130)
at 
org.apache.wicket.util.lang.WicketObjects.newInstance(WicketObjects.java:377)
at org.apache.wicket.Application.addInitializer(Application.java:577)
at org.apache.wicket.Application.load(Application.java:615)
at 
org.apache.wicket.Application.initializeComponents(Application.java:501)
at org.apache.wicket.Application.initApplication(Application.java:808)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at 
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at 
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at 
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:191)
at 
com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:239)
at 
com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:146)
at 
com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
at 
com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at 
com.google.appengine.tools.development.DevAppServerMain.init(DevAppServerMain.java:113)
at 
com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
Caused by: java.lang.ClassNotFoundException:
org.apache.wicket.pageStore.memory.IDataStoreEvictionStrategy
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at 
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:176)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 35 more

Since gae-initializer did compile when I compiled with maven I also
tried simply putting the compile classes next to my other classes for
the deployment, but it still gives this error.

Thanks for all your help.

Daniel

On Wed, Jan 4, 2012 at 11:45 AM, Daniel Watrous
daniel.watr...@gmail.com  wrote:

Is that the same thing as adding the jar file to the build path in eclipse?

How do I build gae-initializer.jar? I tried running 'mvn jar', but it
gave an error about unknown lifecycle phase.

Daniel

On Wed, Jan 4, 2012 at 11:38 AM, Sven Meiers...@meiers.net  wrote:

Hi Daniel,

you just have to add the gae-initializer as a dependency to your project:

dependency
groupIdorg.wicketstuff/groupId
artifactIdwicketstuff-gae-initializer/artifactId
version${wicket.version}/version
/dependency

That's all.
Sven


On 01/04/2012 07:35 PM, Daniel Watrous wrote:

Also, where do I put 

Re: Wicket on Google App Engine

2012-01-04 Thread Daniel Watrous
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 s...@meiers.net 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
 com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:133)
        at
 com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:131)
        at java.security.AccessController.doPrivileged(Native Method)
        at
 com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:130)
        at
 org.apache.wicket.util.lang.WicketObjects.newInstance(WicketObjects.java:377)
        at
 org.apache.wicket.Application.addInitializer(Application.java:577)
        at org.apache.wicket.Application.load(Application.java:615)
        at
 org.apache.wicket.Application.initializeComponents(Application.java:501)
        at
 org.apache.wicket.Application.initApplication(Application.java:808)
        at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
        at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
        at
 org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
        at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at
 org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
        at
 org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
        at
 org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
        at
 org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
        at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at
 org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
        at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at
 org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
        at org.mortbay.jetty.Server.doStart(Server.java:224)
        at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at
 com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:191)
        at
 com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:239)
        at
 com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:146)
        at
 com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
        at
 com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
        at
 com.google.appengine.tools.development.DevAppServerMain.init(DevAppServerMain.java:113)
        at
 com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
 Caused by: java.lang.ClassNotFoundException:
 org.apache.wicket.pageStore.memory.IDataStoreEvictionStrategy
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at
 com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:176)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 35 more

 Since gae-initializer did compile when I compiled with maven I also
 tried simply putting the compile classes next to my other classes for
 the deployment, but it still gives this error.

 Thanks for all your help.

 Daniel

 On Wed, Jan 4, 2012 at 11:45 AM, Daniel Watrous
 daniel.watr...@gmail.com  wrote:

 Is that the same thing as adding the jar file to the build path in
 eclipse?

 How do I build gae-initializer.jar? I tried running 'mvn jar', but it
 gave an error about unknown lifecycle phase.

 Daniel

 On Wed, Jan 4, 2012 at 11:38 AM, Sven Meiers...@meiers.net  

Re: Wicket on Google App Engine

2012-01-04 Thread Sven Meier
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 Meiers...@meiers.net  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
com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:133)
at
com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:131)
at java.security.AccessController.doPrivileged(Native Method)
at
com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:130)
at
org.apache.wicket.util.lang.WicketObjects.newInstance(WicketObjects.java:377)
at
org.apache.wicket.Application.addInitializer(Application.java:577)
at org.apache.wicket.Application.load(Application.java:615)
at
org.apache.wicket.Application.initializeComponents(Application.java:501)
at
org.apache.wicket.Application.initApplication(Application.java:808)
at
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
at
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
at
org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:191)
at
com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:239)
at
com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:146)
at
com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
at
com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at
com.google.appengine.tools.development.DevAppServerMain.init(DevAppServerMain.java:113)
at
com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
Caused by: java.lang.ClassNotFoundException:
org.apache.wicket.pageStore.memory.IDataStoreEvictionStrategy
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:176)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 35 more

Since gae-initializer did compile when I compiled with maven I also
tried simply putting the compile classes next to my other classes for
the deployment, but it still gives this error.

Thanks for all your help.

Daniel

On Wed, Jan 4, 2012 at 11:45 AM, Daniel Watrous

Re: Wicket on Google App Engine

2012-01-04 Thread Daniel Watrous
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 s...@meiers.net 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 Meiers...@meiers.net  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

 com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:133)
        at

 com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:131)
        at java.security.AccessController.doPrivileged(Native Method)
        at

 com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:130)
        at

 org.apache.wicket.util.lang.WicketObjects.newInstance(WicketObjects.java:377)
        at
 org.apache.wicket.Application.addInitializer(Application.java:577)
        at org.apache.wicket.Application.load(Application.java:615)
        at
 org.apache.wicket.Application.initializeComponents(Application.java:501)
        at
 org.apache.wicket.Application.initApplication(Application.java:808)
        at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
        at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
        at
 org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
        at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at

 org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
        at
 org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
        at

 org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
        at

 org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
        at
 org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
        at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at

 org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
        at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at

 org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
        at org.mortbay.jetty.Server.doStart(Server.java:224)
        at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at

 com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:191)
        at

 com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:239)
        at

 com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:146)
        at

 com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
        at

 com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
        at

 com.google.appengine.tools.development.DevAppServerMain.init(DevAppServerMain.java:113)
        at

 

Re: Wicket on Google App Engine

2012-01-04 Thread Sven Meier

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 Meiers...@meiers.net  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 Meiers...@meiers.netwrote:

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

com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:133)
at

com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:131)
at java.security.AccessController.doPrivileged(Native Method)
at

com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:130)
at

org.apache.wicket.util.lang.WicketObjects.newInstance(WicketObjects.java:377)
at
org.apache.wicket.Application.addInitializer(Application.java:577)
at org.apache.wicket.Application.load(Application.java:615)
at
org.apache.wicket.Application.initializeComponents(Application.java:501)
at
org.apache.wicket.Application.initApplication(Application.java:808)
at
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
at
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
at
org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at

org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at
org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at

org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at

org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at

org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at

org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at

com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:191)
at

com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:239)
at

com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:146)
at

com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
at


Re: Wicket on Google App Engine

2012-01-04 Thread Daniel Watrous
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
directorysrc/main/webapp/WEB-INF/directory
outputDirectorysrc/main/webapp/WEB-INF/classes/outputDirectory

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 s...@meiers.net 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 Meiers...@meiers.net  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 Meiers...@meiers.net    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


 com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:133)
        at


 com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:131)
        at java.security.AccessController.doPrivileged(Native Method)
        at


 com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:130)
        at


 org.apache.wicket.util.lang.WicketObjects.newInstance(WicketObjects.java:377)
        at
 org.apache.wicket.Application.addInitializer(Application.java:577)
        at org.apache.wicket.Application.load(Application.java:615)
        at

 org.apache.wicket.Application.initializeComponents(Application.java:501)
        at
 org.apache.wicket.Application.initApplication(Application.java:808)
        at

 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
        at

 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
        at
 org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
        at

 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at


 org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
        at
 org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
        at


 org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
        at


 org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
        at
 org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
        at

 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at


 

Handling POST, PUT and DELETE from a resource

2012-01-04 Thread Daniel Watrous
I'm building a web service and I wonder if there's some way to detect
and do something unique when calling a ResourceReference with
different HTTP methods.

-
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-04 Thread 7zark7
I know these sort of replies are annoying, but I don't think Wicket is a good 
choice for handling web service calls - it's pretty easy to map other paths to 
servlets or other handlers that better deal with PUT, DELETE, etc.

-- 
Anh My
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Wednesday, January 4, 2012 at 3:49 PM, Daniel Watrous wrote:

 I'm building a web service and I wonder if there's some way to detect
 and do something unique when calling a ResourceReference with
 different HTTP methods.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org 
 (mailto:users-unsubscr...@wicket.apache.org)
 For additional commands, e-mail: users-h...@wicket.apache.org 
 (mailto:users-h...@wicket.apache.org)
 
 




Re: Handling POST, PUT and DELETE from a resource

2012-01-04 Thread Daniel Watrous
That's a fantastic answer. I'll look at other solutions.

Daniel

On Wed, Jan 4, 2012 at 7:03 PM, 7zark7 7za...@gmail.com wrote:
 I know these sort of replies are annoying, but I don't think Wicket is a good 
 choice for handling web service calls - it's pretty easy to map other paths 
 to servlets or other handlers that better deal with PUT, DELETE, etc.

 --
 Anh My
 Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


 On Wednesday, January 4, 2012 at 3:49 PM, Daniel Watrous wrote:

 I'm building a web service and I wonder if there's some way to detect
 and do something unique when calling a ResourceReference with
 different HTTP methods.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org 
 (mailto:users-unsubscr...@wicket.apache.org)
 For additional commands, e-mail: users-h...@wicket.apache.org 
 (mailto: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-04 Thread Jeff Schneller
Look into restlet.org


Sent from my iPad

On Jan 4, 2012, at 10:36 PM, Daniel Watrous daniel.watr...@gmail.com wrote:

 That's a fantastic answer. I'll look at other solutions.
 
 Daniel
 
 On Wed, Jan 4, 2012 at 7:03 PM, 7zark7 7za...@gmail.com wrote:
 I know these sort of replies are annoying, but I don't think Wicket is a 
 good choice for handling web service calls - it's pretty easy to map other 
 paths to servlets or other handlers that better deal with PUT, DELETE, etc.
 
 --
 Anh My
 Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
 
 
 On Wednesday, January 4, 2012 at 3:49 PM, Daniel Watrous wrote:
 
 I'm building a web service and I wonder if there's some way to detect
 and do something unique when calling a ResourceReference with
 different HTTP methods.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org 
 (mailto:users-unsubscr...@wicket.apache.org)
 For additional commands, e-mail: users-h...@wicket.apache.org 
 (mailto: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: Wicket on Google App Engine

2012-01-04 Thread Hans Lesmeister 2
Hi Daniel,


Daniel Watrous-2 wrote
 
 I tried putting in this:
 getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND);
 

GAE does not allow you to start additional threads and that's what
setResourcePollFrequency(...) does I think

-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-on-Google-App-Engine-tp4259205p4264458.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: Wicket on Google App Engine

2012-01-04 Thread Martin Grigorov
On Thu, Jan 5, 2012 at 8:40 AM, Hans Lesmeister 2
hans.lesmeis...@lessy-software.de wrote:
 Hi Daniel,


 Daniel Watrous-2 wrote

 I tried putting in this:
 getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND);

True!
GAE Initializer actually disables the ModificationWatcher.



 GAE does not allow you to start additional threads and that's what
 setResourcePollFrequency(...) does I think

 -
 --
 Regards,
 Hans

 http://cantaa.de

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-on-Google-App-Engine-tp4259205p4264458.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




-- 
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



Re: Wicket on Google App Engine

2012-01-04 Thread Ernesto Reinaldo Barreiro
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.comwrote:

 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
directorysrc/main/webapp/WEB-INF/directory

  outputDirectorysrc/main/webapp/WEB-INF/classes/outputDirectory

 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 s...@meiers.net 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 Meiers...@meiers.net  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 Meiers...@meiers.netwrote:
 
  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
 
 
 
 com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:133)
 at
 
 
 
 com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:131)
 at java.security.AccessController.doPrivileged(Native Method)
 at
 
 
 
 com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:130)
 at
 
 
 
 org.apache.wicket.util.lang.WicketObjects.newInstance(WicketObjects.java:377)
 at
  org.apache.wicket.Application.addInitializer(Application.java:577)
 at org.apache.wicket.Application.load(Application.java:615)
 at
 
 
 org.apache.wicket.Application.initializeComponents(Application.java:501)
 at
  org.apache.wicket.Application.initApplication(Application.java:808)
 at
 
 
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
 at
 
 
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
 at
  org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
 at
 
 
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 

Re: my book updated for Wicket 1.5.x

2012-01-04 Thread Rain... Is wet!
I already got Wicket In Action, and am playing with the idea to buy your book
aswell.
What gets in my way is the idea to buy the paper-version and then have to
pay (even with a discount) for the electronic-version again...
To bring an example on whats in my mind: If I paied for the business class
in an airplane but - as an example for the reason to get the chance to sit
beside a beautiful woman - want to get a seat in the economy class I
although won't have to pay again...

-
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/my-book-updated-for-Wicket-1-5-x-tp4242471p4264587.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: Wicket on Google App Engine

2012-01-04 Thread Ernesto Reinaldo Barreiro
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.comwrote:

 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
directorysrc/main/webapp/WEB-INF/directory

  outputDirectorysrc/main/webapp/WEB-INF/classes/outputDirectory

 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 s...@meiers.net 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 Meiers...@meiers.net  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 Meiers...@meiers.net
  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
 
 
 
 com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:133)
 at
 
 
 
 com.google.appengine.tools.development.agent.runtime.Runtime$2.run(Runtime.java:131)
 at java.security.AccessController.doPrivileged(Native
 Method)
 at
 
 
 
 com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:130)
 at
 
 
 
 org.apache.wicket.util.lang.WicketObjects.newInstance(WicketObjects.java:377)
 at
  org.apache.wicket.Application.addInitializer(Application.java:577)
 at org.apache.wicket.Application.load(Application.java:615)
 at
 
 
 org.apache.wicket.Application.initializeComponents(Application.java:501)
 at
  org.apache.wicket.Application.initApplication(Application.java:808)
 at
 
 
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
 at