Re: Spring injection not working

2008-07-23 Thread landry soules
Actually, if the class using userDAO doesn't extend Component, you have 
to add InjectorHolder.getInjector().inject(this)  in the constructor 
of the calling class.



David Nedrow wrote:
I believe (though I'm clearly wrong in that belief) that I have 
everything properly configured to allow spring injection along the 
lines of:


import com.foo.dao.UserDAO;
@Spring
private UserDAO userDAO;

Meaning that for a bean defined in the applicationContext as . . .


ref="entityManagerFactory" />



. . . I don't have to do anything else to utilize the bean. There is 
an added complexity in that I am using interfaces for the DAOs, ie. 
UserDAO implements IUserDAO.


I've tried using different combinations of interface and dao, like the 
following


import com.foo.dao.IUserDAO;
import com.foo.dao.UserDAO;
@Spring(name=userDAO)
private IUserDAO userDAO;

No matter what I've tried, userDAO remains unitialized.

I have to resort to the following to get hold of the DAO...

ApplicationContextapplicationContext = 
((WicketApplication) Application.get()).getContext();
IUserDAOdao= 
UserDAO.getFromApplicationContext(applicationContext);




Anyone have a guess at what I'm not doing correctly?

I should note that in the main application class, the init makes the 
following call . . .


addComponentInstantiationListener(new 
SpringComponentInjector(this));



And the entity manager is defined as follows . . .


class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> 

ref="persistenceUnitManager"/>





-David

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




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



Re: First Day Disgust!

2007-09-08 Thread landry soules

I totally agree with Jan.
There's no black magic occurring around Wicket, and the best way to go 
for a newbie may be to simply create a new web project in Eclipse WTP or 
Netbeans, drop wicket.jar, log4j.jar, and slf4j-log4j.jar (if you're 
using wicket1.3), and follow HelloWorld sample from here  : 
http://wicket.apache.org/examplehelloworld.html.

This way, you save the 5 extra minutes needed to install Maven  ;-)

Jan Kriesten a écrit :

hi,

the problem is, that many to be users aren't that deep into oo programming as
expected. also, people trying out wicket don't come from a maven background but
maybe from plain jsp or other frameworks - or even php.

  

$ mvn archetype:create -DarchetypeGroupId=org.apache.wicket
  -DarchetypeArtifactId=wicket-archetype-quickstart
  -DarchetypeVersion=1.3.0-beta3
  -DgroupId=com.mycompany
  -DartifactId=myproject
$ cd myproject
$ more pom.xml



i've this suggestions now quite a few times and many users did actually say 'i
don't have maven installed'. many users are just doing some web programming as
hobby and trying out new things once in a while.

it surely isn't the fault of the developers what knowledge people have when they
stumble over wicket and find it worth a look. but to start with wicket for a
newcomer it might be helpful to not be dependend on maven.

on the other hand, i really don't understand why it's so hard to create a small
wicket-project by hand: just set up a java project and add the wicket.jar to the
build path and start coding. one has then to see for his own servlet container,
but that one should know.

regards, --- jan.


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


  



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



How to get a list of the connected users ?

2007-09-11 Thread landry soules

Hello,

I have to display a list of the connected users in a page of my app. I 
know it sounds definitely dumb, but i don't know how to achieve this...
Users login to my site (i extended AuthenticatedWebApplication), and 
then i update a "isConnected" flag in users table.
Thus i display the connected users in a list view, retrieved by the 
"isConnected" flag.
It implies of course that users will use a "logoff" button when they 
leave, which i don't believe they will do...
I'm aware it's not a Wicket related problem, but a more generally web 
apps problem, but what is the best solution to deal with this ?

Thanks for your answers.

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



Re: How to get a list of the connected users ?

2007-09-12 Thread landry soules
Thanks a lot for your answers, guys.
I will try the 2 approches.
Cheers.

Landry

2007/9/12, Matthijs Wensveen <[EMAIL PROTECTED]>:
>
> landry soules wrote:
> > Hello,
> >
> > I have to display a list of the connected users in a page of my app. I
> > know it sounds definitely dumb, but i don't know how to achieve this...
> > Users login to my site (i extended AuthenticatedWebApplication), and
> > then i update a "isConnected" flag in users table.
> > Thus i display the connected users in a list view, retrieved by the
> > "isConnected" flag.
> > It implies of course that users will use a "logoff" button when they
> > leave, which i don't believe they will do...
> > I'm aware it's not a Wicket related problem, but a more generally web
> > apps problem, but what is the best solution to deal with this ?
> > Thanks for your answers.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> If you don't want to tread on the lower-level servlet API, maybe you
> could do something with WebApplication.sessionDestroyed or
> ISessionStore.unbind. Although I'm not exactly sure when they are called
> (just browsing javadoc, that's all).
>
> Matthijs
>
> --
> Matthijs Wensveen
> Func. Internet Integration
> W http://www.func.nl
> T +31 20 423
> F +31 20 4223500
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Auto refreshing GridView ?

2007-09-12 Thread landry soules
Hello,

I display a list in a GridView.
I need that list to update automatically every x seconds.
I thought that adding an AjaxSelfUpdatingTimerBehavior to my GridView would
do the trick, but it doesn't work.
Any suggestion ?

Thanks for your answers.

Landry


Re: Getting started with Hibernate and Wicket

2007-10-03 Thread Landry Soules

You will find good examples here :

http://www.wicketstuff.org/wicket13/repeater/

and

http://cwiki.apache.org/WICKET/reading-from-a-database.html


Neil B. Cohen a écrit :
I'm trying to learn both Hibernate and Wicket at the same time, and I 
could use a couple of pointers...


I have managed to take the Wicket 'signin' example and added a tiny 
Hibernate database which I can access to extract a 'User' object to 
validate the user's name and password. That works fine...


But now I would like to be able to pull a list of objects (Users) out 
of the database and display them in a table on a new page (with 
columns like 'userName, 'emailAddr', 'Role' etc. etc.) I think I can 
get the list of data from the database using Hibernate (although I'm 
not sure the best way to manage a table if it has thousands of rows, 
which mine will eventually have...) But I'm not sure how to set up the 
Wicket page to display that data. Can someone point me at some simple 
table examples that would do that??


thanks very much,

nbc


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





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



Re: Is Beta5 coming soon? Beta4 has caused these issues for us....

2007-11-02 Thread landry soules
Hello

Please Al, what is the fix for this problem with slf4j ?
I spent half a day trying every possible combination between log4j and
slf4j, and got nothing but a strong headache ( and "NoSuchMethodError") !!!




2007/10/30, Al Maw <[EMAIL PROTECTED]>:
>
> Chris Lintz wrote:
> > Any chance of getting a Beta5 out soon.   As luck would have it, Beta4
> to say
> > the least has been frustrating for us.
> >
> > So far beta4 has caused these problems in our app (all stuff that worked
> in
> > Beta3)
> >
> > 1) AJAXLink is broke when using the Crypted URL encoding strategy.
> > 2) StringResourceModel change on toString() method (this is fine, we
> > refactored and are now using getString() )
> > 3) UpdateFeedback gone -
> >
> http://www.nabble.com/1.3.0-beta4%3A-updateFeedback%28%29-gone--tf4707707.html
> > 4) Pages are stateful now because of -
> >
> http://www.nabble.com/Stateless-page-creating-session-tf4604432.html#a13147396
> >
> > Any chance of getting a Wicket beta5 out with at least the stateless
> page
> > fix?   We have a high traffic site so the thought of generating some
> where
> > in the neighborhood of hundreds of thousands session IDs on disk for
> pages
> > as simple as a WebMarkupcontainer and a Label is very scary thought.
>
> Additionally, the maven 2 quickstart is broken because it uses the wrong
> version of slf4j-log4j (which results in a NoSuchMethodError). Easy to
> fix if you know how, but not good that you should have to. ;-(
>
> +1 on getting beta 5 out ASAP.
>
> Al
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Is Beta5 coming soon? Beta4 has caused these issues for us....

2007-11-02 Thread landry soules
Thanks for your answers, but still no success :
I tried (once again) to use maven to generate a brand new project, but
eclipse freezes when i import the project generated with "mvn
eclipse:eclipse -DdownloadSources=true"...

Is there something i'm missing ? In my classpath, i have
slf4j-log4j12-1.4.2.jar + log4j-1.2.14.jar, and still the infamous
"NoSuchMethodError"

Should i better rollback to wicket 1.3 beta2 ?


2007/11/2, Gerolf Seitz <[EMAIL PROTECTED]>:
>
> you have to use slf4j version 1.4.2 (instead of 1.0.x) in your pom file
>
> Gerolf
>
> On Nov 2, 2007 8:11 PM, landry soules <[EMAIL PROTECTED]> wrote:
>
> > Hello
> >
> > Please Al, what is the fix for this problem with slf4j ?
> > I spent half a day trying every possible combination between log4j and
> > slf4j, and got nothing but a strong headache ( and "NoSuchMethodError")
> > !!!
> >
> >
> >
> >
> > 2007/10/30, Al Maw <[EMAIL PROTECTED]>:
> > >
> > > Chris Lintz wrote:
> > > > Any chance of getting a Beta5 out soon.   As luck would have it,
> Beta4
> > > to say
> > > > the least has been frustrating for us.
> > > >
> > > > So far beta4 has caused these problems in our app (all stuff that
> > worked
> > > in
> > > > Beta3)
> > > >
> > > > 1) AJAXLink is broke when using the Crypted URL encoding strategy.
> > > > 2) StringResourceModel change on toString() method (this is fine, we
> > > > refactored and are now using getString() )
> > > > 3) UpdateFeedback gone -
> > > >
> > >
> >
> http://www.nabble.com/1.3.0-beta4%3A-updateFeedback%28%29-gone--tf4707707.html
> > > > 4) Pages are stateful now because of -
> > > >
> > >
> >
> http://www.nabble.com/Stateless-page-creating-session-tf4604432.html#a13147396
> > > >
> > > > Any chance of getting a Wicket beta5 out with at least the stateless
> > > page
> > > > fix?   We have a high traffic site so the thought of generating some
> > > where
> > > > in the neighborhood of hundreds of thousands session IDs on disk for
> > > pages
> > > > as simple as a WebMarkupcontainer and a Label is very scary thought.
> > >
> > > Additionally, the maven 2 quickstart is broken because it uses the
> wrong
> > > version of slf4j-log4j (which results in a NoSuchMethodError). Easy to
> > > fix if you know how, but not good that you should have to. ;-(
> > >
> > > +1 on getting beta 5 out ASAP.
> > >
> > > Al
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
>


Re: Is Beta5 coming soon? Beta4 has caused these issues for us....

2007-11-02 Thread landry soules
Actually, i didn't go on with maven, since my project is already quite
advanced now, i don't want to reconfigure it to use maven. I just tried to
create a sample project to figure out what is the correct combination of
slf4j/log4j to use (bad idea, since it appears to be broken in the original
wicket pom).
So i'm back in my real eclipse project, and this neverending error :

Exception in thread "ModificationWatcher Task" java.lang.NoSuchMethodError:
org.slf4j.Logger.isTraceEnabled()Z
at org.apache.wicket.util.thread.Task$1.run(Task.java:103)
at java.lang.Thread.run(Thread.java:595)

 even though i'm using slf4j-log4j12-1.4.2.jar + log4j-1.2.14.jar.



2007/11/2, Gwyn Evans <[EMAIL PROTECTED]>:
>
> Hi landry,
>
> Did you modify the SLF version specified in the created pom.xml before
> trying to import it?
>
> /Gwyn
>
> Friday, November 2, 2007, 8:36:37 PM, landry soules <
> [EMAIL PROTECTED]> wrote:
>
> ls> Thanks for your answers, but still no success :
> ls> I tried (once again) to use maven to generate a brand new project, but
> ls> eclipse freezes when i import the project generated with "mvn
> ls> eclipse:eclipse -DdownloadSources=true"...
>
> ls> Is there something i'm missing ? In my classpath, i have
> ls> slf4j-log4j12-1.4.2.jar + log4j-1.2.14.jar, and still the infamous
> ls> "NoSuchMethodError"
>
> ls> Should i better rollback to wicket 1.3 beta2 ?
>
>
> ls> 2007/11/2, Gerolf Seitz <[EMAIL PROTECTED]>:
> >>
> >> you have to use slf4j version 1.4.2 (instead of 1.0.x) in your pom file
> >>
> >> Gerolf
> >>
> >> On Nov 2, 2007 8:11 PM, landry soules <[EMAIL PROTECTED]>
> wrote:
> >>
> >> > Hello
> >> >
> >> > Please Al, what is the fix for this problem with slf4j ?
> >> > I spent half a day trying every possible combination between log4j
> and
> >> > slf4j, and got nothing but a strong headache ( and
> "NoSuchMethodError")
> >> > !!!
> >> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Is Beta5 coming soon? Beta4 has caused these issues for us....

2007-11-03 Thread landry soules
Sorry Al, but you lost your money  ;-)

I put back slf4j-api-1.4.2.jar , and still the same problem... Using the
jars suggested by Cristi doesn't help either. But since it seems i'm the
only one to still have the problem, must be a problem with my classpath. I
will recheck after deploying the project in a war. Maybe it's just eclipse
WTP that does some weird things with my classpath.
As always, thanks a lot for your support, guys.

2007/11/3, Al Maw <[EMAIL PROTECTED]>:
>
> landry soules wrote:
> > Actually, i didn't go on with maven, since my project is already quite
> > advanced now, i don't want to reconfigure it to use maven. I just tried
> to
> > create a sample project to figure out what is the correct combination of
> > slf4j/log4j to use (bad idea, since it appears to be broken in the
> original
> > wicket pom).
> > So i'm back in my real eclipse project, and this neverending error :
> >
> > Exception in thread "ModificationWatcher Task"
> java.lang.NoSuchMethodError:
> > org.slf4j.Logger.isTraceEnabled()Z
> > at org.apache.wicket.util.thread.Task$1.run(Task.java:103)
> > at java.lang.Thread.run(Thread.java:595)
> >
> >  even though i'm using slf4j-log4j12-1.4.2.jar + log4j-1.2.14.jar.
>
> You also need slf4j-api-1.4.2.jar. I'd lay money on your not having that
> version on your classpath (or having an earlier version as well).
>
> Regards,
>
> Al
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Is Beta5 coming soon? Beta4 has caused these issues for us....

2007-11-04 Thread landry soules
Actually, it seems that the option "class" is useful in my case, not "gc"
I couldn't find yet slf4j.Logger among the thousands lines generated(eclipse
only retains the newer lines, erasing the olders), but i found something
interesting :
log4j.Logger is loaded from cayenne.jar...
I'm quite puzzled : do i have to start spamming cayenne users list ? Or is
this a bug (or at least a dangerous implementation) in beta4, that can cause
problems not only with Cayenne, but also with some other frameworks ? Or
maybe i can change the classpath load order in eclipse ?
Thanks for your support.


2007/11/4, Johan Compagner <[EMAIL PROTECTED]>:
>
> no i don't think Al lost,
> 1.4.2 or 1.4.3 that shouldn't matter
> But somewhere in your classpath you have and old version of 1 of the jars
>
> Please start the java process up with -verbose:gc and see what jar file it
> gives for org.slf4j.Logger
>
> johan
>
>
>
> On 11/4/07, landry soules <[EMAIL PROTECTED]> wrote:
> >
> > Sorry Al, but you lost your money  ;-)
> >
> > I put back slf4j-api-1.4.2.jar , and still the same problem... Using the
> > jars suggested by Cristi doesn't help either. But since it seems i'm the
> > only one to still have the problem, must be a problem with my classpath.
> I
> > will recheck after deploying the project in a war. Maybe it's just
> eclipse
> > WTP that does some weird things with my classpath.
> > As always, thanks a lot for your support, guys.
> >
> > 2007/11/3, Al Maw <[EMAIL PROTECTED]>:
> > >
> > > landry soules wrote:
> > > > Actually, i didn't go on with maven, since my project is already
> quite
> > > > advanced now, i don't want to reconfigure it to use maven. I just
> > tried
> > > to
> > > > create a sample project to figure out what is the correct
> combination
> > of
> > > > slf4j/log4j to use (bad idea, since it appears to be broken in the
> > > original
> > > > wicket pom).
> > > > So i'm back in my real eclipse project, and this neverending error :
> > > >
> > > > Exception in thread "ModificationWatcher Task"
> > > java.lang.NoSuchMethodError:
> > > > org.slf4j.Logger.isTraceEnabled()Z
> > > > at org.apache.wicket.util.thread.Task$1.run(Task.java:103)
> > > > at java.lang.Thread.run(Thread.java:595)
> > > >
> > > >  even though i'm using slf4j-log4j12-1.4.2.jar + log4j-1.2.14.jar.
> > >
> > > You also need slf4j-api-1.4.2.jar. I'd lay money on your not having
> that
> > > version on your classpath (or having an earlier version as well).
> > >
> > > Regards,
> > >
> > > Al
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
>


Re: Is Beta5 coming soon? Beta4 has caused these issues for us....

2007-11-05 Thread landry soules
Hello guys

I finally won't take your time anymore with my problem of dependencies : it
was a simple PEBCAK !
I got the following error :
Exception in thread "ModificationWatcher Task" java.lang.NoSuchMethodError:
org.apache.log4j.Logger.isTraceEnabled()Z

It was coming from log4j.Logger, not from slf4j.Logger, and the cause was i
used cayenne.jar (wich contains cayenne and all its dependencies, including
an older version of log4j) , instead of  cayenne-nodeps.jar !

Al, i owe you a beer if you come to Paris  ;-)

Thanks a lot for your patience.



2007/11/4, Al Maw <[EMAIL PROTECTED]>:
>
> landry soules wrote:
> > Sorry Al, but you lost your money  ;-)
> >
> > I put back slf4j-api-1.4.2.jar , and still the same problem... Using the
> > jars suggested by Cristi doesn't help either. But since it seems i'm the
> > only one to still have the problem, must be a problem with my classpath.
> I
> > will recheck after deploying the project in a war. Maybe it's just
> eclipse
> > WTP that does some weird things with my classpath.
> > As always, thanks a lot for your support, guys.
>
> Gah. Can't believe you haven't sorted this issue out yet!
>
> It's conceptually really simple...
>
> org.slf4j.Logger#isTraceEnabled()
>
> ...is a method in the org.slf4j.Logger interface. That interface is in
> the main SLF4J API JAR.
>
> The isTraceEnabled() method, according to the javadoc, has been
> available in that interface since version 1.4.
>
> So you either don't have slf4j-api-1.4.x on your classpath, or you also
> have a version prior to 1.4 also your classpath which is being picked up
> instead.
>
> If both of those two things weren't the case, you wouldn't be having
> this issue.
>
> To check the classpath of a running project in Eclipse, Right click on
> the root node in the debug dialog and choose "Properties". You can find
> the classpath in the dialog that is shown.
>
>
> Regards,
>
> Al
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Getting started

2007-11-22 Thread landry soules
Have a look at CompoundPropertyModel, or BoundCompoundPropertyModel.
The different models are explained in details here :
http://cwiki.apache.org/WICKET/working-with-wicket-models.html




2007/11/22, Gervais <[EMAIL PROTECTED]>:
>
> Ho.. yes it is possible. .. really i'm a stupid boy !
>
> But is it also possible to give one model for all content of the page ?
>
> public class MyPage extends WebPage {
>
> public MyPage(PageModel model) {
>
>add(new Label("welcome", model));
>add(new ExternalLink("toGoogle", model));
>
> }
> }
>
> Maybe, this klind of model already exist ? If not what existing model
> can i extend or implements to do that ?
> Also is it possible to give objects to page by a setter ? I suppose that
> it isn't beacause page was rendered after the constructor.
>
>
> Dipu Seminlal a écrit :
> > Is it not possible to pass those objects itself to the page in the
> constructor.
> > Thats how i do it, may be i don't understand your problem correctly,
> > hopefully someone else here will be able to help you.
> >
> > regards
> > dipu
> >
> >
> >
> > On Nov 22, 2007 4:01 PM, Gervais <[EMAIL PROTECTED]> wrote:
> >
> >> Ho, yes i imagine it like that.
> >>
> >> But in my case, and i suppose many other, i get information from many
> >> object/beans that contains values stored in database.
> >>
> >> In fact i surrely use two java.util.List (Annoucements and Notes) and
> >> other objects for paragraph and links but i don't now what kinds of
> >> objects. Must i create one class per non static item to be displayed ?
> >>
> >> Dipu Seminlal a écrit :
> >>
> >>
> >>> Is the content of your  page (paragraph, links, list etc ) static in
> >>> nature, then you can just write it directly in html,
> >>>
> >>> If it is not static in nature where do you get it from and in what
> form
> >>>
> >>> If you have an object that is initialised with the data to populate in
> >>> you StartupPage, you can have a constructor like the following
> >>>
> >>> public StartupPage(YourStartupContentObject foo)
> >>> {
> >>>add(new Label("message1", foo.getMessage1()));
> >>>   add(new Label("message2", foo.getMessage2()));
> >>>
> >>>   add(new MultilineLabel("message2", foo.getparagraph()));
> >>> }
> >>>
> >>> Or
> >>>
> >>> public StartupPage()
> >>> {
> >>>YourStartupContentObject foo = fetchTheContent();
> >>>add(new Label("message1", foo.getMessage1()));
> >>>   add(new Label("message2", foo.getMessage2()));
> >>>
> >>>   add(new MultilineLabel("message2", foo.getparagraph()));
> >>> }
> >>>
> >>> Hope you get the Idea
> >>>
> >>> regards
> >>> dipu
> >>>
> >>> On Nov 22, 2007 3:23 PM, Gervais <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
>  Ok thanks.
> 
>  But y have another question. (i try to translate it corretcly).
> 
>  For beginning i have created an application named "Startup" with one
>  page named "StartupPage".
>  Below is my "StartupPage" code :
> 
>  # Code start
> 
> --
>  public class StartupPage extends WebPage {
> 
>  private TestBean bean;
> 
>  public StartupPage() {
> 
>  bean=new TestBean();
>  bean.setWelcome("Welcome text bla bla bla");
> 
>  add(new Label("test", new PropertyMdel(bean, "welcome") ));
> 
>  }
>  }
>  # Code end
> 
> --
> 
>  It works great but my page "StartupPage.html" must contains more than
>  one welcome message.
>  - Must i have one attribute (in my bean) per item to display ?
>  - If i must have one attribute in my bean per item to display, it
> become
>  a Model. If it become a model it must implements or extends a model.
>  What model ?
>  --> How can i correctly create a page that contains "only" paragraph,
>  links and list ?
> 
> 
> 
> 
>  Dipu Seminlal a écrit :
> 
> 
> 
> > We don't do imports, we extends ! checkout markup inheritance
> >
> > http://cwiki.apache.org/WICKET/markup-inheritance.html
> >
> > regards
> > dipu
> >
> > On Nov 22, 2007 2:48 PM, Gervais <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >> Hy all,
> >>
> >> I'm new in the famous wicket world ! I need to start learning
> Wicket but
> >> i can't found docs that explain more than just doing a HelloWrold
> or a
> >> GuestBook.
> >> In fact i need to use Wicket with Spring but for that i first need
> to
> >> understand and play with wicket. So i have many questions.
> >>
> >> 1° Is there a way for stupid frenchies that don't speak english
> like me
> >> to talk about Wicket ? (If not sorry for my poor english)
> >>
> >>
> >> 2° How can i import

2 questions on Include

2008-08-18 Thread landry soules

Hello,

In my firm, we're currently using a homegrown component-like framework, 
based on cgi-perl scripts calling servlets. I would like to prove my 
boss how smooth the transition towards Wicket could be.
I'm trying to make a first step, replacing the perl scripts with Wicket, 
and calling the components (here servlets), with Include. But i have 2 
problems :


1/ When i call a servlet that has several parameters, for example  
add(*new** 
*Include("maxMin","http://myserver/maxminservlet?id=0001&periodes=1st;1a;";));   
Wicket actually replaces "&" with "&", as shown in the trace :
DEBUG - UrlResourceStream  - cannot convert url: 
http://myserver/maxminservlet?id=0001&periodes=1st;1a; to file (URI 
scheme is not "file"), falling back to the inputstream for polling
This alters my servlet's behaviour, is there a mean to avoid this 
substitution ?


2/ Is it possible to catch the content of the include, and so possibly 
modify it before it is actually displayed in my Wicket page ?



Thanks for your help


Landry

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



Re: 2 questions on Include

2008-08-19 Thread landry soules
Thanks a lot for your answer, Cemal, my first problem is solved !
For the second one, i can get the content, thanks to your explanation, but
can't figure out how to modify it before it's displayed.
Here is what i do :

add(new Include("stat",
"http://myurl";) {
protected void onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag) {
super.onComponentTagBody(markupStream, openTag);
String content = importAsString();

   logger.debug(content);
}
}.setEscapeModelStrings(false));


But how can i inject my modified content back to my component ?

Best regards.


Landry



2008/8/19 jWeekend <[EMAIL PROTECTED]>

>
> Landry,
>
> 1 - setEscapeModelStrings(false)
> 2 - Subclass Include. Override onComponentTagBody and use importAsString()
>
> Regards - Cemal
> http://www.jWeekend.co.uk http://jWeekend.co.uk
>
>
> landry soules wrote:
> >
> > Hello,
> >
> > In my firm, we're currently using a homegrown component-like framework,
> > based on cgi-perl scripts calling servlets. I would like to prove my
> > boss how smooth the transition towards Wicket could be.
> > I'm trying to make a first step, replacing the perl scripts with Wicket,
> > and calling the components (here servlets), with Include. But i have 2
> > problems :
> >
> > 1/ When i call a servlet that has several parameters, for example
> > add(*new**
> > *Include("maxMin","http://myserver/maxminservlet?id=0001&periodes=1st;1a
> ;"));
> > Wicket actually replaces "&" with "&", as shown in the trace :
> > DEBUG - UrlResourceStream  - cannot convert url:
> > http://myserver/maxminservlet?id=0001&periodes=1st;1a; to file (URI
> > scheme is not "file"), falling back to the inputstream for polling
> > This alters my servlet's behaviour, is there a mean to avoid this
> > substitution ?
> >
> > 2/ Is it possible to catch the content of the include, and so possibly
> > modify it before it is actually displayed in my Wicket page ?
> >
> >
> > Thanks for your help
> >
> >
> > Landry
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/2-questions-on-Include-tp19036146p19041450.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: 2 questions on Include

2008-08-19 Thread landry soules
Thanks a lot Cemal, you rock !
And please don't blame me for the dumbness of my questions  ;-)

Thanks again

Best regards


Landry



2008/8/19 jWeekend <[EMAIL PROTECTED]>

>
> Landry,
>
> Component has a replaceComponentTagBody(markupStream, openTag, content)
> method.
>
> Regards - Cemal
> http://www.jWeekend.co.uk http://jWeekend.co.uk
>
>
>
> landry soules wrote:
> >
> > Thanks a lot for your answer, Cemal, my first problem is solved !
> > For the second one, i can get the content, thanks to your explanation,
> but
> > can't figure out how to modify it before it's displayed.
> > Here is what i do :
> >
> > add(new Include("stat",
> > "http://myurl";) {
> > protected void onComponentTagBody(MarkupStream markupStream,
> > ComponentTag openTag) {
> > super.onComponentTagBody(markupStream, openTag);
> > String content = importAsString();
> >
> >logger.debug(content);
> > }
> > }.setEscapeModelStrings(false));
> >
> >
> > But how can i inject my modified content back to my component ?
> >
> > Best regards.
> >
> >
> > Landry
> >
> >
> >
> > 2008/8/19 jWeekend <[EMAIL PROTECTED]>
> >
> >>
> >> Landry,
> >>
> >> 1 - setEscapeModelStrings(false)
> >> 2 - Subclass Include. Override onComponentTagBody and use
> >> importAsString()
> >>
> >> Regards - Cemal
> >> http://www.jWeekend.co.uk http://jWeekend.co.uk
> >>
> >>
> >> landry soules wrote:
> >> >
> >> > Hello,
> >> >
> >> > In my firm, we're currently using a homegrown component-like
> framework,
> >> > based on cgi-perl scripts calling servlets. I would like to prove my
> >> > boss how smooth the transition towards Wicket could be.
> >> > I'm trying to make a first step, replacing the perl scripts with
> >> Wicket,
> >> > and calling the components (here servlets), with Include. But i have 2
> >> > problems :
> >> >
> >> > 1/ When i call a servlet that has several parameters, for example
> >> > add(*new**
> >> >
> >> *Include("maxMin","
> http://myserver/maxminservlet?id=0001&periodes=1st;1a
> >> ;"));
> >> > Wicket actually replaces "&" with "&", as shown in the trace :
> >> > DEBUG - UrlResourceStream  - cannot convert url:
> >> > http://myserver/maxminservlet?id=0001&periodes=1st;1a; to file
> (URI
> >> > scheme is not "file"), falling back to the inputstream for polling
> >> > This alters my servlet's behaviour, is there a mean to avoid this
> >> > substitution ?
> >> >
> >> > 2/ Is it possible to catch the content of the include, and so possibly
> >> > modify it before it is actually displayed in my Wicket page ?
> >> >
> >> >
> >> > Thanks for your help
> >> >
> >> >
> >> > Landry
> >> >
> >> > -
> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > For additional commands, e-mail: [EMAIL PROTECTED]
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/2-questions-on-Include-tp19036146p19041450.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]
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/2-questions-on-Include-tp19036146p19045669.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: Auto-Reload in Wicket

2008-10-06 Thread landry soules
If you use Eclipse, and built your application with the quick start 
Maven archetype, all you have to do is right-click on the Start class, 
and select "debug as>Java application", to start your app in auto 
reloading mode.



cnoleherzer wrote:

I'm new to Wicket and i found that Wicket doesn't auto reload if i changed my
java code, i must relaunch jetty after some changes. Is there some way to
make Wicket auto-reloadable? I also use Spring in my project.
  



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



Properties file

2008-11-20 Thread landry soules

Hello, i have a question about properties files :
I want to access several variables residing in a property file, from 
various components of my application. What is the best way to achieve 
this trivial need ?
Do you guys use Commons Configuration, or another api ? How do you 
configure it to work with Wicket ?

Is there an example somewhere ?
I know my question sounds dumb, but in my previous job we used an home 
made api to achieve this...

Thanks in advance !

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



Re: Properties file

2008-11-21 Thread landry soules
Thanks a lot, Cemal. As always, you gave me a quick and brilliant answer.
I tried your first solution, and it works as a charm.

However, i wonder if there is a way to overload this properties file
according to the deployment environment (typically, i will have a file named
MyApplication.properties, another MyApplication.test.properties, and a 3rd
MyApplication.prod.properties) ?
Landry
2008/11/20 jWeekend <[EMAIL PROTECTED]>

>
> Landry,
>
> If your properties are application wide, create MyApplication.properties
> (assuming you called your WebApplication subclass MyApplication) in the
> same
> package as your MyApplication class and use getString if you have a
> Component (or subclass, like a Page) to talk to, otherwise use
> Applicaion.get().getResourceSettings().getLocalizer().getString ...
>
> Regards - Cemal
> http://www.jWeekend.co.uk <http://www.jweekend.co.uk/>
> http://jWeekend.co.uk <http://jweekend.co.uk/>
>
>
> landry soules wrote:
> >
> > Hello, i have a question about properties files :
> > I want to access several variables residing in a property file, from
> > various components of my application. What is the best way to achieve
> > this trivial need ?
> > Do you guys use Commons Configuration, or another api ? How do you
> > configure it to work with Wicket ?
> > Is there an example somewhere ?
> > I know my question sounds dumb, but in my previous job we used an home
> > made api to achieve this...
> > Thanks in advance !
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Properties-file-tp20610610p20611147.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: will it work in a Linode?

2009-02-28 Thread landry soules

Hello Jaime

I use a Linode plan myself, in this exact configuration (360MB ram-20$/M).
It runs on Ubuntu 8.10, with Apache2, Tomcat6, Mysql.
It's perfect for what i do with it : development, testing, and code 
repository (Subversion).

But don't expect to host amazon.com on it !
360MB is the bare minimum.

Cheers

Landry

jbarciela jbarciela wrote:

Hello all,

Does anyone have experience running a Wicket app in a memory
constrained server? It's going to be Ubuntu minimal, Wicket and H2
embedded database on a Linode (360 MB ram, $20/month).

Can I get even 1 req/s from that setup?

Thanks!
Jaime

-
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: The Textis incomprehensible

2007-12-15 Thread Landry Soules
If you program with Eclipse, make sure that " text file encoding" 
(preferences>general>workspace) is set to UTF-8.



JohnSmith333 a écrit :
My wicket code in xp  show normally.  The text isn't incomprehensible. 
But when I deploy the code to linux os and in weblogic ap server. 
The text from db table date also OK. The text code in html also OK. 
But the text code in wicket program all are incomprehensible. 
I am use the Chinese language. Just like below: 
 Label lblTest=new Label("lblTest","測試"); 
The "測試" is incomprehensible in browser. 
All html code have write the below already. 
  
  


 Coule anyone help me to solve the Text incomprehensible problem? Versy
thanks

  



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



Re: Happy new year list!

2008-01-01 Thread Landry Soules

Very happy new year !

Thank you so much for providing us a so great framework, and 1st class 
support !

I believe 2008 will be a brilliant year for our favourite framework  :-)

Landry

Jörgen Persson a écrit :

Regards,

Jörgen

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




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



Re: International char

2008-02-10 Thread Landry Soules

Hello Pierre,

I think your problem is due to an Apache mis configuration. This link 
should help you solve it : 
http://aide.sivit.fr/index.php?2007/04/21/185-apache2-probleme-de-charset-pages-en-utf-8-vers-iso-8859-1astuce

It's in french, but i think it won't bother you ;-)

Bon courage !



Pierre Gilquin a écrit :

Hi all,

I have legacy html files, I trying to insert in a Wicket app.

The charset is iso-8859-1


The special character (French and German) and not html coded in theses files.
Everything work perfectly on my dev machine. I have try to deploy on a 
www.eatj.com account and I get garbage for theses chars.

What can be possibly wrong ?

Thanks in advance



Pierre Gilquin

NB:  


I have in my WebApplication :

public void init() {

getRequestCycleSettings().setResponseRequestEncoding("iso-8859-1");

}

  



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