Re: Apache Wicket 1.5.4 is released

2012-02-06 Thread Kayode Odeyemi
On Mon, Feb 6, 2012 at 7:24 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 On Sun, Feb 5, 2012 at 1:51 PM, Kayode Odeyemi drey...@gmail.com wrote:
  Does this mean this is the recommended branch to work from?
 
  There's a fix on 1.5 RC5 that I need. Is it advisable to work off wicket
  dev releases as against official releases?
 
  When will 1.5 RC5 slated for full release?

 RC means release candidate. RCs has been released before 1.5.0.
 1.5.4 is the latest stable release of Wicket and is the recommended one to
 use.


Thanks and  Sorry for the back and forth. I'll like to know, is the fix at
https://issues.apache.org/jira/browse/WICKET-3769 in 1.5.4? I couldn't find
it the changelog, so I thought I should ask.


 
  Thanks
 
  On Mon, Jan 23, 2012 at 9:54 AM, Per Newgro per.new...@gmx.ch wrote:
 
  Oops sorry. My fault. Mail filter is filtering dev before users list. So
  it's only seen in dev folder.
  Sorry.
  Per
 
  Am 23.01.2012 10:51, schrieb Per Newgro:
 
   Shouldn't it be announce to the other list?
 
  Cheers
  Per
 
  Am 23.01.2012 09:41, schrieb Martin Grigorov:
 
  This is the fourth maintenance release of the Wicket 1.5.x series.
 This
  release brings over 60 bug fixes and improvements.
 
  Git tag:
  release/wicket-1.5.4
 
  Changelog:
  https://issues.apache.org/**jira/secure/ReleaseNote.jspa?**
  projectId=12310561version=**12319051
 https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310561version=12319051
 
 
  Maven:
  dependency
  groupIdorg.apache.wicket/**groupId
  artifactIdwicket-core/**artifactId
  version1.5.4/version
  /dependency
 
 
  Download the full distribution (including source):
  http://www.apache.org/dyn/**closer.cgi/wicket/1.5.4
 http://www.apache.org/dyn/closer.cgi/wicket/1.5.4
 
  The Wicket team
 
  --**--**
  -
  To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org
 users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 --**--**-
  To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org
 users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 --**--**-
  To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org
 users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Odeyemi 'Kayode O.
  http://www.sinati.com. t: @charyorde



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




-- 
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde


Re: Set Wicket User Session to Servlet's HttpSession

2012-02-06 Thread Kayode Odeyemi
On Mon, Feb 6, 2012 at 7:18 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 Hi,

 On Sat, Feb 4, 2012 at 3:25 PM, Kayode Odeyemi drey...@gmail.com wrote:
  Hi, thanks.
 
  On Fri, Feb 3, 2012 at 8:05 PM, Serban.Balamaci thespamtr...@gmail.com
 wrote:
 
  Hello,
  It's not really clear what you mean and maybe you need to tell us what
 you
  want to do.
 
 
  I want to use servlet session object for user authentication and not
  wickets'.
 
 
  A Wicket session stores it's attributes into an implementation of the
  ISessionStore interface, but the default the store is HttpSessionStore,
 so
  the HttpSession. On the other hand, the wicket session can exist in a
  temporary state for the duration of the request and not have a
 HttpSession
  created. See bind(...) method in HttpSessionStore and you can see the
  Wicket
  session object being stored in a  httpsession attribute when the Wicket
  session needs to be persistent.
  setAttribute(request, Session.SESSION_ATTRIBUTE_NAME, newSession);
 
 
  But from what you've just explained, does that mean a wicket session is
  HttpSession? Hence, I can just concentrate on implementing wicket session
  and then retrieve it whenever its required even within a servlet - alas,
  the HelloWorldServlet example which makes use of WicketSessionFilter?

 Yes, Wicket's Session is saved as an attribute in the HttpSession.
 And yes, using WicketSessionFilter you can read it in servlets.


Thanks. I tried this but I keep getting  java.lang.IllegalArgumentException:
Argument 'requestCycle' may not be null.

This is the reason why I wanted to know if this is a bug that is fixed in a
different branch but not yet on the official release.

Thanks for the time.

 
 
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Set-Wicket-User-Session-to-Servlet-s-HttpSession-tp4355593p4355644.html
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Odeyemi 'Kayode O.
  http://www.sinati.com. t: @charyorde



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




-- 
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde


Re: Set Wicket User Session to Servlet's HttpSession

2012-02-06 Thread Martin Grigorov
Hi,

As I answered in the ticket - RequestCycle is not created for
non-Wicket requests. It will be always 'null'.

On Mon, Feb 6, 2012 at 11:15 AM, Kayode Odeyemi drey...@gmail.com wrote:
 On Mon, Feb 6, 2012 at 7:18 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 Hi,

 On Sat, Feb 4, 2012 at 3:25 PM, Kayode Odeyemi drey...@gmail.com wrote:
  Hi, thanks.
 
  On Fri, Feb 3, 2012 at 8:05 PM, Serban.Balamaci thespamtr...@gmail.com
 wrote:
 
  Hello,
  It's not really clear what you mean and maybe you need to tell us what
 you
  want to do.
 
 
  I want to use servlet session object for user authentication and not
  wickets'.
 
 
  A Wicket session stores it's attributes into an implementation of the
  ISessionStore interface, but the default the store is HttpSessionStore,
 so
  the HttpSession. On the other hand, the wicket session can exist in a
  temporary state for the duration of the request and not have a
 HttpSession
  created. See bind(...) method in HttpSessionStore and you can see the
  Wicket
  session object being stored in a  httpsession attribute when the Wicket
  session needs to be persistent.
  setAttribute(request, Session.SESSION_ATTRIBUTE_NAME, newSession);
 
 
  But from what you've just explained, does that mean a wicket session is
  HttpSession? Hence, I can just concentrate on implementing wicket session
  and then retrieve it whenever its required even within a servlet - alas,
  the HelloWorldServlet example which makes use of WicketSessionFilter?

 Yes, Wicket's Session is saved as an attribute in the HttpSession.
 And yes, using WicketSessionFilter you can read it in servlets.


 Thanks. I tried this but I keep getting  java.lang.IllegalArgumentException:
 Argument 'requestCycle' may not be null.

 This is the reason why I wanted to know if this is a bug that is fixed in a
 different branch but not yet on the official release.

 Thanks for the time.

 
 
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Set-Wicket-User-Session-to-Servlet-s-HttpSession-tp4355593p4355644.html
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Odeyemi 'Kayode O.
  http://www.sinati.com. t: @charyorde



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




 --
 Odeyemi 'Kayode O.
 http://www.sinati.com. t: @charyorde



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Apache Wicket 1.5.4 is released

2012-02-06 Thread Martin Grigorov
On Mon, Feb 6, 2012 at 11:11 AM, Kayode Odeyemi drey...@gmail.com wrote:
 On Mon, Feb 6, 2012 at 7:24 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 On Sun, Feb 5, 2012 at 1:51 PM, Kayode Odeyemi drey...@gmail.com wrote:
  Does this mean this is the recommended branch to work from?
 
  There's a fix on 1.5 RC5 that I need. Is it advisable to work off wicket
  dev releases as against official releases?
 
  When will 1.5 RC5 slated for full release?

 RC means release candidate. RCs has been released before 1.5.0.
 1.5.4 is the latest stable release of Wicket and is the recommended one to
 use.


 Thanks and  Sorry for the back and forth. I'll like to know, is the fix at
 https://issues.apache.org/jira/browse/WICKET-3769 in 1.5.4? I couldn't find
 it the changelog, so I thought I should ask.

Yes, it is.



 
  Thanks
 
  On Mon, Jan 23, 2012 at 9:54 AM, Per Newgro per.new...@gmx.ch wrote:
 
  Oops sorry. My fault. Mail filter is filtering dev before users list. So
  it's only seen in dev folder.
  Sorry.
  Per
 
  Am 23.01.2012 10:51, schrieb Per Newgro:
 
   Shouldn't it be announce to the other list?
 
  Cheers
  Per
 
  Am 23.01.2012 09:41, schrieb Martin Grigorov:
 
  This is the fourth maintenance release of the Wicket 1.5.x series.
 This
  release brings over 60 bug fixes and improvements.
 
  Git tag:
  release/wicket-1.5.4
 
  Changelog:
  https://issues.apache.org/**jira/secure/ReleaseNote.jspa?**
  projectId=12310561version=**12319051
 https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310561version=12319051
 
 
  Maven:
  dependency
  groupIdorg.apache.wicket/**groupId
  artifactIdwicket-core/**artifactId
  version1.5.4/version
  /dependency
 
 
  Download the full distribution (including source):
  http://www.apache.org/dyn/**closer.cgi/wicket/1.5.4
 http://www.apache.org/dyn/closer.cgi/wicket/1.5.4
 
  The Wicket team
 
  --**--**
  -
  To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org
 users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 --**--**-
  To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org
 users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 --**--**-
  To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org
 users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Odeyemi 'Kayode O.
  http://www.sinati.com. t: @charyorde



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




 --
 Odeyemi 'Kayode O.
 http://www.sinati.com. t: @charyorde



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



MulitFileUploadField looses state after validation error

2012-02-06 Thread Daniel Meier
Hi everyone

Little advice needed: I have a Form with several TextField's and a
MultiFileUploadField. If you select some files to upload and enter some
text in the TextFields - after the submit everything is fine.
Now if in case some TextField fire a validation error and the page is
rendered again, you have to select the files to upload one more time. Is
there any possibility to keep the state as long as validation errors occur?
Btw same problem wit FileUploadField.

Using wicket 1.5.3.

thx


RE: MulitFileUploadField looses state after validation error

2012-02-06 Thread Wilhelmsen Tor Iver
No, the only workaround is probably to do the FileUpload logic during 
validation, and flag the upload field as completed somehow (or just show that 
files have been uploaded)

- Tor Iver

-Original Message-
From: Daniel Meier [mailto:meier_dan...@sunrise.ch] 
Sent: 6. februar 2012 14:34
To: users@wicket.apache.org
Subject: MulitFileUploadField looses state after validation error

Hi everyone

Little advice needed: I have a Form with several TextField's and a 
MultiFileUploadField. If you select some files to upload and enter some text in 
the TextFields - after the submit everything is fine.
Now if in case some TextField fire a validation error and the page is rendered 
again, you have to select the files to upload one more time. Is there any 
possibility to keep the state as long as validation errors occur?
Btw same problem wit FileUploadField.

Using wicket 1.5.3.

thx

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



Re: Add items and then submit a form

2012-02-06 Thread Tito
Well, I solved the problem.
Just submitting the form that adds items by ajax in order to avoid the
reload of the entire page and keep fields of the other form.

Thanks!

Tito

On Tue, Jan 31, 2012 at 9:07 AM, Tito njyt...@gmail.com wrote:

 Hi, I'm working again on this. And I realized that I have a problem with
 this method.

 The problem is when I submit the form that adds items, the main form
 does't keep its state. I mean if I a complete something like 'name' then
 click 'add item' the name desapear because it is not submitted.

 Do you understand my problem?

 But if I nest forms it works but the problem are validations on main form
 when inner form is submitted.

 Thanks in advance

 Tito

 On Tue, Dec 20, 2011 at 8:38 AM, Tito njyt...@gmail.com wrote:

 Great!!
 It works ok!

 Thank you very much.

 On Tue, Dec 20, 2011 at 6:21 AM, Andrea Del Bene 
 adelb...@ciseonweb.itwrote:

 This should not be a big deal. Wicket lets you put form submitting
 button outside form itself. All you have to do to make it work is to pass
 the form to component's constructor.


 HTML code:


 form wicket:id=form1

 /form

 form wicket:id=form2
 input  type=submit value=form2 wicket:id=submit2/

 /form

 input type=submit value=form1  wicket:id=submit1/


 Java code:



 add(form1 = new Form(form1){
   @Override
protected void onSubmit() {
super.onSubmit();
System.out.println(form1);
}
   });

add(new SubmitLink(submit1, form1));

Form form2;

add(form2 =new Form(form2){
@Override
protected void onSubmit() {
super.onSubmit();
System.out.println(form2);
}
   });

form2.add(new SubmitLink(submit2));



 Button submit1 is outside its form and you have two separated form.



  I think you are right.
 Using an AjaxButton it works a litle more like I want.

 Nevertheless I still have a problem, because outer form submits inner
 form.

 In my case I think that I need two separated forms, but the problem is
 how
 to put add button y save button in the correct place. I mean, the
 layout is
 what you mentioned but the behavior is more like two separated forms.
 Thank you!

 On Mon, Dec 19, 2011 at 2:04 PM, Andrea Del Beneadelb...@ciseonweb.it
 **wrote:



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






Re: ResourceReference for resource in webapp dir

2012-02-06 Thread Bertrand Guay-Paquet

Hi,

Thanks for your reply. I'll try to explain why I require this.

I want to use a ResRef to implement dependent resources based on 
AbstractResourceDependentResourceReference. Essentially, when a resource 
A.js is added to the response, I want B.js to be also automatically added.


A.js and B.js are both located in the webapp dir instead of being 
package resources. This is why I wanted to make a ResRef point to the 
webapp dir directly.


I don't have much experience with Wicket resources so maybe what I 
requested originally is the wrong tool for the task.


On 04/02/2012 5:07 AM, Martin Grigorov wrote:

Hi,

I didn't understand why you want to use ResRef but if this is your
requirement then the easiest will be to create your own IRequestMapper
that handles only your own IRequestHandler that works with your ResRef
impl.
IRequestMapper#mapHandler(IRequestHandler) is the one responsible to
create Url when RequestCycle#urlFor() is used.
Also take a look at
org.apache.wicket.util.string.UrlUtils#rewriteToContextRelative()

On Fri, Feb 3, 2012 at 5:40 PM, Bertrand Guay-Paquet
ber...@step.polymtl.ca  wrote:

Hi,

I have the following code in my base page:

public void renderHead(IHeaderResponse response) {
// scripts/jquery-1.7.1.min.js is in webapp dir
response.renderJavaScriptReference(scripts/jquery-1.7.1.min.js);
}

How can I transform this direct URL to a ResourceReference?

PackageResourceReference is not a good fit because I don't want to store the
.js in a Java package since it is used by non-wicket pages.

With ContextRelativeResource, Wicket reads the actual resource and sends the
result instead of simply pointing to a URL.

AbstractResource with its newResourceResponse() abstract method requires to
return the actual ResourceResponse which won't allow for a simple URL.

So from what I gather, I would have to fallback to implementing an
IResource's respond(Attributes attributes) method. I looked at the
implementation in AbstractResource but I'm confused about what to do with
headers since I only want a URL.

So, does this functionality already exist? If not, do you have a few
pointers to steer me in the right direction?

Thanks,
Bertrand

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






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



Re: ResourceReference for resource in webapp dir

2012-02-06 Thread Martin Grigorov
Hi,

I'd not invest in AbstractResourceDependentResourceReference.
This has been re-implemented in Wicket 6.0 and this class is no more there.

For your case I can recommend you to take a look at Wro4j.
With this library you can merge all resources which depend on each
other at build time. For production you can even minimize them.

On Mon, Feb 6, 2012 at 4:51 PM, Bertrand Guay-Paquet
ber...@step.polymtl.ca wrote:
 Hi,

 Thanks for your reply. I'll try to explain why I require this.

 I want to use a ResRef to implement dependent resources based on
 AbstractResourceDependentResourceReference. Essentially, when a resource
 A.js is added to the response, I want B.js to be also automatically added.

 A.js and B.js are both located in the webapp dir instead of being package
 resources. This is why I wanted to make a ResRef point to the webapp dir
 directly.

 I don't have much experience with Wicket resources so maybe what I requested
 originally is the wrong tool for the task.


 On 04/02/2012 5:07 AM, Martin Grigorov wrote:

 Hi,

 I didn't understand why you want to use ResRef but if this is your
 requirement then the easiest will be to create your own IRequestMapper
 that handles only your own IRequestHandler that works with your ResRef
 impl.
 IRequestMapper#mapHandler(IRequestHandler) is the one responsible to
 create Url when RequestCycle#urlFor() is used.
 Also take a look at
 org.apache.wicket.util.string.UrlUtils#rewriteToContextRelative()

 On Fri, Feb 3, 2012 at 5:40 PM, Bertrand Guay-Paquet
 ber...@step.polymtl.ca  wrote:

 Hi,

 I have the following code in my base page:

 public void renderHead(IHeaderResponse response) {
    // scripts/jquery-1.7.1.min.js is in webapp dir
    response.renderJavaScriptReference(scripts/jquery-1.7.1.min.js);
 }

 How can I transform this direct URL to a ResourceReference?

 PackageResourceReference is not a good fit because I don't want to store
 the
 .js in a Java package since it is used by non-wicket pages.

 With ContextRelativeResource, Wicket reads the actual resource and sends
 the
 result instead of simply pointing to a URL.

 AbstractResource with its newResourceResponse() abstract method requires
 to
 return the actual ResourceResponse which won't allow for a simple URL.

 So from what I gather, I would have to fallback to implementing an
 IResource's respond(Attributes attributes) method. I looked at the
 implementation in AbstractResource but I'm confused about what to do with
 headers since I only want a URL.

 So, does this functionality already exist? If not, do you have a few
 pointers to steer me in the right direction?

 Thanks,
 Bertrand

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




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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Best way to clean all sessions

2012-02-06 Thread Andrea Del Bene

Hi,

what is the best way to clean all sessions at once? I want to get rid of 
all sessions' data when I terminate Wicket application.


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



Re: MulitFileUploadField looses state after validation error

2012-02-06 Thread Martin Grigorov
Hi,

You can add AjaxFormComponentUpdatingBehavior to all TextFields and
set some error class when they are invalid. Add onsubmit event
listener (pure JS) to the form that will check all form elements for
such class and refuse the submit (by returning false) if there is at
least one invalid text field.

On Mon, Feb 6, 2012 at 3:33 PM, Daniel Meier meier_dan...@sunrise.ch wrote:
 Hi everyone

 Little advice needed: I have a Form with several TextField's and a
 MultiFileUploadField. If you select some files to upload and enter some
 text in the TextFields - after the submit everything is fine.
 Now if in case some TextField fire a validation error and the page is
 rendered again, you have to select the files to upload one more time. Is
 there any possibility to keep the state as long as validation errors occur?
 Btw same problem wit FileUploadField.

 Using wicket 1.5.3.

 thx



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Best way to clean all sessions

2012-02-06 Thread Martin Grigorov
Hi,

What exactly is not cleared ?
See org.apache.wicket.Application#internalDestroy()

On Mon, Feb 6, 2012 at 5:11 PM, Andrea Del Bene adelb...@ciseonweb.it wrote:
 Hi,

 what is the best way to clean all sessions at once? I want to get rid of all
 sessions' data when I terminate Wicket application.

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: ResourceReference for resource in webapp dir

2012-02-06 Thread Bertrand Guay-Paquet

Thanks a lot! I'm glad I gave more details :)

On 06/02/2012 10:08 AM, Martin Grigorov wrote:

Hi,

I'd not invest in AbstractResourceDependentResourceReference.
This has been re-implemented in Wicket 6.0 and this class is no more there.

For your case I can recommend you to take a look at Wro4j.
With this library you can merge all resources which depend on each
other at build time. For production you can even minimize them.

On Mon, Feb 6, 2012 at 4:51 PM, Bertrand Guay-Paquet
ber...@step.polymtl.ca  wrote:

Hi,

Thanks for your reply. I'll try to explain why I require this.

I want to use a ResRef to implement dependent resources based on
AbstractResourceDependentResourceReference. Essentially, when a resource
A.js is added to the response, I want B.js to be also automatically added.

A.js and B.js are both located in the webapp dir instead of being package
resources. This is why I wanted to make a ResRef point to the webapp dir
directly.

I don't have much experience with Wicket resources so maybe what I requested
originally is the wrong tool for the task.


On 04/02/2012 5:07 AM, Martin Grigorov wrote:

Hi,

I didn't understand why you want to use ResRef but if this is your
requirement then the easiest will be to create your own IRequestMapper
that handles only your own IRequestHandler that works with your ResRef
impl.
IRequestMapper#mapHandler(IRequestHandler) is the one responsible to
create Url when RequestCycle#urlFor() is used.
Also take a look at
org.apache.wicket.util.string.UrlUtils#rewriteToContextRelative()

On Fri, Feb 3, 2012 at 5:40 PM, Bertrand Guay-Paquet
ber...@step.polymtl.cawrote:

Hi,

I have the following code in my base page:

public void renderHead(IHeaderResponse response) {
// scripts/jquery-1.7.1.min.js is in webapp dir
response.renderJavaScriptReference(scripts/jquery-1.7.1.min.js);
}

How can I transform this direct URL to a ResourceReference?

PackageResourceReference is not a good fit because I don't want to store
the
.js in a Java package since it is used by non-wicket pages.

With ContextRelativeResource, Wicket reads the actual resource and sends
the
result instead of simply pointing to a URL.

AbstractResource with its newResourceResponse() abstract method requires
to
return the actual ResourceResponse which won't allow for a simple URL.

So from what I gather, I would have to fallback to implementing an
IResource's respond(Attributes attributes) method. I looked at the
implementation in AbstractResource but I'm confused about what to do with
headers since I only want a URL.

So, does this functionality already exist? If not, do you have a few
pointers to steer me in the right direction?

Thanks,
Bertrand

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




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






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



Re: Best way to clean all sessions

2012-02-06 Thread Andrea Del Bene
if I turn off Tomcat and turn it on later, pressing F5 I see the page I 
was on when I stopped Tomcat. I think is due to DiskDataStore which 
saves page versions into file.

How can I clean Data Store files when Wicket Application is terminated?

Hi,

What exactly is not cleared ?
See org.apache.wicket.Application#internalDestroy()

On Mon, Feb 6, 2012 at 5:11 PM, Andrea Del Beneadelb...@ciseonweb.it  wrote:

Hi,

what is the best way to clean all sessions at once? I want to get rid of all
sessions' data when I terminate Wicket application.

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







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



Re: Best way to clean all sessions

2012-02-06 Thread Martin Grigorov
See
org.apache.wicket.pageStore.DiskDataStore#destroy()
org.apache.wicket.DefaultPageManagerProvider#newDataStore()

http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html#Persistence_Across_Restarts

On Mon, Feb 6, 2012 at 6:10 PM, Andrea Del Bene adelb...@ciseonweb.it wrote:
 if I turn off Tomcat and turn it on later, pressing F5 I see the page I was
 on when I stopped Tomcat. I think is due to DiskDataStore which saves page
 versions into file.
 How can I clean Data Store files when Wicket Application is terminated?

 Hi,

 What exactly is not cleared ?
 See org.apache.wicket.Application#internalDestroy()

 On Mon, Feb 6, 2012 at 5:11 PM, Andrea Del Beneadelb...@ciseonweb.it
  wrote:

 Hi,

 what is the best way to clean all sessions at once? I want to get rid of
 all
 sessions' data when I terminate Wicket application.

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





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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Wicket 1.4 - 1.5: MarkupContainer.getMarkupStream()

2012-02-06 Thread Thomas Singer
I need help for converting our application from Wicket 1.4 to 1.5. We have
following code:

  MarkupContainer container = ...
  ...
  MarkupStream markupStream = container.getMarkupStream();
  if (markupStream == null) {
return null;
  }

  Class tagMarkupClass = markupStream.atTag()
  ? markupStream.getTag().getMarkupClass()
  : null;
  if (tagMarkupClass == null) {
return markupStream.getContainerClass();
  }

  return tagMarkupClass;

How to write it using Wicket 1.5? Thanks in advance.

Tom

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



Re: Best way to clean all sessions

2012-02-06 Thread Andrea Del Bene

It is exactly what I needed! Thank you!

http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html#Persistence_Across_Restarts




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



Wicket 1.4 - 1.5: RequestCycle.urlFor

2012-02-06 Thread Thomas Singer
According to https://cwiki.apache.org/WICKET/migration-to-wicket-15.html

 org.apache.wicket.RequestCycle.urlFor

has been renamed to

 org.apache.wicket.request.cycle.RequestCycle.renderUrlFor

but there is no such method renderUrlFor.

Tom

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



Serializing server objects

2012-02-06 Thread Kayode Odeyemi
Hi,

Please I will like to know if all IModel class implementations are capable
of serializing all type of objects without necessarily having to do custom
serialization? I'm asking because I want to know the underlying
architecture of how server objects are being transported to Wicket.

I had a look at AbstractReadOnlyModel, LoadableDetachableModel etc and it
seems to me that that is how it is meant to work (i.e through the Wicket
model structure). Please am I correct?

Thanks

-- 
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde


Re: WICKET AJAX QUESTION

2012-02-06 Thread Andrea Del Bene
How are you attempting to clean textbox? For example you could clear 
textbox setting model object to empty string and adding textbox to 
AjaxRequestTarget.




Hi, i have one textbox.  we send the value of text box to listchoice. On add
button , we used ajax. But i am unable to clear the textbox value after
successfully add. Plz help me.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WICKET-AJAX-QUESTION-tp4361992p4361992.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: Wicket 1.4 - 1.5: RequestCycle.urlFor

2012-02-06 Thread vineet semwal
RequestCycle#urlFor still exists,that needs to be corrected..

On Mon, Feb 6, 2012 at 10:44 PM, Thomas Singer wic...@regnis.de wrote:
 According to https://cwiki.apache.org/WICKET/migration-to-wicket-15.html

  org.apache.wicket.RequestCycle.urlFor

 has been renamed to

  org.apache.wicket.request.cycle.RequestCycle.renderUrlFor

 but there is no such method renderUrlFor.

 Tom

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




-- 
thank you,

regards,
Vineet Semwal

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



Re: Wicket 1.4 - 1.5: RequestCycle.urlFor

2012-02-06 Thread Thomas Singer
Unfortunately, a new parameter for PageParameters was added. Is passing null
the same as in 1.4?

Tom


On 06.02.2012 18:29, vineet semwal wrote:
 RequestCycle#urlFor still exists,that needs to be corrected..
 
 On Mon, Feb 6, 2012 at 10:44 PM, Thomas Singer wic...@regnis.de wrote:
 According to https://cwiki.apache.org/WICKET/migration-to-wicket-15.html

  org.apache.wicket.RequestCycle.urlFor

 has been renamed to

  org.apache.wicket.request.cycle.RequestCycle.renderUrlFor

 but there is no such method renderUrlFor.

 Tom

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

 
 
 

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



Re: Serializing server objects

2012-02-06 Thread Andrea Del Bene

Hi,

Wicket uses an implementation of org.apache.wicket.serialize.ISerializer 
to serialize all objects (pages, models, ecc...)
The default serializer is based on standard classes ObjectOutputStream 
and ObjectInputStream.
IModel implementations have nothing to do with the concrete ISerializer 
used by Wicket.
You should have a look at 
org.apache.wicket.serialize.java.JavaSerializer (which is the default 
ISerializer)



Hi,

Please I will like to know if all IModel class implementations are capable
of serializing all type of objects without necessarily having to do custom
serialization? I'm asking because I want to know the underlying
architecture of how server objects are being transported to Wicket.

I had a look at AbstractReadOnlyModel, LoadableDetachableModel etc and it
seems to me that that is how it is meant to work (i.e through the Wicket
model structure). Please am I correct?

Thanks




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



Re: Wicket 1.4 - 1.5: RequestCycle.urlFor

2012-02-06 Thread vineet semwal
its not unfortunate,its  a good thing ,will help you in retrieving url
for dynamic resources.
yeah you can leave it as null for static package resources

On Mon, Feb 6, 2012 at 11:17 PM, Thomas Singer wic...@regnis.de wrote:
 Unfortunately, a new parameter for PageParameters was added. Is passing null
 the same as in 1.4?

 Tom


 On 06.02.2012 18:29, vineet semwal wrote:
 RequestCycle#urlFor still exists,that needs to be corrected..

 On Mon, Feb 6, 2012 at 10:44 PM, Thomas Singer wic...@regnis.de wrote:
 According to https://cwiki.apache.org/WICKET/migration-to-wicket-15.html

  org.apache.wicket.RequestCycle.urlFor

 has been renamed to

  org.apache.wicket.request.cycle.RequestCycle.renderUrlFor

 but there is no such method renderUrlFor.

 Tom

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





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




-- 
thank you,

regards,
Vineet Semwal

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



Re: Serializing server objects

2012-02-06 Thread Kayode Odeyemi
On Mon, Feb 6, 2012 at 5:52 PM, Andrea Del Bene adelb...@ciseonweb.itwrote:

 Wicket uses an implementation of org.apache.wicket.serialize.**ISerializer
 to serialize all objects (pages, models, ecc...)



Thanks Andrea.

Meaning if I have a custom model that extends one of the IModel
implementing classes, I don't have to serialize the objects returned by the
model myself - Wicket does this by default?



-- 
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde


Re: Wicket-Source: Click-through from browser back to Java source

2012-02-06 Thread Minas Manthos
Thanks for explanations Jenny. It was very easy to port... :-)

And thank you again for your great work and for sharing. Well done.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Source-Click-through-from-browser-back-to-Java-source-tp4346532p4362279.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket-Source: Click-through from browser back to Java source

2012-02-06 Thread Jenny Brown
Thanks!  When you have a project url for the port, let me know, and I'll
link it in from the project wiki.

Jenny


On Mon, Feb 6, 2012 at 12:30 PM, Minas Manthos minas.mant...@gmail.comwrote:

 Thanks for explanations Jenny. It was very easy to port... :-)

 And thank you again for your great work and for sharing. Well done.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-Source-Click-through-from-browser-back-to-Java-source-tp4346532p4362279.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




Re: Serializing server objects

2012-02-06 Thread Martin Baez
You can configure your own serializer. You can follow this:
https://cwiki.apache.org/WICKET/using-jboss-serialization-in-wicket-15.html
in order to use JBossSerializer. By using  JbossSerialiser you can
serialize objects that don´t implement ISerializable.



On Mon, Feb 6, 2012 at 6:12 PM, Kayode Odeyemi drey...@gmail.com wrote:
 On Mon, Feb 6, 2012 at 5:52 PM, Andrea Del Bene adelb...@ciseonweb.itwrote:

 Wicket uses an implementation of org.apache.wicket.serialize.**ISerializer
 to serialize all objects (pages, models, ecc...)



 Thanks Andrea.

 Meaning if I have a custom model that extends one of the IModel
 implementing classes, I don't have to serialize the objects returned by the
 model myself - Wicket does this by default?



 --
 Odeyemi 'Kayode O.
 http://www.sinati.com. t: @charyorde

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



Re: Wicket-Source: Click-through from browser back to Java source

2012-02-06 Thread Minas Manthos
@armhold
I've also already started a plugin, but was too busy and had not the time to
test and to do some cleanup. :-) I think it's better to have a independent
plugin rather than integrate in WicketForge, so each plugin can have own
deploy cycle. Anyway... I'm glad that you already deployed your work.

I forked and pushed my work for documentation purpose. If you like look into
https://github.com/minman/wicket-source/tree/master/sourceopener-idea. Feel
free to reuse some code (maybe ConfigurationPanel usind IDEA's PasswordSafe
or whatever). I will not further work on it nor deploy.

Thank you for the plugin. Regards. :-)




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Source-Click-through-from-browser-back-to-Java-source-tp4346532p4362375.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Serializing server objects

2012-02-06 Thread Andrea Del Bene
Yes, provided that the object returned by model implements 
java.io.Serializable. When you serialize an object (no matter if it is a 
Wicket page or a model or whatever else), you serialize also all its 
references. So when Wicket serializes a  page or a component also its 
model and the object inside it are serialized.



On Mon, Feb 6, 2012 at 5:52 PM, Andrea Del Beneadelb...@ciseonweb.itwrote:


Wicket uses an implementation of org.apache.wicket.serialize.**ISerializer
to serialize all objects (pages, models, ecc...)



Thanks Andrea.

Meaning if I have a custom model that extends one of the IModel
implementing classes, I don't have to serialize the objects returned by the
model myself - Wicket does this by default?






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



Re: Wicket Ajax direction and roadmap regarding push-like updates

2012-02-06 Thread pkc
It is a tricky topic because what can be done from the wicket api level
doesn't have to use true push for the default implementation.  I don't like
the push solutions out there.  Ice-push looked promising because of the hype
but after issues with memory leaks and overly complicated requirements,  I
switched to jQuery and two rest-style request handlers and it was so simple
(one url for status updates and one for the request that is taking a long
time).  I don't know why there is resistance to a default wicket push
interface that works with jquery or pure ajax to provide a default
implementation.  I bet most wicket developers would welcome a simple
solution like this.  Especially if the wicket team made the interface
flexible enough to plugin alternate push solutions as they become standard.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Ajax-direction-and-roadmap-regarding-push-like-updates-tp4351890p4362477.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket Ajax direction and roadmap regarding push-like updates

2012-02-06 Thread Pierre Goupil
Just to mention that I'm personally more than happy with Atmosphere.
There's a little work coming in order to support lots of Comet channels (it
will be contributed back when it's done) but for a simple use with two or
three channels it works like a charm. Plus there's a working Wicket example
available in the official distro. And it's unit testable. Or at least, it
doesn't prevent you to unit-test the regular Wicket code, not like
wicket-push for instance, that I gave up because it prevented me to unit
test my regular (non-Comet) code.

You won't have a perfect for all, no JavaScript solution but it's pretty
well integrated with our favorite framework and it handles very well the
different clients and servers solutions. Plus the support of WebSocket is
coming and I know from the author that the Atmosphere guy and the Tomcat
guys are working together for a forth-coming WebSocket support in this nice
servlet engine.

Regards,

Pierre



On Mon, Feb 6, 2012 at 8:33 PM, pkc pkci...@gmail.com wrote:

 It is a tricky topic because what can be done from the wicket api level
 doesn't have to use true push for the default implementation.  I don't like
 the push solutions out there.  Ice-push looked promising because of the
 hype
 but after issues with memory leaks and overly complicated requirements,  I
 switched to jQuery and two rest-style request handlers and it was so simple
 (one url for status updates and one for the request that is taking a long
 time).  I don't know why there is resistance to a default wicket push
 interface that works with jquery or pure ajax to provide a default
 implementation.  I bet most wicket developers would welcome a simple
 solution like this.  Especially if the wicket team made the interface
 flexible enough to plugin alternate push solutions as they become standard.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-Ajax-direction-and-roadmap-regarding-push-like-updates-tp4351890p4362477.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




-- 
Si tu penses que la violence ne résout rien, c'est que tu n'as pas tapé
assez fort.


Best practices for using CSS resource references

2012-02-06 Thread Alec Swan
Hello,

I have a LocalResourceScope class (aliased as local shared resource)
and style.css in the same package. I can access
resources/local/style.css directly from the browser and track the size
of HTTP request/response to retrieve CSS.

I also tried to do bind the CSS file as follows
  new CompressedResourceReference(LocalResourceScope.class,
style.css).bind(Application.get())
expecting it to reduce the amount of traffic, but it actually
increased request size by about 10%.

So, why would anybody use CompressedResourceReference when
contributing CSS? Is there a resource reference that would strip out
spaces and comments from CSS?

Thanks,

Alec

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



Re: Wicket 1.5 redirect to an external site.

2012-02-06 Thread Dan Retzlaff
This doesn't look related to a Wicket version change. OpenID4Java requires
HttpClient. Do you have HttpComponents' HttpClient JAR on your classpath?

On Mon, Feb 6, 2012 at 12:54 PM, singh13 gso...@gmail.com wrote:

 Hi there I am creating a web app that acts as an openID relying party. I am
 using the OpenID4Java library.

 On my page I have a textfield in which the user enters their openid.
 OpenID4Java gets the redirect url from this field.

 In my OnSubmit method for my submit button I have the following using
 wicket
 1.3:


 getRequestCycle().setRedirect(false);
 getResponse().redirect(authRequest.getDestinationUrl(true));



 // authRequest.getDestinationUrl(true) returns the url for the opened
 provider.

 In wicket 1.5 i am using the following in my OnSubmit method:

 throw new RedirectToUrlException(authRequest.getDestinationUrl(true));


 The problem is when i use this i get a whole load of exceptions and errors
 displayed below

 Root cause:

 java.lang.ClassNotFoundException:
 org.apache.http.client.ClientProtocolException
 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
 at
 org.openid4java.consumer.ConsumerManager.init(ConsumerManager.java:167)
 at

 com.university.RelyingPartyService.getConsumerManager(RelyingPartyService.java:114)
 at

 com.university.RelyingPartyService.performDiscovery(RelyingPartyService.java:32)
 at com.university.HomePage$SignInForm$1.onSubmit(HomePage.java:59)
 at
 org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1174)
 at org.apache.wicket.markup.html.form.Form.process(Form.java:838)
 at
 org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:762)
 at
 org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:692)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at

 org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:260)
 at

 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216)
 at

 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248)
 at

 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
 at

 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
 at

 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
 at
 org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
 at

 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
 at

 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
 at

 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
 at

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

 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1326)
 at
 org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
 at

 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
 at
 org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)
 at

 org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
 at

 org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:940)
 at
 org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)
 at

 org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
 at

 org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:874)
 at

 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
 at

 org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
 at org.eclipse.jetty.server.Server.handle(Server.java:349)
 at

 org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
 at

 org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:921)
 at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:784)
 at
 org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:223)
 at

 org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:50)
 at

 org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:245)
 at

 org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
 at

 

Re: StalePageException with CryptoMapper

2012-02-06 Thread jchappelle
Hi Martin,

The reason I don't extend the AjaxEventBehavior is because I'm using the YUI
javascript library to create my menu and my behavior is not being attached
to a dom element. There are two ways they allow you to create the menu. One
way is by having some markup that backs up the javascript or by pure
javascript. I'm using the pure javascript way. So my wicket java code just
builds up a javascript string that gets loaded when the page is loaded and
it knows the div's id to write the output to.


I know that AjaxLinks are not broken and I'm pretty sure that I'm going
through the same code to generate my url that the AjaxLink class does.

I'll work on creating a quickstart. Should I just upload it to this post or
is there a different place for those?

Thanks,

Josh


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/StalePageException-with-CryptoMapper-tp4355184p4362997.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Tighter Wicket-Spring integration

2012-02-06 Thread Lukáš Šembera
Hello,
my application communicates with various erlang processes in a
background. The communication is done via AMQP messages and handling
of those messages in already done in the spring-based service layer.
Now I'm in the situation that I need wicket components to display
those messages (ideally asynchronously). I'd like Spring beans to
somehow raise events in Wicket anytime new message arrives and thus
force selected components to repaint). I cannot figure out what how to
do clear communication (from architectural point of view) between my
Spring service layer and Wicket presentation. It would be wonderful if
it was possible to somehow integrate Spring with Wicket events
introduced in 1.5. The only solution I currently think of is a polling
of the service layer, which doesn't suite my needs very well.

Thank you very much for your help.

Lukáš Šembera

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



Reload html in Wicket + GAE

2012-02-06 Thread Daniel Watrous
Hi,

I'm following up on a previous thread that's still unresolved. I would
like GAE to automatically reload my HTML when I save changes. Classes
are reloaded when I save (compile) them, but I have to restart each
time for HTML changes.

There are some old articles that show how to do this, but they deal
with older versions of Wicket and GAE. For example:
http://agilewombat.blogspot.com/2010/01/wicket-on-google-app-engine.html
http://apache-wicket.1842946.n4.nabble.com/How-can-I-reload-HTML-in-app-engine-td3005241.html
http://code.google.com/p/kickat26/source/browse/trunk/src/de/kickat26/ui/wicket/GAEModificationWatcher.java

Those suggest creating a class MyWebRequestCycle extends
WebRequestCycle, but wicket 1.5 doesn't have WebRequestCycle.

How can I accomplish this same thing in the current version of wicket?

Daniel

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



clustering wicket webapps

2012-02-06 Thread Martin Baez
After considering several alternatives I have choosen wicket. Nowadays
I am considering  clustering my webapp. Do you hace any recommendation
or lecture about clustering in wicket?. why are sticky sessions
recommended?, in case of session replication is it necesary to replace
the default IPageStore?.


colo

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



pooling validators

2012-02-06 Thread jsanca
Hi All,

As a common practice in Wicket we create IValidator objects for each
component we need to add a validation, there are some scenarios when we use
the same validator for several objects, so I was wondering if there is any
issue if I create a pooling to provide this validators

Thread Safe issues
Concurrency issues
Any other issue

Thanks,
J

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/pooling-validators-tp4363095p4363095.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: pooling validators

2012-02-06 Thread Jeremy Thomerson
On Mon, Feb 6, 2012 at 5:43 PM, jsanca jsa...@gmail.com wrote:

 Hi All,

 As a common practice in Wicket we create IValidator objects for each
 component we need to add a validation, there are some scenarios when we use
 the same validator for several objects, so I was wondering if there is any
 issue if I create a pooling to provide this validators

 Thread Safe issues


Potentially.


 Concurrency issues


Potentially.


 Any other issue


Potentially.

Really, the question is: why?  Sounds like premature optimization.  Until
you see that validators actually cause a problem there's no need to do it.
 If they do cause a problem, I can almost 300% guarantee that pooling them
won't be the way to solve it.

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: pooling validators

2012-02-06 Thread jsanca
Hi Jeremy

Thanks for your answer, I agree with you (reason why I sent this email, to
double check my theory)
I am just trying to find way to optimize the app, I am new with Wicket and
I feel the Framework creates so much instances just to render a page, so I
see the validators everywhere might a good idea to pooling it

Of course if pooling will introduce a new issue I prefer just to keep
following the way we are using so far

thanks again,
J

On Mon, Feb 6, 2012 at 7:52 PM, jer...@wickettraining.com [via Apache
Wicket] ml-node+s1842946n436349...@n4.nabble.com wrote:

 On Mon, Feb 6, 2012 at 5:43 PM, jsanca [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4363496i=0
 wrote:

  Hi All,
 
  As a common practice in Wicket we create IValidator objects for each
  component we need to add a validation, there are some scenarios when we
 use
  the same validator for several objects, so I was wondering if there is
 any
  issue if I create a pooling to provide this validators
 
  Thread Safe issues
 

 Potentially.


  Concurrency issues
 

 Potentially.


  Any other issue


 Potentially.

 Really, the question is: why?  Sounds like premature optimization.  Until
 you see that validators actually cause a problem there's no need to do it.
  If they do cause a problem, I can almost 300% guarantee that pooling them
 won't be the way to solve it.

 --
 Jeremy Thomerson
 http://wickettraining.com
 *Need a CMS for Wicket?  Use Brix! http://brixcms.org*


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://apache-wicket.1842946.n4.nabble.com/pooling-validators-tp4363095p4363496.html
  To unsubscribe from pooling validators, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4363095code=anNhbmNhQGdtYWlsLmNvbXw0MzYzMDk1fC0xMDAyMzAxODY1
 .
 NAMLhttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml




-- 
Saludos,
Jonathan

http://jsanca.blogspot.com/


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/pooling-validators-tp4363095p4363668.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket 1.4 - 1.5: MarkupContainer.getMarkupStream()

2012-02-06 Thread Thomas Singer
Does nobody have an idea? This code prevents me from making progress in
converting our application to Wicket 1.5.

Tom


On 06.02.2012 18:06, Thomas Singer wrote:
 I need help for converting our application from Wicket 1.4 to 1.5. We have
 following code:
 
   MarkupContainer container = ...
   ...
   MarkupStream markupStream = container.getMarkupStream();
   if (markupStream == null) {
   return null;
   }
 
   Class tagMarkupClass = markupStream.atTag()
   ? markupStream.getTag().getMarkupClass()
   : null;
   if (tagMarkupClass == null) {
   return markupStream.getContainerClass();
   }
 
   return tagMarkupClass;
 
 How to write it using Wicket 1.5? Thanks in advance.
 
 Tom
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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



Re: Wicket 1.4 - 1.5: MarkupContainer.getMarkupStream()

2012-02-06 Thread Jenny Brown
I'm still a beginner myself, but upon looking at the Javadocs for
MarkupContainer and MarkupStream, I am not sure where exactly the code is
giving you trouble.  Compile error?  Runtime exception?  Can you be more
specific?


On Mon, Feb 6, 2012 at 11:14 PM, Thomas Singer wic...@regnis.de wrote:

 Does nobody have an idea? This code prevents me from making progress in
 converting our application to Wicket 1.5.

 Tom


Re: Tighter Wicket-Spring integration

2012-02-06 Thread vineet semwal
i think you need something like wicketstuff push

2012/2/7 Lukáš Šembera mailing-li...@semberal.eu:
 Hello,
 my application communicates with various erlang processes in a
 background. The communication is done via AMQP messages and handling
 of those messages in already done in the spring-based service layer.
 Now I'm in the situation that I need wicket components to display
 those messages (ideally asynchronously). I'd like Spring beans to
 somehow raise events in Wicket anytime new message arrives and thus
 force selected components to repaint). I cannot figure out what how to
 do clear communication (from architectural point of view) between my
 Spring service layer and Wicket presentation. It would be wonderful if
 it was possible to somehow integrate Spring with Wicket events
 introduced in 1.5. The only solution I currently think of is a polling
 of the service layer, which doesn't suite my needs very well.

 Thank you very much for your help.

 Lukáš Šembera

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




-- 
thank you,

regards,
Vineet Semwal

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



Re: Wicket 1.4 - 1.5: MarkupContainer.getMarkupStream()

2012-02-06 Thread Thomas Singer
MarkupContainer.getMarkupStream()

does not exist any more in Wicket 1.5.

Tom


On 07.02.2012 06:37, Jenny Brown wrote:
 I'm still a beginner myself, but upon looking at the Javadocs for
 MarkupContainer and MarkupStream, I am not sure where exactly the code is
 giving you trouble.  Compile error?  Runtime exception?  Can you be more
 specific?
 
 
 On Mon, Feb 6, 2012 at 11:14 PM, Thomas Singer wic...@regnis.de wrote:
 
 Does nobody have an idea? This code prevents me from making progress in
 converting our application to Wicket 1.5.

 Tom
 

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



Re: Wicket 1.4 - 1.5: MarkupContainer.getMarkupStream()

2012-02-06 Thread vineet semwal
use MarkupContainer#getAssociatedMarkupStream(boolean)

On Tue, Feb 7, 2012 at 11:13 AM, Thomas Singer wic...@regnis.de wrote:
 MarkupContainer.getMarkupStream()

 does not exist any more in Wicket 1.5.

 Tom


 On 07.02.2012 06:37, Jenny Brown wrote:
 I'm still a beginner myself, but upon looking at the Javadocs for
 MarkupContainer and MarkupStream, I am not sure where exactly the code is
 giving you trouble.  Compile error?  Runtime exception?  Can you be more
 specific?


 On Mon, Feb 6, 2012 at 11:14 PM, Thomas Singer wic...@regnis.de wrote:

 Does nobody have an idea? This code prevents me from making progress in
 converting our application to Wicket 1.5.

 Tom


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




-- 
thank you,

regards,
Vineet Semwal

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



Re: StalePageException with CryptoMapper

2012-02-06 Thread Martin Grigorov
On Tue, Feb 7, 2012 at 12:10 AM, jchappelle jchappe...@4redi.com wrote:
 Hi Martin,

 The reason I don't extend the AjaxEventBehavior is because I'm using the YUI
 javascript library to create my menu and my behavior is not being attached
 to a dom element. There are two ways they allow you to create the menu. One
 way is by having some markup that backs up the javascript or by pure
 javascript. I'm using the pure javascript way. So my wicket java code just
 builds up a javascript string that gets loaded when the page is loaded and
 it knows the div's id to write the output to.


 I know that AjaxLinks are not broken and I'm pretty sure that I'm going
 through the same code to generate my url that the AjaxLink class does.

 I'll work on creating a quickstart. Should I just upload it to this post or
 is there a different place for those?


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

 Thanks,

 Josh


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/StalePageException-with-CryptoMapper-tp4355184p4362997.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Reload html in Wicket + GAE

2012-02-06 Thread Martin Grigorov
Hi,

On Tue, Feb 7, 2012 at 1:32 AM, Daniel Watrous daniel.watr...@gmail.com wrote:
 Hi,

 I'm following up on a previous thread that's still unresolved. I would
 like GAE to automatically reload my HTML when I save changes. Classes
 are reloaded when I save (compile) them, but I have to restart each
 time for HTML changes.

 There are some old articles that show how to do this, but they deal
 with older versions of Wicket and GAE. For example:
 http://agilewombat.blogspot.com/2010/01/wicket-on-google-app-engine.html
 http://apache-wicket.1842946.n4.nabble.com/How-can-I-reload-HTML-in-app-engine-td3005241.html
 http://code.google.com/p/kickat26/source/browse/trunk/src/de/kickat26/ui/wicket/GAEModificationWatcher.java

 Those suggest creating a class MyWebRequestCycle extends
 WebRequestCycle, but wicket 1.5 doesn't have WebRequestCycle.

 How can I accomplish this same thing in the current version of wicket?

application.getRequestCycleListeners().add(new MyRequestCycleListener())

class MyRequestCycleListener extends AbstractRequestCycleListener {
 // override the method you need here
}

Once you have it you can contribute it to gae-initializer project so
other people can re-use it and improve it.


 Daniel

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Wicket 1.4 - 1.5: MarkupContainer.getMarkupStream()

2012-02-06 Thread Martin Grigorov
IMarkupFragment markup = component.getMarkup();
MarkupStream stream = new MarkupStream(markup);

On Tue, Feb 7, 2012 at 7:54 AM, vineet semwal
vineetsemwal1...@gmail.com wrote:
 use MarkupContainer#getAssociatedMarkupStream(boolean)

 On Tue, Feb 7, 2012 at 11:13 AM, Thomas Singer wic...@regnis.de wrote:
 MarkupContainer.getMarkupStream()

 does not exist any more in Wicket 1.5.

 Tom


 On 07.02.2012 06:37, Jenny Brown wrote:
 I'm still a beginner myself, but upon looking at the Javadocs for
 MarkupContainer and MarkupStream, I am not sure where exactly the code is
 giving you trouble.  Compile error?  Runtime exception?  Can you be more
 specific?


 On Mon, Feb 6, 2012 at 11:14 PM, Thomas Singer wic...@regnis.de wrote:

 Does nobody have an idea? This code prevents me from making progress in
 converting our application to Wicket 1.5.

 Tom


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




 --
 thank you,

 regards,
 Vineet Semwal

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Best practices for using CSS resource references

2012-02-06 Thread Serban.Balamaci
Hi Alec,
Not really a direct reply to your question rather another. 
Wro4j project is more powerful(configurable) when it comes to grouping and
minification css/jss, and I think maybe the WroFilter can easily be turned
into a Wicket Resource, for a tighter wicket integration, I'm wondering if
this has not already been done by someone.

Also for JS references a parser for wro.xml that returns the contained js
entries in a group to distinguish between wicket development and deployment
versions could be done.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Best-practices-for-using-CSS-resource-references-tp4362796p4363970.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Tighter Wicket-Spring integration

2012-02-06 Thread kamiseq
also you need to consider that wicket components will be accessed from
different threads

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__

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