RE: Location of wicket-ajax.js

2008-02-29 Thread Chris Colman
Using 1.3.0 - maybe I should try 1.3.1


 -Original Message-
 From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Sent: Friday, 29 February 2008 6:29 PM
 To: users@wicket.apache.org
 Subject: Re: Location of wicket-ajax.js
 
 this should happen automatically, please file a bug report
 
 -igor
 
 
 On Thu, Feb 28, 2008 at 11:26 PM, Chris Colman
 [EMAIL PROTECTED] wrote:
  Problem found: Was a problem with script import lines not being
added,
   not that the .js files were not reachable.
 
   Apparently we need to have a stateful component somewhere in the
page
 in
   order for wicket to auto inject the script lines into the HTML
for
 us.
 
   Is there a way of telling wicket to inject the script lines
without
   having a stateful component on the page - currently everything on
the
   page is stateless - we just have buttons on each item that, when
   pressed, need to bring up an AJAX modal dialog box to display some
info
   on the items.
 
   Or do we need to add an invisible edit control or something to get
the
   script injection happening?
 
 
 
 
 
-
   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]


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



Re: Location of wicket-ajax.js

2008-02-29 Thread Igor Vaynberg
that is a given. try 1.3.1 and if that doesnt work try building trunk
yourself and test with that.

-igor


On Fri, Feb 29, 2008 at 12:16 AM, Chris Colman
[EMAIL PROTECTED] wrote:
 Using 1.3.0 - maybe I should try 1.3.1




   -Original Message-
   From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
   Sent: Friday, 29 February 2008 6:29 PM
   To: users@wicket.apache.org
   Subject: Re: Location of wicket-ajax.js
  
   this should happen automatically, please file a bug report
  
   -igor
  
  
   On Thu, Feb 28, 2008 at 11:26 PM, Chris Colman
   [EMAIL PROTECTED] wrote:
Problem found: Was a problem with script import lines not being
  added,
 not that the .js files were not reachable.
   
 Apparently we need to have a stateful component somewhere in the
  page
   in
 order for wicket to auto inject the script lines into the HTML
  for
   us.
   
 Is there a way of telling wicket to inject the script lines
  without
 having a stateful component on the page - currently everything on
  the
 page is stateless - we just have buttons on each item that, when
 pressed, need to bring up an AJAX modal dialog box to display some
  info
 on the items.
   
 Or do we need to add an invisible edit control or something to get
  the
 script injection happening?
   
   
   
   
   
  -
 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]


  -
  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: div close tag error

2008-02-29 Thread Maeder Thomas
And your ids are mismatched: someModal != openModal 

 -Original Message-
 From: Thijs [mailto:[EMAIL PROTECTED] 
 Sent: Donnerstag, 28. Februar 2008 21:56
 To: users@wicket.apache.org
 Subject: Re: div close tag error
 
 Wicket:id=someModal is missing a 
 
 Michael Mehrle wrote:
  I have div like this:
 
  div wicket:id=somePanel
  a wicket:id=someModal
  wicket:message key=label.link /
  /a
  /div
 
  My code is:
 
  SomePanel somePanel - new SomePanel(somePanel, someModel); ..
  somePanel.add(new AjaxLink(openModal) {
  ..
  }
 
  I keep getting an error message: WicketMessage: close tag not found 
  for
  tag: div wicket:id=somePanel
 
  Anyone any idea what I am doing wrong?
 
  Thanks!
 
  Michael
 
 
  
 -
  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]
 
 

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



Re: div close tag error

2008-02-29 Thread Igor Vaynberg
assuming SomePanel extends Panel

you cannot embed components into panel's markup. any static markup
inside tags that the panel is attached to will be removed and replaced
by the panel's markup. if you do put a wicket:id into a markup that is
inside panel tags you will get that error. the error means wicket
expects to find /div right after div (skipping any raw markup),
but cannot and instead finds a a tag for a wicket component.

-igor


On Thu, Feb 28, 2008 at 12:53 PM, Michael Mehrle [EMAIL PROTECTED] wrote:
 I have div like this:

  div wicket:id=somePanel
 a wicket:id=someModal
 wicket:message key=label.link /
 /a
  /div

  My code is:

  SomePanel somePanel - new SomePanel(somePanel, someModel);
  ..
  somePanel.add(new AjaxLink(openModal) {
 ..
  }

  I keep getting an error message: WicketMessage: close tag not found for
  tag: div wicket:id=somePanel

  Anyone any idea what I am doing wrong?

  Thanks!

  Michael


  -
  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: [newbie question] How to refresh Image using an AjaxLink

2008-02-29 Thread Nino Saturnino Martinez Vazquez Wael

Could you show us some code?

regards

Karol Wrzesniewski wrote:

Thanks for all your help.

NonCachingImage is exacly what I wanted.

It works fine but only after I open modal window, call 
setImageResource, close modal and reopen it again.


After first call of modal window default image is created, when I'm 
trying to change it nothing happens exacly like with plain Image 
objects. But when I close modal and open it again everything works as 
intended to, pictures are refreshing using chosen resources.


regards,
Zyx




Dnia 28-02-2008 o 10:22:40 Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] napisał(a):


:) I think thats the point of noncaching image thats already there, 
it's just that people gets confused by this...


Bernard Niset wrote:

Hi,
I had the same issue yesterday and found a solution somewhere else 
in this mailing list. Adding some random query to the url forces the 
browser not to reuse a cached image. To achieve that you have to 
subclass Image and override onComponentTag like this:


   @Override
   protected void onComponentTag(ComponentTag tag)
   {
   super.onComponentTag(tag);
   String src = (String) tag.getAttributes().get(src);
   src = src + rand= + Math.random();
   tag.getAttributes().put(src, src);
   }

Bernard.


Igor Vaynberg wrote:

most people want stable urls for their images i would imagine, so they
can be cached by the browser.

in case of ajax this doesnt work because the url has to change so that
browser needs to know to refresh it.

maybe image can know if its requested within an ajax request and
automatically add random noise to the url...there maybe room for
improvement here.

please add an rfe

-igor


On Wed, Feb 27, 2008 at 11:12 AM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:

Should nocachingImage be default, and then have a cachingImage? Or 
would

 that result in the same amount of confusion? WDYT?

 As a couple of people has been confused by this...

 regards Nino



 Igor Vaynberg wrote:
  use NonCachingImage
 
  -igor
 
 
  On Wed, Feb 27, 2008 at 2:43 AM, Karol Wrzesniewski
  [EMAIL PROTECTED] wrote:
 
  Hi,
 
   I'm having problems with refreshing an Image using AjaxLink.
 
   I have a ModalWindow. On it's left side theres a ListView 
containing Ajax

   links:
 
   --
   add(listaObrazow = new ListView(pics, obrazki) {
   public void populateItem(final ListItem listItem) {
   final String obr = 
(String)listItem.getModelObject();

   listItem.add(new Label(pic,new Model(obr)));
 
   listItem.add(new AjaxLink(picAjaxLink) {
   public void onClick(AjaxRequestTarget
   ajaxRequestTarget) {
 
   imgPreview.setImageResource(
   EbokTools.getImageResource(
   
(String)listItem.getModelObject()

   )
   );
 
   
ajaxRequestTarget.addComponent(imgPreview);

 
 
   
myModal.setObraz((String)listItem.getModelObject());
   
ajaxRequestTarget.addComponent(wyborObrazow);

   }});
   }
   });
   --
 
 
 
   imgPreview is an Image object, placed on the same modal 
Window. What Im
   trying to achieve is to refresh this image after the AjaxLink 
is clicked.
   Unfortunately it doesn't. After I click on AjaxLink content 
of form

   wyborObrazow is refreshed, but image stays unchanged.
 
   Image resource is being changed - i know that because after i 
close modal
   and open it again imgPreview is showing me  the right 
Resource.

 
   The problem is that calling 
ajaxRequestTarget.addComponent(imgPreview);

   after changing imageResource doesn't seem to be enough.
 
   I would be very grateful for some hints.
 
   best regards,
   Zyx
 
   --
 
   
-

   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]
 
 
 

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





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













--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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

Re: [newbie question] How to refresh Image using an AjaxLink

2008-02-29 Thread Nino Saturnino Martinez Vazquez Wael

https://issues.apache.org/jira/browse/WICKET-1382

Igor Vaynberg wrote:

most people want stable urls for their images i would imagine, so they
can be cached by the browser.

in case of ajax this doesnt work because the url has to change so that
browser needs to know to refresh it.

maybe image can know if its requested within an ajax request and
automatically add random noise to the url...there maybe room for
improvement here.

please add an rfe

-igor


On Wed, Feb 27, 2008 at 11:12 AM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
  

Should nocachingImage be default, and then have a cachingImage? Or would
 that result in the same amount of confusion? WDYT?

 As a couple of people has been confused by this...

 regards Nino



 Igor Vaynberg wrote:
  use NonCachingImage
 
  -igor
 
 
  On Wed, Feb 27, 2008 at 2:43 AM, Karol Wrzesniewski
  [EMAIL PROTECTED] wrote:
 
  Hi,
 
   I'm having problems with refreshing an Image using AjaxLink.
 
   I have a ModalWindow. On it's left side theres a ListView containing Ajax
   links:
 
   --
   add(listaObrazow = new ListView(pics, obrazki) {
   public void populateItem(final ListItem listItem) {
   final String obr = (String)listItem.getModelObject();
   listItem.add(new Label(pic,new Model(obr)));
 
   listItem.add(new AjaxLink(picAjaxLink) {
   public void onClick(AjaxRequestTarget
   ajaxRequestTarget) {
 
   imgPreview.setImageResource(
   EbokTools.getImageResource(
   (String)listItem.getModelObject()
   )
   );
 
   ajaxRequestTarget.addComponent(imgPreview);
 
 
   
myModal.setObraz((String)listItem.getModelObject());
   ajaxRequestTarget.addComponent(wyborObrazow);
   }});
   }
   });
   --
 
 
 
   imgPreview is an Image object, placed on the same modal Window. What Im
   trying to achieve is to refresh this image after the AjaxLink is clicked.
   Unfortunately it doesn't. After I click on AjaxLink content of form
   wyborObrazow is refreshed, but image stays unchanged.
 
   Image resource is being changed - i know that because after i close modal
   and open it again imgPreview is showing me  the right Resource.
 
   The problem is that calling ajaxRequestTarget.addComponent(imgPreview);
   after changing imageResource doesn't seem to be enough.
 
   I would be very grateful for some hints.
 
   best regards,
   Zyx
 
   --
 
   -
   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]
 
 
 

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





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


  


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



Cross fields validation

2008-02-29 Thread Paolo Di Tommaso
Guys,

Which the best pattern using wicket to write validation rule that span over
more than one field?!

Take in consideration the following use case:

There is a form with two field Field-A and Field-B.

Field-A is mandatory and contains a date value. So this is trivial:
setRequired(true) + a DateValidator

Field-B validation depends on the date value entered in Field-A and is
mandatory only for certain date value entered in Field-A.

So basically how write a validator that depends on values entered in other
fields?


Thank you.

/ Paolo


Re: [newbie question] How to refresh Image using an AjaxLink

2008-02-29 Thread Karol Wrzesniewski

ok - that's how it looks:


this is a ListView on the panels left side:

  add(listaObrazow = new ListView(pics, obrazki) {
public void populateItem(final ListItem listItem) {
final String obr = (String)listItem.getModelObject();

AjaxLink linka = new AjaxLink(picAjaxLink) {
public void onClick(AjaxRequestTarget  
ajaxRequestTarget) {


imgPreview.setImageResource(
EbokTools.getImageResource(
(String)listItem.getModelObject()
)
);

ajaxRequestTarget.addComponent(imgPreview);

myModal.setObraz((String)listItem.getModelObject());
ajaxRequestTarget.addComponent(wyborObrazow);
}};

linka.add(new Label(pic,new Model(obr)));
listItem.add(linka);
}
});


that's getImageResource method:

public static ByteArrayResource getImageResource(String picName) {
byte[] plik = null;
try {

  plik = EbokTools.fileToArray(
 new File(
EbokSettings.getImgDir()+/+picName));
} catch (IOException ex) {
ex.printStackTrace();
}

  return new ByteArrayResource(img,plik);
}



As I wrote before imgPreview is a NonCachingImage object placed on the  
same Modal Window as ListView. Its created in the panel constructor using  
method:


EbokTools.getImage(imgPreview, nopic.jpg);  



getImage looks like this:

public static NonCachingImage getImage(String wicketID, String  
picName) {

return new NonCachingImage(wicketID,getImageResource(picName));
}


-

To make it work I need to:
- open modal window
	- click on one of the AjaxLinks on listaObrazow (it doesn't trigger image  
refresh :\ )

- close modal
- open it again

After that images are changing on clicking AjaxLinks - as they should.



best regards,
Karol

Dnia 29-02-2008 o 10:15:55 Nino Saturnino Martinez Vazquez Wael  
[EMAIL PROTECTED] napisał(a):



Could you show us some code?

regards

Karol Wrzesniewski wrote:

Thanks for all your help.

NonCachingImage is exacly what I wanted.

It works fine but only after I open modal window, call  
setImageResource, close modal and reopen it again.


After first call of modal window default image is created, when I'm  
trying to change it nothing happens exacly like with plain Image  
objects. But when I close modal and open it again everything works as  
intended to, pictures are refreshing using chosen resources.


regards,
Zyx




Dnia 28-02-2008 o 10:22:40 Nino Saturnino Martinez Vazquez Wael  
[EMAIL PROTECTED] napisał(a):


:) I think thats the point of noncaching image thats already there,  
it's just that people gets confused by this...


Bernard Niset wrote:

Hi,
I had the same issue yesterday and found a solution somewhere else in  
this mailing list. Adding some random query to the url forces the  
browser not to reuse a cached image. To achieve that you have to  
subclass Image and override onComponentTag like this:


   @Override
   protected void onComponentTag(ComponentTag tag)
   {
   super.onComponentTag(tag);
   String src = (String) tag.getAttributes().get(src);
   src = src + rand= + Math.random();
   tag.getAttributes().put(src, src);
   }

Bernard.


Igor Vaynberg wrote:
most people want stable urls for their images i would imagine, so  
they

can be cached by the browser.

in case of ajax this doesnt work because the url has to change so  
that

browser needs to know to refresh it.

maybe image can know if its requested within an ajax request and
automatically add random noise to the url...there maybe room for
improvement here.

please add an rfe

-igor


On Wed, Feb 27, 2008 at 11:12 AM, Nino Saturnino Martinez Vazquez  
Wael

[EMAIL PROTECTED] wrote:

Should nocachingImage be default, and then have a cachingImage? Or  
would

 that result in the same amount of confusion? WDYT?

 As a couple of people has been confused by this...

 regards Nino



 Igor Vaynberg wrote:
  use NonCachingImage
 
  -igor
 
 
  On Wed, Feb 27, 2008 at 2:43 AM, Karol Wrzesniewski
  [EMAIL PROTECTED] wrote:
 
  Hi,
 
   I'm having problems with refreshing an Image using AjaxLink.
 
   I have a ModalWindow. On it's left side theres a ListView  
containing Ajax

   links:
 
   --
   

Re: SpringBean in AuthenticatedWebSession

2008-02-29 Thread lars vonk
If I recall it correctly only Components are injected. A Session is
not a Component and therefor not injected.

You could pass the UserDao as construtor argument yourself when
instantiating you Session class in your newSession method in your
WebApplication.

Lars



On Fri, Feb 29, 2008 at 10:54 AM, Bert Radke [EMAIL PROTECTED] wrote:
 Hi List,

  thanks to the help i received so far here, i managed to load objects
  through JPA using DAOs.
  The DAOs get injected just fine using the wicket-spring extension (i
  used the blog example [1]
  as a starting point). So this is all fine, but now i tried using the
  same technique to load and
  verify a user for login purposes, but the userDao does not get injected.

  My Session extends AuthenticatedWebSession and is created fine, but no
  DAO is injected.

 @SpringBean(name = userDao)
 private UserDao dao;

  the userDao is defined in the application.xml just like all the others...

  Do i have to take any additional steps to get Spring to inject the DAO
  into the session?

  [1] http://cwiki.apache.org/WICKET/blog-tutorial.html

  Thanks in advance for your time.
  Bert

  -
  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: Cross fields validation

2008-02-29 Thread Paolo Di Tommaso
Thanks!

On Fri, Feb 29, 2008 at 10:55 AM, Kai Mütz [EMAIL PROTECTED] wrote:

 [EMAIL PROTECTED]  wrote:
  Guys,
 
  Which the best pattern using wicket to write validation rule that
  span over
  more than one field?!

 http://cwiki.apache.org/WICKET/validating-related-fields.html

 HTH, Kai


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




RE: Cross fields validation

2008-02-29 Thread Kai Mütz
[EMAIL PROTECTED]  wrote:
 Guys,
 
 Which the best pattern using wicket to write validation rule that
 span over
 more than one field?!

http://cwiki.apache.org/WICKET/validating-related-fields.html

HTH, Kai


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



SpringBean in AuthenticatedWebSession

2008-02-29 Thread Bert Radke
Hi List,

thanks to the help i received so far here, i managed to load objects
through JPA using DAOs.
The DAOs get injected just fine using the wicket-spring extension (i
used the blog example [1]
as a starting point). So this is all fine, but now i tried using the
same technique to load and
verify a user for login purposes, but the userDao does not get injected.

My Session extends AuthenticatedWebSession and is created fine, but no
DAO is injected.

@SpringBean(name = userDao)
private UserDao dao;

the userDao is defined in the application.xml just like all the others...

Do i have to take any additional steps to get Spring to inject the DAO
into the session?

[1] http://cwiki.apache.org/WICKET/blog-tutorial.html

Thanks in advance for your time.
Bert

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



Re: Can i add multiple lines to a node-link in tree?

2008-02-29 Thread Newgro

I added a NRFE 
https://issues.apache.org/jira/browse/WICKET-1384
https://issues.apache.org/jira/browse/WICKET-1384 

Maybe someone will take care for this.

Thanks for your taken time
Cheers
Per
-- 
View this message in context: 
http://www.nabble.com/Can-i-add-multiple-lines-to-a-node-link-in-tree--tp15617892p15755831.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: SpringBean in AuthenticatedWebSession

2008-02-29 Thread Sebastiaan van Erk

One option is to add:

InjectorHolder.getInjector().inject(this)

In your session constructor.

Regards,
Sebastiaan

Bert Radke wrote:

Hi List,

thanks to the help i received so far here, i managed to load objects
through JPA using DAOs.
The DAOs get injected just fine using the wicket-spring extension (i
used the blog example [1]
as a starting point). So this is all fine, but now i tried using the
same technique to load and
verify a user for login purposes, but the userDao does not get injected.

My Session extends AuthenticatedWebSession and is created fine, but no
DAO is injected.

@SpringBean(name = userDao)
private UserDao dao;

the userDao is defined in the application.xml just like all the others...

Do i have to take any additional steps to get Spring to inject the DAO
into the session?

[1] http://cwiki.apache.org/WICKET/blog-tutorial.html

Thanks in advance for your time.
Bert

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



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Can i add multiple lines to a node-link in tree?

2008-02-29 Thread Matej Knopp
It is not possible to do this with tree table. That is fixed for one line only.

-Matej

On Fri, Feb 29, 2008 at 11:26 AM, Newgro [EMAIL PROTECTED] wrote:

  I added a NRFE
  https://issues.apache.org/jira/browse/WICKET-1384
  https://issues.apache.org/jira/browse/WICKET-1384

  Maybe someone will take care for this.

  Thanks for your taken time
  Cheers
  Per
  --
  View this message in context: 
 http://www.nabble.com/Can-i-add-multiple-lines-to-a-node-link-in-tree--tp15617892p15755831.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]





-- 
Resizable and reorderable grid components.
http://www.inmethod.com

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



Re: SpringBean in AuthenticatedWebSession

2008-02-29 Thread Bert Radke
Thank you,

while trying the approach from Lars, your answer came in ;)

On Fri, Feb 29, 2008 at 11:33 AM, Sebastiaan van Erk
[EMAIL PROTECTED] wrote:
 One option is to add:

  InjectorHolder.getInjector().inject(this)

I should have know this myself, as it came up on this list recently..

But now it works,

Thank you both.

Bert

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



Re: Can i add multiple lines to a node-link in tree?

2008-02-29 Thread Newgro

Hello Matej,

is there a cause for fix single line? Or is it only not implemented yet?

Thanks
Per
-- 
View this message in context: 
http://www.nabble.com/Can-i-add-multiple-lines-to-a-node-link-in-tree--tp15617892p15756237.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: SpringBean in AuthenticatedWebSession

2008-02-29 Thread lars vonk
Nice one Sebastiaan. Only now I have to refactor my code :-)

On Fri, Feb 29, 2008 at 11:52 AM, Bert Radke [EMAIL PROTECTED] wrote:
 Thank you,

  while trying the approach from Lars, your answer came in ;)


  On Fri, Feb 29, 2008 at 11:33 AM, Sebastiaan van Erk
  [EMAIL PROTECTED] wrote:
   One option is to add:
  
InjectorHolder.getInjector().inject(this)
  
  I should have know this myself, as it came up on this list recently..

  But now it works,

  Thank you both.



  Bert

  -
  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: Can i add multiple lines to a node-link in tree?

2008-02-29 Thread Matej Knopp
The problem is that TreeTable doesn't use table for building the
actual layout. So it's not something easily fixable. It's on my todo
list to rework the TreeTable to use table but I'm kinda short of
time right now.

-Matej

On Fri, Feb 29, 2008 at 11:58 AM, Newgro [EMAIL PROTECTED] wrote:

  Hello Matej,

  is there a cause for fix single line? Or is it only not implemented yet?

  Thanks
  Per
  --
  View this message in context: 
 http://www.nabble.com/Can-i-add-multiple-lines-to-a-node-link-in-tree--tp15617892p15756237.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]





-- 
Resizable and reorderable grid components.
http://www.inmethod.com

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



Re: Can i add multiple lines to a node-link in tree?

2008-02-29 Thread Newgro

I exchanged the tree-table by tree and have the same problem.
Can you please provide me a little example how you did this?

Cheers
Per
-- 
View this message in context: 
http://www.nabble.com/Can-i-add-multiple-lines-to-a-node-link-in-tree--tp15617892p15756637.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]



Problem with opening inline PDF file due to ;charset=UTF-8 in content type

2008-02-29 Thread Niels Bo

Hi

After upgrading from wicket 1.2.6 to 1.3 we got a problem with opening PDF
files inline in a browser window. 
At least for some browser versions and/or PDF readers, it now opens the PDF
file in a separate window instead of inline.

The difference is that in Wicket 1.3 ;charset=UTF-8 is always appended to
the content type.
If ResourceState::getContentType() returns application/pdf, this is what I
see in a HTTP debugger:

Wicket 1.2.6:
Content-Type: application/pdf

Wicket 1.3.1:
Content-Type: application/pdf; charset=UTF-8

The ;charset=UTF-8 is appended in ResourceStreamRequestTarget, and I can't
see a way to override it.
Any suggestions how to fix this?

Niels
-- 
View this message in context: 
http://www.nabble.com/Problem-with-opening-inline-PDF-file-due-to-%22-charset%3DUTF-8%22-in-content-type-tp15757124p15757124.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]



TreeTable lazy loading. updateTree and javascript

2008-02-29 Thread JuanPabloCoenMitrani

Hi,
I'm using the TreeTable from wicket-extensions 1.2.6
I extended it to make childs load lazily by AJAX when parent nodes are
expanded.
I also used some javascript to make all expand/collapse behavior client side
from that moment.

My problem is that, when I update the tree via AJAX (and load some new child
nodes), if I call 
target.addComponent(treeTable);
all nodes are sent to the server, and the purpose of lazy loading them is
not fullfiled,
on the other hand, if I call
treeTable.updateTree(target);
only the lastly loaded nodes are sent to the server, but the Javascript is
not sent.

By the way, I have some behaviors that load the Javascript by doing
public void bind(Component component) {

component.add(TextTemplateHeaderContributor.forJavaScript(getClass(),prepareParents.js,variables));
}

Thank you very much

Juan Pablo
-- 
View this message in context: 
http://www.nabble.com/TreeTable-lazy-loading.-updateTree-and-javascript-tp15757158p15757158.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]



JDBC Connection for CRUD operations

2008-02-29 Thread wicketUser

Hi,

I am new to Wicket and I don't wish to use hibernate as persistence
framework. I am trying to do CRUD operations through JDBC connection to a
mysql database.

I have added mysql dependency in my project's pom.xml file

  dependency
groupIdmysql/groupId
artifactIdmysql-connector-java/artifactId
version5.0.5/version

  /dependency

and I can see the connector in the war file.

However, when I try to save an object, I get the following error:

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at com.mycompany.DBConnection.save(DBConnection.java:20)
at
com.mycompany.CategoryPage$CategoryForm.onSubmit(CategoryPage.java:35)
at
org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1328
)
at
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:776
)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInte
rface.java:183)
at
org.apache.wicket.request.target.component.listener.ListenerInterface
RequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents
(AbstractRequestCycleProcessor.java:90)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.j
ava:1166)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:
354)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.ja
va:194)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1084)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
60)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
81)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
26)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
lerCollection.java:206)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
39)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
5)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
n.java:842)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:395)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
.java:450)


Can anyone please help me with this?

Thanks.

-- 
View this message in context: 
http://www.nabble.com/JDBC-Connection-for-CRUD-operations-tp15757358p15757358.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]



AjaxLink throws WicketRuntimeException

2008-02-29 Thread Tim Squires
Hi,

I have an AjaxLink that displays a ModalWindow onClick:

AjaxLink executorLink = new AjaxLink(show executor) {
public void onClick(AjaxRequestTarget target) {
logger.debug(show the executor details window for will 
+ will);
executorModalWindow.show(target);
}
};
// Don't display the executor link if this is read only.
executorLink.setVisible(!readonly);
add(executorLink);

with html

a href=# wicket:id=show executorexecutor.../a

The first time this link is clicked, a WicketRuntimeException is thrown.

WicketMessage: component wills list:wills list:1:will details:show
executor not found on page

See below for full stack.  If I then go back (right click-back) and click
the link again, the modal window is displayed.

Has anyone come across this before?  What have I missed?

Wicket 1.3.1
Tomcat 6
JDK 1.6

Thanks for your help,
Tim




WicketMessage: component wills list:wills list:1:will details:show
executor not found on page
crystalmark.willfinder.page.modal.SearchWillsResultsPage[id = 0], listener
interface = [RequestListenerInterface name=IBehaviorListener,
method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]

Root cause:

org.apache.wicket.WicketRuntimeException: component wills list:wills
list:1:will details:show executor not found on page
crystalmark.willfinder.page.modal.SearchWillsResultsPage[id = 0], listener
interface = [RequestListenerInterface name=IBehaviorListener,
method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:411)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:456)
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:111)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)

Page

  [Stateless Page]:
  # PathSizeTypeModel Object

No more page details shown.


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



Re: JDBC Connection for CRUD operations

2008-02-29 Thread lars vonk
What driver did you specify?

On Fri, Feb 29, 2008 at 1:17 PM, wicketUser [EMAIL PROTECTED] wrote:

  Hi,

  I am new to Wicket and I don't wish to use hibernate as persistence
  framework. I am trying to do CRUD operations through JDBC connection to a
  mysql database.

  I have added mysql dependency in my project's pom.xml file

   dependency
 groupIdmysql/groupId
 artifactIdmysql-connector-java/artifactId
 version5.0.5/version
   /dependency

  and I can see the connector in the war file.

  However, when I try to save an object, I get the following error:

  java.sql.SQLException: No suitable driver
 at java.sql.DriverManager.getConnection(DriverManager.java:545)
 at java.sql.DriverManager.getConnection(DriverManager.java:171)
 at com.mycompany.DBConnection.save(DBConnection.java:20)
 at
  com.mycompany.CategoryPage$CategoryForm.onSubmit(CategoryPage.java:35)
 at
  org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1328
  )
 at
  org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:776
  )
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  java:39)
 at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  sorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at
  org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInte
  rface.java:183)
 at
  org.apache.wicket.request.target.component.listener.ListenerInterface
  RequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
 at
  org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents
  (AbstractRequestCycleProcessor.java:90)
 at
  org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.j
  ava:1166)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at
  org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:
  354)
 at
  org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.ja
  va:194)
 at
  org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
  Handler.java:1084)
 at
  org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
  60)
 at
  org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
  a:216)
 at
  org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
  81)
 at
  org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
  26)
 at
  org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

 at
  org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
  lerCollection.java:206)
 at
  org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
  java:114)
 at
  org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
  39)
 at org.mortbay.jetty.Server.handle(Server.java:324)
 at
  org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
  5)
 at
  org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
  n.java:842)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
 at
  org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
  va:395)
 at
  org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
  .java:450)


  Can anyone please help me with this?

  Thanks.

  --
  View this message in context: 
 http://www.nabble.com/JDBC-Connection-for-CRUD-operations-tp15757358p15757358.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]



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



Re: JDBC Connection for CRUD operations

2008-02-29 Thread Nino Saturnino Martinez Vazquez Wael

you need to have which ever driver you specified on classpath..

wicketUser wrote:

Hi,

I am new to Wicket and I don't wish to use hibernate as persistence
framework. I am trying to do CRUD operations through JDBC connection to a
mysql database.

I have added mysql dependency in my project's pom.xml file

  dependency
groupIdmysql/groupId
artifactIdmysql-connector-java/artifactId
version5.0.5/version

  /dependency

and I can see the connector in the war file.

However, when I try to save an object, I get the following error:

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at com.mycompany.DBConnection.save(DBConnection.java:20)
at
com.mycompany.CategoryPage$CategoryForm.onSubmit(CategoryPage.java:35)
at
org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1328
)
at
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:776
)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInte
rface.java:183)
at
org.apache.wicket.request.target.component.listener.ListenerInterface
RequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents
(AbstractRequestCycleProcessor.java:90)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.j
ava:1166)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:
354)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.ja
va:194)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1084)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
60)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
81)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
26)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
lerCollection.java:206)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
39)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
5)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
n.java:842)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:395)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
.java:450)


Can anyone please help me with this?

Thanks.

  


--
-Wicket for love
-Jme for fun

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]



Re: Security Features offered by Wicket

2008-02-29 Thread Arthur Ahiceh
Hi Igor,

4. CSRF attacks

  first you would have to hijack the session...
  then in order for you to hit

?wicket:interface=:0:goGerman::ILinkListener::

  a few things have to be true:
  a) attacker has to hijack the session
  b) page id (the 0 part of the url) has to match with the link path
in
  the user's session. this depends on the order user has visited the
  pages
  c) user had to actually have visited the page previously

  even if thats not enough it is trivial to write your own coding
  strategy that appends the random token and stores its mirror in
  session

While pages ids have been correlatives, hacker could always construct a
valid url to generate a CSRF attack. Let's see a typical example...

Consider a bank web site that allows its users to make account transfers.
Once a user has logged in and received an authentication cookie, he needs
only to request the URL
http://www.bank.com/manageaccount/?wicket:interface=:0:inputForm::IFormSubmitListener::inputForm4_hf_0transferTo=123amount=1000in
order to transfer $1000 to account number 123. If an attacker can
trick
an already-authenticated user into visiting a malicious page that contains
an image link like img src=
http://www.bank.com/manageaccount/?wicket:interface=:0:inputForm::IFormSubmitListener::inputForm4_hf_0transferTo=456amount=1000/,
the user's (victim) browser will automatically request that URL, thus making
an account transfer without the user's knowledge or consent.

Once the victim makes a valid transfer, the transfer's values are in
session, so if the attacker generates many images like commented with
different values in interface parameter, he would obtain the objective.
So, I think that it is necessary to insert a random value to all requests or
generate confidential values for all parameters of a request. What do you
think?

3. CONFIDENTIALITY: I have seen in forms that radio's options an checkbox's
values have no confidential values. Could I put automatically all form
values confidentiality in Wicket? I don't want that the attacker sees the
original values...

Is it possible to apply encrypt strategy to forms?

thanks!

Arthur.


RE: Security Features offered by Wicket

2008-02-29 Thread Hoover, William
What about using the CryptedUrlWebRequestCodingStrategy? In your WebApplication:

 @Override
protected IRequestCycleProcessor newRequestCycleProcessor() {
return new WebRequestCycleProcessor() {
protected IRequestCodingStrategy 
newRequestCodingStrategy() {
// encrypt URL with a hash format
return new 
CryptedUrlWebRequestCodingStrategy(new WebRequestCodingStrategy());
}
};
}

-Original Message-
From: Arthur Ahiceh [mailto:[EMAIL PROTECTED]
Sent: Friday, February 29, 2008 9:04 AM
To: users@wicket.apache.org
Subject: Re: Security Features offered by Wicket


Hi Igor,

4. CSRF attacks

  first you would have to hijack the session...
  then in order for you to hit

?wicket:interface=:0:goGerman::ILinkListener::

  a few things have to be true:
  a) attacker has to hijack the session
  b) page id (the 0 part of the url) has to match with the link path
in
  the user's session. this depends on the order user has visited the
  pages
  c) user had to actually have visited the page previously

  even if thats not enough it is trivial to write your own coding
  strategy that appends the random token and stores its mirror in
  session

While pages ids have been correlatives, hacker could always construct a
valid url to generate a CSRF attack. Let's see a typical example...

Consider a bank web site that allows its users to make account transfers.
Once a user has logged in and received an authentication cookie, he needs
only to request the URL
http://www.bank.com/manageaccount/?wicket:interface=:0:inputForm::IFormSubmitListener::inputForm4_hf_0transferTo=123amount=1000in
order to transfer $1000 to account number 123. If an attacker can
trick
an already-authenticated user into visiting a malicious page that contains
an image link like img src=
http://www.bank.com/manageaccount/?wicket:interface=:0:inputForm::IFormSubmitListener::inputForm4_hf_0transferTo=456amount=1000/,
the user's (victim) browser will automatically request that URL, thus making
an account transfer without the user's knowledge or consent.

Once the victim makes a valid transfer, the transfer's values are in
session, so if the attacker generates many images like commented with
different values in interface parameter, he would obtain the objective.
So, I think that it is necessary to insert a random value to all requests or
generate confidential values for all parameters of a request. What do you
think?

3. CONFIDENTIALITY: I have seen in forms that radio's options an checkbox's
values have no confidential values. Could I put automatically all form
values confidentiality in Wicket? I don't want that the attacker sees the
original values...

Is it possible to apply encrypt strategy to forms?

thanks!

Arthur.


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



Re: fix for WICKET-1365 causes ClassCastException

2008-02-29 Thread Maurice Marrink
The problem seems to be line 97 of SerializedPagesCache where you add
a SerializedPageWithSession to a list who's entries will later be cast
to a SoftReference (at line 63).

Maurice


On Fri, Feb 29, 2008 at 2:20 PM, Maurice Marrink [EMAIL PROTECTED] wrote:
 Matej,

  I am afraid your latest change is causing page expired all over the
  place in our application.
  The underlying exception seems to be:
  org.apache.wicket.RequestCycle.detach(RequestCycle.java:1095) : there
  was an error detaching the request from the session
  [EMAIL PROTECTED]
  java.lang.ClassCastException:
  org.apache.wicket.protocol.http.pagestore.SerializedPagesCache
  $SerializedPageWithSession cannot be cast to java.lang.ref.SoftReference
 at
  
 org.apache.wicket.protocol.http.pagestore.SerializedPagesCache.removePage(SerializedPagesCache.java:63)
 at
  
 org.apache.wicket.protocol.http.pagestore.SerializedPagesCache.storePage(SerializedPagesCache.java:145)
 at
  
 org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(DiskPageStore.java:808)
 at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore
  $SecondLevelCachePageMap.put(SecondLevelCacheSessionStore.java:332)
 at org.apache.wicket.Session.requestDetached(Session.java:1370)
 at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1091)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1348)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at
  org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:358)
 at
  org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
 at
  
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at
  
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
  
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at
  
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)


  Maurice


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



Sporadic exponential explosion of session size

2008-02-29 Thread Meetesh Karia

Hi all,

We're running into a problem that we've seen happen many times though 
unfortunately we can't consistently reproduce it.  We're using Wicket 
1.3.1 with automatic multi-window support enabled and the default 
SecondLevelCacheSessionStore.


During normal use of our site, no Pages reference other Pages and the 
session size changes as it should.  However, occasionally when we open 
pages in a new tab (often when multiple pages are opened in a new tab in 
rapid succession), we get the following situation:


1 tab

pagemap-null size = x

2 tabs

pagemap-null size = 2x
pagemap-0 size = x

3 tabs

pagemap-null size = 4x
pagemap-0 size = 2x
pagemap-1 size = x

4 tabs

pagemap-null size = 8x
pagemap-0 size = 4x
pagemap-1 size = 2x
pagemap-2 size = x


The only explanation that I could come up with for this explosion is 
that somehow, behind the scenes, a Page is holding onto a reference to 
another Page in this situation.  Because 8x is beyond our max pagemap 
size, it means that there can only be 1-2 Pages in it taking up this space.


Has anyone come across a problem like this?  Any thoughts on what this 
could be?


Thanks,
Meetesh


Re: errors on the WicketStuff Dojo split container example

2008-02-29 Thread Fernando Wermus
I have the same problem. Did you solve by yourself?

This is my code an debugging,

DEBUG: widget ID collision on ID: resumenPartido111
DEBUG: widget ID collision on ID: detallePartido112


wicket:panel
table
  tr wicket:id=repeating
tddiv wicket:id=accordion[accordion]/div/td
  /tr
/table
/wicket:panel

public class SolapaPartidos extends Panel {

private static final long serialVersionUID = 5452141466481309848L;

public SolapaPartidos(String id) {
super(id);
RepeatingView repeating=new RepeatingView(repeating);
add(repeating);

WebMarkupContainer item = new WebMarkupContainer(
repeating.newChildId());
repeating.add(item);
 item.add(new Accordion(accordion));
}
}


wicket:panel
div wicket:id=partido
div wicket:id=resumenPartido
[resumenPartido]
/div
div wicket:id=detallePartido
[detallePartido]
/div
/div
/wicket:panel


public class Accordion extends Panel {
private static final long serialVersionUID = -3342221765791589494L;

public Accordion(String id, InscripcionPartido inscripcion) {
super(id);
DojoAccordionContainer container = new
DojoAccordionContainer(partido);

container.setHeight(200px);
container.add(new DojoSimpleContainer(resumenPartido, Resumen del
partido));
container.add(new DojoSimpleContainer(detallePartido, Detalle del
partido));
add(container);
}
}



On Wed, Jan 30, 2008 at 1:43 PM, Wicketter [EMAIL PROTECTED] wrote:


 There are errors on this page which displays split container example. Also
 copying the source code, doesn't do the same thing as example running on
 the
 site.

 Here are the errors displayed:

 DEBUG: widget ID collision on ID: tab11
 DEBUG: widget ID collision on ID: tab22
 DEBUG: widget ID collision on ID: tab33
 clear | close
 Wicket Ajax Debug Window (drag me here)
 WICKET AJAX DEBUG
 DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
 locate widget implementation for panel in wicket.widget registered to
 namespace wicket. Developers must specify correct namespaces for all
 non-Dojo widgets -- will be removed in version: 0.5
 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget
 implementation for panel in wicket.widget registered to namespace
 wicket
 DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
 locate widget implementation for panel in wicket.widget registered to
 namespace wicket. Developers must specify correct namespaces for all
 non-Dojo widgets -- will be removed in version: 0.5
 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget
 implementation for panel in wicket.widget registered to namespace
 wicket
 DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
 locate widget implementation for child in wicket.widget registered to
 namespace wicket. Developers must specify correct namespaces for all
 non-Dojo widgets -- will be removed in version: 0.5
 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget
 implementation for child in wicket.widget registered to namespace
 wicket
 DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
 locate widget implementation for extend in wicket.widget registered to
 namespace wicket. Developers must specify correct namespaces for all
 non-Dojo widgets -- will be removed in version: 0.5
 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget
 implementation for extend in wicket.widget registered to namespace
 wicket
 DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
 locate widget implementation for simpledropdowndatepicker in 
 dojo.widget
 registered to namespace dojo. Developers must specify correct namespaces
 for all non-Dojo widgets -- will be removed in version: 0.5
 DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
 locate widget implementation for panel in wicket.widget registered to
 namespace wicket. Developers must specify correct namespaces for all
 non-Dojo widgets -- will be removed in version: 0.5
 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget
 implementation for panel in wicket.widget registered to namespace
 wicket
 DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
 locate widget implementation for panel in wicket.widget registered to
 namespace wicket. Developers must specify correct namespaces for all
 non-Dojo widgets -- will be removed in version: 0.5
 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget
 implementation for panel in wicket.widget registered to namespace
 wicket
 DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
 locate widget implementation for child in wicket.widget registered to
 namespace wicket. Developers must specify correct namespaces for all
 non-Dojo widgets -- will be removed in version: 0.5
 DEBUG: dojo.widget.Parse: error:Error: 

Re: Security Features offered by Wicket

2008-02-29 Thread Martin Makundi
Hi Arthur!

It would be nice if you wrote a public wiki document about Wicket
Security Audit from the point of view of security-sensitive
institutions. After you have gathered all the necessary information,
of course. This would speed up the adoption of Wicket in similar
projects as there would be research done on the subject.

**
Martin

2008/2/29, Arthur Ahiceh [EMAIL PROTECTED]:
 Hi Igor,

  4. CSRF attacks

first you would have to hijack the session...
then in order for you to hit

 ?wicket:interface=:0:goGerman::ILinkListener::

a few things have to be true:
a) attacker has to hijack the session
b) page id (the 0 part of the url) has to match with the link path
  in
the user's session. this depends on the order user has visited the
pages
c) user had to actually have visited the page previously

even if thats not enough it is trivial to write your own coding
strategy that appends the random token and stores its mirror in
session

  While pages ids have been correlatives, hacker could always construct a
  valid url to generate a CSRF attack. Let's see a typical example...

  Consider a bank web site that allows its users to make account transfers.
  Once a user has logged in and received an authentication cookie, he needs
  only to request the URL
  
 http://www.bank.com/manageaccount/?wicket:interface=:0:inputForm::IFormSubmitListener::inputForm4_hf_0transferTo=123amount=1000in
  order to transfer $1000 to account number 123. If an attacker can
  trick
  an already-authenticated user into visiting a malicious page that contains
  an image link like img src=
  
 http://www.bank.com/manageaccount/?wicket:interface=:0:inputForm::IFormSubmitListener::inputForm4_hf_0transferTo=456amount=1000/,
  the user's (victim) browser will automatically request that URL, thus making
  an account transfer without the user's knowledge or consent.

  Once the victim makes a valid transfer, the transfer's values are in
  session, so if the attacker generates many images like commented with
  different values in interface parameter, he would obtain the objective.
  So, I think that it is necessary to insert a random value to all requests or
  generate confidential values for all parameters of a request. What do you
  think?

  3. CONFIDENTIALITY: I have seen in forms that radio's options an checkbox's
  values have no confidential values. Could I put automatically all form
  values confidentiality in Wicket? I don't want that the attacker sees the
  original values...

  Is it possible to apply encrypt strategy to forms?

  thanks!


  Arthur.


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



Re: GET method parameters as List or Map?

2008-02-29 Thread Johan Compagner
What is your question exactly? What do you want todo in wicket?

On 2/29/08, Gabor Szokoli [EMAIL PROTECTED] wrote:
 Hi,

 I have a GET method which takes a bunch of optional search parameters.
 I then put these in a map, keyed by the .
 A cool servlet framework we use (wicket) has a construct called
 PageParameters. Is there anything similar in Jersey?


 Gabor Szokoli

 -
 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: GET method parameters as List or Map?

2008-02-29 Thread Gabor Szokoli
On 2/29/08, Johan Compagner [EMAIL PROTECTED] wrote:
 What is your question exactly? What do you want todo in wicket?


Woops, wrong users list, sorry about the noise!
(should have been the jersey list...)


Gabor Szokoli

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



Re: Security Features offered by Wicket

2008-02-29 Thread Arthur Ahiceh
Hi again,

The example that I put here is a typical example when you read articles
about CSRF attacks. It demonstrates that the attack request is made by a
valid user with his credentials (cookies).

 This second authentication usually also contains an encrypted version of
the amount that should be transfered.
yes! this is random token solution that I have commented. You can add a
random parameter to all requests or to encrypt the values of all the
noneditable parameters (links, lists, radios, etc.).

Therefore, if we did not adopt automatic solutions it is probable that most
of the applications they are vulnerable to this type of attacks. Is it not
better than frameworks like Wicket solves certain vulnerabilities to us?

 CryptedUrlWebRequestCodingStrategy... (William Hoover)
This strategy as I know is only applied to urls and not to data forms! But I
would like that this point was confirmed by a wicket's developers group.

 public wiki document... (Martin Makundi)
First, I would like to know Wickets' features better and they confirmed me
if my questions are correct or no...

 CONFIDENTIALITY
 It is not possible out of the box afaik but you could either try to
 subclass Form or write a filter to intercept and replace form values
 when wicket sends the response and reverse it when the user submits
 the form.

right, I know that I could do it as HDIV does but I like to know if this
feature is provided by Wicket framework, I think that it would be very
interesting...what do you think about an automatic solution?

Excuse me, I'm french and my english is poorer than I would like.

Thanks again four your time! I consider that it is a subject that to all
interests to us.

Arthur.




2008/2/29, Maurice Marrink [EMAIL PROTECTED]:

   While pages ids have been correlatives, hacker could always construct a
   valid url to generate a CSRF attack. Let's see a typical example...
 
   Consider a bank web site that allows its users to make account
 transfers.
   Once a user has logged in and received an authentication cookie, he
 needs
   only to request the URL
 
 http://www.bank.com/manageaccount/?wicket:interface=:0:inputForm::IFormSubmitListener::inputForm4_hf_0transferTo=123amount=1000in
   order to transfer $1000 to account number 123. If an attacker can
   trick
   an already-authenticated user into visiting a malicious page that
 contains
   an image link like img src=
 
 http://www.bank.com/manageaccount/?wicket:interface=:0:inputForm::IFormSubmitListener::inputForm4_hf_0transferTo=456amount=1000/
 ,
   the user's (victim) browser will automatically request that URL, thus
 making
   an account transfer without the user's knowledge or consent.
 
   Once the victim makes a valid transfer, the transfer's values are in
   session, so if the attacker generates many images like commented with
   different values in interface parameter, he would obtain the
 objective.
   So, I think that it is necessary to insert a random value to all
 requests or
   generate confidential values for all parameters of a request. What do
 you
   think?

 In this case i think the problem would be the app allowing the
 transfer without requiring additional authentication and not the
 framework.
 Fortunately my online bank does require this and thus no amount of
 links will ever get past the response of authenticate yourself
 again.
 This second authentication usually also contains an encrypted version
 of the amount that should be transfered.


 
   3. CONFIDENTIALITY: I have seen in forms that radio's options an
 checkbox's
   values have no confidential values. Could I put automatically all form
   values confidentiality in Wicket? I don't want that the attacker sees
 the
   original values...
 
   Is it possible to apply encrypt strategy to forms?

 It is not possible out of the box afaik but you could either try to
 subclass Form or write a filter to intercept and replace form values
 when wicket sends the response and reverse it when the user submits
 the form.


 Maurice


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




Re: JDBC Connection for CRUD operations

2008-02-29 Thread James Carman
Just having the driver specified on the classpath doesn't register it.
 You have to do a Class.forName(drivernamehere) to register it with
the DriverManager.  I'd do that as a ServletContextListener or
something.

On 2/29/08, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
 you need to have which ever driver you specified on classpath..


  wicketUser wrote:
   Hi,
  
   I am new to Wicket and I don't wish to use hibernate as persistence
   framework. I am trying to do CRUD operations through JDBC connection to a
   mysql database.
  
   I have added mysql dependency in my project's pom.xml file
  
 dependency
 groupIdmysql/groupId
 artifactIdmysql-connector-java/artifactId
 version5.0.5/version
 /dependency
  
   and I can see the connector in the war file.
  
   However, when I try to save an object, I get the following error:
  
   java.sql.SQLException: No suitable driver
   at java.sql.DriverManager.getConnection(DriverManager.java:545)
   at java.sql.DriverManager.getConnection(DriverManager.java:171)
   at com.mycompany.DBConnection.save(DBConnection.java:20)
   at
   com.mycompany.CategoryPage$CategoryForm.onSubmit(CategoryPage.java:35)
   at
   org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1328
   )
   at
   org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:776
   )
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
   java:39)
   at
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
   sorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at
   org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInte
   rface.java:183)
   at
   org.apache.wicket.request.target.component.listener.ListenerInterface
   RequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
   at
   org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents
   (AbstractRequestCycleProcessor.java:90)
   at
   org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.j
   ava:1166)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
   at
   org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:
   354)
   at
   org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.ja
   va:194)
   at
   org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
   Handler.java:1084)
   at
   org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
   60)
   at
   org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
   a:216)
   at
   org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
   81)
   at
   org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
   26)
   at
   org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
  
   at
   org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
   lerCollection.java:206)
   at
   org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
   java:114)
   at
   org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
   39)
   at org.mortbay.jetty.Server.handle(Server.java:324)
   at
   org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
   5)
   at
   org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
   n.java:842)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
   at
   org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
   va:395)
   at
   org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
   .java:450)
  
  
   Can anyone please help me with this?
  
   Thanks.
  
  

  --

 -Wicket for love
  -Jme for fun

  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]



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



Re: fix for WICKET-1365 causes ClassCastException

2008-02-29 Thread Matej Knopp
Hi,

sorry about that. Didn't have time to test that properly. The fix
should be committed.

Thanks
-Matej

On Fri, Feb 29, 2008 at 3:42 PM, Maurice Marrink [EMAIL PROTECTED] wrote:
 The problem seems to be line 97 of SerializedPagesCache where you add
  a SerializedPageWithSession to a list who's entries will later be cast
  to a SoftReference (at line 63).

  Maurice




  On Fri, Feb 29, 2008 at 2:20 PM, Maurice Marrink [EMAIL PROTECTED] wrote:
   Matej,
  
I am afraid your latest change is causing page expired all over the
place in our application.
The underlying exception seems to be:
org.apache.wicket.RequestCycle.detach(RequestCycle.java:1095) : there
was an error detaching the request from the session
[EMAIL PROTECTED]
java.lang.ClassCastException:
org.apache.wicket.protocol.http.pagestore.SerializedPagesCache
$SerializedPageWithSession cannot be cast to java.lang.ref.SoftReference
   at

 org.apache.wicket.protocol.http.pagestore.SerializedPagesCache.removePage(SerializedPagesCache.java:63)
   at

 org.apache.wicket.protocol.http.pagestore.SerializedPagesCache.storePage(SerializedPagesCache.java:145)
   at

 org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(DiskPageStore.java:808)
   at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore
$SecondLevelCachePageMap.put(SecondLevelCacheSessionStore.java:332)
   at org.apache.wicket.Session.requestDetached(Session.java:1370)
   at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1091)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1348)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
   at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:358)
   at

 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
   at

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at

 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at

 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
   at

 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at

 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  
  
Maurice
  

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





-- 
Resizable and reorderable grid components.
http://www.inmethod.com

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



Re: Problem with multiwindow app

2008-02-29 Thread legol

Hi, thx I used constructor with Pagemap and now it works well.
You also suggested upgrading to 1.3.1 could you tell me profits from 
upgrading to 1.3.1 in this case? What is the solution of this problem
in 1.3.1?

Thx again, pzdr
legol


Johan Compagner wrote:
 
 See PageMap and the Page constructor with the pagemap param. Just make
 sure if open in a new tab/window that that page resides in another
 one. But we also should have  a setting in our app settings that auto
 detects multi tabs/window. But maybe if you click really fast
 something can go out of sync much better would be to upgrade to 1.3.1
 
 On 2/25/08, legol [EMAIL PROTECTED] wrote:

 Hi thx for reply,
 I use wicket 1.2.6 and i don't use pagemap.
 Could you give me some example how to do this?

 Pzdr,
 legol


 Johan Compagner wrote:
 
  What wicket version is this?
  If it is 1.2 do you use pagemaps (new onces for every tab you open?)
 
  On 2/22/08, legol [EMAIL PROTECTED] wrote:
 
  Hi all!!!
 
  I have application with 2 pages. First page lists users names and each
  element of list is link to second page that shows user details. I want
 to
  have this second page shown in other tab or window. Everything works
 fine
  when I click one user link, detail page is loaded and i can operate on
  it.
  But when i click on i.e. 5 links in very short time and 5 tabs are
 opened
  i
  get 'page expired' on each of them. Thanks to logs I discovered that
 when
  i
  open page in other tab or window it renders twice. Maybe this is the
  problem. Do you have any idea how to solve it?
 
  pzdr,
  Legol
  --
  View this message in context:
 
 http://www.nabble.com/Problem-with-multiwindow-app-tp15632896p15632896.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]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Problem-with-multiwindow-app-tp15632896p15674566.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]


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

-- 
View this message in context: 
http://www.nabble.com/Problem-with-multiwindow-app-tp15632896p15762340.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: Sporadic exponential explosion of session size

2008-02-29 Thread Igor Vaynberg
please file a bug report so this doesnt fall through the cracks.
reference this email thread in this issue report through nabble or
whatever...

-igor


On Fri, Feb 29, 2008 at 8:59 AM, Meetesh Karia [EMAIL PROTECTED] wrote:
 There's nothing obvious and we don't hold references between pages
  intentionally.  Additionally, when we use the site normally (ie, without
  opening new tabs), we don't run into this problem (and I would expect us
  to if we were holding references to Pages).

  Is it possible that the automatic multi-window javascript is executing
  before the response is completely written (don't know if wicket flushes
  the response buffer in parts for large pages) which causes the redirect
  to happen before the response completes?  Perhaps that keeps a
  threadlocal variable from being cleaned up somewhere?

  I'm just speculating here ...

  Meetesh



  Matej Knopp wrote:
   Wicket shouldn't implicitely hold any page references. Are you sure
   you don't have references between your pages?
  
   -Matej
  
   On Fri, Feb 29, 2008 at 3:29 PM, Meetesh Karia [EMAIL PROTECTED] wrote:
  
   Hi all,
  
We're running into a problem that we've seen happen many times though
unfortunately we can't consistently reproduce it.  We're using Wicket
1.3.1 with automatic multi-window support enabled and the default
SecondLevelCacheSessionStore.
  
During normal use of our site, no Pages reference other Pages and the
session size changes as it should.  However, occasionally when we open
pages in a new tab (often when multiple pages are opened in a new tab in
rapid succession), we get the following situation:
  
1 tab
  
pagemap-null size = x
  
2 tabs
  
pagemap-null size = 2x
pagemap-0 size = x
  
3 tabs
  
pagemap-null size = 4x
pagemap-0 size = 2x
pagemap-1 size = x
  
4 tabs
  
pagemap-null size = 8x
pagemap-0 size = 4x
pagemap-1 size = 2x
pagemap-2 size = x
  
  
The only explanation that I could come up with for this explosion is
that somehow, behind the scenes, a Page is holding onto a reference to
another Page in this situation.  Because 8x is beyond our max pagemap
size, it means that there can only be 1-2 Pages in it taking up this 
 space.
  
Has anyone come across a problem like this?  Any thoughts on what this
could be?
  
Thanks,
Meetesh
  
  
  
  
  
  


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



Re: get Form information after submit

2008-02-29 Thread Igor Vaynberg
what about it didnt work? it looks fine...

-igor


On Thu, Feb 28, 2008 at 12:43 PM, taygolf [EMAIL PROTECTED] wrote:

  hey igor thanks for all the help I really am learning a lot here.

  I am having an issue forwarding the model tp my textfiled in my panel and I
  wanted to show you my code and see what you thought the issue is. I am sure
  it is something simple I have overlooked.

  Template.java
  public class Template extends WebPage {
  private String teststring;
  Form form = new Form(myform) {
 protected void onSubmit() {
 callDatabase(teststring);//this is always coming back null 
 and I am not
  sure why.
 };
  };
  form.setMarkupId(myform);
  form.setOutputMarkupId(true);
  add(form);
  form.add(new FeedbackPanel(feedback));
  form.add(new TextFieldPanel(textfield, new PropertyModel(this,
  teststring)));
  }


  Template.html
  body
 form wicket:id=myform
   all feedback messages go here!
   TextFieldPanel go here
 /form
  /body

  TextFieldPanel.java

  public TextFieldPanel(String id, PropertyModel pm) {
   super(id, pm);
   add(new RequiredTextField(textField1, pm));
  }


  TextFieldPanel.html
  wicket:panel
  input wicket:id=textField1 type=text/
  /wicket:panel


  Now I was thinking that since I sent the PropertyModel to the TextFieldPanel
  it should work but it did not. Is there an inheritance that i need to do to
  get this to work? The goal here is to create a bunch of textFields on the
  fly but first I would like to get this working so I know what I am doing
  hince the simple example of my code.

  Thanks again for the help



  T


  igor.vaynberg wrote:
  
   no, it wont change, just have the panel forward the model to the
   textfield.
  
   -igor
  
  
   On Wed, Feb 27, 2008 at 1:50 PM, taygolf [EMAIL PROTECTED] wrote:
  
Thanks igor I really appreciate the help. My code was really close but I
   was
not creating:
  
   private object selection1;
 private object selection2;
  
which was giving me my issues of getting the object in the onSubmit
override. I do not know why I did not see something that simple I think
   I
was just blocked.
  
Will the code change at all if the textfield on page 2 is created in
   nested
panels. Since I am creating my form on the fly the textfield will be in
   a
panel nested in a panel. I might be able to change my code to allow just
   one
panel but I am not sure yet.
  
Thanks again
  
T
  
  
  
igor.vaynberg wrote:

 class page1 {
   private object selection1;
   private object selection2;

   public page1() {
   form form=new form(form) {
  onsubmit() { setresponsepage(new
   page2(selection1,selection2)); }
   }
   form.add(new dropdownchoice(s1, new propertymodel(this,
 selection1), ...));
   form.add(new dropdownchoice(s2, new propertymodel(this,
 selection2), ...));
   }
 }

 class page2 {
private final object selection1;
private final object selection2;
private final String text;

public page2(object selection1, object selection2) {
   this.selection1=selection1; this.selection2=selection2;
   form=new form(form) {
   onsubmit() {
   sendemails(selection1,selection2,text);
   savetodb(selection1,selection2,text);
setresponsepage(donepage.class);
}
}
form.add(new textfield(tf, new propertymodel(this,text)));
  }
 }

 -igor

 On Wed, Feb 27, 2008 at 11:16 AM, taygolf [EMAIL PROTECTED]
 wrote:

  yes all of my experiance is in JSP so I guess I am just confused
   about
 how
  forms work in wicket compared to JSP.  Maybe you can help me
   understand
 and
  suggest a way to accomplish what I am looking to do.

  I have a form that takes in 2 dropdown chioces. When selected these
  dropdownchoices are set to session variables. I then set the
   response
 page
  to a new page with a form. that form is created off of a query based
   on
 what
  was selected in the 2 dropdown choices. I have all of this working
 today.

  Now when the form is filled out I want to save the information to
   the
  database, make a few other calls to push the data to outside
 applications
  and databases and send emails and things like that. Then I simply
   want
 to
  display that the form was submitted properly.

  There is no need to see the form once it is submitted so that is why
   I
 want
  to push it to another page but if I can override onSubmit to insert
   the
 data
  in the database then all I would have to do is set the response page
   to
 a
  simple html page that said your work is done or something like that.

  I guess 

Re: get Form information after submit

2008-02-29 Thread Igor Vaynberg
if you create a quickstart it will make it very easy for me to see and
will give us both something to work with...

-igor


On Fri, Feb 29, 2008 at 12:48 PM, taygolf [EMAIL PROTECTED] wrote:

  teststring in onSubmit is always null no matter what I have entered in the
  textfield.

  Any help with this would be most appreciated.

  Thanks

  T



  igor.vaynberg wrote:
  
   what about it didnt work? it looks fine...
  
   -igor
  
  
   On Thu, Feb 28, 2008 at 12:43 PM, taygolf [EMAIL PROTECTED]
   wrote:
  
hey igor thanks for all the help I really am learning a lot here.
  
I am having an issue forwarding the model tp my textfiled in my panel
   and I
wanted to show you my code and see what you thought the issue is. I am
   sure
it is something simple I have overlooked.
  
Template.java
public class Template extends WebPage {
private String teststring;
Form form = new Form(myform) {
   protected void onSubmit() {
   callDatabase(teststring);//this is always coming back
   null and I am not
sure why.
   };
};
form.setMarkupId(myform);
form.setOutputMarkupId(true);
add(form);
form.add(new FeedbackPanel(feedback));
form.add(new TextFieldPanel(textfield, new PropertyModel(this,
teststring)));
}
  
  
Template.html
body
   form wicket:id=myform
 all feedback messages go here!
 TextFieldPanel go here
   /form
/body
  
TextFieldPanel.java
  
public TextFieldPanel(String id, PropertyModel pm) {
 super(id, pm);
 add(new RequiredTextField(textField1, pm));
}
  
  
TextFieldPanel.html
wicket:panel
input wicket:id=textField1 type=text/
/wicket:panel
  
  
Now I was thinking that since I sent the PropertyModel to the
   TextFieldPanel
it should work but it did not. Is there an inheritance that i need to do
   to
get this to work? The goal here is to create a bunch of textFields on
   the
fly but first I would like to get this working so I know what I am doing
hince the simple example of my code.
  
Thanks again for the help
  
  
  
T
  
  
igor.vaynberg wrote:

 no, it wont change, just have the panel forward the model to the
 textfield.

 -igor


 On Wed, Feb 27, 2008 at 1:50 PM, taygolf [EMAIL PROTECTED]
   wrote:

  Thanks igor I really appreciate the help. My code was really close
   but I
 was
  not creating:

 private object selection1;
   private object selection2;

  which was giving me my issues of getting the object in the onSubmit
  override. I do not know why I did not see something that simple I
   think
 I
  was just blocked.

  Will the code change at all if the textfield on page 2 is created in
 nested
  panels. Since I am creating my form on the fly the textfield will be
   in
 a
  panel nested in a panel. I might be able to change my code to allow
   just
 one
  panel but I am not sure yet.

  Thanks again

  T



  igor.vaynberg wrote:
  
   class page1 {
 private object selection1;
 private object selection2;
  
 public page1() {
 form form=new form(form) {
onsubmit() { setresponsepage(new
 page2(selection1,selection2)); }
 }
 form.add(new dropdownchoice(s1, new propertymodel(this,
   selection1), ...));
 form.add(new dropdownchoice(s2, new propertymodel(this,
   selection2), ...));
 }
   }
  
   class page2 {
  private final object selection1;
  private final object selection2;
  private final String text;
  
  public page2(object selection1, object selection2) {
 this.selection1=selection1; this.selection2=selection2;
 form=new form(form) {
 onsubmit() {
 sendemails(selection1,selection2,text);
 savetodb(selection1,selection2,text);
  setresponsepage(donepage.class);
  }
  }
  form.add(new textfield(tf, new
   propertymodel(this,text)));
}
   }
  
   -igor
  
   On Wed, Feb 27, 2008 at 11:16 AM, taygolf
   [EMAIL PROTECTED]
   wrote:
  
yes all of my experiance is in JSP so I guess I am just confused
 about
   how
forms work in wicket compared to JSP.  Maybe you can help me
 understand
   and
suggest a way to accomplish what I am looking to do.
  
I have a form that takes in 2 dropdown chioces. When selected
   these
dropdownchoices are set to session variables. I then set the
 response
   page
to a new page with a form. that form is created off of a query
   based
 on
   what
was selected in 

ModificationWatcher - Cannot track modifications to resource

2008-02-29 Thread robert.mcguinness

I have a class = public class WorkspaceResourceStream extends
org.apache.wicket.util.resource.AbstractResourceStream

and wicket throws info message =15:58:03.004 [http-8080-3] INFO 
o.a.w.util.watch.ModificationWatcher - Cannot track modifications to
resource

I understand its just informational, but what exactly is Wicket trying to
track?  How can I suppress the message (besides changing the log level).  

Any help would be appreciated.

- rob
-- 
View this message in context: 
http://www.nabble.com/ModificationWatcher---Cannot-track-modifications-to-resource-tp15767480p15767480.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: Location of wicket-ajax.js

2008-02-29 Thread Chris Colman
The class derives, ultimately, from the WebPage class. Should I try
deriving it from some other wicket base class as a workaround?

 there are no conditions, these things are pushed to wicket by
 invocations on  iheadercontributor's iheaderresponse interface by all
 interested components/behaviors. i guess wicket ignores these if the
 page is stateless, which woud be a bug...
 
 -igor
 
 On Fri, Feb 29, 2008 at 12:50 PM, Chris Colman
 [EMAIL PROTECTED] wrote:
  I've tried 1.3.1 and still no luck in getting wicket to inject the
   appropriate script lines into the header of the HTML.
 
   I was wondering what is the *trigger* or set of conditions that
wicket
   uses to determine that it should inject the script lines that
import
   the .js files into a generated HTML file?
 
   Maybe if I understand these I can 'force' it to add these lines.
 
   I should mention that we're using markup inheritance in case that
has
   some bearing on the issue.
 
 
 
   
that is a given. try 1.3.1 and if that doesnt work try building
trunk
yourself and test with that.
   
-igor
   
   
On Fri, Feb 29, 2008 at 12:16 AM, Chris Colman
[EMAIL PROTECTED] wrote:
 Using 1.3.0 - maybe I should try 1.3.1




   -Original Message-
   From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
   Sent: Friday, 29 February 2008 6:29 PM
   To: users@wicket.apache.org
   Subject: Re: Location of wicket-ajax.js
  
   this should happen automatically, please file a bug report
  
   -igor
  
  
   On Thu, Feb 28, 2008 at 11:26 PM, Chris Colman
   [EMAIL PROTECTED] wrote:
Problem found: Was a problem with script import lines
not
   being
  added,
 not that the .js files were not reachable.
   
 Apparently we need to have a stateful component somewhere
in
   the
  page
   in
 order for wicket to auto inject the script lines into
the
   HTML
  for
   us.
   
 Is there a way of telling wicket to inject the script
lines
  without
 having a stateful component on the page - currently
 everything
   on
  the
 page is stateless - we just have buttons on each item
that,
   when
 pressed, need to bring up an AJAX modal dialog box to
display
   some
  info
 on the items.
   
 Or do we need to add an invisible edit control or
something
 to
   get
  the
 script injection happening?
   
   
   
   
   

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



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


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



Re: Location of wicket-ajax.js

2008-02-29 Thread Igor Vaynberg
no. webpage is the correct choice. as a workaround you can make the
page stateful

-igor


On Fri, Feb 29, 2008 at 1:04 PM, Chris Colman
[EMAIL PROTECTED] wrote:
 The class derives, ultimately, from the WebPage class. Should I try
  deriving it from some other wicket base class as a workaround?



   there are no conditions, these things are pushed to wicket by
   invocations on  iheadercontributor's iheaderresponse interface by all
   interested components/behaviors. i guess wicket ignores these if the
   page is stateless, which woud be a bug...
  
   -igor
  
   On Fri, Feb 29, 2008 at 12:50 PM, Chris Colman
   [EMAIL PROTECTED] wrote:
I've tried 1.3.1 and still no luck in getting wicket to inject the
 appropriate script lines into the header of the HTML.
   
 I was wondering what is the *trigger* or set of conditions that
  wicket
 uses to determine that it should inject the script lines that
  import
 the .js files into a generated HTML file?
   
 Maybe if I understand these I can 'force' it to add these lines.
   
 I should mention that we're using markup inheritance in case that
  has
 some bearing on the issue.
   
   
   
 
  that is a given. try 1.3.1 and if that doesnt work try building
  trunk
  yourself and test with that.
 
  -igor
 
 
  On Fri, Feb 29, 2008 at 12:16 AM, Chris Colman
  [EMAIL PROTECTED] wrote:
   Using 1.3.0 - maybe I should try 1.3.1
  
  
  
  
 -Original Message-
 From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Sent: Friday, 29 February 2008 6:29 PM
 To: users@wicket.apache.org
 Subject: Re: Location of wicket-ajax.js

 this should happen automatically, please file a bug report

 -igor


 On Thu, Feb 28, 2008 at 11:26 PM, Chris Colman
 [EMAIL PROTECTED] wrote:
  Problem found: Was a problem with script import lines
  not
 being
added,
   not that the .js files were not reachable.
 
   Apparently we need to have a stateful component somewhere
  in
 the
page
 in
   order for wicket to auto inject the script lines into
  the
 HTML
for
 us.
 
   Is there a way of telling wicket to inject the script
  lines
without
   having a stateful component on the page - currently
   everything
 on
the
   page is stateless - we just have buttons on each item
  that,
 when
   pressed, need to bring up an AJAX modal dialog box to
  display
 some
info
   on the items.
 
   Or do we need to add an invisible edit control or
  something
   to
 get
the
   script injection happening?
 
 
 
 
 
  
   
  -
   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]
  
  
  
   
  -
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]
   
   
   
  -
 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]


  -
  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: Location of wicket-ajax.js

2008-02-29 Thread Chris Colman
I've tried 1.3.1 and still no luck in getting wicket to inject the
appropriate script lines into the header of the HTML.

I was wondering what is the *trigger* or set of conditions that wicket
uses to determine that it should inject the script lines that import
the .js files into a generated HTML file?

Maybe if I understand these I can 'force' it to add these lines.

I should mention that we're using markup inheritance in case that has
some bearing on the issue.

 
 that is a given. try 1.3.1 and if that doesnt work try building trunk
 yourself and test with that.
 
 -igor
 
 
 On Fri, Feb 29, 2008 at 12:16 AM, Chris Colman
 [EMAIL PROTECTED] wrote:
  Using 1.3.0 - maybe I should try 1.3.1
 
 
 
 
-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Friday, 29 February 2008 6:29 PM
To: users@wicket.apache.org
Subject: Re: Location of wicket-ajax.js
   
this should happen automatically, please file a bug report
   
-igor
   
   
On Thu, Feb 28, 2008 at 11:26 PM, Chris Colman
[EMAIL PROTECTED] wrote:
 Problem found: Was a problem with script import lines not
being
   added,
  not that the .js files were not reachable.

  Apparently we need to have a stateful component somewhere in
the
   page
in
  order for wicket to auto inject the script lines into the
HTML
   for
us.

  Is there a way of telling wicket to inject the script lines
   without
  having a stateful component on the page - currently everything
on
   the
  page is stateless - we just have buttons on each item that,
when
  pressed, need to bring up an AJAX modal dialog box to display
some
   info
  on the items.

  Or do we need to add an invisible edit control or something to
get
   the
  script injection happening?





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


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



Re: Location of wicket-ajax.js

2008-02-29 Thread Igor Vaynberg
there are no conditions, these things are pushed to wicket by
invocations on  iheadercontributor's iheaderresponse interface by all
interested components/behaviors. i guess wicket ignores these if the
page is stateless, which woud be a bug...

-igor

On Fri, Feb 29, 2008 at 12:50 PM, Chris Colman
[EMAIL PROTECTED] wrote:
 I've tried 1.3.1 and still no luck in getting wicket to inject the
  appropriate script lines into the header of the HTML.

  I was wondering what is the *trigger* or set of conditions that wicket
  uses to determine that it should inject the script lines that import
  the .js files into a generated HTML file?

  Maybe if I understand these I can 'force' it to add these lines.

  I should mention that we're using markup inheritance in case that has
  some bearing on the issue.



  
   that is a given. try 1.3.1 and if that doesnt work try building trunk
   yourself and test with that.
  
   -igor
  
  
   On Fri, Feb 29, 2008 at 12:16 AM, Chris Colman
   [EMAIL PROTECTED] wrote:
Using 1.3.0 - maybe I should try 1.3.1
   
   
   
   
  -Original Message-
  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
  Sent: Friday, 29 February 2008 6:29 PM
  To: users@wicket.apache.org
  Subject: Re: Location of wicket-ajax.js
 
  this should happen automatically, please file a bug report
 
  -igor
 
 
  On Thu, Feb 28, 2008 at 11:26 PM, Chris Colman
  [EMAIL PROTECTED] wrote:
   Problem found: Was a problem with script import lines not
  being
 added,
not that the .js files were not reachable.
  
Apparently we need to have a stateful component somewhere in
  the
 page
  in
order for wicket to auto inject the script lines into the
  HTML
 for
  us.
  
Is there a way of telling wicket to inject the script lines
 without
having a stateful component on the page - currently everything
  on
 the
page is stateless - we just have buttons on each item that,
  when
pressed, need to bring up an AJAX modal dialog box to display
  some
 info
on the items.
  
Or do we need to add an invisible edit control or something to
  get
 the
script injection happening?
  
  
  
  
  
   
  -
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]
   
   
   
  -
 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]


  -
  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: Submit a form and ignore nested forms

2008-02-29 Thread AshleyAbraham

Hi everyone, 
   I have a similar problem using Wizard, I have a idea but I dont know
whether its a right approach or is there an easy way to do it...

here is my thought, if I use a FormComponentPanel and put my nested form in
it, then override the processChildren() to return false. So, when the main
form starts processing it only processes FormComponentPanel's sibling and
not its children.

Any thougts...?

Thanks
Ashley



Pills wrote:
 
 Hi everybody,
 
 I'm using nested forms in my web app to provide to the user a simple way
 for editting a product and its stock state at the same time (PRODUCTS and
 STOCKS are bound with a relation 1-n in my database). So I've defined a
 form for each of my tables.  
 
 When I submit a nested form (in this case, the form STOCK), Wicket
 doesn't care about the master form (PRODUCTS) and that's fine. But when I
 submit the master form, Wicket does the validation of all the nested
 forms, and obviously it failed because the nested forms aren't filled... 
 
 How can I tell to Wicket to ignore the nested forms when submitting theire
 parent? I won't use the setDefaultFormProcessing(false), because it
 forces me to handle the validity of fields and the feedback messages...
 
 Is there a way to do what I need?
 
 Thank you for your help ;)
 

-- 
View this message in context: 
http://www.nabble.com/Submit-a-form-and-ignore-nested-forms-tp13794970p15767485.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: ModificationWatcher - Cannot track modifications to resource

2008-02-29 Thread Igor Vaynberg
when in dev mode wicket tries to monitor resources for changes so it
can evict them from cache - thus in dev mode resources are reloaded as
you edit them without you having to redeploy the app.

not sure you can do anything about the message...just disable the
logger for that class/package...

-igor


On Fri, Feb 29, 2008 at 1:14 PM, robert.mcguinness
[EMAIL PROTECTED] wrote:

  I have a class = public class WorkspaceResourceStream extends
  org.apache.wicket.util.resource.AbstractResourceStream

  and wicket throws info message =15:58:03.004 [http-8080-3] INFO
  o.a.w.util.watch.ModificationWatcher - Cannot track modifications to
  resource

  I understand its just informational, but what exactly is Wicket trying to
  track?  How can I suppress the message (besides changing the log level).

  Any help would be appreciated.

  - rob
  --
  View this message in context: 
 http://www.nabble.com/ModificationWatcher---Cannot-track-modifications-to-resource-tp15767480p15767480.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]



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



Re: get Form information after submit

2008-02-29 Thread Yue Liu
Don't you need to provide getter and setter for teststring?


On Fri, Feb 29, 2008 at 3:48 PM, taygolf [EMAIL PROTECTED] wrote:


 teststring in onSubmit is always null no matter what I have entered in the
 textfield.

 Any help with this would be most appreciated.

 Thanks

 T

 igor.vaynberg wrote:
 
  what about it didnt work? it looks fine...
 
  -igor
 
 
  On Thu, Feb 28, 2008 at 12:43 PM, taygolf [EMAIL PROTECTED]
  wrote:
 
   hey igor thanks for all the help I really am learning a lot here.
 
   I am having an issue forwarding the model tp my textfiled in my panel
  and I
   wanted to show you my code and see what you thought the issue is. I am
  sure
   it is something simple I have overlooked.
 
   Template.java
   public class Template extends WebPage {
   private String teststring;
   Form form = new Form(myform) {
  protected void onSubmit() {
  callDatabase(teststring);//this is always coming back
  null and I am not
   sure why.
  };
   };
   form.setMarkupId(myform);
   form.setOutputMarkupId(true);
   add(form);
   form.add(new FeedbackPanel(feedback));
   form.add(new TextFieldPanel(textfield, new PropertyModel(this,
   teststring)));
   }
 
 
   Template.html
   body
  form wicket:id=myform
all feedback messages go here!
TextFieldPanel go here
  /form
   /body
 
   TextFieldPanel.java
 
   public TextFieldPanel(String id, PropertyModel pm) {
super(id, pm);
add(new RequiredTextField(textField1, pm));
   }
 
 
   TextFieldPanel.html
   wicket:panel
   input wicket:id=textField1 type=text/
   /wicket:panel
 
 
   Now I was thinking that since I sent the PropertyModel to the
  TextFieldPanel
   it should work but it did not. Is there an inheritance that i need to
 do
  to
   get this to work? The goal here is to create a bunch of textFields on
  the
   fly but first I would like to get this working so I know what I am
 doing
   hince the simple example of my code.
 
   Thanks again for the help
 
 
 
   T
 
 
   igor.vaynberg wrote:
   
no, it wont change, just have the panel forward the model to the
textfield.
   
-igor
   
   
On Wed, Feb 27, 2008 at 1:50 PM, taygolf [EMAIL PROTECTED]
  wrote:
   
 Thanks igor I really appreciate the help. My code was really close
  but I
was
 not creating:
   
private object selection1;
  private object selection2;
   
 which was giving me my issues of getting the object in the
 onSubmit
 override. I do not know why I did not see something that simple I
  think
I
 was just blocked.
   
 Will the code change at all if the textfield on page 2 is created
 in
nested
 panels. Since I am creating my form on the fly the textfield will
 be
  in
a
 panel nested in a panel. I might be able to change my code to
 allow
  just
one
 panel but I am not sure yet.
   
 Thanks again
   
 T
   
   
   
 igor.vaynberg wrote:
 
  class page1 {
private object selection1;
private object selection2;
 
public page1() {
form form=new form(form) {
   onsubmit() { setresponsepage(new
page2(selection1,selection2)); }
}
form.add(new dropdownchoice(s1, new propertymodel(this,
  selection1), ...));
form.add(new dropdownchoice(s2, new propertymodel(this,
  selection2), ...));
}
  }
 
  class page2 {
 private final object selection1;
 private final object selection2;
 private final String text;
 
 public page2(object selection1, object selection2) {
this.selection1=selection1; this.selection2=selection2;
form=new form(form) {
onsubmit() {
sendemails(selection1,selection2,text);
savetodb(selection1,selection2,text);
 setresponsepage(donepage.class);
 }
 }
 form.add(new textfield(tf, new
  propertymodel(this,text)));
   }
  }
 
  -igor
 
  On Wed, Feb 27, 2008 at 11:16 AM, taygolf
  [EMAIL PROTECTED]
  wrote:
 
   yes all of my experiance is in JSP so I guess I am just
 confused
about
  how
   forms work in wicket compared to JSP.  Maybe you can help me
understand
  and
   suggest a way to accomplish what I am looking to do.
 
   I have a form that takes in 2 dropdown chioces. When selected
  these
   dropdownchoices are set to session variables. I then set the
response
  page
   to a new page with a form. that form is created off of a query
  based
on
  what
   was selected in the 2 dropdown choices. I have all of this
  working
  today.
 
   Now when the form is filled out I want to save the information
  to
the
   database, make a few other calls to push the data to outside
  

Re: Submit a form and ignore nested forms

2008-02-29 Thread Igor Vaynberg
processchildren() comes from IFormVisitorParticipant which, afaik, any
component can implement and therefore act as a barrier to prevent
form processing logic from going any deeper.

-igor


On Fri, Feb 29, 2008 at 1:21 PM, AshleyAbraham [EMAIL PROTECTED] wrote:

  Hi everyone,
I have a similar problem using Wizard, I have a idea but I dont know
  whether its a right approach or is there an easy way to do it...

  here is my thought, if I use a FormComponentPanel and put my nested form in
  it, then override the processChildren() to return false. So, when the main
  form starts processing it only processes FormComponentPanel's sibling and
  not its children.

  Any thougts...?

  Thanks
  Ashley




  Pills wrote:
  
   Hi everybody,
  
   I'm using nested forms in my web app to provide to the user a simple way
   for editting a product and its stock state at the same time (PRODUCTS and
   STOCKS are bound with a relation 1-n in my database). So I've defined a
   form for each of my tables.
  
   When I submit a nested form (in this case, the form STOCK), Wicket
   doesn't care about the master form (PRODUCTS) and that's fine. But when I
   submit the master form, Wicket does the validation of all the nested
   forms, and obviously it failed because the nested forms aren't filled...
  
   How can I tell to Wicket to ignore the nested forms when submitting theire
   parent? I won't use the setDefaultFormProcessing(false), because it
   forces me to handle the validity of fields and the feedback messages...
  
   Is there a way to do what I need?
  
   Thank you for your help ;)
  

  --
  View this message in context: 
 http://www.nabble.com/Submit-a-form-and-ignore-nested-forms-tp13794970p15767485.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]



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



Re: Submit a form and ignore nested forms

2008-02-29 Thread Igor Vaynberg
eg its probably something your nested form can implement

-igor


On Fri, Feb 29, 2008 at 1:29 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 processchildren() comes from IFormVisitorParticipant which, afaik, any
  component can implement and therefore act as a barrier to prevent
  form processing logic from going any deeper.

  -igor




  On Fri, Feb 29, 2008 at 1:21 PM, AshleyAbraham [EMAIL PROTECTED] wrote:
  
Hi everyone,
  I have a similar problem using Wizard, I have a idea but I dont know
whether its a right approach or is there an easy way to do it...
  
here is my thought, if I use a FormComponentPanel and put my nested form 
 in
it, then override the processChildren() to return false. So, when the main
form starts processing it only processes FormComponentPanel's sibling and
not its children.
  
Any thougts...?
  
Thanks
Ashley
  
  
  
  
Pills wrote:

 Hi everybody,

 I'm using nested forms in my web app to provide to the user a simple way
 for editting a product and its stock state at the same time (PRODUCTS 
 and
 STOCKS are bound with a relation 1-n in my database). So I've defined a
 form for each of my tables.

 When I submit a nested form (in this case, the form STOCK), Wicket
 doesn't care about the master form (PRODUCTS) and that's fine. But when 
 I
 submit the master form, Wicket does the validation of all the nested
 forms, and obviously it failed because the nested forms aren't filled...

 How can I tell to Wicket to ignore the nested forms when submitting 
 theire
 parent? I won't use the setDefaultFormProcessing(false), because it
 forces me to handle the validity of fields and the feedback messages...

 Is there a way to do what I need?

 Thank you for your help ;)

  
--
View this message in context: 
 http://www.nabble.com/Submit-a-form-and-ignore-nested-forms-tp13794970p15767485.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]
  
  


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



Re: Sporadic exponential explosion of session size

2008-02-29 Thread Meetesh Karia
Will do and I will respond with any other information we find as we're 
looking into this as well.


Meetesh

Igor Vaynberg wrote:

please file a bug report so this doesnt fall through the cracks.
reference this email thread in this issue report through nabble or
whatever...

-igor


On Fri, Feb 29, 2008 at 8:59 AM, Meetesh Karia [EMAIL PROTECTED] wrote:
  

There's nothing obvious and we don't hold references between pages
 intentionally.  Additionally, when we use the site normally (ie, without
 opening new tabs), we don't run into this problem (and I would expect us
 to if we were holding references to Pages).

 Is it possible that the automatic multi-window javascript is executing
 before the response is completely written (don't know if wicket flushes
 the response buffer in parts for large pages) which causes the redirect
 to happen before the response completes?  Perhaps that keeps a
 threadlocal variable from being cleaned up somewhere?

 I'm just speculating here ...

 Meetesh



 Matej Knopp wrote:
  Wicket shouldn't implicitely hold any page references. Are you sure
  you don't have references between your pages?
 
  -Matej
 
  On Fri, Feb 29, 2008 at 3:29 PM, Meetesh Karia [EMAIL PROTECTED] wrote:
 
  Hi all,
 
   We're running into a problem that we've seen happen many times though
   unfortunately we can't consistently reproduce it.  We're using Wicket
   1.3.1 with automatic multi-window support enabled and the default
   SecondLevelCacheSessionStore.
 
   During normal use of our site, no Pages reference other Pages and the
   session size changes as it should.  However, occasionally when we open
   pages in a new tab (often when multiple pages are opened in a new tab in
   rapid succession), we get the following situation:
 
   1 tab
 
   pagemap-null size = x
 
   2 tabs
 
   pagemap-null size = 2x
   pagemap-0 size = x
 
   3 tabs
 
   pagemap-null size = 4x
   pagemap-0 size = 2x
   pagemap-1 size = x
 
   4 tabs
 
   pagemap-null size = 8x
   pagemap-0 size = 4x
   pagemap-1 size = 2x
   pagemap-2 size = x
 
 
   The only explanation that I could come up with for this explosion is
   that somehow, behind the scenes, a Page is holding onto a reference to
   another Page in this situation.  Because 8x is beyond our max pagemap
   size, it means that there can only be 1-2 Pages in it taking up this space.
 
   Has anyone come across a problem like this?  Any thoughts on what this
   could be?
 
   Thanks,
   Meetesh
 
 
 
 
 
 




Re: Submit a form and ignore nested forms

2008-02-29 Thread AshleyAbraham

Igor,
Thank u for your fast response...

Thanks again,
Ashley



Pills wrote:
 
 Hi everybody,
 
 I'm using nested forms in my web app to provide to the user a simple way
 for editting a product and its stock state at the same time (PRODUCTS and
 STOCKS are bound with a relation 1-n in my database). So I've defined a
 form for each of my tables.  
 
 When I submit a nested form (in this case, the form STOCK), Wicket
 doesn't care about the master form (PRODUCTS) and that's fine. But when I
 submit the master form, Wicket does the validation of all the nested
 forms, and obviously it failed because the nested forms aren't filled... 
 
 How can I tell to Wicket to ignore the nested forms when submitting theire
 parent? I won't use the setDefaultFormProcessing(false), because it
 forces me to handle the validity of fields and the feedback messages...
 
 Is there a way to do what I need?
 
 Thank you for your help ;)
 

-- 
View this message in context: 
http://www.nabble.com/Submit-a-form-and-ignore-nested-forms-tp13794970p15768833.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]



How to get a context root in wicket?

2008-02-29 Thread Vitaly Tsaplin
   Hi everyone,

   Simple... simple question... How to get a context root in wicket?

   Best regards,
   Vitaly

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



Re: How to get a context root in wicket?

2008-02-29 Thread James Carman
You can get to the ServletContext through your application object.

On 2/29/08, Vitaly Tsaplin [EMAIL PROTECTED] wrote:
Hi everyone,

Simple... simple question... How to get a context root in wicket?

Best regards,
Vitaly

  -
  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: Integrating with a forum application...?

2008-02-29 Thread Toto Laricot
We've done it. Nothing Wicket-specific. JForum runs as a separate webapp, we
display it in a frame.
SSO is a bit tricky but it's doable.

v.

On 2/29/08, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]
wrote:

 Has any one done this?

 Im thinking of jforum.. http://www.jforum.net/ ?

 It should'nt be that hard to create a contrib for btw, if somebody are
 interested..?

 --
 -Wicket for love
 -Jme for fun

 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]




Anyone thinking about an OLAP4J component?

2008-02-29 Thread Jay Hogan
Has anyone thought about writing a Wicket OLAP viewer using the new (still
beta) olap4j API? (http://www.olap4j.org/) I would kill (ok, maim) for
something like that and Wicket is a great platform for it IMHO. I have not
been very impressed with the Java OLAP pivot tools I have seen, of which
JPivot is the best.

Some of the Pentaho developers have put together a proof of concept called
Halogen using GWT. http://code.google.com/p/halogen/


Re: Integrating with a forum application...?

2008-02-29 Thread Scott Swank
I suspect that Nino wants to use Wicket instead of Freemarker for the UI layer.

http://www.jforum.net/doc/TemplatesAndStyles

On Fri, Feb 29, 2008 at 4:46 PM, Toto Laricot [EMAIL PROTECTED] wrote:
 We've done it. Nothing Wicket-specific. JForum runs as a separate webapp, we
  display it in a frame.
  SSO is a bit tricky but it's doable.

  v.

  On 2/29/08, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]
  wrote:


 
   Has any one done this?
  
   Im thinking of jforum.. http://www.jforum.net/ ?
  
   It should'nt be that hard to create a contrib for btw, if somebody are
   interested..?
  
   --
   -Wicket for love
   -Jme for fun
  
   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]
  
  




-- 
Scott Swank
reformed mathematician

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



Re: Testing (Ajax)TabbedPanel

2008-02-29 Thread Kent Tong


Sven Schliesing wrote:
 
 This works quite good. But I'm having problems with using too much 
 internal knowledge (e.g. the tabs-container id) of the AjaxTabbedPanel.
 

You can always create your own TabPanelTester that may have a getTab(id) 
method. This class will encapsulate the internal knowledge.


-
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
Axis2 tutorials freely available at http://www.agileskills2.org/DWSAA
-- 
View this message in context: 
http://www.nabble.com/Testing-%28Ajax%29TabbedPanel-tp15739429p15772312.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: Wicket Wizard form need to add custom validation to each panel

2008-02-29 Thread Kent Tong


AshleyAbraham wrote:
 
I am working on a wicket wizard component, I am trying to add an
 AbstractFormValidation to each wizardStep, so when the wizardStep is
 added/replaced the wizard form will know how to custom validate that
 particular wizardStep.
 

Why not add the form validator to the wizard step? It has an add() method
exactly
for this purpose.


-
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
Axis2 tutorials freely available at http://www.agileskills2.org/DWSAA
-- 
View this message in context: 
http://www.nabble.com/Wicket-Wizard-form-need-to-add-custom-validation-to-each-panel-tp15746917p15772387.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: Page markup caching

2008-02-29 Thread Kent Tong


hbf wrote:
 
 Has anybody implemented page caching for Wicket? If possible, I'd  
 like to store the markup of a page in ehcache so that subsequent requests
 can be
 served without invoking the rendering mechanism of the framework at all.
 

You may try overriding the onRender() method in the Page class in
your own page class to retrieve the cached output.

However, I really don't think this is necessary as Wicket pages involves
no compilation of any kind like OGNL, the render time should be quite
consistent.


-
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
Axis2 tutorials freely available at http://www.agileskills2.org/DWSAA
-- 
View this message in context: 
http://www.nabble.com/Page-markup-caching-tp15734416p15772444.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: Wicket Wizard form need to add custom validation to each panel

2008-02-29 Thread Igor Vaynberg
or embed a form in the wizard panel and add the validator to that

-igor


On Fri, Feb 29, 2008 at 7:47 PM, Kent Tong [EMAIL PROTECTED] wrote:


  AshleyAbraham wrote:
  
  I am working on a wicket wizard component, I am trying to add an
   AbstractFormValidation to each wizardStep, so when the wizardStep is
   added/replaced the wizard form will know how to custom validate that
   particular wizardStep.
  

  Why not add the form validator to the wizard step? It has an add() method
  exactly
  for this purpose.


  -
  --
  Kent Tong
  Wicket tutorials freely available at http://www.agileskills2.org/EWDW
  Axis2 tutorials freely available at http://www.agileskills2.org/DWSAA
  --
  View this message in context: 
 http://www.nabble.com/Wicket-Wizard-form-need-to-add-custom-validation-to-each-panel-tp15746917p15772387.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]



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



Re: Submitting an ajaxform with multipart/form-data

2008-02-29 Thread Martijn Dashorst
iirc wicket-extensions has a multi file upload that does this, and the
ajax file upload progress bar in extensions should work as advertised.

Martijn

On 2/28/08, Michael Sparer [EMAIL PROTECTED] wrote:

  Hi,

  it's a known limitation that one cannot submit an ajaxform with multipart
  enabled. but as i'd like to upload files without reloading the page i've
  been looking for an elegant solution for this problem.
  a possible solution (it's even called an AJAX-pattern) is to post the form
  data to a hidden inlineframe (iframe) and let the iframe submit the form.
  but passing the values to the iframe, let the iframe submit the values, get
  the state of the upload from the iframe and displaying results in the
  regular form would result in a fair hack.

  my question: has anybody a better solution to go about this problem or has
  anyone any experience with the above scenario using an iframe? maybe wicket
  already offers an easy way to do this that i haven't found yet?

  regards,
  Michael

  -
  Michael Sparer
  http://talk-on-tech.blogspot.com

 --
  View this message in context: 
 http://www.nabble.com/Submitting-an-ajaxform-with-multipart-form-data-tp15734375p15734375.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]




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1

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



Re: Sporadic exponential explosion of session size

2008-02-29 Thread Johan Compagner
please do and also try to attach a quickstart.

On Fri, Feb 29, 2008 at 11:02 PM, Meetesh Karia [EMAIL PROTECTED]
wrote:

 Will do and I will respond with any other information we find as we're
 looking into this as well.

 Meetesh

 Igor Vaynberg wrote:
  please file a bug report so this doesnt fall through the cracks.
  reference this email thread in this issue report through nabble or
  whatever...
 
  -igor
 
 
  On Fri, Feb 29, 2008 at 8:59 AM, Meetesh Karia [EMAIL PROTECTED]
 wrote:
 
  There's nothing obvious and we don't hold references between pages
   intentionally.  Additionally, when we use the site normally (ie,
 without
   opening new tabs), we don't run into this problem (and I would expect
 us
   to if we were holding references to Pages).
 
   Is it possible that the automatic multi-window javascript is executing
   before the response is completely written (don't know if wicket
 flushes
   the response buffer in parts for large pages) which causes the
 redirect
   to happen before the response completes?  Perhaps that keeps a
   threadlocal variable from being cleaned up somewhere?
 
   I'm just speculating here ...
 
   Meetesh
 
 
 
   Matej Knopp wrote:
Wicket shouldn't implicitely hold any page references. Are you sure
you don't have references between your pages?
   
-Matej
   
On Fri, Feb 29, 2008 at 3:29 PM, Meetesh Karia 
 [EMAIL PROTECTED] wrote:
   
Hi all,
   
 We're running into a problem that we've seen happen many times
 though
 unfortunately we can't consistently reproduce it.  We're using
 Wicket
 1.3.1 with automatic multi-window support enabled and the default
 SecondLevelCacheSessionStore.
   
 During normal use of our site, no Pages reference other Pages and
 the
 session size changes as it should.  However, occasionally when we
 open
 pages in a new tab (often when multiple pages are opened in a new
 tab in
 rapid succession), we get the following situation:
   
 1 tab
   
 pagemap-null size = x
   
 2 tabs
   
 pagemap-null size = 2x
 pagemap-0 size = x
   
 3 tabs
   
 pagemap-null size = 4x
 pagemap-0 size = 2x
 pagemap-1 size = x
   
 4 tabs
   
 pagemap-null size = 8x
 pagemap-0 size = 4x
 pagemap-1 size = 2x
 pagemap-2 size = x
   
   
 The only explanation that I could come up with for this explosion
 is
 that somehow, behind the scenes, a Page is holding onto a
 reference to
 another Page in this situation.  Because 8x is beyond our max
 pagemap
 size, it means that there can only be 1-2 Pages in it taking up
 this space.
   
 Has anyone come across a problem like this?  Any thoughts on what
 this
 could be?
   
 Thanks,
 Meetesh
   
   
   
   
   
   
 
 



Re: Location of wicket-ajax.js

2008-02-29 Thread Johan Compagner
if ajax is used in a page then the page is not stateless anyway.

johan



On Fri, Feb 29, 2008 at 9:55 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 there are no conditions, these things are pushed to wicket by
 invocations on  iheadercontributor's iheaderresponse interface by all
 interested components/behaviors. i guess wicket ignores these if the
 page is stateless, which woud be a bug...

 -igor

 On Fri, Feb 29, 2008 at 12:50 PM, Chris Colman
  [EMAIL PROTECTED] wrote:
  I've tried 1.3.1 and still no luck in getting wicket to inject the
   appropriate script lines into the header of the HTML.
 
   I was wondering what is the *trigger* or set of conditions that wicket
   uses to determine that it should inject the script lines that import
   the .js files into a generated HTML file?
 
   Maybe if I understand these I can 'force' it to add these lines.
 
   I should mention that we're using markup inheritance in case that has
   some bearing on the issue.
 
 
 
   
that is a given. try 1.3.1 and if that doesnt work try building trunk
yourself and test with that.
   
-igor
   
   
On Fri, Feb 29, 2008 at 12:16 AM, Chris Colman
[EMAIL PROTECTED] wrote:
 Using 1.3.0 - maybe I should try 1.3.1




   -Original Message-
   From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
   Sent: Friday, 29 February 2008 6:29 PM
   To: users@wicket.apache.org
   Subject: Re: Location of wicket-ajax.js
  
   this should happen automatically, please file a bug report
  
   -igor
  
  
   On Thu, Feb 28, 2008 at 11:26 PM, Chris Colman
   [EMAIL PROTECTED] wrote:
Problem found: Was a problem with script import lines not
   being
  added,
 not that the .js files were not reachable.
   
 Apparently we need to have a stateful component somewhere in
   the
  page
   in
 order for wicket to auto inject the script lines into the
   HTML
  for
   us.
   
 Is there a way of telling wicket to inject the script lines
  without
 having a stateful component on the page - currently
 everything
   on
  the
 page is stateless - we just have buttons on each item that,
   when
 pressed, need to bring up an AJAX modal dialog box to display
   some
  info
 on the items.
   
 Or do we need to add an invisible edit control or something
 to
   get
  the
 script injection happening?
   
   
   
   
   

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



   -
  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]
 
 
   -
   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: Location of wicket-ajax.js

2008-02-29 Thread Chris Colman
I tried that by adding a TextField - still no joy.

 no. webpage is the correct choice. as a workaround you can make the
 page stateful
 
 -igor
 
 
 On Fri, Feb 29, 2008 at 1:04 PM, Chris Colman
 [EMAIL PROTECTED] wrote:
  The class derives, ultimately, from the WebPage class. Should I try
   deriving it from some other wicket base class as a workaround?
 
 
 
there are no conditions, these things are pushed to wicket by
invocations on  iheadercontributor's iheaderresponse interface by
all
interested components/behaviors. i guess wicket ignores these if
the
page is stateless, which woud be a bug...
   
-igor
   
On Fri, Feb 29, 2008 at 12:50 PM, Chris Colman
[EMAIL PROTECTED] wrote:
 I've tried 1.3.1 and still no luck in getting wicket to inject
the
  appropriate script lines into the header of the HTML.

  I was wondering what is the *trigger* or set of conditions
that
   wicket
  uses to determine that it should inject the script lines
that
   import
  the .js files into a generated HTML file?

  Maybe if I understand these I can 'force' it to add these
lines.

  I should mention that we're using markup inheritance in case
that
   has
  some bearing on the issue.



  
   that is a given. try 1.3.1 and if that doesnt work try
building
   trunk
   yourself and test with that.
  
   -igor
  
  
   On Fri, Feb 29, 2008 at 12:16 AM, Chris Colman
   [EMAIL PROTECTED] wrote:
Using 1.3.0 - maybe I should try 1.3.1
   
   
   
   
  -Original Message-
  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
  Sent: Friday, 29 February 2008 6:29 PM
  To: users@wicket.apache.org
  Subject: Re: Location of wicket-ajax.js
 
  this should happen automatically, please file a bug
report
 
  -igor
 
 
  On Thu, Feb 28, 2008 at 11:26 PM, Chris Colman
  [EMAIL PROTECTED] wrote:
   Problem found: Was a problem with script import
lines
   not
  being
 added,
not that the .js files were not reachable.
  
Apparently we need to have a stateful component
 somewhere
   in
  the
 page
  in
order for wicket to auto inject the script lines
into
   the
  HTML
 for
  us.
  
Is there a way of telling wicket to inject the
script
   lines
 without
having a stateful component on the page - currently
everything
  on
 the
page is stateless - we just have buttons on each
item
   that,
  when
pressed, need to bring up an AJAX modal dialog box
to
   display
  some
 info
on the items.
  
Or do we need to add an invisible edit control or
   something
to
  get
 the
script injection happening?
  
  
  
  
  
   

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

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



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


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



RE: Location of wicket-ajax.js

2008-02-29 Thread Chris Colman
How do I force a page to be stateful?

 I tried that by adding a TextField - still no joy.
 
  no. webpage is the correct choice. as a workaround you can make the
  page stateful
 
  -igor
 
 
  On Fri, Feb 29, 2008 at 1:04 PM, Chris Colman
  [EMAIL PROTECTED] wrote:
   The class derives, ultimately, from the WebPage class. Should I
try
deriving it from some other wicket base class as a workaround?
  
  
  
 there are no conditions, these things are pushed to wicket by
 invocations on  iheadercontributor's iheaderresponse interface
by
 all
 interested components/behaviors. i guess wicket ignores these
if
 the
 page is stateless, which woud be a bug...

 -igor

 On Fri, Feb 29, 2008 at 12:50 PM, Chris Colman
 [EMAIL PROTECTED] wrote:
  I've tried 1.3.1 and still no luck in getting wicket to
inject
 the
   appropriate script lines into the header of the HTML.
 
   I was wondering what is the *trigger* or set of conditions
 that
wicket
   uses to determine that it should inject the script lines
 that
import
   the .js files into a generated HTML file?
 
   Maybe if I understand these I can 'force' it to add these
 lines.
 
   I should mention that we're using markup inheritance in case
 that
has
   some bearing on the issue.
 
 
 
   
that is a given. try 1.3.1 and if that doesnt work try
 building
trunk
yourself and test with that.
   
-igor
   
   
On Fri, Feb 29, 2008 at 12:16 AM, Chris Colman
[EMAIL PROTECTED] wrote:
 Using 1.3.0 - maybe I should try 1.3.1




   -Original Message-
   From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
   Sent: Friday, 29 February 2008 6:29 PM
   To: users@wicket.apache.org
   Subject: Re: Location of wicket-ajax.js
  
   this should happen automatically, please file a bug
 report
  
   -igor
  
  
   On Thu, Feb 28, 2008 at 11:26 PM, Chris Colman
   [EMAIL PROTECTED] wrote:
Problem found: Was a problem with script import
 lines
not
   being
  added,
 not that the .js files were not reachable.
   
 Apparently we need to have a stateful component
  somewhere
in
   the
  page
   in
 order for wicket to auto inject the script lines
 into
the
   HTML
  for
   us.
   
 Is there a way of telling wicket to inject the
 script
lines
  without
 having a stateful component on the page -
currently
 everything
   on
  the
 page is stateless - we just have buttons on each
 item
that,
   when
 pressed, need to bring up an AJAX modal dialog box
 to
display
   some
  info
 on the items.
   
 Or do we need to add an invisible edit control or
something
 to
   get
  the
 script injection happening?
   
   
   
   
   

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



 
  
 -
  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]
 
 
 
  
 -
   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]
  
  
  
 -
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]
 
 
 -
 To unsubscribe, e-mail: [EMAIL 

Re: Anyone thinking about an OLAP4J component?

2008-02-29 Thread Nino Saturnino Martinez Vazquez Wael
Sounds like a great idea, and maybe give companies like SAS institute 
and SPSS a little run for it:)


I'd love to do that, but unfortunalty I'ts not a business case for my 
company.. I'd be glad to help out a little though:)



regards Nino

Jay Hogan wrote:

Has anyone thought about writing a Wicket OLAP viewer using the new (still
beta) olap4j API? (http://www.olap4j.org/) I would kill (ok, maim) for
something like that and Wicket is a great platform for it IMHO. I have not
been very impressed with the Java OLAP pivot tools I have seen, of which
JPivot is the best.

Some of the Pentaho developers have put together a proof of concept called
Halogen using GWT. http://code.google.com/p/halogen/

  


--
-Wicket for love
-Jme for fun

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]



Re: Integrating with a forum application...?

2008-02-29 Thread Nino Saturnino Martinez Vazquez Wael

It was exactly the tricky parts, that would be nice to have in a contrib:)

Toto Laricot wrote:

We've done it. Nothing Wicket-specific. JForum runs as a separate webapp, we
display it in a frame.
SSO is a bit tricky but it's doable.

v.

On 2/29/08, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]
wrote:
  

Has any one done this?

Im thinking of jforum.. http://www.jforum.net/ ?

It should'nt be that hard to create a contrib for btw, if somebody are
interested..?

--
-Wicket for love
-Jme for fun

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]





  


--
-Wicket for love
-Jme for fun

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]



Re: Integrating with a forum application...?

2008-02-29 Thread Nino Saturnino Martinez Vazquez Wael

Yeah maybe create a thin wrapper, doesnt seem that hard todo?

regards Nino

Scott Swank wrote:

I suspect that Nino wants to use Wicket instead of Freemarker for the UI layer.

http://www.jforum.net/doc/TemplatesAndStyles

On Fri, Feb 29, 2008 at 4:46 PM, Toto Laricot [EMAIL PROTECTED] wrote:
  

We've done it. Nothing Wicket-specific. JForum runs as a separate webapp, we
 display it in a frame.
 SSO is a bit tricky but it's doable.

 v.

 On 2/29/08, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]
 wrote:



  Has any one done this?

 
  Im thinking of jforum.. http://www.jforum.net/ ?
 
  It should'nt be that hard to create a contrib for btw, if somebody are
  interested..?
 
  --
  -Wicket for love
  -Jme for fun
 
  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]
 
 






  


--
-Wicket for love
-Jme for fun

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]