Re: [Wicket-user] Hibernate transactions

2005-12-20 Thread Johan Compagner
it was there really at the beginning. But then developers complained that it was really difficult to have youre own request cyclebecause you needed to first make youre own SessionFactory then youre own Session then youre own RequestCycle factory and then last 
the RequestCycle itself. that where 4 classes and 5 methods just to do one thing (implement one method)Now in the 1.2 stream it is easier to create a RequestCycle so we could think of moving it.johan
On 12/19/05, John Patterson <[EMAIL PROTECTED]> wrote:
On Monday 19 Dec 2005 09:33, Eelco Hillenius wrote:> No need for that anymore, it's 'fixed' now (though I don't entirely> agree as I stated in another thread).>Thanks guys!  I have used WebWork previously and this is my first Wicket
project.  I think it is bloody brilliant.  I am really looking forward tozero state support.  By the way, I also feel that the RequestCycle would bethe natural place to have such an handle exception listener.
John.---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket book?

2005-12-20 Thread Christopher Dodunski
Hi,

As a new comer, I was wondering if there was an existing text on Wicket,
or one in the pipeline - "Wicket In Action" maybe?  Or is Wicket
considered to be so simple that there isn't a need?

Cheers,

Christopher.



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket book?

2005-12-20 Thread Eelco Hillenius
Yep. Martijn and I are working on Wicket In Action. And as a spin off,
we'd like to improve our normal documentation a bit too.

Eelco


On 12/20/05, Christopher Dodunski <[EMAIL PROTECTED]> wrote:
> Hi,
>
> As a new comer, I was wondering if there was an existing text on Wicket,
> or one in the pipeline - "Wicket In Action" maybe?  Or is Wicket
> considered to be so simple that there isn't a need?
>
> Cheers,
>
> Christopher.
>
>
>
> ---
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] To SSL And Back

2005-12-20 Thread Dipu



Hi Nick,
 
Did you find a solution for moving from HTTP to 
HTTPS and then back.
I need to do the same in one of the wicket projects 
i am working.
 
At the moment i am using acegi's ChannelProcessingFilter to do this. 
Don't know if this is the ideal solution, if there 
is any better (Wicket) way of doing it , 
i would like to go that way.
 
Thanks 
Dipu 
 

  - Original Message - 
  From: 
  Nick 
  Heudecker 
  To: wicket-user@lists.sourceforge.net 
  
  Sent: Tuesday, December 06, 2005 4:32 
  PM
  Subject: [Wicket-user] To SSL And 
  Back
  Is there a recommended way, within Wicket, to move a user from 
  HTTP to HTTPS for one or several pages, then move them back to HTTP?  
  This is handled within Struts by the SSLEXT package.  Thanks for 
  your time.


Re: [Wicket-user] Wicket book?

2005-12-20 Thread Martijn Dashorst
And you can always look on the wiki, and on my blog (there are some chapters from the reference guide there).

Also, don't miss the component reference in the wicket-examples project
(see them here: http://www.wicket-library.com/wicket-examples/compref)

MartijnOn 12/20/05, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
Yep. Martijn and I are working on Wicket In Action. And as a spin off,we'd like to improve our normal documentation a bit too.EelcoOn 12/20/05, Christopher Dodunski <
[EMAIL PROTECTED]> wrote:> Hi,>> As a new comer, I was wondering if there was an existing text on Wicket,> or one in the pipeline - "Wicket In Action" maybe?  Or is Wicket
> considered to be so simple that there isn't a need?>> Cheers,>> Christopher. ---> This SF.net
 email is sponsored by: Splunk Inc. Do you grep through log files> for problems?  Stop!  Download the new AJAX search engine that makes> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click> ___> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/wicket-user
>---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!http://ads.osdn.com/?ad_idv37&alloc_id865&opclick___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
-- Living a wicket life...Martijn Dashorst - http://www.jroller.com/page/dashorstWicket 1.1 is out: 
http://wicket.sourceforge.net/wicket-1.1


Re: [Wicket-user] Wicket book?

2005-12-20 Thread Johan Compagner
Or is Wicket considered to be so simple that there isn't a need?
Exactly! :)johan


Re: [Wicket-user] How to render part of page (with ajax maybe)

2005-12-20 Thread Ari Suutari

Hi,


I extended the junit with such a case. And yes, it fails as well.


   If you can find time to look at this before 1.2 it would be great.
   If could try to help too, but so far it looks like I'll have to learn
   more about wicket internals before.


   Ari S.



On 12/19/05, Ari Suutari <[EMAIL PROTECTED]> wrote:

Hi again,

> SimplePageTest
> contains a test to rerender the Panel, but not a component inside a
> Panel, correct? Is that the test you added?

   Sorry, I missed this, but yes, this is specifically the case that seems to 
fail.
   My code is not a junit test case, it is more like a very much trimmed down
   version of the actual application..


   Ari S.

>
> Juergen
>
> On 12/19/05, Ari Suutari <[EMAIL PROTECTED]> wrote:
>> Ok,
>>
>> I have now reproduced the problem with simple page. If I have a page, which 
has a panel (with
>> it's own html template) which contains some tags it is not possible to 
render those panel's tags
>> via ajax handler from phonebook example.
>>
>> The difference with full page render and partial render with ajax seems to 
be that
>> Panel's onRender calls renderAssociatedMarkup, which sets the markupStream 
for
>> panel, then renders it's components and sets it back to original stream 
(which is page's stream).
>>
>> When trying the same via ajax, this is not happening, since the Panel is not 
asked to render, only
>> one component inside it. Somehow partial rendering code should do the same 
magic as panel
>> does during it's rendering (ie. the stuff in renderAssociatedMarkup).
>>
>>Ari S.
>>
>>
>> - Original Message -
>> From: "Ari Suutari" <[EMAIL PROTECTED]>
>> To: 
>> Sent: Monday, December 19, 2005 1:25 PM
>> Subject: Re: [Wicket-user] How to render part of page (with ajax maybe)
>>
>>
>> > Hi,
>> >
>> > I can now report that things mostly work. But there are still some
>> > cases where the page renders ok, but some components don't when
>> > trying to render just a component. My application is already rather complex
>> > (I'm still digging deeper in this), but it looks like that there are cases
>> > where system tries to use invalid markup to render component, which
>> > results in exception or wrong output. I have verified this by debugging to
>> > Component.onRender ->.. -> MarkupStream.setCurrentIndex, after which
>> > stream is at bad position. Good thing is that behaviour is consistent, ie. 
it is
>> > always the same component/components that don't render themself correctly 
via ajax.
>> >
>> > I'm trying to build a simpler test case, if possible.
>> >
>> >Ari S.
>> >
>> > - Original Message -
>> > From: "Juergen Donnerstag" <[EMAIL PROTECTED]>
>> > To: 
>> > Sent: Friday, December 16, 2005 3:44 PM
>> > Subject: Re: [Wicket-user] How to render part of page (with ajax maybe)
>> >
>> >
>> >> That that is true as well. You can not render a component inside a
>> >> view, because these component by default get removed onEndRequest for
>> >> optimization reason. I think you can avoid it by calling
>> >> listView.setOptimized()
>> >>
>> >> Juergen
>> >>
>> >> On 12/16/05, Ari Suutari <[EMAIL PROTECTED]> wrote:
>> >>> Hi,
>> >>>
>> >>> I did some more testing. Instead of my original case, I tried to render 
a component
>> >>> hiearchy which is at upper level in my application and it works !
>> >>>
>> >>> Could the problem in my original case be that the component I'm trying
>> >>> to render is inside pageable listview ?
>> >>>
>> >>>Ari S.
>> >>>
>> >>> - Original Message -
>> >>> From: "Ari Suutari" <[EMAIL PROTECTED]>
>> >>> To: 
>> >>> Sent: Friday, December 16, 2005 2:29 PM
>> >>> Subject: Re: [Wicket-user] How to render part of page (with ajax maybe)
>> >>>
>> >>>
>> >>> > Ok,
>> >>> >
>> >>> > (Sorry for horrible formatting of this e-mail)
>> >>> >
>> >>> > I took code from AjaxHandler.java to my TestAjaxHandler, so it looks
>> >>> > like this:
>> >>> >
>> >>> > import wicket.*;
>> >>> > import wicket.protocol.http.*;
>> >>> > import wicket.protocol.http.servlet.ServletWebRequest;
>> >>> > import wicket.response.StringResponse;
>> >>> > import wicket.util.resource.*;
>> >>> >
>> >>> > public class TestAjaxHandler extends AjaxHandler
>> >>> > {
>> >>> > protected String getImplementationId()
>> >>> > {
>> >>> >  return "test";
>> >>> > }
>> >>> >
>> >>> >
>> >>> > protected IResourceStream getResponse()
>> >>> > {
>> >>> >  Component[] components = new Component[1];
>> >>> >  components[0] = getComponent();
>> >>> >
>> >>> >  return render(components);
>> >>> > }
>> >>> >
>> >>> > public IResourceStream render(final Component[] components)
>> >>> > {
>> >>> >
>> >>> >  StringBufferResourceStream response = new 
StringBufferResourceStream("text/xml");
>> >>> >  response.append("");
>> >>> >  response.append("");
>> >>> >  if (components != null)
>> >>> >  {
>> >>> >   Response resp = new StringResponse();
>> >>> >   RequestCycle requestCycle = RequestCycle.get();
>> >>> >   Response origResponse =

Re: [Wicket-user] To SSL And Back

2005-12-20 Thread Nick Heudecker
I'm working on adding the functionality to Wicket.  Should be a few more days.  On 12/20/05, Dipu <[EMAIL PROTECTED]
> wrote:






Hi Nick,
 
Did you find a solution for moving from HTTP to 
HTTPS and then back.
I need to do the same in one of the wicket projects 
i am working.
 
At the moment i am using acegi's ChannelProcessingFilter to do this. 
Don't know if this is the ideal solution, if there 
is any better (Wicket) way of doing it , 
i would like to go that way.
 
Thanks 
Dipu 
 

  - Original Message - 
  
From: 
  Nick 
  Heudecker 
  To: 
wicket-user@lists.sourceforge.net 
  
  Sent: Tuesday, December 06, 2005 4:32 
  PM
  Subject: [Wicket-user] To SSL And 
  Back
  Is there a recommended way, within Wicket, to move a user from 
  HTTP to HTTPS for one or several pages, then move them back to HTTP?  
  This is handled within Struts by the SSLEXT package.  Thanks for 
  your time.




Re: [Wicket-user] How to render part of page (with ajax maybe)

2005-12-20 Thread Juergen Donnerstag
I tried to find a quick fix already, but I didn't succeed. I haven't
found the right approach yet.

Juergen

On 12/20/05, Ari Suutari <[EMAIL PROTECTED]> wrote:
> Hi,
>
> >I extended the junit with such a case. And yes, it fails as well.
>
>If you can find time to look at this before 1.2 it would be great.
>If could try to help too, but so far it looks like I'll have to learn
>more about wicket internals before.
>
>
>Ari S.
>
> >
> > On 12/19/05, Ari Suutari <[EMAIL PROTECTED]> wrote:
> >> Hi again,
> >>
> >> > SimplePageTest
> >> > contains a test to rerender the Panel, but not a component inside a
> >> > Panel, correct? Is that the test you added?
> >>
> >>Sorry, I missed this, but yes, this is specifically the case that seems 
> >> to fail.
> >>My code is not a junit test case, it is more like a very much trimmed 
> >> down
> >>version of the actual application..
> >>
> >>
> >>Ari S.
> >>
> >> >
> >> > Juergen
> >> >
> >> > On 12/19/05, Ari Suutari <[EMAIL PROTECTED]> wrote:
> >> >> Ok,
> >> >>
> >> >> I have now reproduced the problem with simple page. If I have a page, 
> >> >> which has a panel (with
> >> >> it's own html template) which contains some tags it is not possible to 
> >> >> render those panel's tags
> >> >> via ajax handler from phonebook example.
> >> >>
> >> >> The difference with full page render and partial render with ajax seems 
> >> >> to be that
> >> >> Panel's onRender calls renderAssociatedMarkup, which sets the 
> >> >> markupStream for
> >> >> panel, then renders it's components and sets it back to original stream 
> >> >> (which is page's stream).
> >> >>
> >> >> When trying the same via ajax, this is not happening, since the Panel 
> >> >> is not asked to render, only
> >> >> one component inside it. Somehow partial rendering code should do the 
> >> >> same magic as panel
> >> >> does during it's rendering (ie. the stuff in renderAssociatedMarkup).
> >> >>
> >> >>Ari S.
> >> >>
> >> >>
> >> >> - Original Message -
> >> >> From: "Ari Suutari" <[EMAIL PROTECTED]>
> >> >> To: 
> >> >> Sent: Monday, December 19, 2005 1:25 PM
> >> >> Subject: Re: [Wicket-user] How to render part of page (with ajax maybe)
> >> >>
> >> >>
> >> >> > Hi,
> >> >> >
> >> >> > I can now report that things mostly work. But there are still some
> >> >> > cases where the page renders ok, but some components don't when
> >> >> > trying to render just a component. My application is already rather 
> >> >> > complex
> >> >> > (I'm still digging deeper in this), but it looks like that there are 
> >> >> > cases
> >> >> > where system tries to use invalid markup to render component, which
> >> >> > results in exception or wrong output. I have verified this by 
> >> >> > debugging to
> >> >> > Component.onRender ->.. -> MarkupStream.setCurrentIndex, after 
> >> >> > which
> >> >> > stream is at bad position. Good thing is that behaviour is 
> >> >> > consistent, ie. it is
> >> >> > always the same component/components that don't render themself 
> >> >> > correctly via ajax.
> >> >> >
> >> >> > I'm trying to build a simpler test case, if possible.
> >> >> >
> >> >> >Ari S.
> >> >> >
> >> >> > - Original Message -
> >> >> > From: "Juergen Donnerstag" <[EMAIL PROTECTED]>
> >> >> > To: 
> >> >> > Sent: Friday, December 16, 2005 3:44 PM
> >> >> > Subject: Re: [Wicket-user] How to render part of page (with ajax 
> >> >> > maybe)
> >> >> >
> >> >> >
> >> >> >> That that is true as well. You can not render a component inside a
> >> >> >> view, because these component by default get removed onEndRequest for
> >> >> >> optimization reason. I think you can avoid it by calling
> >> >> >> listView.setOptimized()
> >> >> >>
> >> >> >> Juergen
> >> >> >>
> >> >> >> On 12/16/05, Ari Suutari <[EMAIL PROTECTED]> wrote:
> >> >> >>> Hi,
> >> >> >>>
> >> >> >>> I did some more testing. Instead of my original case, I tried to 
> >> >> >>> render a component
> >> >> >>> hiearchy which is at upper level in my application and it works !
> >> >> >>>
> >> >> >>> Could the problem in my original case be that the component I'm 
> >> >> >>> trying
> >> >> >>> to render is inside pageable listview ?
> >> >> >>>
> >> >> >>>Ari S.
> >> >> >>>
> >> >> >>> - Original Message -
> >> >> >>> From: "Ari Suutari" <[EMAIL PROTECTED]>
> >> >> >>> To: 
> >> >> >>> Sent: Friday, December 16, 2005 2:29 PM
> >> >> >>> Subject: Re: [Wicket-user] How to render part of page (with ajax 
> >> >> >>> maybe)
> >> >> >>>
> >> >> >>>
> >> >> >>> > Ok,
> >> >> >>> >
> >> >> >>> > (Sorry for horrible formatting of this e-mail)
> >> >> >>> >
> >> >> >>> > I took code from AjaxHandler.java to my TestAjaxHandler, so it 
> >> >> >>> > looks
> >> >> >>> > like this:
> >> >> >>> >
> >> >> >>> > import wicket.*;
> >> >> >>> > import wicket.protocol.http.*;
> >> >> >>> > import wicket.protocol.http.servlet.ServletWebRequest;
> >> >> >>> > import wicket.response.StringResponse;
> >> >> >>> >

Re: [Wicket-user] Hibernate transactions

2005-12-20 Thread John Patterson
On Tuesday 20 Dec 2005 04:53, Johan Compagner wrote:
> it was there really at the beginning. But then developers complained that
> it was really difficult to have youre own request cycle
> because you needed to first make youre own SessionFactory then youre own
> Session then youre own RequestCycle factory and then last
> the RequestCycle itself. that where 4 classes and 5 methods just to do one
> thing (implement one method)
>

Sounds like a factory object would help here.  It could kind of 'denormalise' 
the object hierarchy - flatten it out - to make things easier to override 
while removing the clutter from the Application.

That would allow me to easily integrate Picocontainer into the framework by 
creating a dynamic Proxy.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] To SSL And Back

2005-12-20 Thread Johan Compagner
you could look at PrependContextPathHandler in the 1.2 streamMaybe you can prepend the complete path for all urls we generate.\johanOn 12/20/05, 
Nick Heudecker <[EMAIL PROTECTED]> wrote:
I'm working on adding the functionality to Wicket.  Should be a few more days.  On 12/20/05, Dipu <
[EMAIL PROTECTED]
> wrote:






Hi Nick,
 
Did you find a solution for moving from HTTP to 
HTTPS and then back.
I need to do the same in one of the wicket projects 
i am working.
 
At the moment i am using acegi's ChannelProcessingFilter to do this. 
Don't know if this is the ideal solution, if there 
is any better (Wicket) way of doing it , 
i would like to go that way.
 
Thanks 
Dipu 
 

  - Original Message - 
  

From: 
  Nick 
  Heudecker 
  To: 

wicket-user@lists.sourceforge.net 
  
  Sent: Tuesday, December 06, 2005 4:32 
  PM
  Subject: [Wicket-user] To SSL And 
  Back
  Is there a recommended way, within Wicket, to move a user from 
  HTTP to HTTPS for one or several pages, then move them back to HTTP?  
  This is handled within Struts by the SSLEXT package.  Thanks for 
  your time.






[Wicket-user] Wicket 1.2 SNAPSHOT release available

2005-12-20 Thread Martijn Dashorst
All,

I've created a development release of the current state of CVS HEAD
for wicket 1.2. This release includes Wicket core, Extensions and
Examples. You can download it from the sourceforge download servers
within the next hours. I put the release in a new package:
wicket-SNAPSHOT. This should help us provide you with quicker releases
in the future.

We encourage you to download and try this release, but NOT TO USE IT
IN PRODUCTION! I had one unittest failing in the examples project, so
DON'T USE IT IN PRODUCTION SYSTEMS!

Enjoy and please provide feedback!

Martijn

--
Living a wicket life...

Martijn Dashorst - http://www.jroller.com/page/dashorst

Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: i10n and branding questions

2005-12-20 Thread Jim McLaughlin

Please edit and correct:
http://wicket-wiki.org.uk/wiki/index.php/Newuserguide#Locale_and_Style

thx,
jim


Juergen Donnerstag wrote:

On 12/19/05, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


Since I am a new user, I will add the answers to these questions to the
new user guide wiki.

When to use StringResourceModel and when to call getLocalizer() directly?



StringResourceModel is an IModel and thus the right choice whereever
an IModel parameter is requested (usually container.add(id, model)).
StringResourceModel uses the Localizer internally. Localizer provides
a general purpose interface to access properties files.



What is the difference between setVariant and setStyle?




A style applies to the application, a variation to a component only.



How do you set the application up to use the WicketMessageTagHandler?



override Application.getAdditionalMarkupHandler()



Also, it  looks like it traverses the stack upward from the component to
look for properties. Is this true?



Please see AbstractStringResouceLoader for details.



Is this traversal opposite of Localizer?



No, it is using the Localizer

Juergen


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Alternatives to wicket's hosting at sourceforge

2005-12-20 Thread Benjamin Podszun

Hi there.

Sorry for breaking this thread. I joined the ml right now because of  
a discussion on freenode/##wicket and don't know how I can continue  
the currently running thread.


My suggestion is www.berlios.de - a quite friendly sf alike project  
site. I know that they offer svn (Not sure if you get it by default  
or have to request it) and they host already quite some nice  
projects. Actually sf is awfully slow for me most of the time - not  
even speaking about the cvs access..


Regards,
Ben


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] beginner: error with simple HelloWorld App with tomcat 5.5

2005-12-20 Thread karthik Guru
Hi All,
 
I just started playing around with wicketsince yesterday and i ran into a strange problem with tomcat 5.5
As long as I have all the required wicket jars under "webapps/Context/WEB-INF/lib", things seem to be working fine. Moment I move the wicket jars from the "webapps/Context/WEB-INF/lib" to 
"Tomcat 5.5\shared\lib", i see an exception when accessing the page.
 
exception:
 
javax.servlet.ServletException: Servlet.init() for servlet HelloWorldApplication threw exceptionorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:148) 
rootcause:
 
wicket.WicketRuntimeException: Unable to create application of class com.wicketdev.app.HelloWorldApplicationwicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java
:58)wicket.protocol.http.WicketServlet.init(WicketServlet.java:245) 
Any idea what is the cause for this error?
 
thanks
karthik


Re: [Wicket-user] beginner: error with simple HelloWorld App with tomcat 5.5

2005-12-20 Thread Igor Vaynberg
i dont think you can share wicket between contexts. the problem is that wicket cannot create your application's class using Class.newInstance() because the server classloader that loads it from the shared libs dir does not see jars inside context dirs. This works opposite to a webapp classloader that sees jars inside context's web-inf/lib AND the shared jars.
-IgorOn 12/20/05, karthik Guru <[EMAIL PROTECTED]> wrote:
Hi All,
 
I just started playing around with wicketsince yesterday and i ran into a strange problem with tomcat 5.5
As long as I have all the required wicket jars under "webapps/Context/WEB-INF/lib", things seem to be working fine. Moment I move the wicket jars from the "webapps/Context/WEB-INF/lib" to 
"Tomcat 5.5\shared\lib", i see an exception when accessing the page.
 
exception:
 
javax.servlet.ServletException: Servlet.init() for servlet HelloWorldApplication threw exceptionorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)org.apache.catalina.connector.CoyoteAdapter.service

(CoyoteAdapter.java:148) 
rootcause:
 
wicket.WicketRuntimeException: Unable to create application of class com.wicketdev.app.HelloWorldApplicationwicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java

:58)wicket.protocol.http.WicketServlet.init(WicketServlet.java:245) 
Any idea what is the cause for this error?
 
thanks
karthik




Re: [Wicket-user] beginner: error with simple HelloWorld App with tomcat 5.5

2005-12-20 Thread karthik Guru
thanks Igor
On 12/21/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
i dont think you can share wicket between contexts. the problem is that wicket cannot create your application's class using 
Class.newInstance() because the server classloader that loads it from the shared libs dir does not see jars inside context dirs. This works opposite to a webapp classloader that sees jars inside context's web-inf/lib AND the shared jars. 
-Igor 

On 12/20/05, karthik Guru <[EMAIL PROTECTED]
> wrote: 

Hi All,
 
I just started playing around with wicketsince yesterday and i ran into a strange problem with tomcat 5.5
As long as I have all the required wicket jars under "webapps/Context/WEB-INF/lib", things seem to be working fine. Moment I move the wicket jars from the "webapps/Context/WEB-INF/lib" to 
"Tomcat 5.5\shared\lib", i see an exception when accessing the page.
 
exception:
 
javax.servlet.ServletException: Servlet.init() for servlet HelloWorldApplication threw exceptionorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)org.apache.catalina.connector.CoyoteAdapter.service
 (CoyoteAdapter.java:148) 
rootcause:
 
wicket.WicketRuntimeException: Unable to create application of class com.wicketdev.app.HelloWorldApplicationwicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java
 :58)wicket.protocol.http.WicketServlet.init(WicketServlet.java:245) 
Any idea what is the cause for this error?
 
thanks
karthik


[Wicket-user] beginner : What happens on submit ?

2005-12-20 Thread karthik Guru
I'm still on the HelloWorld example. I can see that wicket has a component that corresponds to all the HTML tags in the html template file and they are being added to the HelloPage component in the constructor. I guess an instance of HelloPage is probably created (and with that all the contained components) when i request the html and then the page can pull the data from the model and render it.

What happens after that , is the HelloWorldPage instance discarded? When i submit, does wicket again instantiate a HelloWorldPage instance or pull it from some cache it has internally? Does it look at the html template, check the component hierarchy in the template, and then go look for an equivalent java component in the Page hierarchy and fill up the values from the request?

 
and wicket knows somehow that the form has been submitted and hence onSubmit needs to be called?
 
Can someone explain the behaviour.
 
thank you.
regards,
karthik
 
 
 


Re: [Wicket-user] beginner : What happens on submit ?

2005-12-20 Thread Igor Vaynberg
after the page is rendered it is put into a PageMap. the pagemap lives in session and keeps the last 10  pages ( this number is configurable through application settings object). so when you submit a form or click a link the page is brought back from pagemap and the link/form handler is executed on it. the pagemap uses an mru algorithm to only keep the most recent pages - to reduce space taken up in session.
when you click a link the url contains the page id in the pagemap, the component path of the link object you clicked and what kind of interface to invoke on the component that is pointed to by the path ( in this case a link). from this information wicket can lookup the page that the link belongs to from the pagemap, find the right component, and then execute a callback method on it. in this case it would result in Link's onClick() handler being invoked.
similar happens for forms.hope this helps, if you have more questions fire away.-IgorOn 12/20/05, karthik Guru <
[EMAIL PROTECTED]> wrote:I'm still on the HelloWorld example. I can see that wicket has a component that corresponds to all the HTML tags in the html template file and they are being added to the HelloPage component in the constructor. I guess an instance of HelloPage is probably created (and with that all the contained components) when i request the html and then the page can pull the data from the model and render it.

What happens after that , is the HelloWorldPage instance discarded? When i submit, does wicket again instantiate a HelloWorldPage instance or pull it from some cache it has internally? Does it look at the html template, check the component hierarchy in the template, and then go look for an equivalent java component in the Page hierarchy and fill up the values from the request?

 
and wicket knows somehow that the form has been submitted and hence onSubmit needs to be called?
 
Can someone explain the behaviour.
 
thank you.
regards,
karthik
 
 
 




Re: [Wicket-user] beginner : What happens on submit ?

2005-12-20 Thread karthik Guru
cool!
 
Ok here is what am trying. I have a 'login' page and on successful login sends the user to the 'welcome' page. On the onSubmit of login page i do this 
 
Form form = new Form("loginForm"){ public void onSubmit(){
  //get the user id , password and validate
  //this is my welcome page  Welcome welcomePage = new Welcome();  //it has a span with id "message"  Component c = welcomePage.get("message");  c.setModel(new Model("Welcome To Wicket Mr " + userId));
  setResponsePage(welcomePage); }};
 
Now that you tell me that wicket maintains the page instance in the PageMap, can i do new Welcome( )?
S'd i be getting it from the PageMap instead? 
 
I didnt do setResponsePage(Welcome.class) since am not sure how i can supply the model for the "message" component in the 'Welcome.html'
 
thanks
karthik 
On 12/21/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
after the page is rendered it is put into a PageMap. the pagemap lives in session and keeps the last 10  pages ( this number is configurable through application settings object). so when you submit a form or click a link the page is brought back from pagemap and the link/form handler is executed on it. the pagemap uses an mru algorithm to only keep the most recent pages - to reduce space taken up in session. 
when you click a link the url contains the page id in the pagemap, the component path of the link object you clicked and what kind of interface to invoke on the component that is pointed to by the path ( in this case a link). from this information wicket can lookup the page that the link belongs to from the pagemap, find the right component, and then execute a callback method on it. in this case it would result in Link's onClick() handler being invoked. 
similar happens for forms.hope this helps, if you have more questions fire away.-Igor 

On 12/20/05, karthik Guru < [EMAIL PROTECTED]
> wrote: 

I'm still on the HelloWorld example. I can see that wicket has a component that corresponds to all the HTML tags in the html template file and they are being added to the HelloPage component in the constructor. I guess an instance of HelloPage is probably created (and with that all the contained components) when i request the html and then the page can pull the data from the model and render it. 

What happens after that , is the HelloWorldPage instance discarded? When i submit, does wicket again instantiate a HelloWorldPage instance or pull it from some cache it has internally? Does it look at the html template, check the component hierarchy in the template, and then go look for an equivalent java component in the Page hierarchy and fill up the values from the request? 

 
and wicket knows somehow that the form has been submitted and hence onSubmit needs to be called?
 
Can someone explain the behaviour.
 
thank you.
regards,
karthik
 
 
 


Re: [Wicket-user] beginner : What happens on submit ?

2005-12-20 Thread Igor Vaynberg
here is how i would do itclass WelcomePage extends WebPage {  public WelcomePage(long userId) { User user=getUser(userId); add(new Label("message", "welcome "+user.getName()));
  }}so now you have a welcome page that can display the correct message based on the login id you pass into the constructor.then in your login page:onsubmit() {  setResponsePage(new WelcomePage(userId));
}Maybe you dont even need to pass in the loggedin user id into the welcomepage as a constructor. you have to store that somewhere in the session right? maybe the welcome page can pull it out of session, then all you need to do is setResponsePage(new WelcomePage());
There is a signin example in wicket-examples project that shows this exact scenario.-IgorOn 12/20/05, karthik Guru <
[EMAIL PROTECTED]> wrote:cool!
 
Ok here is what am trying. I have a 'login' page and on successful login sends the user to the 'welcome' page. On the onSubmit of login page i do this 
 
Form form = new Form("loginForm"){ public void onSubmit(){
  //get the user id , password and validate
  //this is my welcome page  Welcome welcomePage = new Welcome();  //it has a span with id "message"  Component c = welcomePage.get("message");  c.setModel(new Model("Welcome To Wicket Mr " + userId));
  setResponsePage(welcomePage); }};
 
Now that you tell me that wicket maintains the page instance in the PageMap, can i do new Welcome( )?
S'd i be getting it from the PageMap instead? 
 
I didnt do setResponsePage(Welcome.class) since am not sure how i can supply the model for the "message" component in the 'Welcome.html'
 
thanks
karthik 
On 12/21/05, Igor Vaynberg <[EMAIL PROTECTED]
> wrote:
after the page is rendered it is put into a PageMap. the pagemap lives in session and keeps the last 10  pages ( this number is configurable through application settings object). so when you submit a form or click a link the page is brought back from pagemap and the link/form handler is executed on it. the pagemap uses an mru algorithm to only keep the most recent pages - to reduce space taken up in session. 
when you click a link the url contains the page id in the pagemap, the component path of the link object you clicked and what kind of interface to invoke on the component that is pointed to by the path ( in this case a link). from this information wicket can lookup the page that the link belongs to from the pagemap, find the right component, and then execute a callback method on it. in this case it would result in Link's onClick() handler being invoked. 
similar happens for forms.hope this helps, if you have more questions fire away.-Igor 

On 12/20/05, karthik Guru < [EMAIL PROTECTED]
> wrote: 

I'm still on the HelloWorld example. I can see that wicket has a component that corresponds to all the HTML tags in the html template file and they are being added to the HelloPage component in the constructor. I guess an instance of HelloPage is probably created (and with that all the contained components) when i request the html and then the page can pull the data from the model and render it. 

What happens after that , is the HelloWorldPage instance discarded? When i submit, does wicket again instantiate a HelloWorldPage instance or pull it from some cache it has internally? Does it look at the html template, check the component hierarchy in the template, and then go look for an equivalent java component in the Page hierarchy and fill up the values from the request? 

 
and wicket knows somehow that the form has been submitted and hence onSubmit needs to be called?
 
Can someone explain the behaviour.
 
thank you.
regards,
karthik
 
 
 




[Wicket-user] beginner : doubt on PageMap

2005-12-20 Thread karthik Guru
this is the flow in my application
 
Page1  --on submit --> Page2 (has link to Page1)  on click of link --> Page1
 
I see the Page1 constructor is getting called twice for the same session since am accessing it twice -once through direct access and next time through link.
 
But getSettings().getMaxPages() and getSettings().getMaxPageVersions() are both returning 10.
Why didnt wicket get the Page1 instance from the PageMap , the 2nd time when i access it.
 
thank you,
karthik
 
 
 


Re: [Wicket-user] beginner : doubt on PageMap

2005-12-20 Thread Igor Vaynberg
can we see your code please.-IgorOn 12/20/05, karthik Guru <[EMAIL PROTECTED]> wrote:
this is the flow in my application
 
Page1  --on submit --> Page2 (has link to Page1)  on click of link --> Page1
 
I see the Page1 constructor is getting called twice for the same session since am accessing it twice -once through direct access and next time through link.
 
But getSettings().getMaxPages() and getSettings().getMaxPageVersions() are both returning 10.
Why didnt wicket get the Page1 instance from the PageMap , the 2nd time when i access it.
 
thank you,
karthik
 
 
 




Re: [Wicket-user] beginner : What happens on submit ?

2005-12-20 Thread karthik Guru
Thanks Igor for your patience :)  
Yes this solution is neat. So in this case we are by passing the PageMap concept built into wicket since we are creating the WelcomePage ourselves? So its ok to instantiate pages if the situation demands it ?. But it also means that if my WelcomePage has lots of widgets, the component tree for WelcomePage will be constructed again.

 
On a side note, I'm not too impressed with the wicket documentation on the wiki but user-support is excellent!
 
I shall try to contribute a tutorial for a beginner like me if that is ok.
 
regards,
karthik
 
On 12/21/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
here is how i would do itclass WelcomePage extends WebPage {  public WelcomePage(long userId) {
 User user=getUser(userId); add(new Label("message", "welcome "+user.getName()));   }}so now you have a welcome page that can display the correct message based on the login id you pass into the constructor.
then in your login page:onsubmit() {  setResponsePage(new WelcomePage(userId)); }Maybe you dont even need to pass in the loggedin user id into the welcomepage as a constructor. you have to store that somewhere in the session right? maybe the welcome page can pull it out of session, then all you need to do is setResponsePage(new WelcomePage()); 
There is a signin example in wicket-examples project that shows this exact scenario. 
-Igor


Re: [Wicket-user] beginner : What happens on submit ?

2005-12-20 Thread Igor Vaynberg
On 12/20/05, karthik Guru <[EMAIL PROTECTED]> wrote:
Thanks Igor for your patience :)  
Yes this solution is neat. So in this case we are by passing the PageMap concept built into wicket since we are creating the WelcomePage ourselves?no, we are not bypassing the pagemap. wicket will put any page we create into the pagemap for us if it needs to be there ( ie it got rendered or it was redirected to). pagemap is really wicket's internal store for page instances that might still need to be around. 
 So its ok to instantiate pages if the situation demands it ?. But it also means that if my WelcomePage has lots of widgets, the component tree for WelcomePage will be constructed again.
wicket is an unmanaged framework, so you should treat pages/components like regular classes - ie when you need a new page/component you instantiate it. and yes that will cause your component tree to be rebuilt. in my experience this is not a performance hit even for very large pages - because remember this is done only ones for the lifetime of the page which can be very long.
 On a side note, I'm not too impressed with the wicket documentation on the wiki but user-support is excellent!
most of our documentation is in the javadoc. we try to keep that as much as possible up to date and comprehensive. i realize that javadoc does not provide any tutorial-like docs, but it is most of what we have right now. 
the wiki has a new-user guide, but i dont know how up to date that is. what i would recomend is wiki's page on models - that is a must.when i was learning wicket i learned mostly by looking at the examples and building on them. but i came from tapestry, so most of wicket's concepts looked familiar to me.
there is also a Wicket in Action book being written by two of the developers, so that should help in the future as well. 
I shall try to contribute a tutorial for a beginner like me if that is ok.that would be great!-Igor


Re: [Wicket-user] beginner : doubt on PageMap

2005-12-20 Thread karthik Guru
Hi Igor,
 
this is the code..
 
#Login page 
 
public class Login extends WebPage { private TextField userIdField; private PasswordTextField passField;
 public Login(){  System.out.println("Login Constructor called!\n\n");  Form form = new Form("loginForm"){  public void onSubmit(){String userId = Login.this.getUserId
(); String password = Login.this.getPassword();  System.out.println("User id was "+  userId +  " and the password was " + password);Welcome welcomePage = new Welcome();
Component c = welcomePage.get("message");c.setModel(new Model("Welcome To Wicket Mr " + userId));setResponsePage(welcomePage);   }  };  userIdField = new TextField("userId", new Model(""));
  passField = new PasswordTextField("password",new Model(""));  passField.setResetPassword(false);  form.add(userIdField); form.add(passField);  add(form); } protected String getUserId() {
  return userIdField.getModelObjectAsString();} protected String getPassword() {  return passField.getModelObjectAsString();}
}
 
 
/*** Welcome.java **/
 
public class Welcome extends WebPage { public Welcome(){  System.out.println("Welcome Constructor!\n\n");  IModel model = new Model("");  add(new Label("message",model));
 }}
 
 
/** Welcome.html **/
 
  Welcome to Wicket Application      Message goes here         Login;      
 
 
And on the console
 

Login Constructor called!
User id was karthik and the password was passwordWelcome Constructor!
Login Constructor called!
 


Re: [Wicket-user] Re: i10n and branding questions

2005-12-20 Thread Juergen Donnerstag
thanks a lot

Juergen

On 12/21/05, Jim McLaughlin <[EMAIL PROTECTED]> wrote:
> Please edit and correct:
> http://wicket-wiki.org.uk/wiki/index.php/Newuserguide#Locale_and_Style
>
> thx,
> jim
>
>
> Juergen Donnerstag wrote:
> > On 12/19/05, Jim McLaughlin <[EMAIL PROTECTED]> wrote:
> >
> >>Since I am a new user, I will add the answers to these questions to the
> >>new user guide wiki.
> >>
> >>When to use StringResourceModel and when to call getLocalizer() directly?
> >
> >
> > StringResourceModel is an IModel and thus the right choice whereever
> > an IModel parameter is requested (usually container.add(id, model)).
> > StringResourceModel uses the Localizer internally. Localizer provides
> > a general purpose interface to access properties files.
> >
> >
> >>What is the difference between setVariant and setStyle?
> >>
> >
> >
> > A style applies to the application, a variation to a component only.
> >
> >
> >>How do you set the application up to use the WicketMessageTagHandler?
> >
> >
> > override Application.getAdditionalMarkupHandler()
> >
> >
> >>Also, it  looks like it traverses the stack upward from the component to
> >>look for properties. Is this true?
> >
> >
> > Please see AbstractStringResouceLoader for details.
> >
> >
> >>Is this traversal opposite of Localizer?
> >
> >
> > No, it is using the Localizer
> >
> > Juergen
> >
> >
> > ---
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
>
>
>
> ---
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] beginner : doubt on PageMap

2005-12-20 Thread Igor Vaynberg
what version of wicket are you using?when i run your example i get:Login Constructor called!User id was asdadasda and the password was asdasdasdWelcome Constructor!which is the output i would expect.
-IgorOn 12/20/05, karthik Guru <[EMAIL PROTECTED]> wrote:
Hi Igor,
 
this is the code..
 
#Login page 
 
public class Login extends WebPage { private TextField userIdField; private PasswordTextField passField;
 public Login(){  System.out.println("Login Constructor called!\n\n");  Form form = new Form("loginForm"){  public void onSubmit(){String userId = Login.this.getUserId

(); String password = Login.this.getPassword();  System.out.println("User id was "+  userId +  " and the password was " + password);Welcome welcomePage = new Welcome();
Component c = welcomePage.get("message");c.setModel(new Model("Welcome To Wicket Mr " + userId));setResponsePage(welcomePage);   }  };  userIdField = new TextField("userId", new Model(""));
  passField = new PasswordTextField("password",new Model(""));  passField.setResetPassword(false);  form.add(userIdField); form.add(passField);  add(form); } protected String getUserId() {
  return userIdField.getModelObjectAsString();} protected String getPassword() {  return passField.getModelObjectAsString();}
}
 
 
/*** Welcome.java **/
 
public class Welcome extends WebPage { public Welcome(){  System.out.println("Welcome Constructor!\n\n");  IModel model = new Model("");  add(new Label("message",model));
 }}
 
 
/** Welcome.html **/
 
  Welcome to Wicket Application      Message goes here         Login;      
 
 
And on the console
 

Login Constructor called!
User id was karthik and the password was passwordWelcome Constructor!
Login Constructor called!
 




[Wicket-user] Re: wicket bug

2005-12-20 Thread Juergen Donnerstag
On 12/21/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> hi Juergen,
> could you please take a look at
>
> Bugs item #1375584, was opened at 2005-12-07 18:44
> Message generated for change (Comment added) made by ivaynberg
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1375584&group_id=119783
>
> i think this is more your area then mine. this guy added the same component
> to the page twice. once to a form and once to a feedbackborder which was
> also added to the form. wicket didnt catch this.
>

I'll check it.

Juergen


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] beginner : doubt on PageMap

2005-12-20 Thread karthik Guru
:( 
- wicket 1.1 that i downloaded from the link on the home page. Moment i click the link (Login.html) on Welcome.html, i see the Login.java constructor getting called.
 
 
On 12/21/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
what version of wicket are you using?when i run your example i get:Login Constructor called!
User id was asdadasda and the password was asdasdasdWelcome Constructor!which is the output i would expect. -Igor


Re: [Wicket-user] beginner : doubt on PageMap

2005-12-20 Thread Igor Vaynberg
ahh, you didnt say you click the link before (or at least i didnt catch it - its bed time very soon )this is indeed the proper behaviour. the link is used to go to a "fresh" login page - the way that is attained is that wicket will use a default IPageFactory implementation to instantiate a page by its class - because that is the only way to get a page with a clean state. so when it does that, the constructor is called and you see the message.
-IgorOn 12/20/05, karthik Guru <[EMAIL PROTECTED]> wrote:
:( 
- wicket 1.1 that i downloaded from the link on the home page. Moment i click the link (Login.html) on Welcome.html, i see the Login.java constructor getting called.

 
 
On 12/21/05, Igor Vaynberg <[EMAIL PROTECTED]
> wrote:
what version of wicket are you using?when i run your example i get:Login Constructor called!
User id was asdadasda and the password was asdasdasdWelcome Constructor!which is the output i would expect. -Igor