RE: Wicket/Spring Boilerplate

2012-03-02 Thread Michael Laccetti
  #2 I'm not too sure about - doesn't calling getClientInfo() cause a 
  redirect to
 a temporary page to collect that information?
 
 No, this info will be extracted from the User-Agent header. The extended
 info like browser dimensions are extracted with the special page.

So, I call WebClientInfo.getUserAgent(), not 
WebClientInfo.getProperties.getNavigatorAppName()?


RE: Wicket/Spring Boilerplate

2012-03-01 Thread Michael Laccetti
#1 is a wonderful suggestion - was that added in 1.5?

#2 I'm not too sure about - doesn't calling getClientInfo() cause a redirect to 
a temporary page to collect that information?

#3 I originally tried it that way, but for some reason, no matter what I did, I 
couldn't get the filter to recognize the path I set for it.  Oddly enough, when 
I switched to the servlet 3 annotation, it worked.  I'd love to back this one 
out, as it forces a servlet 3 container.

Mike

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: March-01-12 2:51 AM
To: users@wicket.apache.org
Subject: Re: Wicket/Spring Boilerplate

Hi,

Thanks for sharing it!

Here are some ideas:

https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/HomePage.java#L25
Better override #renderHead(IHeaderResponse response) and use 
'response.renderXYZ()'

https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/HomePage.java#L20
You can use Session#getClientInfo() to see what is the client and if it IE then 
contribute this special .js file

https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/app/WicketFilter.java#L9
I think you can drop this class and configure the original WicketFilter in 
https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/app/WebAppInitializer.java

On Thu, Mar 1, 2012 at 2:07 AM, Michael Laccetti mich...@limone.me wrote:
 Just a quick note to folks that may be interested that I've created a Maven 
 archetype that ties together Wicket 1.5 and Spring 3.1, along with Hibernate 
 4.1/JPA 2 and logback.  It is purely annotation driven, and has no XML 
 configuration files.  Currently, users must clone the git repository [1] to 
 use the archetype, but it should be hosted on Sonatype's OSS Nexus shortly.

 Questions and comments appreciated.  :)

 Michael

 1 - https://github.com/limone/wicket-spring-boilerplate



--
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/Spring Boilerplate

2012-03-01 Thread Emmanouil Batsis (Manos)

On 03/01/2012 02:07 AM, Michael Laccetti wrote:

Just a quick note to folks that may be interested that I've created a Maven 
archetype that ties together Wicket 1.5 and Spring 3.1, along with Hibernate 
4.1/JPA 2 and logback.  It is purely annotation driven, and has no XML 
configuration files.  Currently, users must clone the git repository [1] to use 
the archetype, but it should be hosted on Sonatype's OSS Nexus shortly.

Questions and comments appreciated.  :)


Michael, I have an app on  wicket 1.4.x, spring 2.5.x and *non-JPA* 
hibernate 3.5.x. Without taking wicket or other API changes into 
account, can you suggest whether or even how this archetype could be 
helpful in migrating to 1.5/3.1/4.1 and perhaps JPA later on? I wouldn't 
want to migrate to JPA right now.


Many thanks for the archetype in any case!

Manos

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



RE: Wicket/Spring Boilerplate

2012-03-01 Thread Michael Laccetti
 Michael, I have an app on  wicket 1.4.x, spring 2.5.x and *non-JPA* hibernate
 3.5.x. Without taking wicket or other API changes into account, can you
 suggest whether or even how this archetype could be helpful in migrating to
 1.5/3.1/4.1 and perhaps JPA later on? I wouldn't want to migrate to JPA right
 now.
 
 Many thanks for the archetype in any case!
 
 Manos

There's not much to getting JPA to work vs. Hibernate - the boilerplate is set 
to use Hibernate specifically for JPA.  The only changes required would be 
performed in the SpringConfiguration class - you'd remove the 
LocalContainerEntityManagerFactoryBean (say that fast).  Instead, you'd use a 
LocalSessionFactoryBean that spits out the Hibernate SessionFactory object.  
You could then remove the JpaVendorAdapter method and change the 
TransactionManager method to return a HibernateTransactionManager.  Everything 
else should stay entirely the same.

Michael

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



Re: Wicket/Spring Boilerplate

2012-03-01 Thread Martin Grigorov
On Thu, Mar 1, 2012 at 8:49 PM, Michael Laccetti mich...@limone.me wrote:
 #1 is a wonderful suggestion - was that added in 1.5?

No, it is old.


 #2 I'm not too sure about - doesn't calling getClientInfo() cause a redirect 
 to a temporary page to collect that information?

No, this info will be extracted from the User-Agent header. The
extended info like browser dimensions are extracted with the special
page.


 #3 I originally tried it that way, but for some reason, no matter what I did, 
 I couldn't get the filter to recognize the path I set for it.  Oddly enough, 
 when I switched to the servlet 3 annotation, it worked.  I'd love to back 
 this one out, as it forces a servlet 3 container.

 Mike

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: March-01-12 2:51 AM
 To: users@wicket.apache.org
 Subject: Re: Wicket/Spring Boilerplate

 Hi,

 Thanks for sharing it!

 Here are some ideas:

 https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/HomePage.java#L25
 Better override #renderHead(IHeaderResponse response) and use 
 'response.renderXYZ()'

 https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/HomePage.java#L20
 You can use Session#getClientInfo() to see what is the client and if it IE 
 then contribute this special .js file

 https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/app/WicketFilter.java#L9
 I think you can drop this class and configure the original WicketFilter in 
 https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/app/WebAppInitializer.java

 On Thu, Mar 1, 2012 at 2:07 AM, Michael Laccetti mich...@limone.me wrote:
 Just a quick note to folks that may be interested that I've created a Maven 
 archetype that ties together Wicket 1.5 and Spring 3.1, along with Hibernate 
 4.1/JPA 2 and logback.  It is purely annotation driven, and has no XML 
 configuration files.  Currently, users must clone the git repository [1] to 
 use the archetype, but it should be hosted on Sonatype's OSS Nexus shortly.

 Questions and comments appreciated.  :)

 Michael

 1 - https://github.com/limone/wicket-spring-boilerplate



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



Re: Wicket/Spring Boilerplate

2012-02-29 Thread Martin Grigorov
Hi,

Thanks for sharing it!

Here are some ideas:

https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/HomePage.java#L25
Better override #renderHead(IHeaderResponse response) and use
'response.renderXYZ()'

https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/HomePage.java#L20
You can use Session#getClientInfo() to see what is the client and if
it IE then contribute this special .js file

https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/app/WicketFilter.java#L9
I think you can drop this class and configure the original
WicketFilter in
https://github.com/limone/wicket-spring-boilerplate/blob/master/src/main/resources/archetype-resources/src/main/java/app/WebAppInitializer.java

On Thu, Mar 1, 2012 at 2:07 AM, Michael Laccetti mich...@limone.me wrote:
 Just a quick note to folks that may be interested that I've created a Maven 
 archetype that ties together Wicket 1.5 and Spring 3.1, along with Hibernate 
 4.1/JPA 2 and logback.  It is purely annotation driven, and has no XML 
 configuration files.  Currently, users must clone the git repository [1] to 
 use the archetype, but it should be hosted on Sonatype's OSS Nexus shortly.

 Questions and comments appreciated.  :)

 Michael

 1 - https://github.com/limone/wicket-spring-boilerplate



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