Re: tomcat 6

2008-10-21 Thread Guðmundur Bjarni

If you decide to go for Jetty, you should try the run-jetty-run[1] plugin
that Eelco wrote. Basically if your project is set up right, i.e. web.xml in
the right place and so on. You can run it like any other Java Application
from Eclipse's run configurations.

regards,
Guðmundur Bjarni


[1] http://code.google.com/p/run-jetty-run/
-- 
View this message in context: 
http://www.nabble.com/tomcat-6-tp20064539p20086138.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Salve and Guice

2008-10-21 Thread Guðmundur Bjarni

I haven't used Salve with Wicket, but I've been using the wicket-guice
integration quite extensively. The reason I'm answering this is that I feel
that many of the use cases of Salve can be solved with pure vanilla Guice.
In cases where you can't control the instantiation of objects, you can use
static injection, which is a bit dirty, but IMO cleaner than
instrumentation. :) So this post is maybe a tiny bit off topic. :)

The way I've been doing it is by using the guice-servlet package which
allows you to extend a GuiceServletContextListener to create a Injector. To
tell your servlet container about this, put something similar into your
web.xml:

listener

listener-classdk.dtu.kiosk.guice.MyGuiceServletContextListener/listener-class
/listener

Then I use the wicket-guice integration for hooking the two together. To
bootstrap Wicket with Guice you simply use the following in your web.xml

filter
filter-namemyApplication/filter-name
filter-class
org.apache.wicket.protocol.http.WicketFilter
/filter-class
init-param
param-nameapplicationFactoryClassName/param-name
param-value

org.apache.wicket.guice.GuiceWebApplicationFactory
/param-value
/init-param
init-param
param-nameinjectorContextAttribute/param-name
param-valuecom.google.inject.Injector/param-value
/init-param
/filter

Voila! Now you can use the @Inject annotation in any Wicket component. You
also have the option of using Providers if you need something dep. injected
or in the difficult cases static injection.

regards,
Guðmundur Bjarni
-- 
View this message in context: 
http://www.nabble.com/Salve-and-Guice-tp20087649p20088079.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Salve and Guice

2008-10-21 Thread Guðmundur Bjarni

I agree that static injection is fugly, it makes unit tests very sad and
kills puppies, but in some cases its a necessary evil. Lets say for example
that it is only needed in a very few cases, then IMO pulling in Salve is a
bit of an overkill. I've tried out Salve, liked it but it's a bit of a
commitment to use compile time weaving/instrumentation.  

Last I checked, the InjectorHolder only worked with Spring and not with
Guice. I looked into fixing that some time ago but didn't finish that work.
I've got more time now if someone is interested? :)

regards,
Guðmundur Bjarni


igor.vaynberg wrote:
 
 there are cases where this approach plain old sucks.
 
 as you mentioned, if its not a component you have to use static injection
 which is fugly
 
 class mydataprovider implements idataprovider {
   public mydataprovider() {
  InjectorHolder.getInjector().inject(this);
   }
 }
 
 another problem is that the injector creates a proxy which in certain
 situations cant be done. eg your dependency is a class from a 3rd party
 library that does not have a default constructor, thus cglib cannot create
 a
 proxy.
 
 another advantage of salve is that it _removes_ the field from the class.
 so
 your classes are smaller and there are no serialization problems
 whatsoever
 as far as dependencies go.
 
 -igor
 

-- 
View this message in context: 
http://www.nabble.com/Salve-and-Guice-tp20087649p20100143.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-02 Thread Guðmundur Bjarni

I agree with Antoine.

Guðmundur Bjarni


Antoine van Wel wrote:
 
 1) Generifying* Wicket
   [X] Can best be done like currently in the 1.4 branch, where models
 and components are both generified. I care most about the improved
 static type checking generified models and components give Wicket.
 
 This is the only solution that makes sense, the other options are
 either a partial solution (which is a *very, very* bad thing, mixing
 generic with non-generic code INSIDE a framework!?!?) or no solution
 at all (which has my preference over a partial solution, since at
 least it is concise).
 
 
 2) How strongly do you feel about your choice above?
   [X] I might rethink upgrading if my choice doesn't win.
 
 Seriously, no generics at all is better than a partial solution. Since
 upgrading involves more issues than generics alone, I may rethink
 only... If the decision to upgrade boils down to this issue, then I
 won't.
 

-- 
View this message in context: 
http://www.nabble.com/users%2C-please-give-us-your-opinion%3A-what-is-your-take-on-generics-with-Wicket-tp17589984p17596960.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to set the path for a uploadfolder?

2008-04-24 Thread Guðmundur Bjarni Ólafsson
If memory serves, then you can get access to the servlet request, and pull
out the context path from your page via:

getWebRequestCycle().getWebRequest().getHttpServletRequest()

regards,
Guðmundur


On Thu, Apr 24, 2008 at 11:20 AM, unka_hahrry [EMAIL PROTECTED]
wrote:


 Hi!

 I want to save images to a specified uploadfolder, but I don't want to
 define the Folder object with an absolute path. Is there a possiblity to
 define a Folder relative to the context root?
 --
 View this message in context:
 http://www.nabble.com/How-to-set-the-path-for-a-uploadfolder--tp16848200p16848200.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: [WUG] Copenhagen

2008-04-15 Thread Guðmundur Bjarni

Hey Nino,

I just saw this message now. I signed up myself and a friend of mine who is
quite interested about Wicket.

regards,
Guðmundur Bjarni



Nino.Martinez wrote:
 
 Hi
 
 This is a reminder, and callout as it would be really nice to be some 
 more people in order to get discussions going.
 
 Heres the proposed content:
 
 *Wicket-Spring-JPA-Hibernate (Could also be a discussion of the 
 upcomming archetype wicket Iolith)
 *Wicket Testsing experiences
 *Creating behaviors
 *Selling Wicket (to your company, and customers)
 * Integrating javascript libraries with wicket
 
 Please sign up here:
 23 april 16 hrs is date and time.
 http://cwiki.apache.org/confluence/display/WICKET/Community+meetups
 
 If you have any suggestions on content, etc please write. This also goes 
 for requests on content.
 
 -- 
 -Wicket for love
 
 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-WUG--Copenhagen-tp16449433p1668.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven multi module app using wicket spring hibernate

2008-04-07 Thread Guðmundur Bjarni

Hi,

I've been using Spring and Wicket together with no problems. My web.xml part
looks something like this:

filter
filter-namewicketFilter/filter-name
filter-class
org.apache.wicket.protocol.http.WicketFilter
/filter-class
init-param
param-nameapplicationFactoryClassName/param-name
param-value

org.apache.wicket.spring.SpringWebApplicationFactory
/param-value
/init-param
init-param
param-namebeanName/param-name
param-valuewicketApplication/param-value
/init-param
/filter

I see that you are using the servlet rather than a filter, but that should
not pose any problems, but the filter is the preferred way in Wicket 1.3.

regards,
Guðmundur Bjarni
-- 
View this message in context: 
http://www.nabble.com/Maven-multi-module-app-using-wicket-spring-hibernate-tp16537252p16537448.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]