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

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

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

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 -

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

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

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

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(); } }

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

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:

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

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

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:

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

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

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

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

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

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,

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

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,

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

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:

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

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

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

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

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

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

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

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

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

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,

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

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.

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

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

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