Re: Communication between applications, one using wicket

2009-04-09 Thread John Krasnay
Your approach sounds perfectly reasonable to me. What don't you like
about it?

jk

On Thu, Apr 09, 2009 at 10:36:39AM +0300, Cristi Manole wrote:
 Hello,
 
 I have a wicket application where a user starts an action on another system
 (different machine, outside network). I would like for this specific user to
 receive a response from that system once the action is finished (it takes a
 fair amount of time) and the status of that action.
 
 My idea is to have inside Wicket application an ajax self updating panel, so
 that the database of the application gets read from time to time. The other
 application would send a message to the Wicket application (call some page
 with some page parameters), which would update the specific database table
 with the user who started the action and the response. Once the action is
 finished, the self updating panel (aware of this by reading it in the
 database) becomes visible and it will contain that message to inform the
 user.
 
 I think my idea is bad. If nothing else I consider it resource savvy.
 
 How do you guys handle communication between two applications (the other
 application is not written in java) in order to provide the response to the
 user without refreshing the page?
 
 Thank you very much in advance,
 Cristi Manole

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



Re: Communication between applications, one using wicket

2009-04-09 Thread James Carman
Can the other application just write to the database?

On Thu, Apr 9, 2009 at 8:28 AM, John Krasnay j...@krasnay.ca wrote:
 Your approach sounds perfectly reasonable to me. What don't you like
 about it?

 jk

 On Thu, Apr 09, 2009 at 10:36:39AM +0300, Cristi Manole wrote:
 Hello,

 I have a wicket application where a user starts an action on another system
 (different machine, outside network). I would like for this specific user to
 receive a response from that system once the action is finished (it takes a
 fair amount of time) and the status of that action.

 My idea is to have inside Wicket application an ajax self updating panel, so
 that the database of the application gets read from time to time. The other
 application would send a message to the Wicket application (call some page
 with some page parameters), which would update the specific database table
 with the user who started the action and the response. Once the action is
 finished, the self updating panel (aware of this by reading it in the
 database) becomes visible and it will contain that message to inform the
 user.

 I think my idea is bad. If nothing else I consider it resource savvy.

 How do you guys handle communication between two applications (the other
 application is not written in java) in order to provide the response to the
 user without refreshing the page?

 Thank you very much in advance,
 Cristi Manole

 -
 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: Communication between applications, one using wicket

2009-04-09 Thread David Brown
Hello Cristi, this is typically referred to as diparate sytems communications 
issue. In the past I have had some success between such sytems using a WSDL and 
messaging. I did not have a lot of time so I opted for the Apache Axis2 
framework (http://ws.apache.org/axis2/). You will have to do some work but 
better than developing something with low-level Java nuts-and-bolts. The 
systems I glued together were: a C/C++/Oracle backend concoction to a 
.asp/vbscript(ed) front-end. HTH, David.

There are 10 kinds of people in this world: those who understand binary and 
those who don’t (Valid only for 2's complement).

- Original Message -
From: Cristi Manole cristiman...@gmail.com
To: users@wicket.apache.org
Sent: Thursday, April 9, 2009 2:36:39 AM GMT -06:00 US/Canada Central
Subject: Communication between applications, one using wicket

Hello,

I have a wicket application where a user starts an action on another system
(different machine, outside network). I would like for this specific user to
receive a response from that system once the action is finished (it takes a
fair amount of time) and the status of that action.

My idea is to have inside Wicket application an ajax self updating panel, so
that the database of the application gets read from time to time. The other
application would send a message to the Wicket application (call some page
with some page parameters), which would update the specific database table
with the user who started the action and the response. Once the action is
finished, the self updating panel (aware of this by reading it in the
database) becomes visible and it will contain that message to inform the
user.

I think my idea is bad. If nothing else I consider it resource savvy.

How do you guys handle communication between two applications (the other
application is not written in java) in order to provide the response to the
user without refreshing the page?

Thank you very much in advance,
Cristi Manole

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



Re: Communication between applications, one using wicket

2009-04-09 Thread John Krasnay
On Thu, Apr 09, 2009 at 07:48:10AM -0500, David Brown wrote:
 Hello Cristi, this is typically referred to as diparate sytems
 communications issue. In the past I have had some success between such
 sytems using a WSDL and messaging. I did not have a lot of time so I
 opted for the Apache Axis2 framework (http://ws.apache.org/axis2/).
 You will have to do some work but better than developing something
 with low-level Java nuts-and-bolts.

Ugh! I think Cristi's approach of a bookmarkable page is far simpler
than messing with SOAP stacks.

jk

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



Re: Communication between applications, one using wicket

2009-04-09 Thread James Carman
Or, just write to the database, since the wicket application polls the
db for changes anyway.

On Thu, Apr 9, 2009 at 8:59 AM, John Krasnay j...@krasnay.ca wrote:
 On Thu, Apr 09, 2009 at 07:48:10AM -0500, David Brown wrote:
 Hello Cristi, this is typically referred to as diparate sytems
 communications issue. In the past I have had some success between such
 sytems using a WSDL and messaging. I did not have a lot of time so I
 opted for the Apache Axis2 framework (http://ws.apache.org/axis2/).
 You will have to do some work but better than developing something
 with low-level Java nuts-and-bolts.

 Ugh! I think Cristi's approach of a bookmarkable page is far simpler
 than messing with SOAP stacks.

 jk

 -
 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: Communication between applications, one using wicket

2009-04-09 Thread Jonas
Hi,

there are probably easier way to provide a 'callback' channel to a remote system
than a wicket page. Of course, using the web server makes sense, but
I'd recommend
to use a simple servlet to receive the callback and to update the
specific database table
instead of a wicket page, since the remote system probably doesn't
need to get a html
response - a simple http status code is probably enough.
Using axis sounds like overkill to me...


On Thu, Apr 9, 2009 at 9:36 AM, Cristi Manole cristiman...@gmail.com wrote:
 Hello,

 I have a wicket application where a user starts an action on another system
 (different machine, outside network). I would like for this specific user to
 receive a response from that system once the action is finished (it takes a
 fair amount of time) and the status of that action.

 My idea is to have inside Wicket application an ajax self updating panel, so
 that the database of the application gets read from time to time. The other
 application would send a message to the Wicket application (call some page
 with some page parameters), which would update the specific database table
 with the user who started the action and the response. Once the action is
 finished, the self updating panel (aware of this by reading it in the
 database) becomes visible and it will contain that message to inform the
 user.

 I think my idea is bad. If nothing else I consider it resource savvy.

 How do you guys handle communication between two applications (the other
 application is not written in java) in order to provide the response to the
 user without refreshing the page?

 Thank you very much in advance,
 Cristi Manole


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



Re: Communication between applications, one using wicket

2009-04-09 Thread Cristi Manole
Thanks for your feedback, guys. I don't like the idea of both writing to the
database directly, because I want the layers separated. I don't think either
application should know anything about the other's database.

I used Axis2 before, but at the moment i don't see how it can solve my
problem - meaning how to update some panel *without* doing some action
repeatedly until something worth displaying to the user happens.

On Thu, Apr 9, 2009 at 4:00 PM, James Carman
jcar...@carmanconsulting.comwrote:

 Or, just write to the database, since the wicket application polls the
 db for changes anyway.

 On Thu, Apr 9, 2009 at 8:59 AM, John Krasnay j...@krasnay.ca wrote:
  On Thu, Apr 09, 2009 at 07:48:10AM -0500, David Brown wrote:
  Hello Cristi, this is typically referred to as diparate sytems
  communications issue. In the past I have had some success between such
  sytems using a WSDL and messaging. I did not have a lot of time so I
  opted for the Apache Axis2 framework (http://ws.apache.org/axis2/).
  You will have to do some work but better than developing something
  with low-level Java nuts-and-bolts.
 
  Ugh! I think Cristi's approach of a bookmarkable page is far simpler
  than messing with SOAP stacks.
 
  jk
 
  -
  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: Communication between applications, one using wicket

2009-04-09 Thread David Brown
Hello Cristi, it sounds like you mean polling. When I glued the two disparate 
systems together the Axis2 .aar file was just connected to an Oracle socket. 
The socket was in permissive mode so whenever the data appeared at the socket 
it was immediately available to the Axis2 listener and all the XML just went 
over the wire immediately because of some database trigger or other event on 
the DB side. The Axis2 .aar validated everything and acted accordingly to 
forward the communication to the .asp page. Just an idea. ;-)

There are 10 kinds of people in this world: those who understand binary and 
those who don’t (Valid only for 2's complement).

- Original Message -
From: Cristi Manole cristiman...@gmail.com
To: users@wicket.apache.org
Sent: Thursday, April 9, 2009 8:14:43 AM GMT -06:00 US/Canada Central
Subject: Re: Communication between applications, one using wicket

Thanks for your feedback, guys. I don't like the idea of both writing to the
database directly, because I want the layers separated. I don't think either
application should know anything about the other's database.

I used Axis2 before, but at the moment i don't see how it can solve my
problem - meaning how to update some panel *without* doing some action
repeatedly until something worth displaying to the user happens.

On Thu, Apr 9, 2009 at 4:00 PM, James Carman
jcar...@carmanconsulting.comwrote:

 Or, just write to the database, since the wicket application polls the
 db for changes anyway.

 On Thu, Apr 9, 2009 at 8:59 AM, John Krasnay j...@krasnay.ca wrote:
  On Thu, Apr 09, 2009 at 07:48:10AM -0500, David Brown wrote:
  Hello Cristi, this is typically referred to as diparate sytems
  communications issue. In the past I have had some success between such
  sytems using a WSDL and messaging. I did not have a lot of time so I
  opted for the Apache Axis2 framework (http://ws.apache.org/axis2/).
  You will have to do some work but better than developing something
  with low-level Java nuts-and-bolts.
 
  Ugh! I think Cristi's approach of a bookmarkable page is far simpler
  than messing with SOAP stacks.
 
  jk
 
  -
  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: Communication between applications, one using wicket

2009-04-09 Thread John Krasnay
On Thu, Apr 09, 2009 at 04:14:43PM +0300, Cristi Manole wrote:
 
 I used Axis2 before, but at the moment i don't see how it can solve my
 problem - meaning how to update some panel *without* doing some action
 repeatedly until something worth displaying to the user happens.
 

I don't think anyone has a problem with the polling part of your
solution. Unless your users absolutely can't wait for the polling
interval to find out when the task completes then this is by far the
simplest approach.

Otherwise, you're into some sort of comet solution, where you keep an
HTTP channel open to your server and a thread waiting at the other end
to be woken up and reply the second the task is completed.

jk

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



Re: Communication between applications, one using wicket

2009-04-09 Thread James Carman
On Thu, Apr 9, 2009 at 9:14 AM, Cristi Manole cristiman...@gmail.com wrote:
 Thanks for your feedback, guys. I don't like the idea of both writing to the
 database directly, because I want the layers separated. I don't think either
 application should know anything about the other's database.


Ok, if these are truly two completely separate systems, I can see your
point on not having to have it write to the same db.  And, the
lowest-impact mechanism for the other application (we're
Wicket-centric here) would be to access some URL.  So, it sounds like
you've got it figured out. :)

 I used Axis2 before, but at the moment i don't see how it can solve my
 problem - meaning how to update some panel *without* doing some action
 repeatedly until something worth displaying to the user happens.


I think the simplest way to achieve what you're talking about is
polling, which is what you're doing by using the AJAX self-updating
stuff.  Just make sure your polling interval isn't too crazy.

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



How to manipulate an AjaxRequest

2009-04-09 Thread Frank Klein Koerkamp
Hi all,

i have an Ajax call and when an exception occurs, i want to display the 
exception in an ModalWindow.
But i also want to be able to delete everything(component, javascript) that is 
added or will be added to the AjaxRequestTarget.
So only modalwindow popup but state on page stays the same.

At this moment i'm able to let the window popup, but not yet to delete the 
other content that has been added to the AjaxRequestTarget.

Does anyone have any suggestions?

Kind regards,

Frank Klein Koerkamp



The information contained in this communication is confidential, intended 
solely for the use of the individual or entity to whom it is addressed and may 
be legally privileged and protected by professional secrecy. Access to this 
message by anyone else is unauthorized. If you are not the intended recipient, 
any disclosure, copying, or distribution of the message, or any action or 
omission taken by you in reliance on it is prohibited and may be unlawful. 
Please immediately contact the sender if you have received this message in 
error. This email does not constitute any commitment from Cordys Holding BV or 
any of its subsidiaries except when expressly agreed in a written agreement 
between the intended recipient and Cordys Holding BV or its subsidiaries. 
Cordys is neither liable for the proper and complete transmission of the 
information contained in this communication nor for any delay in its receipt. 
Cordys does not guarantee that the integrity of this communication has been 
maintained nor that the communication is free of viruses, interceptions or 
interference. If you are not the intended recipient of this communication 
please return the communication to the sender and delete and destroy all copies.


Re: How to manipulate an AjaxRequest

2009-04-09 Thread Martin Makundi
You could collect your components into a list or collection before
adding them into the Target..? Or does the error occur at render-time?

**
Martin

2009/4/9 Frank Klein Koerkamp fkleinkoerk...@educator.eu:
 Hi all,

 i have an Ajax call and when an exception occurs, i want to display the 
 exception in an ModalWindow.
 But i also want to be able to delete everything(component, javascript) that 
 is added or will be added to the AjaxRequestTarget.
 So only modalwindow popup but state on page stays the same.

 At this moment i'm able to let the window popup, but not yet to delete the 
 other content that has been added to the AjaxRequestTarget.

 Does anyone have any suggestions?

 Kind regards,

 Frank Klein Koerkamp


 
 The information contained in this communication is confidential, intended 
 solely for the use of the individual or entity to whom it is addressed and 
 may be legally privileged and protected by professional secrecy. Access to 
 this message by anyone else is unauthorized. If you are not the intended 
 recipient, any disclosure, copying, or distribution of the message, or any 
 action or omission taken by you in reliance on it is prohibited and may be 
 unlawful. Please immediately contact the sender if you have received this 
 message in error. This email does not constitute any commitment from Cordys 
 Holding BV or any of its subsidiaries except when expressly agreed in a 
 written agreement between the intended recipient and Cordys Holding BV or its 
 subsidiaries. Cordys is neither liable for the proper and complete 
 transmission of the information contained in this communication nor for any 
 delay in its receipt. Cordys does not guarantee that the integrity of this 
 communication has been maintained nor that the communication is free of 
 viruses, interceptions or interference. If you are not the intended recipient 
 of this communication please return the communication to the sender and 
 delete and destroy all copies.


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



RE: How to manipulate an AjaxRequest

2009-04-09 Thread Frank Klein Koerkamp
The exception may  occur when I try to delete a record in a table.
So I click on the delete link this triggers an event that will delete record 
from db.
After deletion I've to refresh an component on page, but if db gives error i 
don't want to do refresh anything.

Regards,

Frank

-Original Message-
From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com]
Sent: Thursday, April 09, 2009 3:45 PM
To: users@wicket.apache.org
Subject: Re: How to manipulate an AjaxRequest

You could collect your components into a list or collection before
adding them into the Target..? Or does the error occur at render-time?

**
Martin

2009/4/9 Frank Klein Koerkamp fkleinkoerk...@educator.eu:
 Hi all,

 i have an Ajax call and when an exception occurs, i want to display the 
 exception in an ModalWindow.
 But i also want to be able to delete everything(component, javascript) that 
 is added or will be added to the AjaxRequestTarget.
 So only modalwindow popup but state on page stays the same.

 At this moment i'm able to let the window popup, but not yet to delete the 
 other content that has been added to the AjaxRequestTarget.

 Does anyone have any suggestions?

 Kind regards,

 Frank Klein Koerkamp


 
 The information contained in this communication is confidential, intended 
 solely for the use of the individual or entity to whom it is addressed and 
 may be legally privileged and protected by professional secrecy. Access to 
 this message by anyone else is unauthorized. If you are not the intended 
 recipient, any disclosure, copying, or distribution of the message, or any 
 action or omission taken by you in reliance on it is prohibited and may be 
 unlawful. Please immediately contact the sender if you have received this 
 message in error. This email does not constitute any commitment from Cordys 
 Holding BV or any of its subsidiaries except when expressly agreed in a 
 written agreement between the intended recipient and Cordys Holding BV or its 
 subsidiaries. Cordys is neither liable for the proper and complete 
 transmission of the information contained in this communication nor for any 
 delay in its receipt. Cordys does not guarantee that the integrity of this 
 communication has been maintained nor that the communication is free of 
 viruses, interceptions or interference. If you are not the intended recipient 
 of this communication please return the communication to the sender and 
 delete and destroy all copies.


-
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 Noob: Long cannot be cast to java.lang.String

2009-04-09 Thread francisco treacy
Well, it was available 4 years ago :)


2009/4/9 David Brown dbr...@sexingtechnologies.com:
 Hello Johan, thanks! the static NumberValidator.RangeValidator(long minimum, 
 long maximum) worked! Wicket is great. I just wished Wicket was available 10 
 years ago! Regards, David.

 There are 10 kinds of people in this world: those who understand binary and 
 those who don’t (Valid only for 2's complement).

 - Original Message -
 From: Johan Compagner jcompag...@gmail.com
 To: users@wicket.apache.org
 Sent: Tuesday, April 7, 2009 7:08:16 PM GMT -06:00 US/Canada Central
 Subject: Re: Wicket Noob: Long cannot be cast to java.lang.String

 You seem to have a String validator on a number field. What do you
 want to test a range? Or max value of that long? Use a different
 validor

 On 08/04/2009, David Brown dbr...@sexingtechnologies.com wrote:
 Hello Wicket dev, gurus and mortals, I was successfully using Wicket to
 build the UI for my new web-app gig. I have studied the javadoc:
 org.apache.wicket.markup.html.form, org.apache.wicket.MarkupContainer and
 others until bleary-eyed. The web-page I am using will display correctly the
 values for Long and Integer in a HTML text input dialog but when I try to
 Save (write the value back to the DB) I get the following error condition. I
 can only work with String data and nothing else using the wicket ids. Please
 advise, David.

 **
 org.apache.wicket.WicketRuntimeException: Exception
 'java.lang.ClassCastException: java.lang.Long cannot be cast to
 java.lang.String' occurred during validation
 org.apache.wicket.validation.validator.StringValidator$MaximumLengthValidator
 on component 1:editform:weight     at
 org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1510)

 There are 10 kinds of people in this world: those who understand binary and
 those who don’t (Valid only for 2's complement).

 -
 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



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



Package all CSS and JS

2009-04-09 Thread Eduardo Nunes
Hi,

  Is there a way to tell wicket to package all referenced javascripts
together, the same for the css? If there isn't this solution yet, can
anyone tell me where should I look for to implement it?

Thanks,
Eduardo S. Nunes

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



Re: How to manipulate an AjaxRequest

2009-04-09 Thread Martin Makundi
From what I can see you could have:

ListComponent refreshThese = new LinkedListComponent();

you add your components to refreshThese.add(component); and if your db
update fails, just call refreshThese.clear()? Otherwise iterate
through all refreshThese components and
target.addComponent(refreshThese.get(itemIndex));

Could it work? Why not?

**
Martin

2009/4/9 Frank Klein Koerkamp fkleinkoerk...@educator.eu:
 The exception may  occur when I try to delete a record in a table.
 So I click on the delete link this triggers an event that will delete record 
 from db.
 After deletion I've to refresh an component on page, but if db gives error i 
 don't want to do refresh anything.

 Regards,

 Frank

 -Original Message-
 From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com]
 Sent: Thursday, April 09, 2009 3:45 PM
 To: users@wicket.apache.org
 Subject: Re: How to manipulate an AjaxRequest

 You could collect your components into a list or collection before
 adding them into the Target..? Or does the error occur at render-time?

 **
 Martin

 2009/4/9 Frank Klein Koerkamp fkleinkoerk...@educator.eu:
 Hi all,

 i have an Ajax call and when an exception occurs, i want to display the 
 exception in an ModalWindow.
 But i also want to be able to delete everything(component, javascript) that 
 is added or will be added to the AjaxRequestTarget.
 So only modalwindow popup but state on page stays the same.

 At this moment i'm able to let the window popup, but not yet to delete the 
 other content that has been added to the AjaxRequestTarget.

 Does anyone have any suggestions?

 Kind regards,

 Frank Klein Koerkamp


 
 The information contained in this communication is confidential, intended 
 solely for the use of the individual or entity to whom it is addressed and 
 may be legally privileged and protected by professional secrecy. Access to 
 this message by anyone else is unauthorized. If you are not the intended 
 recipient, any disclosure, copying, or distribution of the message, or any 
 action or omission taken by you in reliance on it is prohibited and may be 
 unlawful. Please immediately contact the sender if you have received this 
 message in error. This email does not constitute any commitment from Cordys 
 Holding BV or any of its subsidiaries except when expressly agreed in a 
 written agreement between the intended recipient and Cordys Holding BV or 
 its subsidiaries. Cordys is neither liable for the proper and complete 
 transmission of the information contained in this communication nor for any 
 delay in its receipt. Cordys does not guarantee that the integrity of this 
 communication has been maintained nor that the communication is free of 
 viruses, interceptions or interference. If you are not the intended 
 recipient of this communication please return the communication to the 
 sender and delete and destroy all copies.


 -
 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: How to manipulate an AjaxRequest

2009-04-09 Thread Frank Klein Koerkamp
It could work, but that's not what I want, because also after the exception is 
thrown components could be added to the target.
In that case I've to check on every add to target if an exception has occurred. 
I prefer to do this on one place.
But thanks for your suggestion.

Regards,

Frank


-Original Message-
From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com]
Sent: Thursday, April 09, 2009 4:34 PM
To: users@wicket.apache.org
Subject: Re: How to manipulate an AjaxRequest

From what I can see you could have:

ListComponent refreshThese = new LinkedListComponent();

you add your components to refreshThese.add(component); and if your db
update fails, just call refreshThese.clear()? Otherwise iterate
through all refreshThese components and
target.addComponent(refreshThese.get(itemIndex));

Could it work? Why not?

**
Martin

2009/4/9 Frank Klein Koerkamp fkleinkoerk...@educator.eu:
 The exception may  occur when I try to delete a record in a table.
 So I click on the delete link this triggers an event that will delete record 
 from db.
 After deletion I've to refresh an component on page, but if db gives error i 
 don't want to do refresh anything.

 Regards,

 Frank

 -Original Message-
 From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com]
 Sent: Thursday, April 09, 2009 3:45 PM
 To: users@wicket.apache.org
 Subject: Re: How to manipulate an AjaxRequest

 You could collect your components into a list or collection before
 adding them into the Target..? Or does the error occur at render-time?

 **
 Martin

 2009/4/9 Frank Klein Koerkamp fkleinkoerk...@educator.eu:
 Hi all,

 i have an Ajax call and when an exception occurs, i want to display the 
 exception in an ModalWindow.
 But i also want to be able to delete everything(component, javascript) that 
 is added or will be added to the AjaxRequestTarget.
 So only modalwindow popup but state on page stays the same.

 At this moment i'm able to let the window popup, but not yet to delete the 
 other content that has been added to the AjaxRequestTarget.

 Does anyone have any suggestions?

 Kind regards,

 Frank Klein Koerkamp


 
 The information contained in this communication is confidential, intended 
 solely for the use of the individual or entity to whom it is addressed and 
 may be legally privileged and protected by professional secrecy. Access to 
 this message by anyone else is unauthorized. If you are not the intended 
 recipient, any disclosure, copying, or distribution of the message, or any 
 action or omission taken by you in reliance on it is prohibited and may be 
 unlawful. Please immediately contact the sender if you have received this 
 message in error. This email does not constitute any commitment from Cordys 
 Holding BV or any of its subsidiaries except when expressly agreed in a 
 written agreement between the intended recipient and Cordys Holding BV or 
 its subsidiaries. Cordys is neither liable for the proper and complete 
 transmission of the information contained in this communication nor for any 
 delay in its receipt. Cordys does not guarantee that the integrity of this 
 communication has been maintained nor that the communication is free of 
 viruses, interceptions or interference. If you are not the intended 
 recipient of this communication please return the communication to the 
 sender and delete and destroy all copies.


 -
 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


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



Re: Package all CSS and JS

2009-04-09 Thread Craig Tataryn
On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes esnu...@gmail.com wrote:

 Hi,

  Is there a way to tell wicket to package all referenced javascripts
 together, the same for the css? If there isn't this solution yet, can
 anyone tell me where should I look for to implement it?


You can put your resources, like css and javascript, directly in your
packages either under src/main/java or src/main/resources and include them
through header inclusions using a ResourceReference

Craig.


 Thanks,
 Eduardo S. Nunes

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




-- 
Craig Tataryn
site: http://www.basementcoders.com/
podcast:http://feeds.feedburner.com/TheBasementCoders
irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
im: craiger...@hotmail.com, skype: craig.tataryn


Re: How to manipulate an AjaxRequest

2009-04-09 Thread Martin Makundi
 It could work, but that's not what I want, because also after the exception 
 is thrown components could be added to the target.
 In that case I've to check on every add to target if an exception has 
 occurred. I prefer to do this on one place.

Maybe your exception handling could deal with this?

Would you like to show your code in order for us to have a closer view
on your particular situation?

**
Martin



 -Original Message-

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



Re: Package all CSS and JS

2009-04-09 Thread Eduardo Nunes
I think that I didn't explain it right. What I want is that wicket
concatenate all included javascripts into one file. Something like
wicket:link
  link.. javascript1.js /
  link.. javascript2.js /
  link.. javascript3.js /
/wicket:link

Generate just one resource with javacript1.js, javacript2.js and
javacript3.js concatenated. The reason for that is to reduce the
number of requests. I have a project that includes almost 10
javascripts files and around 7 css files, it would be faster if the
browser has to download just 2 files, one for all javascript and
another one for css.

I can do it with a servlet or something like this, but I want a
solution that works inside wicket, that i don't have to change my
source code.

Probably wicket has a piece of source code responsible for the
wicket:head tag, If I could intercept it and get all included
javascripts, remove them from the generated html and include my own
resource with all javascripts concatenated, I would be happy hehehe

Please ask me if you don't understand, I have to improve my english :(

Thanks,
Eduardo S. Nunes

On Thu, Apr 9, 2009 at 11:42 AM, Craig Tataryn crai...@tataryn.net wrote:
 On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes esnu...@gmail.com wrote:

 Hi,

  Is there a way to tell wicket to package all referenced javascripts
 together, the same for the css? If there isn't this solution yet, can
 anyone tell me where should I look for to implement it?


 You can put your resources, like css and javascript, directly in your
 packages either under src/main/java or src/main/resources and include them
 through header inclusions using a ResourceReference

 Craig.


 Thanks,
 Eduardo S. Nunes

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




 --
 Craig Tataryn
 site: http://www.basementcoders.com/
 podcast:http://feeds.feedburner.com/TheBasementCoders
 irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
 im: craiger...@hotmail.com, skype: craig.tataryn


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



Re: Package all CSS and JS

2009-04-09 Thread Eduardo Nunes
link href=... / for the css
and
script language=javascript src=... / for the javascripts


On Thu, Apr 9, 2009 at 11:57 AM, Eduardo Nunes esnu...@gmail.com wrote:
 I think that I didn't explain it right. What I want is that wicket
 concatenate all included javascripts into one file. Something like
 wicket:link
  link.. javascript1.js /
  link.. javascript2.js /
  link.. javascript3.js /
 /wicket:link

 Generate just one resource with javacript1.js, javacript2.js and
 javacript3.js concatenated. The reason for that is to reduce the
 number of requests. I have a project that includes almost 10
 javascripts files and around 7 css files, it would be faster if the
 browser has to download just 2 files, one for all javascript and
 another one for css.

 I can do it with a servlet or something like this, but I want a
 solution that works inside wicket, that i don't have to change my
 source code.

 Probably wicket has a piece of source code responsible for the
 wicket:head tag, If I could intercept it and get all included
 javascripts, remove them from the generated html and include my own
 resource with all javascripts concatenated, I would be happy hehehe

 Please ask me if you don't understand, I have to improve my english :(

 Thanks,
 Eduardo S. Nunes

 On Thu, Apr 9, 2009 at 11:42 AM, Craig Tataryn crai...@tataryn.net wrote:
 On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes esnu...@gmail.com wrote:

 Hi,

  Is there a way to tell wicket to package all referenced javascripts
 together, the same for the css? If there isn't this solution yet, can
 anyone tell me where should I look for to implement it?


 You can put your resources, like css and javascript, directly in your
 packages either under src/main/java or src/main/resources and include them
 through header inclusions using a ResourceReference

 Craig.


 Thanks,
 Eduardo S. Nunes

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




 --
 Craig Tataryn
 site: http://www.basementcoders.com/
 podcast:http://feeds.feedburner.com/TheBasementCoders
 irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
 im: craiger...@hotmail.com, skype: craig.tataryn



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



Re: Turning off ModificationWatcher

2009-04-09 Thread Matt Welch

I have no intention of actually deploying it in development mode. 

I'm talking about the development sandbox provided by the Google App Engine
Java SDK.

Matt



Martijn Dashorst wrote:
 
 Never *EVER* deploy your application in development mode. Use
 deployment mode and turn those features you want on.
 
 Martijn
 
 On Thu, Apr 9, 2009 at 4:33 AM, Matthew Welch matt...@welchkin.net
 wrote:
 I'm experimenting with Wicket inside Google's new Java support for its
 App
 Engine. My simple apps run fine if the configuration is set to
 DEPLOYMENT,
 however in development mode, I get an exception related to
 ModificationWatcher. Looking at the exception I think this
 ModificationWatcher is being used as part of a new thread which is a
 no-no
 inside the App Engine sandbox. Is there way way to just disbable this
 modification watcher without putting the entire app in deployment mode?
 There are a number of items I like about development mode but this one
 glitch is preventing me from using it.

 Matt

 
 
 
 -- 
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.5 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Turning-off-ModificationWatcher-tp22963478p22973951.html
Sent from the Wicket - User 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: Turning off ModificationWatcher

2009-04-09 Thread Matt Welch

Thanks.

Matt


Ryan Crumley wrote:
 
 Matt,
 
 Add this to your WebApplication.init() method:
 
 getResourceSettings().setResourcePollFrequency(null);
 
 Ryan
 
 On Wed, Apr 8, 2009 at 9:33 PM, Matthew Welch matt...@welchkin.net
 wrote:
 I'm experimenting with Wicket inside Google's new Java support for its
 App
 Engine. My simple apps run fine if the configuration is set to
 DEPLOYMENT,
 however in development mode, I get an exception related to
 ModificationWatcher. Looking at the exception I think this
 ModificationWatcher is being used as part of a new thread which is a
 no-no
 inside the App Engine sandbox. Is there way way to just disbable this
 modification watcher without putting the entire app in deployment mode?
 There are a number of items I like about development mode but this one
 glitch is preventing me from using it.

 Matt

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

-- 
View this message in context: 
http://www.nabble.com/Turning-off-ModificationWatcher-tp22963478p22973975.html
Sent from the Wicket - User 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: Montable PDF creating page

2009-04-09 Thread Igor Vaynberg
why would you want a mounted page to create pdfs? servlets are so much
better at that.

that said you can do

getrequestcycle().setrequesttarget(new sometargetthatstreamspdfs());
throw new restartresponseexception();

-igor

On Thu, Apr 9, 2009 at 12:39 AM, Stefan Lindner lind...@visionet.de wrote:
 I need some trick to turn the response into a PDF stream. E. g. I have a
 Bookmarkable Page PdfPAge

        public class PdfPage extends WebPage {

                public PdfPage (final PageParameters parameters) {
                        // Respond with PDF content.
                }
        }


        Application.init() {
                mountBookmarkablePage(/PdfGenerator, PdfPage.class);

 Is it possible to let a WebPage create a pdfOutput? If I try to do the
 following

                Response r = getResponse();
                if (r instanceof WebResponse) {
                        WebResponse wr = (WebResponse)r;
                        wr.reset();
                        OutputStream os = wr.getOutputStream();
                        try {
                                os.write(/*PDFcontent*/);
                        } catch (Exception e) {
                                e.printStackTrace();
                        }
                }
        }

 I can see the Exception java.lang.IllegalStateException:
 getOutputStream() has already been called for this response

 The reason for this is: I did not find something like
 BookmarkableResource in wicket. It is no problem to have a
 DynaicResourceLink in a page but the displayes content is not
 bookmarkable. Any Ideas?

 -
 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: Turning off ModificationWatcher

2009-04-09 Thread Igor Vaynberg
it is much simpler and more efficient to set proper caching headers.
concatenating resources often does not work because different
components on different pages contribute different resources, so there
are a lot of variations of these huge files you may end up with and
would have to stream to the user over and over. yes, it would only be
one request per page, but it would be a huge one over and over as
opposed to being able to cache a lot of small resources and never
request them again.

-igor

On Thu, Apr 9, 2009 at 9:00 AM, Matt Welch matt...@welchkin.net wrote:

 Thanks.

 Matt


 Ryan Crumley wrote:

 Matt,

 Add this to your WebApplication.init() method:

 getResourceSettings().setResourcePollFrequency(null);

 Ryan

 On Wed, Apr 8, 2009 at 9:33 PM, Matthew Welch matt...@welchkin.net
 wrote:
 I'm experimenting with Wicket inside Google's new Java support for its
 App
 Engine. My simple apps run fine if the configuration is set to
 DEPLOYMENT,
 however in development mode, I get an exception related to
 ModificationWatcher. Looking at the exception I think this
 ModificationWatcher is being used as part of a new thread which is a
 no-no
 inside the App Engine sandbox. Is there way way to just disbable this
 modification watcher without putting the entire app in deployment mode?
 There are a number of items I like about development mode but this one
 glitch is preventing me from using it.

 Matt


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




 --
 View this message in context: 
 http://www.nabble.com/Turning-off-ModificationWatcher-tp22963478p22973975.html
 Sent from the Wicket - User 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: Can client cache pages effectively?

2009-04-09 Thread Jim Pinkham
A quick follow up in case anyone else was curious about how this is going:

I ended up using ehcache page cache filter for a simple page that just
displays 'current' items (calendar view of events) based on a db query.  No
forms (state) on this page so it works pretty well.  In my DAO that does
updates, I clear the cache.  Very simple, works great.  (Only catch I ran
into is that my menus change when I have a session and I'm logged in as
super-user, so I have to make sure I don't let that version of the page be
cached - I do that by adding 'super' page parameter so URL is different
and filter is set to only cache the 'normal' version.

So, that still leaves me with my main catalog page, which is primarily a
similar list of items, but it also has some active content (in particular, a
search form).

So my bright idea (tm)  (i.e. I'd love to hear critiques before I get too
far along with it) is the following:

Make a new page for just the data grid, with page parameters including the
search string and last-modified date (and super-user login because I get
some edit links and such with that).  Mount it and ehcache it, and override
setHeader so it becomes client cache-able.   Then, my outer catalog page
with the search form on it just uses an IFrame to display the grid data
(easy to keep track of last-modified globally).  Same clear method in DAO
dumps the cache whenever a change is made.

Also, I'd want to make a robot no-follow thing to avoid google trap on that
page.  Could this actually be a legitimate use of otherwise dodgy IFRAME ?

Sound like a good plan?

Thanks,
-- Jim.

On Fri, Mar 27, 2009 at 1:56 PM, Jim Pinkham pinkh...@gmail.com wrote:

 Jeremy,

 Thanks for your thoughtful reply - Scenario is exactly right.
 I played around with page headers to make the whole page cacheable, but ran
 into several problems - I have a search form, and there's an 'admin' login
 that enables edit links.  So it's really a stateful page, but I want to
 speed up the most common state.

 The bulk of the content is from an AjaxFallbackDefaultDataTable with
 sortable columns. I re-sorted a column with the Ajax Debug window open to
 measure it's data size - about 225000 chars.  My database search takes
 64ms.  Overall client repaint time is about 2 sec with browser on
 localhost.  I haven't found the right hook to measure total wicket response
 time yet, but it appears pretty quick - so that's why I thougth it made
 sense to focus on client caching.

 Before I give up entirely on this idea, I'm wondering if it might make
 sense to make the grid a public Resource, which I'm hoping the browser would
 treat like an image.  I can afford a separate db query to just get my
 max(lastModified), which might let me save the time to generate HTML, which
 looks as though it could be my bottleneck.  If this way is too hard, I'll
 give up, but it sounds do-able - what do you think?
 Thanks,
 -- Jim.


 On Thu, Mar 26, 2009 at 6:30 PM, Jeremy Thomerson 
 jer...@wickettraining.com wrote:

 How is this going to help you?  Scenario as I understand it:


   1. User requests homepage - pulls from site - with your etag in it
   2. User requests homepage again - calls site - your server does all of
   the loading of data - then you calculate / set etag
   3. Browser now knows that it is the same as before and does not have to
   pull the HTML down

 The user saves what is likely a very short time in the overall scheme of
 things - downloading the HTML.
 The user still has to sit through the process of you loading the data from
 the search / DB / etc. and generating HTML
 Your server saves no load - but a little bandwidth.

 I'd look at caching before it even gets to your server.  Otherwise your
 user
 will likely not see much benefit unless you are sending multiple MB of
 data
 back.  Sounds like premature optimization to me.

 --
 Jeremy Thomerson
 http://www.wickettraining.com



  On Thu, Mar 26, 2009 at 5:26 PM, Jim Pinkham pinkh...@gmail.com wrote:

  Thanks Jerry; I think that applies only to static pages.
 
  My next idea is to try overridding WebPage.setHeaders and just set the
 
  response.setHeader(Cache-Control, max-age=3600, must-revalidate);
 
  response.setHeader(ETag, 1);  // I'll use a checksum on the data
 coming
  back from my search (Even better would be a checksum on the rendered
 page
  data - any idea how to do that?)
  Initial test (above) seems promising...
 
  Thanks,
  -- Jim.
 
  On Thu, Mar 26, 2009 at 3:22 PM, Jeremy Thomerson 
  jer...@wickettraining.com
   wrote:
 
   Have you looked at a standard HTTP caching proxy like
   http://www.squid-cache.org/ ?
  
  
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
  
   On Thu, Mar 26, 2009 at 2:02 PM, Jim Pinkham pinkh...@gmail.com
 wrote:
  
Changing my search query to this got some better hits:
http://lmgtfy.com/?q=cacheability
So, allow me to refine my question based on that - has anyone tried
  some
   of
these approaches (see first 

Re: Communication between applications, one using wicket

2009-04-09 Thread Martin Grigorov
What about some kind of messaging (JMS, AMQP, ...) ?

It'd be blazing combined with Comet ;-)

El jue, 09-04-2009 a las 16:14 +0300, Cristi Manole escribió:
 Thanks for your feedback, guys. I don't like the idea of both writing to the
 database directly, because I want the layers separated. I don't think either
 application should know anything about the other's database.
 
 I used Axis2 before, but at the moment i don't see how it can solve my
 problem - meaning how to update some panel *without* doing some action
 repeatedly until something worth displaying to the user happens.
 
 On Thu, Apr 9, 2009 at 4:00 PM, James Carman
 jcar...@carmanconsulting.comwrote:
 
  Or, just write to the database, since the wicket application polls the
  db for changes anyway.
 
  On Thu, Apr 9, 2009 at 8:59 AM, John Krasnay j...@krasnay.ca wrote:
   On Thu, Apr 09, 2009 at 07:48:10AM -0500, David Brown wrote:
   Hello Cristi, this is typically referred to as diparate sytems
   communications issue. In the past I have had some success between such
   sytems using a WSDL and messaging. I did not have a lot of time so I
   opted for the Apache Axis2 framework (http://ws.apache.org/axis2/).
   You will have to do some work but better than developing something
   with low-level Java nuts-and-bolts.
  
   Ugh! I think Cristi's approach of a bookmarkable page is far simpler
   than messing with SOAP stacks.
  
   jk
  
   -
   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: Package all CSS and JS

2009-04-09 Thread Roman Zechner

Hi Eduardo!

I remember there was once a discussion here on the mailing list, I think 
part of that was


http://techblog.molindo.at/2008/08/wicket-interface-speed-up-merging-resources-for-fewer-http-requests.html

Roman


Eduardo Nunes wrote:

link href=... / for the css
and
script language=javascript src=... / for the javascripts


On Thu, Apr 9, 2009 at 11:57 AM, Eduardo Nunes esnu...@gmail.com wrote:
  

I think that I didn't explain it right. What I want is that wicket
concatenate all included javascripts into one file. Something like
wicket:link
 link.. javascript1.js /
 link.. javascript2.js /
 link.. javascript3.js /
/wicket:link

Generate just one resource with javacript1.js, javacript2.js and
javacript3.js concatenated. The reason for that is to reduce the
number of requests. I have a project that includes almost 10
javascripts files and around 7 css files, it would be faster if the
browser has to download just 2 files, one for all javascript and
another one for css.

I can do it with a servlet or something like this, but I want a
solution that works inside wicket, that i don't have to change my
source code.

Probably wicket has a piece of source code responsible for the
wicket:head tag, If I could intercept it and get all included
javascripts, remove them from the generated html and include my own
resource with all javascripts concatenated, I would be happy hehehe

Please ask me if you don't understand, I have to improve my english :(

Thanks,
Eduardo S. Nunes

On Thu, Apr 9, 2009 at 11:42 AM, Craig Tataryn crai...@tataryn.net wrote:


On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes esnu...@gmail.com wrote:

  

Hi,

 Is there a way to tell wicket to package all referenced javascripts
together, the same for the css? If there isn't this solution yet, can
anyone tell me where should I look for to implement it?



You can put your resources, like css and javascript, directly in your
packages either under src/main/java or src/main/resources and include them
through header inclusions using a ResourceReference

Craig.


  

Thanks,
Eduardo S. Nunes

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




--
Craig Tataryn
site: http://www.basementcoders.com/
podcast:http://feeds.feedburner.com/TheBasementCoders
irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
im: craiger...@hotmail.com, skype: craig.tataryn

  


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

  


--
Liland ...does IT better

Liland IT GmbH
Creative Master
email: roman.zech...@liland.at

office: +43 (0)463 220-111  | fax: +43 (0)463 220-288 http://www.Liland.at 



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



Re: Can client cache pages effectively?

2009-04-09 Thread Eduardo Nunes
Usually IFrame isn't a good idea, I think it's because of the
accessibility and search engines. At least that is what the major part
of the HTML coders talk about it. But I can't think in another way to
do it. just my 5c

On Thu, Apr 9, 2009 at 1:29 PM, Jim Pinkham pinkh...@gmail.com wrote:
 A quick follow up in case anyone else was curious about how this is going:

 I ended up using ehcache page cache filter for a simple page that just
 displays 'current' items (calendar view of events) based on a db query.  No
 forms (state) on this page so it works pretty well.  In my DAO that does
 updates, I clear the cache.  Very simple, works great.  (Only catch I ran
 into is that my menus change when I have a session and I'm logged in as
 super-user, so I have to make sure I don't let that version of the page be
 cached - I do that by adding 'super' page parameter so URL is different
 and filter is set to only cache the 'normal' version.

 So, that still leaves me with my main catalog page, which is primarily a
 similar list of items, but it also has some active content (in particular, a
 search form).

 So my bright idea (tm)  (i.e. I'd love to hear critiques before I get too
 far along with it) is the following:

 Make a new page for just the data grid, with page parameters including the
 search string and last-modified date (and super-user login because I get
 some edit links and such with that).  Mount it and ehcache it, and override
 setHeader so it becomes client cache-able.   Then, my outer catalog page
 with the search form on it just uses an IFrame to display the grid data
 (easy to keep track of last-modified globally).  Same clear method in DAO
 dumps the cache whenever a change is made.

 Also, I'd want to make a robot no-follow thing to avoid google trap on that
 page.  Could this actually be a legitimate use of otherwise dodgy IFRAME ?

 Sound like a good plan?

 Thanks,
 -- Jim.

 On Fri, Mar 27, 2009 at 1:56 PM, Jim Pinkham pinkh...@gmail.com wrote:

 Jeremy,

 Thanks for your thoughtful reply - Scenario is exactly right.
 I played around with page headers to make the whole page cacheable, but ran
 into several problems - I have a search form, and there's an 'admin' login
 that enables edit links.  So it's really a stateful page, but I want to
 speed up the most common state.

 The bulk of the content is from an AjaxFallbackDefaultDataTable with
 sortable columns. I re-sorted a column with the Ajax Debug window open to
 measure it's data size - about 225000 chars.  My database search takes
 64ms.  Overall client repaint time is about 2 sec with browser on
 localhost.  I haven't found the right hook to measure total wicket response
 time yet, but it appears pretty quick - so that's why I thougth it made
 sense to focus on client caching.

 Before I give up entirely on this idea, I'm wondering if it might make
 sense to make the grid a public Resource, which I'm hoping the browser would
 treat like an image.  I can afford a separate db query to just get my
 max(lastModified), which might let me save the time to generate HTML, which
 looks as though it could be my bottleneck.  If this way is too hard, I'll
 give up, but it sounds do-able - what do you think?
 Thanks,
 -- Jim.


 On Thu, Mar 26, 2009 at 6:30 PM, Jeremy Thomerson 
 jer...@wickettraining.com wrote:

 How is this going to help you?  Scenario as I understand it:


   1. User requests homepage - pulls from site - with your etag in it
   2. User requests homepage again - calls site - your server does all of
   the loading of data - then you calculate / set etag
   3. Browser now knows that it is the same as before and does not have to
   pull the HTML down

 The user saves what is likely a very short time in the overall scheme of
 things - downloading the HTML.
 The user still has to sit through the process of you loading the data from
 the search / DB / etc. and generating HTML
 Your server saves no load - but a little bandwidth.

 I'd look at caching before it even gets to your server.  Otherwise your
 user
 will likely not see much benefit unless you are sending multiple MB of
 data
 back.  Sounds like premature optimization to me.

 --
 Jeremy Thomerson
 http://www.wickettraining.com



  On Thu, Mar 26, 2009 at 5:26 PM, Jim Pinkham pinkh...@gmail.com wrote:

  Thanks Jerry; I think that applies only to static pages.
 
  My next idea is to try overridding WebPage.setHeaders and just set the
 
  response.setHeader(Cache-Control, max-age=3600, must-revalidate);
 
  response.setHeader(ETag, 1);  // I'll use a checksum on the data
 coming
  back from my search (Even better would be a checksum on the rendered
 page
  data - any idea how to do that?)
  Initial test (above) seems promising...
 
  Thanks,
  -- Jim.
 
  On Thu, Mar 26, 2009 at 3:22 PM, Jeremy Thomerson 
  jer...@wickettraining.com
   wrote:
 
   Have you looked at a standard HTTP caching proxy like
   http://www.squid-cache.org/ ?
  
  
   --
   Jeremy Thomerson
   

Re: Wicket Noob: Long cannot be cast to java.lang.String

2009-04-09 Thread david
I'm referring to the days of no JSP on AS400 boxes. The only option was to 
out.println() from a Servlet or some Serializable object a whole bunch of HTML 
and then do HTTP GET URL daisy-chain to another Servlet. ;-)


francisco treacy wrote ..
 Well, it was available 4 years ago :)


 2009/4/9 David Brown dbr...@sexingtechnologies.com:
  Hello Johan, thanks! the static NumberValidator.RangeValidator(long minimum,
 long maximum) worked! Wicket is great. I just wished Wicket was available 10 
 years
 ago! Regards, David.
 
  There are 10 kinds of people in this world: those who understand binary and 
  those
 who don’t (Valid only for 2's complement).
 
  - Original Message -
  From: Johan Compagner jcompag...@gmail.com
  To: users@wicket.apache.org
  Sent: Tuesday, April 7, 2009 7:08:16 PM GMT -06:00 US/Canada Central
  Subject: Re: Wicket Noob: Long cannot be cast to java.lang.String
 
  You seem to have a String validator on a number field. What do you
  want to test a range? Or max value of that long? Use a different
  validor
 
  On 08/04/2009, David Brown dbr...@sexingtechnologies.com wrote:
  Hello Wicket dev, gurus and mortals, I was successfully using Wicket to
  build the UI for my new web-app gig. I have studied the javadoc:
  org.apache.wicket.markup.html.form, org.apache.wicket.MarkupContainer and
  others until bleary-eyed. The web-page I am using will display correctly 
  the
  values for Long and Integer in a HTML text input dialog but when I try to
  Save (write the value back to the DB) I get the following error condition. 
  I
  can only work with String data and nothing else using the wicket ids. 
  Please
  advise, David.
 
  **
  org.apache.wicket.WicketRuntimeException: Exception
  'java.lang.ClassCastException: java.lang.Long cannot be cast to
  java.lang.String' occurred during validation
  org.apache.wicket.validation.validator.StringValidator$MaximumLengthValidator
  on component 1:editform:weight     at
  org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1510)
 
  There are 10 kinds of people in this world: those who understand binary and
  those who don’t (Valid only for 2's complement).
 
  -
  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
 
 

 -
 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: Package all CSS and JS

2009-04-09 Thread Alex Objelean

Take a look to web resource optimizer (wro4j) project, hosted on google code.
It's pretty easy to use:

http://code.google.com/p/wro4j/ wro4j 

Alex


Eduardo Nunes wrote:
 
 I think that I didn't explain it right. What I want is that wicket
 concatenate all included javascripts into one file. Something like
 wicket:link
   link.. javascript1.js /
   link.. javascript2.js /
   link.. javascript3.js /
 /wicket:link
 
 Generate just one resource with javacript1.js, javacript2.js and
 javacript3.js concatenated. The reason for that is to reduce the
 number of requests. I have a project that includes almost 10
 javascripts files and around 7 css files, it would be faster if the
 browser has to download just 2 files, one for all javascript and
 another one for css.
 
 I can do it with a servlet or something like this, but I want a
 solution that works inside wicket, that i don't have to change my
 source code.
 
 Probably wicket has a piece of source code responsible for the
 wicket:head tag, If I could intercept it and get all included
 javascripts, remove them from the generated html and include my own
 resource with all javascripts concatenated, I would be happy hehehe
 
 Please ask me if you don't understand, I have to improve my english :(
 
 Thanks,
 Eduardo S. Nunes
 
 On Thu, Apr 9, 2009 at 11:42 AM, Craig Tataryn crai...@tataryn.net
 wrote:
 On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes esnu...@gmail.com wrote:

 Hi,

  Is there a way to tell wicket to package all referenced javascripts
 together, the same for the css? If there isn't this solution yet, can
 anyone tell me where should I look for to implement it?


 You can put your resources, like css and javascript, directly in your
 packages either under src/main/java or src/main/resources and include
 them
 through header inclusions using a ResourceReference

 Craig.


 Thanks,
 Eduardo S. Nunes

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




 --
 Craig Tataryn
 site: http://www.basementcoders.com/
 podcast:http://feeds.feedburner.com/TheBasementCoders
 irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
 im: craiger...@hotmail.com, skype: craig.tataryn

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

-- 
View this message in context: 
http://www.nabble.com/Package-all-CSS-and-JS-tp22971703p22978723.html
Sent from the Wicket - User 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



flush after /head?

2009-04-09 Thread Ryan McKinley

Is there an easy way to flush after you send the /head tag?

http://developer.yahoo.com/performance/rules.html#flush

I don't know if this is premature optimization or just hoping for  
magic speed up from simple fixes... but it is worth a shot!


thanks
ryan





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



debugging a Wicket application running under Jetty-6.1 in Eclipse

2009-04-09 Thread Chenini, Mohamed
Hi,

 

This is about debugging a Wicket application running under Jetty-6.1 in
Eclipse.

 

I followed the steps shown at:
http://docs.codehaus.org/display/JETTY/Debugging+with+the+Maven+Jetty+Pl
ugin+inside+Eclipse

But I am getting this exception: 

 

java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher


Exception in thread main


Any help?


The steps I followed are:


Step 1
Go to the Run/External Tools/External Tools ... menu item on the Run
menu bar. Select Program and click the New button. On the Main
tab, fill in the Location: as the full path to your mvn executable.
C:\java\DEVTOOLS\MAIN\maven2\bin

 For the Working Directory: select the workspace that matches your
webapp. For Arguments: add jetty:run.

Move to the Environment tab and click the New button to add a new
variable named MAVEN_OPTS with the value:

-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y

If you supply suspend=n instead of suspend=y you can start immediately
without running the debugger and launch the debugger at anytime you
really wish to debug.

 

Step 2

Then, pull up the Run/Debug/Debug ... menu item and select Remote
Java Application and click the New button. Fill in the dialog by
selecting your webapp project for the Project: field, and ensure you
are using the same port number as you specified in the address= property
above.

Now all you need to do is to Run/External Tools and select the name of
the maven tool setup you created in step 1 to start the plugin and then
Run/Debug and select the name of the debug setup you setup in step2.

 

 

 

Thanks,

Mohamed


This email/fax message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution of this
email/fax is prohibited. If you are not the intended recipient, please
destroy all paper and electronic copies of the original message.


Re: debugging a Wicket application running under Jetty-6.1 in Eclipse

2009-04-09 Thread jcgarciam

I'll suggest to do it in the Wicket Way, you will have much more benefits.

If you made your project from the QuickStart, you will notice a 'Start'
class under your 'test' source.
that what it does is just start an embedded jetty pointing to your webapp
directory and mounting your application under / context.

so just right click on it and click Debug as - Java Application and 
you're done.

Even if you are working on  a multi-module maven project this will work,
just make sure your module are installed on your local repository, issuing
'mvn install' on the root project.

If you have question regarding the 'Start.java' class just let us know.

mchenini wrote:
 
 Hi,
 
  
 
 This is about debugging a Wicket application running under Jetty-6.1 in
 Eclipse.
 
  
 
 I followed the steps shown at:
 http://docs.codehaus.org/display/JETTY/Debugging+with+the+Maven+Jetty+Pl
 ugin+inside+Eclipse
 
 But I am getting this exception: 
 
  
 
 java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher
 
 
 Exception in thread main
 
 
 Any help?
 
 
 The steps I followed are:
 
 
 Step 1
 Go to the Run/External Tools/External Tools ... menu item on the Run
 menu bar. Select Program and click the New button. On the Main
 tab, fill in the Location: as the full path to your mvn executable.
 C:\java\DEVTOOLS\MAIN\maven2\bin
 
  For the Working Directory: select the workspace that matches your
 webapp. For Arguments: add jetty:run.
 
 Move to the Environment tab and click the New button to add a new
 variable named MAVEN_OPTS with the value:
 
 -Xdebug -Xnoagent -Djava.compiler=NONE
 -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y
 
 If you supply suspend=n instead of suspend=y you can start immediately
 without running the debugger and launch the debugger at anytime you
 really wish to debug.
 
  
 
 Step 2
 
 Then, pull up the Run/Debug/Debug ... menu item and select Remote
 Java Application and click the New button. Fill in the dialog by
 selecting your webapp project for the Project: field, and ensure you
 are using the same port number as you specified in the address= property
 above.
 
 Now all you need to do is to Run/External Tools and select the name of
 the maven tool setup you created in step 1 to start the plugin and then
 Run/Debug and select the name of the debug setup you setup in step2.
 
  
 
  
 
  
 
 Thanks,
 
 Mohamed
 
 
 This email/fax message is for the sole use of the intended
 recipient(s) and may contain confidential and privileged information.
 Any unauthorized review, use, disclosure or distribution of this
 email/fax is prohibited. If you are not the intended recipient, please
 destroy all paper and electronic copies of the original message.
 
 

-- 
View this message in context: 
http://www.nabble.com/debugging-a-Wicket-application-running-under-Jetty-6.1-in-Eclipse-tp22979929p22980041.html
Sent from the Wicket - User 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: Turning off ModificationWatcher

2009-04-09 Thread Sam Stainsby
On Thu, 09 Apr 2009 08:41:20 +0200, Martijn Dashorst wrote:

 Never *EVER* deploy your application in development mode. Use deployment
 mode and turn those features you want on.

Just curious - does something catastrophic happen? I'm running a testing 
demo for a client and haven't bothered turning off development mode (I 
assume it is on by default?). It runs fine.

Cheers,
Sam.


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



Re: Re: Turning off ModificationWatcher

2009-04-09 Thread nick
Thank you for your mail. I am presently on vacation and will return April 14th. 
 

If you need urgent assistance, please email supp...@bookingbooster.com. You can 
also reach our Support via Skype callto://premiersupport

Thank you

Best regards,

Nick Wheeler

Booking Booster.com 
t: +44 (0)1273 573851 
e: integrat...@bookingbooster.com 

a: The Brighton Forum 
95 Ditchling Road 
Brighton BN1 4ST 
East Sussex 
United Kingdom
Booking Booster is the smarter, easier and more elegant way to update agent 
websites. Save time, Boost Bookings with: http://www.bookingbooster.com





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



Re: Changing form validation depending on submit button.

2009-04-09 Thread Ian MacLarty
On Thu, Apr 9, 2009 at 8:20 PM, John Krasnay j...@krasnay.ca wrote:
 Have a look here:

 http://cwiki.apache.org/WICKET/conditional-validation.html


Thanks.  That's pretty much what I ended up doing.  It seemed a bit
kludgy to be doing validation in the onSubmit method.  It means I
can't put my error handling code in onError where it should be.  Not a
big deal though.

Cheers,
Ian.

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



Re: Turning off ModificationWatcher

2009-04-09 Thread Martin Voigt
Na, nothing catastrophic will happen, or else you won't be able to
development your app using development configuration...HOWEVER...the
performance of your app is likely to double when running in deployment
mode, some exceptions won't be visible to the user (i think
component-in-use-check and others), serialization checks won't slow
you down, that kind of stuff.

If you look at the WebApplication class, you will find lots of getters
like getRequestSettings(), getApplicationSettings() and so forth, from
what I know, development configuration is a defined set of these
configs which sorely focus on helping you while developing, but they
won't help you at all while running in production mode, cos they're
not optimized for that. On the other hand, deployment configuration is
a defined set of these configs which sorely help you getting
performance and be in production.

It's like running your app with logging on trace level when in
development...If your app is any good, it may be it won't harm you at
all (we had an app out in production running in development mode for
weeks), but your performance will suffer for sure.

bw,
Martin

2009/4/10 Sam Stainsby s...@sustainablesoftware.com.au:
 On Thu, 09 Apr 2009 08:41:20 +0200, Martijn Dashorst wrote:

 Never *EVER* deploy your application in development mode. Use deployment
 mode and turn those features you want on.

 Just curious - does something catastrophic happen? I'm running a testing
 demo for a client and haven't bothered turning off development mode (I
 assume it is on by default?). It runs fine.

 Cheers,
 Sam.


 -
 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



wicket:link behavior changed in 1.4r2

2009-04-09 Thread Mike Comb
Hi, I'm trying to upgrade several sites from 1.4m3 to 1.4r2 and have  
hit an issue with the AutoLinkResolver.  We have lots of html with  
linked images that look like this:


wicket:linka href=SomePage.htmlimg src=/some/full/path/ 
image.gif //a/wicket:link


This used to work fine, but with the last couple of releases (r1 and  
r2) clicking on the image directs the user to a blank page with the  
image on it rather than the intended page link through a javascript  
onclick action.  Ideally I'd like to turn off processing of img tags  
by the AutoLinkResolver and only have it process href's, but I can't  
figure out how to do that from the javadocs.  Can someone point me in  
the right direction?  Going back and setting each of these up as a  
BookmarkablePageLink is not an option, we need the auto linking  
behavior.


Thanks,
-Mike





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



Re: Turning off ModificationWatcher

2009-04-09 Thread Jonathan Locke


Oh, it's MUCH worse than even that. Every single component constructed by
your application will get a complete Java stack trace attached to it at the
point of construction. Not only does that seriously damage your performance,
but this stack trace also takes up space! This is why we warn you about not
deploying in development mode on startup.


Martin Voigt-2 wrote:
 
 Na, nothing catastrophic will happen, or else you won't be able to
 development your app using development configuration...HOWEVER...the
 performance of your app is likely to double when running in deployment
 mode, some exceptions won't be visible to the user (i think
 component-in-use-check and others), serialization checks won't slow
 you down, that kind of stuff.
 
 If you look at the WebApplication class, you will find lots of getters
 like getRequestSettings(), getApplicationSettings() and so forth, from
 what I know, development configuration is a defined set of these
 configs which sorely focus on helping you while developing, but they
 won't help you at all while running in production mode, cos they're
 not optimized for that. On the other hand, deployment configuration is
 a defined set of these configs which sorely help you getting
 performance and be in production.
 
 It's like running your app with logging on trace level when in
 development...If your app is any good, it may be it won't harm you at
 all (we had an app out in production running in development mode for
 weeks), but your performance will suffer for sure.
 
 bw,
 Martin
 
 2009/4/10 Sam Stainsby s...@sustainablesoftware.com.au:
 On Thu, 09 Apr 2009 08:41:20 +0200, Martijn Dashorst wrote:

 Never *EVER* deploy your application in development mode. Use deployment
 mode and turn those features you want on.

 Just curious - does something catastrophic happen? I'm running a testing
 demo for a client and haven't bothered turning off development mode (I
 assume it is on by default?). It runs fine.

 Cheers,
 Sam.


 -
 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
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Turning-off-ModificationWatcher-tp22963478p22981611.html
Sent from the Wicket - User 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: Turning off ModificationWatcher

2009-04-09 Thread Jonathan Locke


Oh, it's MUCH worse than even that. Every single component constructed by
your application will get a complete Java stack trace attached to it at the
point of construction. Not only does that seriously damage your performance,
but this stack trace also takes up space! This is why we warn you about not
deploying in development mode on startup.


Martin Voigt-2 wrote:
 
 Na, nothing catastrophic will happen, or else you won't be able to
 development your app using development configuration...HOWEVER...the
 performance of your app is likely to double when running in deployment
 mode, some exceptions won't be visible to the user (i think
 component-in-use-check and others), serialization checks won't slow
 you down, that kind of stuff.
 
 If you look at the WebApplication class, you will find lots of getters
 like getRequestSettings(), getApplicationSettings() and so forth, from
 what I know, development configuration is a defined set of these
 configs which sorely focus on helping you while developing, but they
 won't help you at all while running in production mode, cos they're
 not optimized for that. On the other hand, deployment configuration is
 a defined set of these configs which sorely help you getting
 performance and be in production.
 
 It's like running your app with logging on trace level when in
 development...If your app is any good, it may be it won't harm you at
 all (we had an app out in production running in development mode for
 weeks), but your performance will suffer for sure.
 
 bw,
 Martin
 
 2009/4/10 Sam Stainsby s...@sustainablesoftware.com.au:
 On Thu, 09 Apr 2009 08:41:20 +0200, Martijn Dashorst wrote:

 Never *EVER* deploy your application in development mode. Use deployment
 mode and turn those features you want on.

 Just curious - does something catastrophic happen? I'm running a testing
 demo for a client and haven't bothered turning off development mode (I
 assume it is on by default?). It runs fine.

 Cheers,
 Sam.


 -
 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
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Turning-off-ModificationWatcher-tp22963478p22981612.html
Sent from the Wicket - User 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: Changing form validation depending on submit button.

2009-04-09 Thread Igor Vaynberg
there is form#onvalidate()

-igor

On Thu, Apr 9, 2009 at 5:05 PM, Ian MacLarty ian.macla...@gmail.com wrote:
 On Thu, Apr 9, 2009 at 8:20 PM, John Krasnay j...@krasnay.ca wrote:
 Have a look here:

 http://cwiki.apache.org/WICKET/conditional-validation.html


 Thanks.  That's pretty much what I ended up doing.  It seemed a bit
 kludgy to be doing validation in the onSubmit method.  It means I
 can't put my error handling code in onError where it should be.  Not a
 big deal though.

 Cheers,
 Ian.

 -
 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: Turning off ModificationWatcher

2009-04-09 Thread Igor Vaynberg
i dont think that is on by default anymore. it made the app too slow
even for dev mode :)

-igor

On Thu, Apr 9, 2009 at 6:07 PM, Jonathan Locke jonathan.lo...@gmail.com wrote:


 Oh, it's MUCH worse than even that. Every single component constructed by
 your application will get a complete Java stack trace attached to it at the
 point of construction. Not only does that seriously damage your performance,
 but this stack trace also takes up space! This is why we warn you about not
 deploying in development mode on startup.


 Martin Voigt-2 wrote:

 Na, nothing catastrophic will happen, or else you won't be able to
 development your app using development configuration...HOWEVER...the
 performance of your app is likely to double when running in deployment
 mode, some exceptions won't be visible to the user (i think
 component-in-use-check and others), serialization checks won't slow
 you down, that kind of stuff.

 If you look at the WebApplication class, you will find lots of getters
 like getRequestSettings(), getApplicationSettings() and so forth, from
 what I know, development configuration is a defined set of these
 configs which sorely focus on helping you while developing, but they
 won't help you at all while running in production mode, cos they're
 not optimized for that. On the other hand, deployment configuration is
 a defined set of these configs which sorely help you getting
 performance and be in production.

 It's like running your app with logging on trace level when in
 development...If your app is any good, it may be it won't harm you at
 all (we had an app out in production running in development mode for
 weeks), but your performance will suffer for sure.

 bw,
 Martin

 2009/4/10 Sam Stainsby s...@sustainablesoftware.com.au:
 On Thu, 09 Apr 2009 08:41:20 +0200, Martijn Dashorst wrote:

 Never *EVER* deploy your application in development mode. Use deployment
 mode and turn those features you want on.

 Just curious - does something catastrophic happen? I'm running a testing
 demo for a client and haven't bothered turning off development mode (I
 assume it is on by default?). It runs fine.

 Cheers,
 Sam.


 -
 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




 --
 View this message in context: 
 http://www.nabble.com/Turning-off-ModificationWatcher-tp22963478p22981611.html
 Sent from the Wicket - User 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: GWT vs. Wicket?

2009-04-09 Thread Brill Pappin

There is no real easy way, but to do it :)

I find the hardest thing about Wicket, particularly when your first  
starting out, is discarding all the old ideas about how a webapp is  
built...
Having worked in the field for a long time, servlets, JSPs, Struts,  
etc. it took me a while to get over the old patterns of doing things  
and start thinking more wicket'y


I still have trouble with WIcket now and then because there *is* quite  
a lot of complexity when your doing something non-standard, however I  
usually find that the answer is the obvious one and trying something  
usually works... and when I think about it, i realize that the same  
non-standard thing i was doing would have taken just as much time in  
any other framework to sort out.


What I love wicket for in particular, is the very good separation  
between view and controller/model. no more crap logic in my HTML!

Yay.


Anyway, i'll continue to use both GWT and Wicket.

- Brill Pappin





On 8-Apr-09, at 9:24 PM, ying rss wrote:



I played with both GWT and wicket. I was drawn to wicket by several  
reviews

and I'm disappointed.
I use maven to build gwt and ext-js and GXT which works very well.
Compilation is slow but with tuning to specific browser, the call  
stack is

straight forward. It's my feeling that GWT is closer to core java than
wicket.
* I don't know much about javascript so I like the idea of language
separation in GWT. Not very much into wicket's way to blend everything
together.
* Appreciate the fact there are samples for wicket. But Wicket's
documentation and samples are not enough. There is a lot of pain to  
do a
little bit more advanced things in wicket for beginners and there  
are many
user requests in user email list. I never had so much trouble in my  
gwt
project. Maybe I haven't found a easy way out. Appreciate any  
suggestions.


--
View this message in context: 
http://www.nabble.com/GWT-vs.-Wicket--tp22950178p22962926.html
Sent from the Wicket - User 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: Package all CSS and JS

2009-04-09 Thread Brill Pappin

Funny, I was thinking that same thing...
in one quick app i was writing, I had ~20 header links!
I kept thinking that can't be good :)

although I have not done so yet, I think there must be a way to modify  
or create a resource loader that would generate a buffered version of  
css (for isntance) and change the request page to just load it.


Let us know if you tackle that one... I'd love to see the code.

- Brill Pappin





On 9-Apr-09, at 10:57 AM, Eduardo Nunes wrote:


I think that I didn't explain it right. What I want is that wicket
concatenate all included javascripts into one file. Something like
wicket:link
 link.. javascript1.js /
 link.. javascript2.js /
 link.. javascript3.js /
/wicket:link

Generate just one resource with javacript1.js, javacript2.js and
javacript3.js concatenated. The reason for that is to reduce the
number of requests. I have a project that includes almost 10
javascripts files and around 7 css files, it would be faster if the
browser has to download just 2 files, one for all javascript and
another one for css.

I can do it with a servlet or something like this, but I want a
solution that works inside wicket, that i don't have to change my
source code.

Probably wicket has a piece of source code responsible for the
wicket:head tag, If I could intercept it and get all included
javascripts, remove them from the generated html and include my own
resource with all javascripts concatenated, I would be happy hehehe

Please ask me if you don't understand, I have to improve my english :(

Thanks,
Eduardo S. Nunes

On Thu, Apr 9, 2009 at 11:42 AM, Craig Tataryn crai...@tataryn.net  
wrote:
On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes esnu...@gmail.com  
wrote:



Hi,

 Is there a way to tell wicket to package all referenced javascripts
together, the same for the css? If there isn't this solution yet,  
can

anyone tell me where should I look for to implement it?



You can put your resources, like css and javascript, directly in your
packages either under src/main/java or src/main/resources and  
include them

through header inclusions using a ResourceReference

Craig.



Thanks,
Eduardo S. Nunes

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





--
Craig Tataryn
site: http://www.basementcoders.com/
podcast:http://feeds.feedburner.com/TheBasementCoders
irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
im: craiger...@hotmail.com, skype: craig.tataryn



-
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: Package all CSS and JS

2009-04-09 Thread Brill Pappin

Oh nice... exactly what I was thinking... glad I don't have to write it!


- Brill Pappin





On 9-Apr-09, at 1:26 PM, Roman Zechner wrote:


Hi Eduardo!

I remember there was once a discussion here on the mailing list, I  
think part of that was


http://techblog.molindo.at/2008/08/wicket-interface-speed-up-merging-resources-for-fewer-http-requests.html

Roman


Eduardo Nunes wrote:

link href=... / for the css
and
script language=javascript src=... / for the javascripts


On Thu, Apr 9, 2009 at 11:57 AM, Eduardo Nunes esnu...@gmail.com  
wrote:



I think that I didn't explain it right. What I want is that wicket
concatenate all included javascripts into one file. Something like
wicket:link
link.. javascript1.js /
link.. javascript2.js /
link.. javascript3.js /
/wicket:link

Generate just one resource with javacript1.js, javacript2.js and
javacript3.js concatenated. The reason for that is to reduce the
number of requests. I have a project that includes almost 10
javascripts files and around 7 css files, it would be faster if the
browser has to download just 2 files, one for all javascript and
another one for css.

I can do it with a servlet or something like this, but I want a
solution that works inside wicket, that i don't have to change my
source code.

Probably wicket has a piece of source code responsible for the
wicket:head tag, If I could intercept it and get all included
javascripts, remove them from the generated html and include my own
resource with all javascripts concatenated, I would be happy hehehe

Please ask me if you don't understand, I have to improve my  
english :(


Thanks,
Eduardo S. Nunes

On Thu, Apr 9, 2009 at 11:42 AM, Craig Tataryn  
crai...@tataryn.net wrote:


On Thu, Apr 9, 2009 at 9:06 AM, Eduardo Nunes esnu...@gmail.com  
wrote:




Hi,

Is there a way to tell wicket to package all referenced  
javascripts
together, the same for the css? If there isn't this solution  
yet, can

anyone tell me where should I look for to implement it?


You can put your resources, like css and javascript, directly in  
your
packages either under src/main/java or src/main/resources and  
include them

through header inclusions using a ResourceReference

Craig.




Thanks,
Eduardo S. Nunes

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




--
Craig Tataryn
site: http://www.basementcoders.com/
podcast:http://feeds.feedburner.com/TheBasementCoders
irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
im: craiger...@hotmail.com, skype: craig.tataryn




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




--
Liland ...does IT better

Liland IT GmbH
Creative Master
email: roman.zech...@liland.at

office: +43 (0)463 220-111  | fax: +43 (0)463 220-288 http://www.Liland.at

-
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



how to control the required validations before the validation process is started

2009-04-09 Thread srinivas

Hi,

I need to control the required validations set on the components 
dynamically depending on the value of the other element (ex: selecting a 
radio button should trigger required field validation for some 
elements). For this I extended the components, and I m dynamically 
adding or removing the required validation even though the required 
validation was set in the constructor.


I tried calling the validations controlling method in the onValidate(), 
validate()... but before the control comes to my method, all the 
validations are happening.


Is there any method while will be called before the validation process 
is not yet started or just before the validations are checked, so that  
I can control the validations dynamically.


Thanks,
Srinivas


Get your world in your inbox!

Mail, widgets, documents, spreadsheets, organizer and much more with your 
Sifymail WIYI id!
Log on to http://www.sify.com

** DISCLAIMER **
Information contained and transmitted by this E-MAIL is proprietary to 
Sify Limited and is intended for use only by the individual or entity to 
which it is addressed, and may contain information that is privileged, 
confidential or exempt from disclosure under applicable law. If this is a 
forwarded message, the content of this E-MAIL may not have been sent with 
the authority of the Company. If you are not the intended recipient, an 
agent of the intended recipient or a  person responsible for delivering the 
information to the named recipient,  you are notified that any use, 
distribution, transmission, printing, copying or dissemination of this 
information in any way or in any manner is strictly prohibited. If you have 
received this communication in error, please delete this mail  notify us 
immediately at ad...@sifycorp.com


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