Re: How To Change Page Store Size in DiskPageStore?

2007-11-14 Thread Johan Compagner
Yes the pagestore knows which files it makes, but it is not the controller
of those files
because the only thing that controls if the file must be deleted or not is
the servlet container
with the session objects.

and as far as i know there is no api where i can ask which sessions are
still active.
So the only thing we could do is have a thread running that is waking up
every day once
and checks if there are files older then X. And that thread must be
configured by you
explicitly setting the timeout that you want to have.

johan




On Nov 14, 2007 12:04 AM, Chris Lintz [EMAIL PROTECTED] wrote:


 I think from previous threads there was discussion about something that
 you
 could do.  For instance, the Page store should know what cache files it is
 controlling.  By that logic alone it can deduce what it is no longer
 referencing and cleanup what was left form it.

 It seems silly to me to ask people to rely on graceful restarts or write
 your own cleanup script from a framework that created cache files.  It
 seems
 fairly standard to ask clean up what was yours.   I'd like to hear other
 input from average users.



 Johan Compagner wrote:
 
  as long as your server doesn't crash and isn't terminate by a kill -9
  no files are leaked..
 
  When that does happen then yes you have to clean it up.
  If you dont care about those files after a restart then in the script
 that
  starts your webcontainer
  you will just remove all the files in the work dir.
 
  I don't think wicket can do much about it.
 
  johan
 
 
  On Nov 13, 2007 10:41 PM, Chris Lintz [EMAIL PROTECTED]
  wrote:
 
 
  All,
  I have submitted a Jira on this topic.  I will leave it to the great
  minds
  to debate.  In any case, it appears restarting the container cannot
  notify
  the HttpSessionListeners that are bound to the page store files.  It
  would
  be nice if the framework can cleanup what I consider a leak of the
 cache
  files it created.  Otherwise folks like myself living in an high
 traffic
  site are forced to generate script look for old page store cache files.
 
  https://issues.apache.org/jira/browse/WICKET-1158
 
 
  Johan Compagner wrote:
  
  
And from top of my head there is no api to get all the current
  session
   id's
from
an instance when the instance does start up..
  
   But we could ditch ALL the directories it can find in the temp
   directory the page store uses when starting up, right?
  
  
   No we can't do that, If you as you should terminate your web
 container
   gracefully
   then the web container will save all the sessions to disk. Then if
 you
   restart it again
   all the sessions are loaded again. And yes the application works just
  as
   it was never
   restarted. But if we throw away all the page stores. Then we loose
 all
  the
   data
   of sessions that are currently active.
  
   The only thing i can think of is having some check that only deletes
   things
   that are not touched for X hours or days.
  
   johan
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13735298
  Sent from the Wicket - User mailing list archive at
  Nabble.com http://nabble.com/http://nabble.com/
  .
 
 
  -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13736689
  Sent from the Wicket - User mailing list archive at 
 Nabble.comhttp://nabble.com/
 .


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




Re: Doubleclicking on a refreshable Ajax button

2007-11-14 Thread Federico Fanton
On Tue, 13 Nov 2007 11:36:30 -0800
Eelco Hillenius [EMAIL PROTECTED] wrote:

 We're actually seeing similar stack traces occasionally. I wonder if
 there is something more generic we can do about this.

Keeping away from Javascript would be great :) Maybe simply adding a way to 
suppress the exception in such cases..? ^^; Could this lead to Very Bad Things?
Thanks for your help!


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



Re: framework dependencies

2007-11-14 Thread Johan Compagner
do you see that stacktrace when you render that particular page for the
first time?
or is it maybe that you see it when you render it for the second or more
time?
Maybe, this is just a guess, you don't detach something and are asking next
again on a next request
so you are holding on to an object over request

johan



On Nov 14, 2007 7:23 AM, Yevgeni Kovelman [EMAIL PROTECTED] wrote:

 Hello everyone,



 I have been using wicket 1.2.6 with Spring and hibernate for the past
 month
 or so.  Seems like a standard configuration.  So to summarize here is my
 configuration that used to work:



 1.   Wicket 1.2.6

 2.   Wicket-extensions 1.2.6

 3.   Wicket-spring 1.2.6

 4.   Spring 2.0.6

 5.   Hibernate 3



 This configuration used to work, today it stopped after I tried to rework
 the dependencies on my end.  I am getting errors such as below.

 I think this is dependency related, and I am not sure at this point what
 got
 screwed up.  Has anyone seen this?  Thanks



 java.sql.SQLException: Closed Resultset: next
 at
 oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
 at
 oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
 at
 oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:175)
 at
 org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java
 :16
 9)
 at org.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:83)
 at org.hibernate.impl.IteratorImpl.next(IteratorImpl.java:120)
 at

 wicket.extensions.markup.html.repeater.data.DataViewBase$ModelIterator.next
 (
 DataViewBase.java:129)
 at

 wicket.extensions.markup.html.repeater.pageable.AbstractPageableView$CappedI
 teratorAdapter.next(AbstractPageableView.java:386)
 at

 wicket.extensions.markup.html.repeater.refreshing.DefaultItemReuseStrategy$1
 .next(DefaultItemReuseStrategy.java:71)
 at
 wicket.extensions.markup.html.repeater.refreshing.RefreshingView.addItems
 (Re
 freshingView.java:191)
 at

 wicket.extensions.markup.html.repeater.refreshing.RefreshingView.internalOnA
 ttach(RefreshingView.java:117)
 at wicket.Component.internalAttach(Component.java:2572)






Re: required field in a form, help :)

2007-11-14 Thread Dipu Seminlal
setDefaultFormProcessing(false) on your cancel buttom

Regards
Dipu

On Nov 14, 2007 11:05 AM, raybristol [EMAIL PROTECTED] wrote:

 Hi, I have some inputs in a form, some are required field, they work fine
 when I press 'submit' button, however, I also include a cancel button, in
 which onclick event my code is like:

  add(new Button(cancel){
 public void onClick() {
 setResponsePage(new ActivityTypeList());
 }
 });


 But I think it's probably button 'cancel' has attribute type='submit' in
 html page, but I can't put reset, so I don't know what to do to avoid the
 validation when user press 'cancel' ?

 Many thanks,
 Ray
 --
 View this message in context: 
 http://www.nabble.com/required-field-in-a-form%2C-help-%3A%29-tf4804178.html#a13744215
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: required field in a form, help :)

2007-11-14 Thread Martijn Dashorst
Read the JavaDoc of Button:

 One other option you should know of is the 'defaultFormProcessing' property 
 of Button components.
 When you set this to false (default is true), all validation and formupdating 
 is bypassed and the
 onSubmit method of that button is called directly, and the onSubmit method of 
 the parent form is
 not called. A common use for this is to create a cancel button.

Or search the archives:

http://www.nabble.com/forum/Search.jtp?query=skip+form+validation+buttonlocal=yforum=13974

Martijn

On 11/14/07, raybristol [EMAIL PROTECTED] wrote:

 Hi, I have some inputs in a form, some are required field, they work fine
 when I press 'submit' button, however, I also include a cancel button, in
 which onclick event my code is like:

  add(new Button(cancel){
 public void onClick() {
 setResponsePage(new ActivityTypeList());
 }
 });


 But I think it's probably button 'cancel' has attribute type='submit' in
 html page, but I can't put reset, so I don't know what to do to avoid the
 validation when user press 'cancel' ?

 Many thanks,
 Ray
 --
 View this message in context: 
 http://www.nabble.com/required-field-in-a-form%2C-help-%3A%29-tf4804178.html#a13744215
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




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

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



Re: required field in a form, help :)

2007-11-14 Thread Martijn Dashorst
Or just use a Link (tm)

Martijn

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

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



working with JSP problem, thanks!

2007-11-14 Thread raybristol

Hi, my wicket pages need to be worked with some other jsp pages, and for some
reason I need two startup place so in xml conf files I got:

  servlet
servlet-nameAdminPagesApplication/servlet-name
   
servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
init-param
  param-nameapplicationClassName/param-name
 
param-valueapto.umbrella.wicketInterface.AdminPagesApplication/param-value
/init-param
  /servlet

  
  servlet-mapping
servlet-nameAdminPagesApplication/servlet-name
url-pattern/Admin/*/url-pattern
  /servlet-mapping


so I was try to put more something like:

  servlet
servlet-nameAdminPagesApplication/servlet-name
   
servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
init-param
  param-nameapplicationClassName/param-name
 
param-valueapto.umbrella.wicketInterface.AdminPagesApplication/param-value
 
param-valueapto.umbrella.wicketInterface.AdminPagesApplication2/param-value
/init-param
  /servlet

  
  servlet-mapping
servlet-nameAdminPagesApplication/servlet-name
url-pattern/Admin/*/url-pattern
servlet-nameAdminPagesApplication2/servlet-name
url-pattern/Admin2/*/url-pattern
  /servlet-mapping

But then it won't work, I think it probably something really simple to
change, sorry to bother again for those newbie questions!

Many thanks,
Ray
-- 
View this message in context: 
http://www.nabble.com/working-with-JSP-problem%2C-thanks%21-tf4804711.html#a13745657
Sent from the Wicket - User mailing list archive at Nabble.com.


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



ping2

2007-11-14 Thread ate
Please ignore this test message.

This is my 4th attempt to send a message to this list already since
yesterday of which so far none has come through.


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



Re: Keep inserted data on AjaxTabbedPanel tab switching.

2007-11-14 Thread lizz

Hi,
I tried implementing the submitLink but dont really understand what I do
wrong as I still loose the data.
Could you provide me with your code in the newlink metthod please...
I am new to web development so I might have forgotten some obvious stuff ...
Thanks :-)


Fabio Fioretti wrote:
 
 On 9/21/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 you have to override newlink on the tabbedpanel and return a submitlink
 instead
 
 Nice, this worked just fine!
 
 also, really, for situations like this it doesnt make sense to use a
 server-side panel. use client side tabs like what jquery provides instead
 -
 it works much better with forms.
 
 I agree, but this is not the case: I simplified the situation to frame
 the question more easily, but it's more complex in reality.
 
 
 Thanks a lot for your precious help,
 
 Fabio Fioretti - WindoM
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Keep-inserted-data-on-AjaxTabbedPanel-tab-switching.-tf4493055.html#a13745653
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: required field in a form, help :)

2007-11-14 Thread raybristol

Thansk very much, I finally use a Link instead, much better.





Martijn Dashorst wrote:
 
 Read the JavaDoc of Button:
 
 One other option you should know of is the 'defaultFormProcessing'
 property of Button components.
 When you set this to false (default is true), all validation and
 formupdating is bypassed and the
 onSubmit method of that button is called directly, and the onSubmit
 method of the parent form is
 not called. A common use for this is to create a cancel button.
 
 Or search the archives:
 
 http://www.nabble.com/forum/Search.jtp?query=skip+form+validation+buttonlocal=yforum=13974
 
 Martijn
 
 On 11/14/07, raybristol [EMAIL PROTECTED] wrote:

 Hi, I have some inputs in a form, some are required field, they work fine
 when I press 'submit' button, however, I also include a cancel button, in
 which onclick event my code is like:

  add(new Button(cancel){
 public void onClick() {
 setResponsePage(new ActivityTypeList());
 }
 });


 But I think it's probably button 'cancel' has attribute type='submit' in
 html page, but I can't put reset, so I don't know what to do to avoid the
 validation when user press 'cancel' ?

 Many thanks,
 Ray
 --
 View this message in context:
 http://www.nabble.com/required-field-in-a-form%2C-help-%3A%29-tf4804178.html#a13744215
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 
 -- 
 Buy Wicket in Action: http://manning.com/dashorst
 Apache Wicket 1.3.0-rc1 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/required-field-in-a-form%2C-help-%3A%29-tf4804178.html#a13745654
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Add fields Dynamically

2007-11-14 Thread Marco Aurélio Silva
Thank you all! It works!

On Nov 13, 2007 4:53 PM, Nick Heudecker [EMAIL PROTECTED] wrote:

 Yeah, either way, this is readily solvable with panels and some form of
 repeater.

 On Nov 13, 2007 1:51 PM, Scott Swank [EMAIL PROTECTED] wrote:

  You could create a panel with a question and its answers.  Then add
  such a panel repeatedly, perhaps with a ListView.
 
  - Scott
 
 
  On Nov 13, 2007 10:58 AM, Marco Aurélio Silva [EMAIL PROTECTED] wrote:
   Hi
  
   I need to add fields to a page dynamically. I neet do build something
  like a
   survey where the questions and answers are stored on the database, so
  they
   can be changed by the administrator  because this I can't create
 the
   HTML file with the fields  Is there a way to do this?
  
   Thank you
   Marco
  
 
 
 
  --
  Scott Swank
  reformed mathematician
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Nick Heudecker
 Professional Wicket Training  Consulting
 http://www.systemmobile.com

 Eventful - Intelligent Event Management
 http://www.eventfulhq.com



Usage of nested forms

2007-11-14 Thread Piller Sébastien

Hello,

I would like to nest several forms into another one. Each form has its 
own submit button, with some code related to it. They are all defined 
as panels, in theire own files.


When I put a form into its parent, then the nested form's onSubmit is 
no more used and only the parent's onSubmit is called.


Is there a  way to keep the original behavior of each form? I searched 
the wiki but didn't find anything useful.


Thank you for your help ;)

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



Re: working with JSP problem, thanks!

2007-11-14 Thread Dipu Seminlal
i think you should be doing this

servlet
servlet-nameAdminPagesApplication/servlet-name

servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
   init-param
param-nameapplicationClassName/param-name

param-valueapto.umbrella.wicketInterface.AdminPagesApplication/param-value
/init-param
/servlet

servlet
servlet-nameAdminPagesApplication2/servlet-name

servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
   init-param
param-nameapplicationClassName/param-name

param-valueapto.umbrella.wicketInterface.AdminPagesApplication2/param-value
/init-param
/servlet


 servlet-mapping
   servlet-nameAdminPagesApplication/servlet-name
   url-pattern/Admin/*/url-pattern
 /servlet-mapping

 servlet-mapping
servlet-nameAdminPagesApplication2/servlet-name
url-pattern/Admin2/*/url-pattern
 /servlet-mapping

-dipu

On Nov 14, 2007 12:23 PM, raybristol [EMAIL PROTECTED] wrote:

 Hi, my wicket pages need to be worked with some other jsp pages, and for some
 reason I need two startup place so in xml conf files I got:

   servlet
 servlet-nameAdminPagesApplication/servlet-name

 servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
 init-param
   param-nameapplicationClassName/param-name

 param-valueapto.umbrella.wicketInterface.AdminPagesApplication/param-value
 /init-param
   /servlet


   servlet-mapping
 servlet-nameAdminPagesApplication/servlet-name
 url-pattern/Admin/*/url-pattern
   /servlet-mapping


 so I was try to put more something like:

   servlet
 servlet-nameAdminPagesApplication/servlet-name

 servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
 init-param
   param-nameapplicationClassName/param-name

 param-valueapto.umbrella.wicketInterface.AdminPagesApplication/param-value

 param-valueapto.umbrella.wicketInterface.AdminPagesApplication2/param-value
 /init-param
   /servlet


   servlet-mapping
 servlet-nameAdminPagesApplication/servlet-name
 url-pattern/Admin/*/url-pattern
 servlet-nameAdminPagesApplication2/servlet-name
 url-pattern/Admin2/*/url-pattern
   /servlet-mapping

 But then it won't work, I think it probably something really simple to
 change, sorry to bother again for those newbie questions!

 Many thanks,
 Ray
 --
 View this message in context: 
 http://www.nabble.com/working-with-JSP-problem%2C-thanks%21-tf4804711.html#a13745657
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: ResourceStream

2007-11-14 Thread Andrew MacKenzie
Unfortunately it seems that in 1.2 getAssociatedMarkupStream is *final*.

And 'getMarkupStream()' only takes (MarkupContainer container, boolean
throwException).  I pressume the second parameter you listed was for cache
control?

MarkupCache does allow for me to clear the cache and such though.  I can
try doing that as soon as my page is rendered, but I'll still have the
narrow chance that two pages are rendering at the same time (multiplied by
lots of users over a long period this becomes quite likely).

I'm going to guess I'm out of luck in 1.2 then?

+++ Johan Compagner [wicket-users] [Wed, Nov 14, 2007 at 08:55:51AM +0100]:
 in 1.3 you can override some methods of your page that shouldn't me cached.
 don't know from top of my head what the 1.2 methods are but in 1.3:
 *
 
 public* MarkupStream getAssociatedMarkupStream(*final* 
 *boolean*throwException)
 (of the MarkupContainer)
 and then make the call:
 
 *
 
 return*getApplication().getMarkupSettings().getMarkupCache().getMarkupStream(
 *this*,*true*, throwException);
 that true should take care that it always is reloaded.
 
 On Nov 13, 2007 11:55 PM, Andrew MacKenzie [EMAIL PROTECTED] wrote:
 
  +++ Johan Compagner [wicket-users] [Tue, Nov 13, 2007 at 11:40:07PM
  +0100]:
   ahh wait your are not talking about Resource (the class and then the
   SharedResources) But you are talking about what the
  IResourceSteamLocator
   does return for Markup and other kind of (classpath) Resources?
  Yes, sorry for the confusion - I didn't realize there were so many things
  called Resource.
 
   Yes those are cached in 1.2 we didn't cache properties files yet, But
  the
   Localizer does now.
   but in 1.2 we already did have the MarkupCache. And that one polls your
   streams for the last modified time
   and if that is different it will clear the cache.
  
   but what do you cache (or don't you want to cache)? is it markup?
  Yes - I don't want the markup cached.  I'd like for Wicket to always try
  to
  fetch it new on every new request.
 
  I've found that I can tell wicket to poll very frequently via
  .setResourcePollFrequency, but this will only 'mitigate' my issue, not
  solve it.
 
 
  --
  // Andrew MacKenzie  |  http://www.edespot.com
  // GPG public key: http://www.edespot.com/~amackenz/public.key
   // If my theory of relativity is proven successful, Germany will claim
  //  me as a German and France will declare that I am a citizen of the
  //  world. Should my theory prove untrue, France will say that I am a
  //  German and Germany will declare that I am a Jew.
  // -- Albert Einstein
 

-- 
// Andrew MacKenzie  |  http://www.edespot.com
// GPG public key: http://www.edespot.com/~amackenz/public.key
// Perilous to all of us are the devices of an art deeper than we ourselves
// possess.
// -- Gandalf the Grey [J.R.R. Tolkien, Lord of the Rings]


pgpPpdUTbMBrl.pgp
Description: PGP signature


Re: working with JSP problem, thanks!

2007-11-14 Thread raybristol

Thanks, it was quite obvious sorry 




Dipu Seminlal wrote:
 
 i think you should be doing this
 
 servlet
   servlet-nameAdminPagesApplication/servlet-name
 
 servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
init-param
   param-nameapplicationClassName/param-name
   
 param-valueapto.umbrella.wicketInterface.AdminPagesApplication/param-value
   /init-param
 /servlet
 
 servlet
   servlet-nameAdminPagesApplication2/servlet-name
 
 servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
init-param
   param-nameapplicationClassName/param-name
   
 param-valueapto.umbrella.wicketInterface.AdminPagesApplication2/param-value
   /init-param
 /servlet
 
 
  servlet-mapping
servlet-nameAdminPagesApplication/servlet-name
url-pattern/Admin/*/url-pattern
  /servlet-mapping
 
  servlet-mapping
 servlet-nameAdminPagesApplication2/servlet-name
 url-pattern/Admin2/*/url-pattern
  /servlet-mapping
 
 -dipu
 
 On Nov 14, 2007 12:23 PM, raybristol [EMAIL PROTECTED] wrote:

 Hi, my wicket pages need to be worked with some other jsp pages, and for
 some
 reason I need two startup place so in xml conf files I got:

   servlet
 servlet-nameAdminPagesApplication/servlet-name

 servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
 init-param
   param-nameapplicationClassName/param-name

 param-valueapto.umbrella.wicketInterface.AdminPagesApplication/param-value
 /init-param
   /servlet


   servlet-mapping
 servlet-nameAdminPagesApplication/servlet-name
 url-pattern/Admin/*/url-pattern
   /servlet-mapping


 so I was try to put more something like:

   servlet
 servlet-nameAdminPagesApplication/servlet-name

 servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
 init-param
   param-nameapplicationClassName/param-name

 param-valueapto.umbrella.wicketInterface.AdminPagesApplication/param-value

 param-valueapto.umbrella.wicketInterface.AdminPagesApplication2/param-value
 /init-param
   /servlet


   servlet-mapping
 servlet-nameAdminPagesApplication/servlet-name
 url-pattern/Admin/*/url-pattern
 servlet-nameAdminPagesApplication2/servlet-name
 url-pattern/Admin2/*/url-pattern
   /servlet-mapping

 But then it won't work, I think it probably something really simple to
 change, sorry to bother again for those newbie questions!

 Many thanks,
 Ray
 --
 View this message in context:
 http://www.nabble.com/working-with-JSP-problem%2C-thanks%21-tf4804711.html#a13745657
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
:blush:
-- 
View this message in context: 
http://www.nabble.com/working-with-JSP-problem%2C-thanks%21-tf4804711.html#a13746468
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: ping2

2007-11-14 Thread ate
 I don't see anything coming by in moderation, so not sure what's wrong...

(instead of replying only to Martijn sending this also to the list, stupid
webmail client...)

I suspect the wired internet connection at the hotel room here in Atlanta
(ApacheCon US 2007) might be interfering. I'll try to send out a message
later from the wireless network down at the Hackaton and see if that
works.
Right now it seems only webmail works :(

Ate


 Martijn

 On 11/14/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Please ignore this test message.

 This is my 4th attempt to send a message to this list already since
 yesterday of which so far none has come through.


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




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




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



Re: ping2

2007-11-14 Thread Johan Compagner
this attempt seems to work!

Why not use gmail? That works great, especially with lists

johan



On Nov 14, 2007 1:53 PM, [EMAIL PROTECTED] wrote:

 Please ignore this test message.

 This is my 4th attempt to send a message to this list already since
 yesterday of which so far none has come through.


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




Re: ping2

2007-11-14 Thread Martijn Dashorst
I only replied to you, I thought it would not benefit the community
too much, replying to a message that is intended to be ignored :)

But this seems to work though.

Martijn

On 11/14/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  I don't see anything coming by in moderation, so not sure what's wrong...

 (instead of replying only to Martijn sending this also to the list, stupid
 webmail client...)

 I suspect the wired internet connection at the hotel room here in Atlanta
 (ApacheCon US 2007) might be interfering. I'll try to send out a message
 later from the wireless network down at the Hackaton and see if that
 works.
 Right now it seems only webmail works :(

 Ate

 
  Martijn
 
  On 11/14/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  Please ignore this test message.
 
  This is my 4th attempt to send a message to this list already since
  yesterday of which so far none has come through.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  --
  Buy Wicket in Action: http://manning.com/dashorst
  Apache Wicket 1.3.0-rc1 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/
 



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




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

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



Re: ping2

2007-11-14 Thread Johan Compagner
we have to have a busy userlist anyway.. so this kind of mails do help! :)

On Nov 14, 2007 2:53 PM, Martijn Dashorst [EMAIL PROTECTED]
wrote:

 I only replied to you, I thought it would not benefit the community
 too much, replying to a message that is intended to be ignored :)

 But this seems to work though.

 Martijn

 On 11/14/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
   I don't see anything coming by in moderation, so not sure what's
 wrong...
 
  (instead of replying only to Martijn sending this also to the list,
 stupid
  webmail client...)
 
  I suspect the wired internet connection at the hotel room here in
 Atlanta
  (ApacheCon US 2007) might be interfering. I'll try to send out a message
  later from the wireless network down at the Hackaton and see if that
  works.
  Right now it seems only webmail works :(
 
  Ate
 
  
   Martijn
  
   On 11/14/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
   Please ignore this test message.
  
   This is my 4th attempt to send a message to this list already since
   yesterday of which so far none has come through.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
   --
   Buy Wicket in Action: http://manning.com/dashorst
   Apache Wicket 1.3.0-rc1 is released
   Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/
  
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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

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




Re: ping2

2007-11-14 Thread Ate Douma

Martijn Dashorst wrote:

I only replied to you, I thought it would not benefit the community
too much, replying to a message that is intended to be ignored :)

LOL, so my webmail client isn't dumb after all: what a discovery ;)

Hopefully this response will be last bit of this ignorable thread.
If this one comes through, I know its the hotel wired network blocking my mail 
but I can send through the wireless network provided by ApacheCon itself ...

Regards,

Ate



But this seems to work though.

Martijn

On 11/14/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

I don't see anything coming by in moderation, so not sure what's wrong...

(instead of replying only to Martijn sending this also to the list, stupid
webmail client...)

I suspect the wired internet connection at the hotel room here in Atlanta
(ApacheCon US 2007) might be interfering. I'll try to send out a message
later from the wireless network down at the Hackaton and see if that
works.
Right now it seems only webmail works :(

Ate


Martijn

On 11/14/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Please ignore this test message.

This is my 4th attempt to send a message to this list already since
yesterday of which so far none has come through.


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




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




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








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



Re: Keep inserted data on AjaxTabbedPanel tab switching.

2007-11-14 Thread Fabio Fioretti
Hi,
this is how I implemented it:

tabPanel = new AjaxTabbedPanel(tabs, tabs){
@Override
protected WebMarkupContainer newLink(String linkId, final int index) {
return new AjaxSubmitLink(linkId, candidateForm) {
private static final long serialVersionUID = 1L;

@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
setSelectedTab(index);
if (target != null) {
target.addComponent(tabPanel);
}
onAjaxUpdate(target);
}

@Override
protected void onError(AjaxRequestTarget target, Form form){
AjaxUtils.error(form);
}
};
}
};


Kindest regards,

Fabio Fioretti - WindoM


On Nov 14, 2007 1:18 PM, lizz [EMAIL PROTECTED] wrote:

 Hi,
 I tried implementing the submitLink but dont really understand what I do
 wrong as I still loose the data.
 Could you provide me with your code in the newlink metthod please...
 I am new to web development so I might have forgotten some obvious stuff ...
 Thanks :-)



 Fabio Fioretti wrote:
 
  On 9/21/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
  you have to override newlink on the tabbedpanel and return a submitlink
  instead
 
  Nice, this worked just fine!
 
  also, really, for situations like this it doesnt make sense to use a
  server-side panel. use client side tabs like what jquery provides instead
  -
  it works much better with forms.
 
  I agree, but this is not the case: I simplified the situation to frame
  the question more easily, but it's more complex in reality.
 
 
  Thanks a lot for your precious help,
 
  Fabio Fioretti - WindoM
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/Keep-inserted-data-on-AjaxTabbedPanel-tab-switching.-tf4493055.html#a13745653
 Sent from the Wicket - User mailing list archive at Nabble.com.



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



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



Re: Problem deploying the app as portlet in Jetspeed

2007-11-14 Thread Ate Douma

Hi Dipu,

I do need the possible errors from jetspeed.log and maybe catalina.out to help.
Without that, I really don't know what's going wrong and what has an 
initialization failure here.

Ate


Dipu Seminlal wrote:

Hi all,

I tried to deploy my application as portlet in jetspeed and it's
complaining about Initialization failure
I can't find anything useful in the logs
I am using Jetspeed 2.1.2 and my app is build against the wicket trunk.

I have given the following in my portlet.xml

init-param
nameServletContextProvider/name
valueorg.apache.jetspeed.portlet.ServletContextProviderImpl/value
/init-param
init-param
namePortletResourceURLFactory/name
valueorg.apache.jetspeed.portlet.PortletResourceURLFactoryImpl/value
/init-param

and the following in web.xml

servlet
servlet-nameJetspeedContainer/servlet-name
display-nameJetspeed Container/display-name
descriptionMVC Servlet for Jetspeed Portlet 
Applications/description

servlet-classorg.apache.jetspeed.container.JetspeedContainerServlet/servlet-class
init-param
  param-namecontextName/param-name
  param-valueFAB/param-value
/init-param
load-on-startup100/load-on-startup
  /servlet
  servlet-mapping
servlet-nameJetspeedContainer/servlet-name
url-pattern/container/*/url-pattern
  /servlet-mapping

has anyone seen this before ?

Regards
Dipu

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





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



Re: ResourceStream

2007-11-14 Thread Johan Compagner
the hack i can come up with when looking at the code is this:

override this method


call super
keep a reference to the MarkupResourceStream

and in detach call MarkupCache.removeMarkup with that reference.
But tis is really a hack because it should be removed from the cache much
earlier (it should never go in)
because if you have 2 the same request of different clients

But i think you should also really look why do you need it.
Markup that already has state of the session thats a bit weird. Cant you do
how it goes with everything
stateless markup but then the session inserts the info?

johan


On Nov 14, 2007 2:02 PM, Andrew MacKenzie [EMAIL PROTECTED] wrote:

 Unfortunately it seems that in 1.2 getAssociatedMarkupStream is *final*.

 And 'getMarkupStream()' only takes (MarkupContainer container, boolean
 throwException).  I pressume the second parameter you listed was for cache
 control?

 MarkupCache does allow for me to clear the cache and such though.  I can
 try doing that as soon as my page is rendered, but I'll still have the
 narrow chance that two pages are rendering at the same time (multiplied by
 lots of users over a long period this becomes quite likely).

 I'm going to guess I'm out of luck in 1.2 then?

 +++ Johan Compagner [wicket-users] [Wed, Nov 14, 2007 at 08:55:51AM
 +0100]:
   in 1.3 you can override some methods of your page that shouldn't me
 cached.
  don't know from top of my head what the 1.2 methods are but in 1.3:
  *
 
  public* MarkupStream getAssociatedMarkupStream(*final*
 *boolean*throwException)
  (of the MarkupContainer)
  and then make the call:
 
  *
 
 
 return*getApplication().getMarkupSettings().getMarkupCache().getMarkupStream(
  *this*,*true*, throwException);
  that true should take care that it always is reloaded.
 
  On Nov 13, 2007 11:55 PM, Andrew MacKenzie [EMAIL PROTECTED] wrote:
 
   +++ Johan Compagner [wicket-users] [Tue, Nov 13, 2007 at 11:40:07PM
   +0100]:
ahh wait your are not talking about Resource (the class and then the
SharedResources) But you are talking about what the
   IResourceSteamLocator
does return for Markup and other kind of (classpath) Resources?
   Yes, sorry for the confusion - I didn't realize there were so many
 things
   called Resource.
  
Yes those are cached in 1.2 we didn't cache properties files yet,
 But
   the
Localizer does now.
but in 1.2 we already did have the MarkupCache. And that one polls
 your
streams for the last modified time
and if that is different it will clear the cache.
   
but what do you cache (or don't you want to cache)? is it markup?
   Yes - I don't want the markup cached.  I'd like for Wicket to always
 try
   to
   fetch it new on every new request.
  
   I've found that I can tell wicket to poll very frequently via
   .setResourcePollFrequency, but this will only 'mitigate' my issue,
 not
   solve it.
  
  
   --
   // Andrew MacKenzie  |  http://www.edespot.com
   // GPG public key: http://www.edespot.com/~amackenz/public.key
// If my theory of relativity is proven successful, Germany will
 claim
   //  me as a German and France will declare that I am a citizen of the
   //  world. Should my theory prove untrue, France will say that I am a
   //  German and Germany will declare that I am a Jew.
   // -- Albert Einstein
  

 --
 // Andrew MacKenzie  |  http://www.edespot.com
 // GPG public key: http://www.edespot.com/~amackenz/public.key
 // Perilous to all of us are the devices of an art deeper than we
 ourselves
 // possess.
 // -- Gandalf the Grey [J.R.R. Tolkien, Lord of the
 Rings]



Re: Strange behavior with DropDownChoice and PropertyModel

2007-11-14 Thread Timo Rantalaiho
On Tue, 13 Nov 2007, Pills wrote:
 Well, I use this method to edit a record. The form is bound with the field
 formTarget. When called, it loads data in formTarget from the parameter. 
 
 If I don't call modelChanging/modelChanged, some components like
 DropDownChoices aren't properly inited, and they select old cached values. I
 don't know if it is a bug or if I wrote something wrong...

Ah, maybe your formTarget.set... should be a setModelObject() instead,
so that the framework would call those methods instead. 
Still I don't entirely get the point of the edit method; because
normally you just bind the objects to be edited to model (or
models) of the form and editing the form values in browser causes
them to update the properties of the objects.

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

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



RE: framework dependencies

2007-11-14 Thread Yevgeni Kovelman
The problem is that behavior changes when I switch underlying frameworks.
If I use Hibernate 3.0.5 things work the way they are , however if I use
Hibernate 3.1/3.2, the error below appears.  FYI, I am using the same code
that's in the wicket-phonebook example application(uses hibernate 3.0.5)

Gene

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 14, 2007 2:05 AM
To: users@wicket.apache.org
Subject: Re: framework dependencies

do you see that stacktrace when you render that particular page for the
first time?
or is it maybe that you see it when you render it for the second or more
time?
Maybe, this is just a guess, you don't detach something and are asking next
again on a next request
so you are holding on to an object over request

johan



On Nov 14, 2007 7:23 AM, Yevgeni Kovelman [EMAIL PROTECTED] wrote:

 Hello everyone,



 I have been using wicket 1.2.6 with Spring and hibernate for the past
 month
 or so.  Seems like a standard configuration.  So to summarize here is my
 configuration that used to work:



 1.   Wicket 1.2.6

 2.   Wicket-extensions 1.2.6

 3.   Wicket-spring 1.2.6

 4.   Spring 2.0.6

 5.   Hibernate 3



 This configuration used to work, today it stopped after I tried to rework
 the dependencies on my end.  I am getting errors such as below.

 I think this is dependency related, and I am not sure at this point what
 got
 screwed up.  Has anyone seen this?  Thanks



 java.sql.SQLException: Closed Resultset: next
 at
 oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
 at
 oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
 at
 oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:175)
 at
 org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java
 :16
 9)
 at org.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:83)
 at org.hibernate.impl.IteratorImpl.next(IteratorImpl.java:120)
 at


wicket.extensions.markup.html.repeater.data.DataViewBase$ModelIterator.next
 (
 DataViewBase.java:129)
 at


wicket.extensions.markup.html.repeater.pageable.AbstractPageableView$CappedI
 teratorAdapter.next(AbstractPageableView.java:386)
 at


wicket.extensions.markup.html.repeater.refreshing.DefaultItemReuseStrategy$1
 .next(DefaultItemReuseStrategy.java:71)
 at
 wicket.extensions.markup.html.repeater.refreshing.RefreshingView.addItems
 (Re
 freshingView.java:191)
 at


wicket.extensions.markup.html.repeater.refreshing.RefreshingView.internalOnA
 ttach(RefreshingView.java:117)
 at wicket.Component.internalAttach(Component.java:2572)






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



Wicket OSGi

2007-11-14 Thread Thies Edeling

Hello all,

Does anyone have any experience with using Wicket and OSGi? I'm looking 
for the most flexible way of composing an application and deploying 
Wicket pages/panels as OSGi bundles seems like a nice way.I noticed the 
Pax Wicket project but am not sure how stable that is.


regards,
Thies

--
http://www.ehour.nl/ 
http://blog.ehour.nl/




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



Re: Problem deploying the app as portlet in Jetspeed

2007-11-14 Thread Dipu Seminlal
Hi Ate,

Thanks for the response,  this was exactly my problem as well, there
is nothing useful in the logs.

I can't find jetspeed.log in the logs folder, catalina.out doesn't
have anything in it and there is no stack trace in my projects log
either.

Do i need anything special to get things logged to  jetspeed.log and
catalina.out.

regards
dipu




On Nov 14, 2007 2:33 PM, Ate Douma [EMAIL PROTECTED] wrote:
 Hi Dipu,

 I do need the possible errors from jetspeed.log and maybe catalina.out to 
 help.
 Without that, I really don't know what's going wrong and what has an 
 initialization failure here.

 Ate



 Dipu Seminlal wrote:
  Hi all,
 
  I tried to deploy my application as portlet in jetspeed and it's
  complaining about Initialization failure
  I can't find anything useful in the logs
  I am using Jetspeed 2.1.2 and my app is build against the wicket trunk.
 
  I have given the following in my portlet.xml
 
  init-param
nameServletContextProvider/name
valueorg.apache.jetspeed.portlet.ServletContextProviderImpl/value
  /init-param
  init-param
namePortletResourceURLFactory/name

  valueorg.apache.jetspeed.portlet.PortletResourceURLFactoryImpl/value
  /init-param
 
  and the following in web.xml
 
  servlet
servlet-nameJetspeedContainer/servlet-name
display-nameJetspeed Container/display-name
descriptionMVC Servlet for Jetspeed Portlet 
  Applications/description

  servlet-classorg.apache.jetspeed.container.JetspeedContainerServlet/servlet-class
init-param
  param-namecontextName/param-name
  param-valueFAB/param-value
/init-param
load-on-startup100/load-on-startup
  /servlet
  servlet-mapping
servlet-nameJetspeedContainer/servlet-name
url-pattern/container/*/url-pattern
/servlet-mapping
 
  has anyone seen this before ?
 
  Regards
  Dipu
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



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



How can I switch page direction (LTR-RTL)?

2007-11-14 Thread nlif

Hi all,

I would like to be able to set the page direction: right-to-left or
left-to-right.
This can be done via the browser's view - switch page direction
menu-option,
but I need to be able to set this dynamically (i.e. by the application),
based on the locale.
Is this supported in Wicket?


Thanks,
Naaman


-- 
View this message in context: 
http://www.nabble.com/How-can-I-switch-page-direction-%28LTR-RTL%29--tf4805391.html#a13747743
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Problem deploying the app as portlet in Jetspeed

2007-11-14 Thread Dipu Seminlal
sorry , i found where jetspeed.log is.
Its throwing a ClassCastException


javax.portlet.PortletException: Initialization failure
at 
org.apache.wicket.protocol.http.portlet.WicketPortlet.init(WicketPortlet.java:136)
at 
org.apache.jetspeed.factory.JetspeedPortletInstance.init(JetspeedPortletInstance.java:85)
at 
org.apache.jetspeed.factory.JetspeedPortletFactory.getPortletInstance(JetspeedPortletFactory.java:230)
at 
org.apache.jetspeed.container.invoker.ServletPortletInvoker.invoke(ServletPortletInvoker.java:208)
at 
org.apache.jetspeed.container.invoker.ServletPortletInvoker.render(ServletPortletInvoker.java:128)
at 
org.apache.pluto.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:119)
at 
org.apache.jetspeed.container.JetspeedPortletContainerWrapper.renderPortlet(JetspeedPortletContainerWrapper.java:121)
at 
org.apache.jetspeed.aggregator.impl.RenderingJobImpl.execute(RenderingJobImpl.java:242)
at 
org.apache.jetspeed.aggregator.impl.PortletRendererImpl.renderNow(PortletRendererImpl.java:226)
at 
org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.aggregateAndRender(PageAggregatorImpl.java:147)
at 
org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.aggregateAndRender(PageAggregatorImpl.java:143)
at 
org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.build(PageAggregatorImpl.java:78)
at 
org.apache.jetspeed.aggregator.AggregatorValve.invoke(AggregatorValve.java:46)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
at 
org.apache.jetspeed.aggregator.HeaderAggregatorValve.invoke(HeaderAggregatorValve.java:53)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
at 
org.apache.jetspeed.decoration.DecorationValve.invoke(DecorationValve.java:130)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
at 
org.apache.jetspeed.resource.ResourceValveImpl.invoke(ResourceValveImpl.java:130)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
at 
org.apache.jetspeed.pipeline.valve.impl.ActionValveImpl.invoke(ActionValveImpl.java:184)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
at 
org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:104)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
at 
org.apache.jetspeed.profiler.impl.ProfilerValveImpl.invoke(ProfilerValveImpl.java:248)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
at 
org.apache.jetspeed.security.impl.LoginValidationValveImpl.invoke(LoginValidationValveImpl.java:159)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
at 
org.apache.jetspeed.security.impl.PasswordCredentialValveImpl.invoke(PasswordCredentialValveImpl.java:150)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
at 
org.apache.jetspeed.localization.impl.LocalizationValveImpl.invoke(LocalizationValveImpl.java:170)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
at 
org.apache.jetspeed.security.impl.AbstractSecurityValve$1.run(AbstractSecurityValve.java:138)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:454)
at 
org.apache.jetspeed.security.JSSubject.doAsPrivileged(JSSubject.java:179)
at 
org.apache.jetspeed.security.impl.AbstractSecurityValve.invoke(AbstractSecurityValve.java:132)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
at 
org.apache.jetspeed.container.url.impl.PortalURLValveImpl.invoke(PortalURLValveImpl.java:66)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
at 
org.apache.jetspeed.capabilities.impl.CapabilityValveImpl.invoke(CapabilityValveImpl.java:126)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline.invoke(JetspeedPipeline.java:146)
at 
org.apache.jetspeed.engine.JetspeedEngine.service(JetspeedEngine.java:227)
at 
org.apache.jetspeed.engine.JetspeedServlet.doGet(JetspeedServlet.java:242)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 

Re: Doubleclicking on a refreshable Ajax button

2007-11-14 Thread jweekend

Can you try using something like setThrottleDelay(Duration.milliseconds(500))
to help eliminate the accidental, quick-fire second click?
Regards - Cemal
http://jWeekend.co.uk http://jWeekend.co.uk 



Federico Fanton wrote:
 
 Hi everyone!
 I'm having a problem with an ajax button and I'd like to ask for help X-)
 
 I have a DataTable with a Button, a text field and a label on every row.
 My objective is to be able to insert data into the text field, then click
 on the button and have an ajax call which 1) renders the label according
 to the input and 2) hides the button.
 Everything is fine as long as I press the button a single time, but if (by
 accident) I doubleclick, I get an exception like:
 
 WicketMessage: component
 frmDettaglio:dettaglio:tabella:rows:1:cells:1:cell:button not found on
 page it.ibc.moduli.movimenti.DettaglioMovimenti[id = 4], listener
 interface = [RequestListenerInterface name=IBehaviorListener,
 method=public abstract void
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
 
 Root cause:
 
 org.apache.wicket.WicketRuntimeException: component
 frmDettaglio:dettaglio:tabella:rows:1:cells:1:cell:button not found on
 page it.ibc.moduli.movimenti.DettaglioMovimenti[id = 4], listener
 interface = [RequestListenerInterface name=IBehaviorListener,
 method=public abstract void
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:394)
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:440)
 at
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1091)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
 at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
 at
 org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126)
 
 
 I think this is because there are two ajax calls, and since the first one
 alters the DOM (or maybe the serverside state - the button needs to be
 hidden) the second one can't find the new button anymore.. Is there a
 way to suppress one of the two calls?
 
 Many thanks for your attention!
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Doubleclicking-on-a-refreshable-Ajax-button-tf4799510.html#a13748726
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Problem in servlet configuration, migrating 1.2.6 to 1.3

2007-11-14 Thread dtoffe

Hi !

I've just finished changing the libraries and fixing the code, the
application is small and not even finished. Now it won't run, Tomcat gives
me this error:

HTTP 404 - Servlet MyApplication is not available

My working web.xml was:

servlet
servlet-nameMyApplication/servlet-name
servlet-classwicket.protocol.http.WicketServlet/servlet-class
init-param
param-nameapplicationClassName/param-name
param-valuecom.myapp.pages.MyApplication/param-value
/init-param
load-on-startup2/load-on-startup
/servlet
servlet-mapping
servlet-nameMyApplication/servlet-name
url-pattern/wicket/*/url-pattern
/servlet-mapping

Now I changed this to the new packages in 1.3:

   
servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class

I've seen in the wiki that now it's recommended to use Filters instead
of Servlets, but Servlet support is still ok. I've already tried with
variations in the url-pattern.

Any hints ??

Thanks,

Daniel

-- 
View this message in context: 
http://www.nabble.com/Problem-in-servlet-configuration%2C-migrating-1.2.6-to-1.3-tf4805722.html#a13748584
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Problem deploying the app as portlet in Jetspeed

2007-11-14 Thread Dipu Seminlal
sorry, my bad, found the reason why , i had a conflicting jar in the
class path. Initialization failure has gone now.
I am not there yet , i will ping with other problems. many thanks for
the patience.

cheers
dipu



On Nov 14, 2007 3:00 PM, Dipu Seminlal [EMAIL PROTECTED] wrote:
 sorry , i found where jetspeed.log is.
 Its throwing a ClassCastException


 javax.portlet.PortletException: Initialization failure
 at 
 org.apache.wicket.protocol.http.portlet.WicketPortlet.init(WicketPortlet.java:136)
 at 
 org.apache.jetspeed.factory.JetspeedPortletInstance.init(JetspeedPortletInstance.java:85)
 at 
 org.apache.jetspeed.factory.JetspeedPortletFactory.getPortletInstance(JetspeedPortletFactory.java:230)
 at 
 org.apache.jetspeed.container.invoker.ServletPortletInvoker.invoke(ServletPortletInvoker.java:208)
 at 
 org.apache.jetspeed.container.invoker.ServletPortletInvoker.render(ServletPortletInvoker.java:128)
 at 
 org.apache.pluto.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:119)
 at 
 org.apache.jetspeed.container.JetspeedPortletContainerWrapper.renderPortlet(JetspeedPortletContainerWrapper.java:121)
 at 
 org.apache.jetspeed.aggregator.impl.RenderingJobImpl.execute(RenderingJobImpl.java:242)
 at 
 org.apache.jetspeed.aggregator.impl.PortletRendererImpl.renderNow(PortletRendererImpl.java:226)
 at 
 org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.aggregateAndRender(PageAggregatorImpl.java:147)
 at 
 org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.aggregateAndRender(PageAggregatorImpl.java:143)
 at 
 org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.build(PageAggregatorImpl.java:78)
 at 
 org.apache.jetspeed.aggregator.AggregatorValve.invoke(AggregatorValve.java:46)
 at 
 org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
 at 
 org.apache.jetspeed.aggregator.HeaderAggregatorValve.invoke(HeaderAggregatorValve.java:53)
 at 
 org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
 at 
 org.apache.jetspeed.decoration.DecorationValve.invoke(DecorationValve.java:130)
 at 
 org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
 at 
 org.apache.jetspeed.resource.ResourceValveImpl.invoke(ResourceValveImpl.java:130)
 at 
 org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
 at 
 org.apache.jetspeed.pipeline.valve.impl.ActionValveImpl.invoke(ActionValveImpl.java:184)
 at 
 org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
 at 
 org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:104)
 at 
 org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
 at 
 org.apache.jetspeed.profiler.impl.ProfilerValveImpl.invoke(ProfilerValveImpl.java:248)
 at 
 org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
 at 
 org.apache.jetspeed.security.impl.LoginValidationValveImpl.invoke(LoginValidationValveImpl.java:159)
 at 
 org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
 at 
 org.apache.jetspeed.security.impl.PasswordCredentialValveImpl.invoke(PasswordCredentialValveImpl.java:150)
 at 
 org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
 at 
 org.apache.jetspeed.localization.impl.LocalizationValveImpl.invoke(LocalizationValveImpl.java:170)
 at 
 org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
 at 
 org.apache.jetspeed.security.impl.AbstractSecurityValve$1.run(AbstractSecurityValve.java:138)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.Subject.doAsPrivileged(Subject.java:454)
 at 
 org.apache.jetspeed.security.JSSubject.doAsPrivileged(JSSubject.java:179)
 at 
 org.apache.jetspeed.security.impl.AbstractSecurityValve.invoke(AbstractSecurityValve.java:132)
 at 
 org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
 at 
 org.apache.jetspeed.container.url.impl.PortalURLValveImpl.invoke(PortalURLValveImpl.java:66)
 at 
 org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
 at 
 org.apache.jetspeed.capabilities.impl.CapabilityValveImpl.invoke(CapabilityValveImpl.java:126)
 at 
 org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
 at 
 org.apache.jetspeed.pipeline.JetspeedPipeline.invoke(JetspeedPipeline.java:146)
 at 
 

Re: Wicket OSGi

2007-11-14 Thread Edgar Poce
Hi,

 I ran a helloworld application in osgi, the only problem I found was
a classloader issue, I had to use a custom IWebApplicationFactory. I
copy the code bellow.
 In order to make it work you have to register an OsgiWicketServlet
instance in the HttpService.

hope it helps,
Edgar


public class OsgiWebApplicationFactory implements IWebApplicationFactory {

private Class webApplication;

public OsgiWebApplicationFactory(Class webApplication) {
super();
this.webApplication = webApplication;
}

public WebApplication createApplication(WicketFilter filter) {
try {
return (WebApplication) 
this.webApplication.newInstance();
} catch (Exception e) {
throw new RuntimeException(unable to start 
application, e);
}
}

}

public class OsgiWicketFilter extends WicketFilter {

private Class webApplication;

public OsgiWicketFilter(Class webApplication) {
super();
this.webApplication = webApplication;
}

@Override
protected IWebApplicationFactory getApplicationFactory() {
return new OsgiWebApplicationFactory(this.webApplication);
}

}

public class OsgiWicketServlet extends WicketServlet {

private String name;

private Class webApplication;

public OsgiWicketServlet(Class webApplication) {
super();
this.webApplication = webApplication;
}

@Override
protected WicketFilter newWicketFilter() {
return new OsgiWicketFilter(this.webApplication);
}

/**
 * The servlet name can't contain * characters because Wicket uses the 
name
 * of the servlet to create a temporary folder.
 */
public String getServletName() {
if (name == null) {
synchronized (this) {
name = super.getServletName();
if (name.endsWith(*)) {
name = name.substring(0, name.length() 
- 1);
}
}
}
return name;
}

}

On Nov 14, 2007 11:46 AM, Thies Edeling [EMAIL PROTECTED] wrote:
 Hello all,

 Does anyone have any experience with using Wicket and OSGi? I'm looking
 for the most flexible way of composing an application and deploying
 Wicket pages/panels as OSGi bundles seems like a nice way.I noticed the
 Pax Wicket project but am not sure how stable that is.

 regards,
 Thies

 --
 http://www.ehour.nl/
 http://blog.ehour.nl/



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



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



Re: Wicket meetup (the netherlands) ideas

2007-11-14 Thread Niels van Kampenhout

Eelco Hillenius wrote:

This is your chance to do some practicing on presenting Johan! One
idea that comes in mind is to let Arje or someone else from Hippo talk
about how they plan to use Wicket (or are already doing so) and/ or
have a talk on why and how to use portlets with Wicket.


We can do a short informal talk on why and how we use Wicket to build 
our new CMS. I can do the why, and I'll try to persuade someone else 
to do the how ;-)


Since we are basically Wicket newbies this might turn into a rather 
Idols like assessment, but we are interested to know what others think 
of our approach so I guess that's all right :-)


Cheers

Niels



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



Re: Problem in servlet configuration, migrating 1.2.6 to 1.3

2007-11-14 Thread Johan Compagner
please try to get to the real exception.
I guess it is somehow a class loading problem
How to configure the servlet is not really changed if you want to use a
servlet in 1.3

On Nov 14, 2007 4:21 PM, dtoffe [EMAIL PROTECTED] wrote:


 Hi !

 I've just finished changing the libraries and fixing the code, the
 application is small and not even finished. Now it won't run, Tomcat gives
 me this error:

 HTTP 404 - Servlet MyApplication is not available

 My working web.xml was:

servlet
servlet-nameMyApplication/servlet-name
servlet-classwicket.protocol.http.WicketServlet/servlet-class
init-param
param-nameapplicationClassName/param-name
param-valuecom.myapp.pages.MyApplication/param-value
/init-param
load-on-startup2/load-on-startup
/servlet
servlet-mapping
servlet-nameMyApplication/servlet-name
url-pattern/wicket/*/url-pattern
/servlet-mapping

 Now I changed this to the new packages in 1.3:


 servlet-classorg.apache.wicket.protocol.http.WicketServlet
 /servlet-class

I've seen in the wiki that now it's recommended to use Filters instead
 of Servlets, but Servlet support is still ok. I've already tried with
 variations in the url-pattern.

 Any hints ??

 Thanks,

 Daniel

 --
 View this message in context:
 http://www.nabble.com/Problem-in-servlet-configuration%2C-migrating-1.2.6-to-1.3-tf4805722.html#a13748584
 Sent from the Wicket - User mailing list archive at 
 Nabble.comhttp://nabble.com/
 .


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




Re: Doubleclicking on a refreshable Ajax button

2007-11-14 Thread Federico Fanton
On Wed, 14 Nov 2007 07:22:52 -0800 (PST)
jweekend [EMAIL PROTECTED] wrote:

 Can you try using something like setThrottleDelay(Duration.milliseconds(500))
 to help eliminate the accidental, quick-fire second click?

I completely overlooked that X-) I'll try it, many thanks :)


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



Re: Doubleclicking on a refreshable Ajax button

2007-11-14 Thread Matej Knopp
Err. These exception shouldn't happen anymore with latest wicket.
Anyone who can reproduce this with latest wicket please file a jira
issue, preferred with quickstart. It's a bug.

Thanks.

-Matej

On Nov 14, 2007 4:22 PM, jweekend [EMAIL PROTECTED] wrote:

 Can you try using something like setThrottleDelay(Duration.milliseconds(500))
 to help eliminate the accidental, quick-fire second click?
 Regards - Cemal
 http://jWeekend.co.uk http://jWeekend.co.uk




 Federico Fanton wrote:
 
  Hi everyone!
  I'm having a problem with an ajax button and I'd like to ask for help X-)
 
  I have a DataTable with a Button, a text field and a label on every row.
  My objective is to be able to insert data into the text field, then click
  on the button and have an ajax call which 1) renders the label according
  to the input and 2) hides the button.
  Everything is fine as long as I press the button a single time, but if (by
  accident) I doubleclick, I get an exception like:
 
  WicketMessage: component
  frmDettaglio:dettaglio:tabella:rows:1:cells:1:cell:button not found on
  page it.ibc.moduli.movimenti.DettaglioMovimenti[id = 4], listener
  interface = [RequestListenerInterface name=IBehaviorListener,
  method=public abstract void
  org.apache.wicket.behavior.IBehaviorListener.onRequest()]
 
  Root cause:
 
  org.apache.wicket.WicketRuntimeException: component
  frmDettaglio:dettaglio:tabella:rows:1:cells:1:cell:button not found on
  page it.ibc.moduli.movimenti.DettaglioMovimenti[id = 4], listener
  interface = [RequestListenerInterface name=IBehaviorListener,
  method=public abstract void
  org.apache.wicket.behavior.IBehaviorListener.onRequest()]
  at
  org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:394)
  at
  org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:440)
  at
  org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1091)
  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
  at
  org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
  at
  org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126)
 
 
  I think this is because there are two ajax calls, and since the first one
  alters the DOM (or maybe the serverside state - the button needs to be
  hidden) the second one can't find the new button anymore.. Is there a
  way to suppress one of the two calls?
 
  Many thanks for your attention!
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/Doubleclicking-on-a-refreshable-Ajax-button-tf4799510.html#a13748726
 Sent from the Wicket - User mailing list archive at Nabble.com.



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



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



Re: Wicket OSGi

2007-11-14 Thread Ernesto Reinaldo Barreiro
We have gather some experience on using wicket and OSGi:  we have been 
using them together for almost a year now. Instead of going the PAX way 
we chose to tie ourselves to equinox implementation of OSGi and we use 
some eclipse extensions to avoid class loading problems (look for 
*Eclipse*-*RegisterBuddy* header on manifest files). We have encountered 
all kinds of class loading related problems (e.g. when you want to 
integrate Hibernate into the picture or deploying the applicition into a 
real application server) but after having dealt with all these 
problems  we are quite happy with the decision of going OSGi. 
Additionally, if you use eclipse 3.3. for development, it comes  with a 
plugin version  of Jetty that is quite handy for development...


AFAIK if you plan to deploy your application in a real application 
server  you will have to use equinox anyway because is the only 
implementation providing a Bridge servlet (that allows to start an OSGi 
runtime insede your application server). Here we have had class loading 
problems well as (in some application servers) you cannot simply do a 
JNDI lookup from withing a not WEB thread...


Best regards,

Ernesto

Thies Edeling wrote:

Hello all,

Does anyone have any experience with using Wicket and OSGi? I'm 
looking for the most flexible way of composing an application and 
deploying Wicket pages/panels as OSGi bundles seems like a nice way.I 
noticed the Pax Wicket project but am not sure how stable that is.


regards,
Thies





Re: Keep inserted data on AjaxTabbedPanel tab switching using a LoadableDetachableModel

2007-11-14 Thread lizz

Hi,
I tried this but since I use a LoadableDetachableModel it gets detatched and 
loaded every time I select a new tab. 
Therefore the new information is still lost...
Any idea on how to use a LoadableDetachableModel in this scenario?
(In the tabs i create a new panel every time the getPanel methos is called.
I guess this is the correct way to do it.)
Kind regards,
Elisabeth


Fabio Fioretti wrote:
 
 Hi,
 this is how I implemented it:
 
 tabPanel = new AjaxTabbedPanel(tabs, tabs){
 @Override
 protected WebMarkupContainer newLink(String linkId, final int index) {
 return new AjaxSubmitLink(linkId, candidateForm) {
 private static final long serialVersionUID = 1L;
 
 @Override
 protected void onSubmit(AjaxRequestTarget target, Form form) {
 setSelectedTab(index);
 if (target != null) {
 target.addComponent(tabPanel);
 }
 onAjaxUpdate(target);
 }
 
 @Override
 protected void onError(AjaxRequestTarget target, Form form){
 AjaxUtils.error(form);
 }
 };
 }
 };
 
 
 Kindest regards,
 
 Fabio Fioretti - WindoM
 
 
 On Nov 14, 2007 1:18 PM, lizz [EMAIL PROTECTED] wrote:

 Hi,
 I tried implementing the submitLink but dont really understand what I do
 wrong as I still loose the data.
 Could you provide me with your code in the newlink metthod please...
 I am new to web development so I might have forgotten some obvious stuff
 ...
 Thanks :-)



 Fabio Fioretti wrote:
 
  On 9/21/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
  you have to override newlink on the tabbedpanel and return a
 submitlink
  instead
 
  Nice, this worked just fine!
 
  also, really, for situations like this it doesnt make sense to use a
  server-side panel. use client side tabs like what jquery provides
 instead
  -
  it works much better with forms.
 
  I agree, but this is not the case: I simplified the situation to frame
  the question more easily, but it's more complex in reality.
 
 
  Thanks a lot for your precious help,
 
  Fabio Fioretti - WindoM
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Keep-inserted-data-on-AjaxTabbedPanel-tab-switching.-tf4493055.html#a13745653
 Sent from the Wicket - User mailing list archive at Nabble.com.



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


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

-- 
View this message in context: 
http://www.nabble.com/Keep-inserted-data-on-AjaxTabbedPanel-tab-switching.-tf4493055.html#a13749951
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket OSGi

2007-11-14 Thread Daniel Stoch
Hi,

We are using Wicket as the UI layer in our OSGi application platform
project. The registration of WicketServlet (or filter) is done in the
very similar way like the Edgar wrote (even we have the same class
names :)). And it is quite simple.
The main problem is with Spring (precisely with spring bean
injection). In OSGi each bundle has its own ApplicationContext
(AppCtxt) and ClassLoader, so the standard Wicket mechanism
(wicket-spring  wicket-spring-annot) does not work when you want to
use more than one bundle in your app.

Problems:
1. There is one AppCtxt inside application (eg. SpringWebApplication),
so when each bundle with your Wicket pages (panels, components, etc.)
has its own AppCtxt you cannot get beans or inject beans in it.
2. InjectorHolder holds only one AppCtxt (it is used when you using
injection outside components).

I have to extend these mechanisms to support multiple AppCtxt. I only
mention here that we have added a new interface to provide a proper
injector:

public interface InjectorProvider {
  ConfigurableInjector getInjector();
}

and instead of using default InjectorHolder we use a there similar
class ContextInjector, which is using InjectorProvider interface for
resolving current injector.
The simple implementation is (in apps outside OSGi - with only one AppCtxt):

public class DefaultInjectorProvider implements InjectorProvider {

  public ConfigurableInjector getInjector() {
return InjectorHolder.getInjector();
  }

}

But inside OSGi injectors are hold in context of bunldes' class
loaders. Maybe in the next versions of Wicket we should think about a
small refactorization to support multiple AppCtxt ;).

I'm looking for the most flexible way of composing an application and
deploying Wicket pages/panels as OSGi bundles seems like a nice way.

We don't use Pax. We have our own visual plugins' system based on
pages and panels and we can use them to compose a pages or another
plugins. Plugins can be delivered in different bundles. But it is a
long story ;).

Best regards,
Daniel

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



Re: Wicket OSGi

2007-11-14 Thread Serge Libotte
Hi Ernesto,

You tell about some problems you met but could you summarize the benefits
you had by adopting OSGI?

Thanks,

Serge.


2007/11/14, Ernesto Reinaldo Barreiro [EMAIL PROTECTED]:

 We have gather some experience on using wicket and OSGi:  we have been
 using them together for almost a year now. Instead of going the PAX way
 we chose to tie ourselves to equinox implementation of OSGi and we use
 some eclipse extensions to avoid class loading problems (look for
 *Eclipse*-*RegisterBuddy* header on manifest files). We have encountered
 all kinds of class loading related problems (e.g. when you want to
 integrate Hibernate into the picture or deploying the applicition into a
 real application server) but after having dealt with all these
 problems  we are quite happy with the decision of going OSGi.
 Additionally, if you use eclipse 3.3. for development, it comes  with a
 plugin version  of Jetty that is quite handy for development...

 AFAIK if you plan to deploy your application in a real application
 server  you will have to use equinox anyway because is the only
 implementation providing a Bridge servlet (that allows to start an OSGi
 runtime insede your application server). Here we have had class loading
 problems well as (in some application servers) you cannot simply do a
 JNDI lookup from withing a not WEB thread...

 Best regards,

 Ernesto

 Thies Edeling wrote:
  Hello all,
 
  Does anyone have any experience with using Wicket and OSGi? I'm
  looking for the most flexible way of composing an application and
  deploying Wicket pages/panels as OSGi bundles seems like a nice way.I
  noticed the Pax Wicket project but am not sure how stable that is.
 
  regards,
  Thies
 




Re: How To Change Page Store Size in DiskPageStore?

2007-11-14 Thread Johan Compagner
can you get the current process id by general api in java? have to
look at Runtime then.

On 11/14/07, Chris Lintz [EMAIL PROTECTED] wrote:

 That makes sense.  Another thought that possibly makes it a bit easier is to
 name the page store directories with a unique process identifier. For
 example, if my session ID is B31598D4B206B75161AFE08FB5610D54.n1 and the
 process ID is 123456, then the Page store directory would be:

MyWebSite-filestore/123456/B31598D4B206B75161AFE08FB5610D54.n1

 With a structure like that it would be easy for a thread to remove the Page
 store directories that do not have the current process ID.

 Just a thought.





 Johan Compagner wrote:
 
  Yes the pagestore knows which files it makes, but it is not the controller
  of those files
  because the only thing that controls if the file must be deleted or not is
  the servlet container
  with the session objects.
 
  and as far as i know there is no api where i can ask which sessions are
  still active.
  So the only thing we could do is have a thread running that is waking up
  every day once
  and checks if there are files older then X. And that thread must be
  configured by you
  explicitly setting the timeout that you want to have.
 
  johan
 
 
 
 
  On Nov 14, 2007 12:04 AM, Chris Lintz [EMAIL PROTECTED]
  wrote:
 
 
  I think from previous threads there was discussion about something that
  you
  could do.  For instance, the Page store should know what cache files it
  is
  controlling.  By that logic alone it can deduce what it is no longer
  referencing and cleanup what was left form it.
 
  It seems silly to me to ask people to rely on graceful restarts or write
  your own cleanup script from a framework that created cache files.  It
  seems
  fairly standard to ask clean up what was yours.   I'd like to hear
  other
  input from average users.
 
 
 
  Johan Compagner wrote:
  
   as long as your server doesn't crash and isn't terminate by a kill -9
   no files are leaked..
  
   When that does happen then yes you have to clean it up.
   If you dont care about those files after a restart then in the script
  that
   starts your webcontainer
   you will just remove all the files in the work dir.
  
   I don't think wicket can do much about it.
  
   johan
  
  
   On Nov 13, 2007 10:41 PM, Chris Lintz [EMAIL PROTECTED]
   wrote:
  
  
   All,
   I have submitted a Jira on this topic.  I will leave it to the great
   minds
   to debate.  In any case, it appears restarting the container cannot
   notify
   the HttpSessionListeners that are bound to the page store files.  It
   would
   be nice if the framework can cleanup what I consider a leak of the
  cache
   files it created.  Otherwise folks like myself living in an high
  traffic
   site are forced to generate script look for old page store cache
  files.
  
   https://issues.apache.org/jira/browse/WICKET-1158
  
  
   Johan Compagner wrote:
   
   
 And from top of my head there is no api to get all the current
   session
id's
 from
 an instance when the instance does start up..
   
But we could ditch ALL the directories it can find in the temp
directory the page store uses when starting up, right?
   
   
No we can't do that, If you as you should terminate your web
  container
gracefully
then the web container will save all the sessions to disk. Then if
  you
restart it again
all the sessions are loaded again. And yes the application works
  just
   as
it was never
restarted. But if we throw away all the page stores. Then we loose
  all
   the
data
of sessions that are currently active.
   
The only thing i can think of is having some check that only deletes
things
that are not touched for X hours or days.
   
johan
   
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13735298
   Sent from the Wicket - User mailing list archive at
   Nabble.com http://nabble.com/http://nabble.com/
   .
  
  
   -
To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13736689
   Sent from the Wicket - User mailing list archive at
  Nabble.comhttp://nabble.com/
  .
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13751284
 Sent from the Wicket - User mailing list archive at Nabble.com.


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

Re: How can I switch page direction (LTR-RTL)?

2007-11-14 Thread Suad AlShamsi
In your html page you can use the set the dir attribute of the html tag 
to the direction you want


html xmlns=http://www.w3.org/1999/xhtml;  dir=ltr

I believe you can do so automatically using the new attribute modifier.

Regards
Alshamsi


nlif wrote:

Hi all,

I would like to be able to set the page direction: right-to-left or
left-to-right.
This can be done via the browser's view - switch page direction
menu-option,
but I need to be able to set this dynamically (i.e. by the application),
based on the locale.
Is this supported in Wicket?


Thanks,
Naaman


  



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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-14 Thread Chris Lintz

That makes sense.  Another thought that possibly makes it a bit easier is to
name the page store directories with a unique process identifier. For
example, if my session ID is B31598D4B206B75161AFE08FB5610D54.n1 and the
process ID is 123456, then the Page store directory would be:

   MyWebSite-filestore/123456/B31598D4B206B75161AFE08FB5610D54.n1

With a structure like that it would be easy for a thread to remove the Page
store directories that do not have the current process ID.

Just a thought.





Johan Compagner wrote:
 
 Yes the pagestore knows which files it makes, but it is not the controller
 of those files
 because the only thing that controls if the file must be deleted or not is
 the servlet container
 with the session objects.
 
 and as far as i know there is no api where i can ask which sessions are
 still active.
 So the only thing we could do is have a thread running that is waking up
 every day once
 and checks if there are files older then X. And that thread must be
 configured by you
 explicitly setting the timeout that you want to have.
 
 johan
 
 
 
 
 On Nov 14, 2007 12:04 AM, Chris Lintz [EMAIL PROTECTED]
 wrote:
 

 I think from previous threads there was discussion about something that
 you
 could do.  For instance, the Page store should know what cache files it
 is
 controlling.  By that logic alone it can deduce what it is no longer
 referencing and cleanup what was left form it.

 It seems silly to me to ask people to rely on graceful restarts or write
 your own cleanup script from a framework that created cache files.  It
 seems
 fairly standard to ask clean up what was yours.   I'd like to hear
 other
 input from average users.



 Johan Compagner wrote:
 
  as long as your server doesn't crash and isn't terminate by a kill -9
  no files are leaked..
 
  When that does happen then yes you have to clean it up.
  If you dont care about those files after a restart then in the script
 that
  starts your webcontainer
  you will just remove all the files in the work dir.
 
  I don't think wicket can do much about it.
 
  johan
 
 
  On Nov 13, 2007 10:41 PM, Chris Lintz [EMAIL PROTECTED]
  wrote:
 
 
  All,
  I have submitted a Jira on this topic.  I will leave it to the great
  minds
  to debate.  In any case, it appears restarting the container cannot
  notify
  the HttpSessionListeners that are bound to the page store files.  It
  would
  be nice if the framework can cleanup what I consider a leak of the
 cache
  files it created.  Otherwise folks like myself living in an high
 traffic
  site are forced to generate script look for old page store cache
 files.
 
  https://issues.apache.org/jira/browse/WICKET-1158
 
 
  Johan Compagner wrote:
  
  
And from top of my head there is no api to get all the current
  session
   id's
from
an instance when the instance does start up..
  
   But we could ditch ALL the directories it can find in the temp
   directory the page store uses when starting up, right?
  
  
   No we can't do that, If you as you should terminate your web
 container
   gracefully
   then the web container will save all the sessions to disk. Then if
 you
   restart it again
   all the sessions are loaded again. And yes the application works
 just
  as
   it was never
   restarted. But if we throw away all the page stores. Then we loose
 all
  the
   data
   of sessions that are currently active.
  
   The only thing i can think of is having some check that only deletes
   things
   that are not touched for X hours or days.
  
   johan
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13735298
  Sent from the Wicket - User mailing list archive at
  Nabble.com http://nabble.com/http://nabble.com/
  .
 
 
  -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13736689
  Sent from the Wicket - User mailing list archive at
 Nabble.comhttp://nabble.com/
 .


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


 
 

-- 
View this message in context: 
http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13751284
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: framework dependencies

2007-11-14 Thread igor . vaynberg
big difference between those versions is that in one count queries
return integer and in another longs

-igor

On 11/14/07, Yevgeni Kovelman [EMAIL PROTECTED] wrote:
 The problem is that behavior changes when I switch underlying frameworks.
 If I use Hibernate 3.0.5 things work the way they are , however if I use
 Hibernate 3.1/3.2, the error below appears.  FYI, I am using the same code
 that's in the wicket-phonebook example application(uses hibernate 3.0.5)

 Gene

 -Original Message-
 From: Johan Compagner [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 14, 2007 2:05 AM
 To: users@wicket.apache.org
 Subject: Re: framework dependencies

 do you see that stacktrace when you render that particular page for the
 first time?
 or is it maybe that you see it when you render it for the second or more
 time?
 Maybe, this is just a guess, you don't detach something and are asking next
 again on a next request
 so you are holding on to an object over request

 johan



 On Nov 14, 2007 7:23 AM, Yevgeni Kovelman [EMAIL PROTECTED] wrote:

  Hello everyone,
 
 
 
  I have been using wicket 1.2.6 with Spring and hibernate for the past
  month
  or so.  Seems like a standard configuration.  So to summarize here is my
  configuration that used to work:
 
 
 
  1.   Wicket 1.2.6
 
  2.   Wicket-extensions 1.2.6
 
  3.   Wicket-spring 1.2.6
 
  4.   Spring 2.0.6
 
  5.   Hibernate 3
 
 
 
  This configuration used to work, today it stopped after I tried to rework
  the dependencies on my end.  I am getting errors such as below.
 
  I think this is dependency related, and I am not sure at this point what
  got
  screwed up.  Has anyone seen this?  Thanks
 
 
 
  java.sql.SQLException: Closed Resultset: next
  at
  oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
  at
  oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
  at
  oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:175)
  at
  org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java
  :16
  9)
  at org.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:83)
  at org.hibernate.impl.IteratorImpl.next(IteratorImpl.java:120)
  at
 
 
 wicket.extensions.markup.html.repeater.data.DataViewBase$ModelIterator.next
  (
  DataViewBase.java:129)
  at
 
 
 wicket.extensions.markup.html.repeater.pageable.AbstractPageableView$CappedI
  teratorAdapter.next(AbstractPageableView.java:386)
  at
 
 
 wicket.extensions.markup.html.repeater.refreshing.DefaultItemReuseStrategy$1
  .next(DefaultItemReuseStrategy.java:71)
  at
  wicket.extensions.markup.html.repeater.refreshing.RefreshingView.addItems
  (Re
  freshingView.java:191)
  at
 
 
 wicket.extensions.markup.html.repeater.refreshing.RefreshingView.internalOnA
  ttach(RefreshingView.java:117)
  at wicket.Component.internalAttach(Component.java:2572)
 
 
 
 


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



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



Re: Problem in servlet configuration, migrating 1.2.6 to 1.3

2007-11-14 Thread dtoffe

You are right, it was something about slf4j being missing. In 1.2.6 the
commons logging jar file was included in /lib, but I forgot that slf4j was
required now. I don't use Maven, perhaps that's why I missed it, now that I
check again the release notes, slf4j is mentioned there. With slf4j in place
now I'm getting other errors that I'm checking now.

Thanks and excuse me,

Daniel



Johan Compagner wrote:
 
 please try to get to the real exception.
 I guess it is somehow a class loading problem
 How to configure the servlet is not really changed if you want to use a
 servlet in 1.3
 
 On Nov 14, 2007 4:21 PM, dtoffe [EMAIL PROTECTED] wrote:
 
 

-- 
View this message in context: 
http://www.nabble.com/Problem-in-servlet-configuration%2C-migrating-1.2.6-to-1.3-tf4805722.html#a13751449
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Doubleclicking on a refreshable Ajax button

2007-11-14 Thread Federico Fanton
On Wed, 14 Nov 2007 17:30:18 +0100
Federico Fanton [EMAIL PROTECTED] wrote:

  Can you try using something like 
  setThrottleDelay(Duration.milliseconds(500))
  to help eliminate the accidental, quick-fire second click?
 
 I completely overlooked that X-) I'll try it, many thanks :)

Mmh.. Using throttleDelay works like wait X millisecs THEN fire event, not 
fire event THEN wait, right? Since I'm working on a generic component and I 
don't know how much time the Ajax request will take, I can't use this 
approach.. :/ (I'm also trying to prevent 
second-clicks-while-Ajax-does-its-thing)
Thanks anyway :)


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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-14 Thread Johan Compagner
ohh wait that also doesn't work (process id can also be generated once
ofcourse) but you can have mulitply dirs created with 10 different
processes that are all valid. so that doesn't solve anything

On 11/14/07, Johan Compagner [EMAIL PROTECTED] wrote:
 can you get the current process id by general api in java? have to
 look at Runtime then.

 On 11/14/07, Chris Lintz [EMAIL PROTECTED] wrote:
 
  That makes sense.  Another thought that possibly makes it a bit easier is
 to
  name the page store directories with a unique process identifier. For
  example, if my session ID is B31598D4B206B75161AFE08FB5610D54.n1 and the
  process ID is 123456, then the Page store directory would be:
 
 MyWebSite-filestore/123456/B31598D4B206B75161AFE08FB5610D54.n1
 
  With a structure like that it would be easy for a thread to remove the
 Page
  store directories that do not have the current process ID.
 
  Just a thought.
 
 
 
 
 
  Johan Compagner wrote:
  
   Yes the pagestore knows which files it makes, but it is not the
 controller
   of those files
   because the only thing that controls if the file must be deleted or not
 is
   the servlet container
   with the session objects.
  
   and as far as i know there is no api where i can ask which sessions are
   still active.
   So the only thing we could do is have a thread running that is waking up
   every day once
   and checks if there are files older then X. And that thread must be
   configured by you
   explicitly setting the timeout that you want to have.
  
   johan
  
  
  
  
   On Nov 14, 2007 12:04 AM, Chris Lintz [EMAIL PROTECTED]
   wrote:
  
  
   I think from previous threads there was discussion about something that
   you
   could do.  For instance, the Page store should know what cache files it
   is
   controlling.  By that logic alone it can deduce what it is no longer
   referencing and cleanup what was left form it.
  
   It seems silly to me to ask people to rely on graceful restarts or
 write
   your own cleanup script from a framework that created cache files.  It
   seems
   fairly standard to ask clean up what was yours.   I'd like to hear
   other
   input from average users.
  
  
  
   Johan Compagner wrote:
   
as long as your server doesn't crash and isn't terminate by a kill -9
no files are leaked..
   
When that does happen then yes you have to clean it up.
If you dont care about those files after a restart then in the script
   that
starts your webcontainer
you will just remove all the files in the work dir.
   
I don't think wicket can do much about it.
   
johan
   
   
On Nov 13, 2007 10:41 PM, Chris Lintz [EMAIL PROTECTED]
wrote:
   
   
All,
I have submitted a Jira on this topic.  I will leave it to the great
minds
to debate.  In any case, it appears restarting the container cannot
notify
the HttpSessionListeners that are bound to the page store files.  It
would
be nice if the framework can cleanup what I consider a leak of the
   cache
files it created.  Otherwise folks like myself living in an high
   traffic
site are forced to generate script look for old page store cache
   files.
   
https://issues.apache.org/jira/browse/WICKET-1158
   
   
Johan Compagner wrote:


  And from top of my head there is no api to get all the current
session
 id's
  from
  an instance when the instance does start up..

 But we could ditch ALL the directories it can find in the temp
 directory the page store uses when starting up, right?


 No we can't do that, If you as you should terminate your web
   container
 gracefully
 then the web container will save all the sessions to disk. Then if
   you
 restart it again
 all the sessions are loaded again. And yes the application works
   just
as
 it was never
 restarted. But if we throw away all the page stores. Then we loose
   all
the
 data
 of sessions that are currently active.

 The only thing i can think of is having some check that only
 deletes
 things
 that are not touched for X hours or days.

 johan


   
--
View this message in context:
   
  
 
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13735298
Sent from the Wicket - User mailing list archive at
Nabble.com http://nabble.com/http://nabble.com/
.
   
   
   
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13736689
Sent from the Wicket - User mailing list archive at
   Nabble.comhttp://nabble.com/
   .
  
  
   -
   To 

Re: How To Change Page Store Size in DiskPageStore?

2007-11-14 Thread Chris Lintz

The process ID is just an idea for a unique ID.  If that wont work for you,
lets dream another unique ID .



Johan Compagner wrote:
 
 ohh wait that also doesn't work (process id can also be generated once
 ofcourse) but you can have mulitply dirs created with 10 different
 processes that are all valid. so that doesn't solve anything
 
 On 11/14/07, Johan Compagner [EMAIL PROTECTED] wrote:
 can you get the current process id by general api in java? have to
 look at Runtime then.

 On 11/14/07, Chris Lintz [EMAIL PROTECTED] wrote:
 
  That makes sense.  Another thought that possibly makes it a bit easier
 is
 to
  name the page store directories with a unique process identifier. For
  example, if my session ID is B31598D4B206B75161AFE08FB5610D54.n1 and
 the
  process ID is 123456, then the Page store directory would be:
 
 MyWebSite-filestore/123456/B31598D4B206B75161AFE08FB5610D54.n1
 
  With a structure like that it would be easy for a thread to remove the
 Page
  store directories that do not have the current process ID.
 
  Just a thought.
 
 
 
 
 
  Johan Compagner wrote:
  
   Yes the pagestore knows which files it makes, but it is not the
 controller
   of those files
   because the only thing that controls if the file must be deleted or
 not
 is
   the servlet container
   with the session objects.
  
   and as far as i know there is no api where i can ask which sessions
 are
   still active.
   So the only thing we could do is have a thread running that is waking
 up
   every day once
   and checks if there are files older then X. And that thread must be
   configured by you
   explicitly setting the timeout that you want to have.
  
   johan
  
  
  
  
   On Nov 14, 2007 12:04 AM, Chris Lintz [EMAIL PROTECTED]
   wrote:
  
  
   I think from previous threads there was discussion about something
 that
   you
   could do.  For instance, the Page store should know what cache files
 it
   is
   controlling.  By that logic alone it can deduce what it is no longer
   referencing and cleanup what was left form it.
  
   It seems silly to me to ask people to rely on graceful restarts or
 write
   your own cleanup script from a framework that created cache files. 
 It
   seems
   fairly standard to ask clean up what was yours.   I'd like to hear
   other
   input from average users.
  
  
  
   Johan Compagner wrote:
   
as long as your server doesn't crash and isn't terminate by a kill
 -9
no files are leaked..
   
When that does happen then yes you have to clean it up.
If you dont care about those files after a restart then in the
 script
   that
starts your webcontainer
you will just remove all the files in the work dir.
   
I don't think wicket can do much about it.
   
johan
   
   
On Nov 13, 2007 10:41 PM, Chris Lintz
 [EMAIL PROTECTED]
wrote:
   
   
All,
I have submitted a Jira on this topic.  I will leave it to the
 great
minds
to debate.  In any case, it appears restarting the container
 cannot
notify
the HttpSessionListeners that are bound to the page store files. 
 It
would
be nice if the framework can cleanup what I consider a leak of
 the
   cache
files it created.  Otherwise folks like myself living in an high
   traffic
site are forced to generate script look for old page store cache
   files.
   
https://issues.apache.org/jira/browse/WICKET-1158
   
   
Johan Compagner wrote:


  And from top of my head there is no api to get all the
 current
session
 id's
  from
  an instance when the instance does start up..

 But we could ditch ALL the directories it can find in the temp
 directory the page store uses when starting up, right?


 No we can't do that, If you as you should terminate your web
   container
 gracefully
 then the web container will save all the sessions to disk. Then
 if
   you
 restart it again
 all the sessions are loaded again. And yes the application
 works
   just
as
 it was never
 restarted. But if we throw away all the page stores. Then we
 loose
   all
the
 data
 of sessions that are currently active.

 The only thing i can think of is having some check that only
 deletes
 things
 that are not touched for X hours or days.

 johan


   
--
View this message in context:
   
  
 
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13735298
Sent from the Wicket - User mailing list archive at
Nabble.com http://nabble.com/http://nabble.com/
.
   
   
   
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13736689
Sent from the 

Re: AbstractAjaxTimerBehavior question

2007-11-14 Thread Timo Rantalaiho
On Tue, 13 Nov 2007, Clay Lehman wrote:
 every 5 seconds... Is there a way to keep the window from scrolling to
 the last focused component (or unfocus all components) when the onTimer
 is called? Or

I think that at least there is a way to focus on a specific
component, AjaxRequestTarget.focusOn(Component) or something
such.


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



Wicket's custom serialization

2007-11-14 Thread ChuckDeal

I have been using Wicket's custom serialization for quite some time now. 
I've noticed a few oddities, but I attributed them to my own mistakes.  Now,
that I have got most of my code ironed out, I have been following up on the
oddities.

The first scenario goes like this:  I have a custom authorization strategy
in place that reads a predicate from the Component's metadata.  If I leave
the page, then simply click the back button, the Component still has a
reference to the metadata item, but not it's content (in my case the
predicate object is missing).  I switched back to JDK serialization and it
works as expected (the predicates remain attached to the metadata object). 
I am preparing to build a quickstart to demonstrate this issue, but I wanted
to toss the issue out there in case this is something that you might already
be aware of.

The second scenario is a little less clear to me.  I have a Page that
includes an inner class that extends the AbstractFormValidator.  The Page
has references to TextField objects.  I received an error where the stack
trace implied that it was attempting to serialize the data in the model of
the page's TextField references.  (something like
formValidator-this$0-textField-data).  Shouldn't the models of the
textfields have been detached prior to serialization?  

Also, it seems that the joda DateTime object has problems serializing
(something to do with the iChronology class).  

I'll make sure I keep the stack traces the next time I get these errors, at
the moment, they are randomly occuring.

Thanks
Chuck
-- 
View this message in context: 
http://www.nabble.com/Wicket%27s-custom-serialization-tf4807039.html#a13753110
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-14 Thread Brandon Harper
I assume Wicket could just create it's own persistent ID on startup
which it uses to name the dir.   Any other parent dirs which don't
match that ID get deleted on startup?

On Nov 14, 2007 11:05 AM, Chris Lintz [EMAIL PROTECTED] wrote:

 The process ID is just an idea for a unique ID.  If that wont work for you,
 lets dream another unique ID .




 Johan Compagner wrote:
 
  ohh wait that also doesn't work (process id can also be generated once
  ofcourse) but you can have mulitply dirs created with 10 different
  processes that are all valid. so that doesn't solve anything
 
  On 11/14/07, Johan Compagner [EMAIL PROTECTED] wrote:
  can you get the current process id by general api in java? have to
  look at Runtime then.
 
  On 11/14/07, Chris Lintz [EMAIL PROTECTED] wrote:
  
   That makes sense.  Another thought that possibly makes it a bit easier
  is
  to
   name the page store directories with a unique process identifier. For
   example, if my session ID is B31598D4B206B75161AFE08FB5610D54.n1 and
  the
   process ID is 123456, then the Page store directory would be:
  
  MyWebSite-filestore/123456/B31598D4B206B75161AFE08FB5610D54.n1
  
   With a structure like that it would be easy for a thread to remove the
  Page
   store directories that do not have the current process ID.
  
   Just a thought.
  
  
  
  
  
   Johan Compagner wrote:
   
Yes the pagestore knows which files it makes, but it is not the
  controller
of those files
because the only thing that controls if the file must be deleted or
  not
  is
the servlet container
with the session objects.
   
and as far as i know there is no api where i can ask which sessions
  are
still active.
So the only thing we could do is have a thread running that is waking
  up
every day once
and checks if there are files older then X. And that thread must be
configured by you
explicitly setting the timeout that you want to have.
   
johan
   
   
   
   
On Nov 14, 2007 12:04 AM, Chris Lintz [EMAIL PROTECTED]
wrote:
   
   
I think from previous threads there was discussion about something
  that
you
could do.  For instance, the Page store should know what cache files
  it
is
controlling.  By that logic alone it can deduce what it is no longer
referencing and cleanup what was left form it.
   
It seems silly to me to ask people to rely on graceful restarts or
  write
your own cleanup script from a framework that created cache files.
  It
seems
fairly standard to ask clean up what was yours.   I'd like to hear
other
input from average users.
   
   
   
Johan Compagner wrote:

 as long as your server doesn't crash and isn't terminate by a kill
  -9
 no files are leaked..

 When that does happen then yes you have to clean it up.
 If you dont care about those files after a restart then in the
  script
that
 starts your webcontainer
 you will just remove all the files in the work dir.

 I don't think wicket can do much about it.

 johan


 On Nov 13, 2007 10:41 PM, Chris Lintz
  [EMAIL PROTECTED]
 wrote:


 All,
 I have submitted a Jira on this topic.  I will leave it to the
  great
 minds
 to debate.  In any case, it appears restarting the container
  cannot
 notify
 the HttpSessionListeners that are bound to the page store files.
  It
 would
 be nice if the framework can cleanup what I consider a leak of
  the
cache
 files it created.  Otherwise folks like myself living in an high
traffic
 site are forced to generate script look for old page store cache
files.

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


 Johan Compagner wrote:
 
 
   And from top of my head there is no api to get all the
  current
 session
  id's
   from
   an instance when the instance does start up..
 
  But we could ditch ALL the directories it can find in the temp
  directory the page store uses when starting up, right?
 
 
  No we can't do that, If you as you should terminate your web
container
  gracefully
  then the web container will save all the sessions to disk. Then
  if
you
  restart it again
  all the sessions are loaded again. And yes the application
  works
just
 as
  it was never
  restarted. But if we throw away all the page stores. Then we
  loose
all
 the
  data
  of sessions that are currently active.
 
  The only thing i can think of is having some check that only
  deletes
  things
  that are not touched for X hours or days.
 
  johan
 
 

 --
 View this message in context:

   
  
  http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13735298
 Sent from the Wicket - User mailing list archive at
 

Re: How To Change Page Store Size in DiskPageStore?

2007-11-14 Thread Johan Compagner
no it doesnt matter what id i generate or get. This is still not
enough because it doesnt say any thing if i can delete it or not. i
have an id 1 then i restart and i have id 2 can i then delete
everything from 1? No i cant because there could be live sessions from
1.

On 11/14/07, Chris Lintz [EMAIL PROTECTED] wrote:

 The process ID is just an idea for a unique ID.  If that wont work for you,
 lets dream another unique ID .



 Johan Compagner wrote:
 
  ohh wait that also doesn't work (process id can also be generated once
  ofcourse) but you can have mulitply dirs created with 10 different
  processes that are all valid. so that doesn't solve anything
 
  On 11/14/07, Johan Compagner [EMAIL PROTECTED] wrote:
  can you get the current process id by general api in java? have to
  look at Runtime then.
 
  On 11/14/07, Chris Lintz [EMAIL PROTECTED] wrote:
  
   That makes sense.  Another thought that possibly makes it a bit easier
  is
  to
   name the page store directories with a unique process identifier. For
   example, if my session ID is B31598D4B206B75161AFE08FB5610D54.n1 and
  the
   process ID is 123456, then the Page store directory would be:
  
  MyWebSite-filestore/123456/B31598D4B206B75161AFE08FB5610D54.n1
  
   With a structure like that it would be easy for a thread to remove the
  Page
   store directories that do not have the current process ID.
  
   Just a thought.
  
  
  
  
  
   Johan Compagner wrote:
   
Yes the pagestore knows which files it makes, but it is not the
  controller
of those files
because the only thing that controls if the file must be deleted or
  not
  is
the servlet container
with the session objects.
   
and as far as i know there is no api where i can ask which sessions
  are
still active.
So the only thing we could do is have a thread running that is waking
  up
every day once
and checks if there are files older then X. And that thread must be
configured by you
explicitly setting the timeout that you want to have.
   
johan
   
   
   
   
On Nov 14, 2007 12:04 AM, Chris Lintz [EMAIL PROTECTED]
wrote:
   
   
I think from previous threads there was discussion about something
  that
you
could do.  For instance, the Page store should know what cache files
  it
is
controlling.  By that logic alone it can deduce what it is no longer
referencing and cleanup what was left form it.
   
It seems silly to me to ask people to rely on graceful restarts or
  write
your own cleanup script from a framework that created cache files.
  It
seems
fairly standard to ask clean up what was yours.   I'd like to hear
other
input from average users.
   
   
   
Johan Compagner wrote:

 as long as your server doesn't crash and isn't terminate by a kill
  -9
 no files are leaked..

 When that does happen then yes you have to clean it up.
 If you dont care about those files after a restart then in the
  script
that
 starts your webcontainer
 you will just remove all the files in the work dir.

 I don't think wicket can do much about it.

 johan


 On Nov 13, 2007 10:41 PM, Chris Lintz
  [EMAIL PROTECTED]
 wrote:


 All,
 I have submitted a Jira on this topic.  I will leave it to the
  great
 minds
 to debate.  In any case, it appears restarting the container
  cannot
 notify
 the HttpSessionListeners that are bound to the page store files.
  It
 would
 be nice if the framework can cleanup what I consider a leak of
  the
cache
 files it created.  Otherwise folks like myself living in an high
traffic
 site are forced to generate script look for old page store cache
files.

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


 Johan Compagner wrote:
 
 
   And from top of my head there is no api to get all the
  current
 session
  id's
   from
   an instance when the instance does start up..
 
  But we could ditch ALL the directories it can find in the temp
  directory the page store uses when starting up, right?
 
 
  No we can't do that, If you as you should terminate your web
container
  gracefully
  then the web container will save all the sessions to disk. Then
  if
you
  restart it again
  all the sessions are loaded again. And yes the application
  works
just
 as
  it was never
  restarted. But if we throw away all the page stores. Then we
  loose
all
 the
  data
  of sessions that are currently active.
 
  The only thing i can think of is having some check that only
  deletes
  things
  that are not touched for X hours or days.
 
  johan
 
 

 --
 View this message in context:

   
  
 
 

Re: Doubleclicking on a refreshable Ajax button

2007-11-14 Thread jweekend

Are you sure about that?
We used this exact same handy, little Wicket feature (yet another one) on
the jWeekend  http://jweekend.co.uk/dev/BookingPage/ booking page  to make
sure that if the user drags his mouse over the entries in the Course
DropDownChoice we don't update the Location, Date DropDownChoice
(master/detail style database calls via JPA) unnecessarily for every
selection change until he's actually landed somewhere for a while. It works
fine (having said that, we probably need to add it to our Add To Cart
Button too). 
Here's the javadoc for setThrottleDelay

/**
 * Sets the throttle delay for this behavior. Throttled behaviors only
 * execute once withing the given delay even though they are triggered
 * multiple times.
 * p
 * For example, this is useful when attaching this behavior to the
 * onkeypress event. It is not desirable to have an ajax call made every
 * time the user types so we throttle that call to a desirable delay, 
such
 * as once per second. This gives us a near real time ability to provide
 * feedback without overloading the server with ajax calls.
 * 
 * 
 * @param throttleDelay
 *throttle delay
 * @return this for chaining
 */

Regards - Cemal
http://jWeekend.co.uk http://jWeekend.co.uk 



Federico Fanton wrote:
 
 On Wed, 14 Nov 2007 17:30:18 +0100
 Federico Fanton [EMAIL PROTECTED] wrote:
 
  Can you try using something like
 setThrottleDelay(Duration.milliseconds(500))
  to help eliminate the accidental, quick-fire second click?
 
 I completely overlooked that X-) I'll try it, many thanks :)
 
 
 Mmh.. Using throttleDelay works like wait X millisecs THEN fire event,
 not fire event THEN wait, right? Since I'm working on a generic
 component and I don't know how much time the Ajax request will take, I
 can't use this approach.. :/ (I'm also trying to prevent
 second-clicks-while-Ajax-does-its-thing)
 Thanks anyway :)
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Doubleclicking-on-a-refreshable-Ajax-button-tf4799510.html#a13754011
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket's custom serialization

2007-11-14 Thread Johan Compagner
custom serialization is a bit on hold currenly, this is because its an
always on going thing, and if users use 1.5 in there code and we only
have 1.4 yet so we maybe cant serialize everything (enums?). We need
to check this out. Also we do gain a lot smaller size i am still
curious how much cpu cycles we gain, maybe we can pick it up again in
1.4

On 11/14/07, ChuckDeal [EMAIL PROTECTED] wrote:

 I have been using Wicket's custom serialization for quite some time now.
 I've noticed a few oddities, but I attributed them to my own mistakes.  Now,
 that I have got most of my code ironed out, I have been following up on the
 oddities.

 The first scenario goes like this:  I have a custom authorization strategy
 in place that reads a predicate from the Component's metadata.  If I leave
 the page, then simply click the back button, the Component still has a
 reference to the metadata item, but not it's content (in my case the
 predicate object is missing).  I switched back to JDK serialization and it
 works as expected (the predicates remain attached to the metadata object).
 I am preparing to build a quickstart to demonstrate this issue, but I wanted
 to toss the issue out there in case this is something that you might already
 be aware of.

 The second scenario is a little less clear to me.  I have a Page that
 includes an inner class that extends the AbstractFormValidator.  The Page
 has references to TextField objects.  I received an error where the stack
 trace implied that it was attempting to serialize the data in the model of
 the page's TextField references.  (something like
 formValidator-this$0-textField-data).  Shouldn't the models of the
 textfields have been detached prior to serialization?

 Also, it seems that the joda DateTime object has problems serializing
 (something to do with the iChronology class).

 I'll make sure I keep the stack traces the next time I get these errors, at
 the moment, they are randomly occuring.

 Thanks
 Chuck
 --
 View this message in context:
 http://www.nabble.com/Wicket%27s-custom-serialization-tf4807039.html#a13753110
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-14 Thread Chris Lintz

There are still other ways around this.  If every process registered itself
via unique file in a known directory and a Page Store thread touched this
file every say 5 minutes, this gives more information to a thread to know
whether or not delete a Page Store directory associated with unique ID.   

For example,

MyWebSite-filestore/running_processes/uid1
MyWebSite-filestore/running_processes/uid2
MyWebSite-filestore/running_processes/uid2

Each Page store thread would then check the uid files that it did not
create.  For example, process 1 would check to see if uid1 and uid2 have
been touched in the last hour (just making up something way greater than 5
minutes).  If not, remove their associated PageStore files.

I will admit this is a bit more involved, but i am trying to present a
solution that doesn't require any configuration from a user perspective.




Johan Compagner wrote:
 
 no it doesnt matter what id i generate or get. This is still not
 enough because it doesnt say any thing if i can delete it or not. i
 have an id 1 then i restart and i have id 2 can i then delete
 everything from 1? No i cant because there could be live sessions from
 1.
 
 On 11/14/07, Chris Lintz [EMAIL PROTECTED] wrote:

 The process ID is just an idea for a unique ID.  If that wont work for
 you,
 lets dream another unique ID .



 Johan Compagner wrote:
 
  ohh wait that also doesn't work (process id can also be generated once
  ofcourse) but you can have mulitply dirs created with 10 different
  processes that are all valid. so that doesn't solve anything
 
  On 11/14/07, Johan Compagner [EMAIL PROTECTED] wrote:
  can you get the current process id by general api in java? have to
  look at Runtime then.
 
  On 11/14/07, Chris Lintz [EMAIL PROTECTED] wrote:
  
   That makes sense.  Another thought that possibly makes it a bit
 easier
  is
  to
   name the page store directories with a unique process identifier.
 For
   example, if my session ID is B31598D4B206B75161AFE08FB5610D54.n1 and
  the
   process ID is 123456, then the Page store directory would be:
  
  MyWebSite-filestore/123456/B31598D4B206B75161AFE08FB5610D54.n1
  
   With a structure like that it would be easy for a thread to remove
 the
  Page
   store directories that do not have the current process ID.
  
   Just a thought.
  
  
  
  
  
   Johan Compagner wrote:
   
Yes the pagestore knows which files it makes, but it is not the
  controller
of those files
because the only thing that controls if the file must be deleted
 or
  not
  is
the servlet container
with the session objects.
   
and as far as i know there is no api where i can ask which
 sessions
  are
still active.
So the only thing we could do is have a thread running that is
 waking
  up
every day once
and checks if there are files older then X. And that thread must
 be
configured by you
explicitly setting the timeout that you want to have.
   
johan
   
   
   
   
On Nov 14, 2007 12:04 AM, Chris Lintz
 [EMAIL PROTECTED]
wrote:
   
   
I think from previous threads there was discussion about
 something
  that
you
could do.  For instance, the Page store should know what cache
 files
  it
is
controlling.  By that logic alone it can deduce what it is no
 longer
referencing and cleanup what was left form it.
   
It seems silly to me to ask people to rely on graceful restarts
 or
  write
your own cleanup script from a framework that created cache
 files.
  It
seems
fairly standard to ask clean up what was yours.   I'd like to
 hear
other
input from average users.
   
   
   
Johan Compagner wrote:

 as long as your server doesn't crash and isn't terminate by a
 kill
  -9
 no files are leaked..

 When that does happen then yes you have to clean it up.
 If you dont care about those files after a restart then in the
  script
that
 starts your webcontainer
 you will just remove all the files in the work dir.

 I don't think wicket can do much about it.

 johan


 On Nov 13, 2007 10:41 PM, Chris Lintz
  [EMAIL PROTECTED]
 wrote:


 All,
 I have submitted a Jira on this topic.  I will leave it to the
  great
 minds
 to debate.  In any case, it appears restarting the container
  cannot
 notify
 the HttpSessionListeners that are bound to the page store
 files.
  It
 would
 be nice if the framework can cleanup what I consider a leak of
  the
cache
 files it created.  Otherwise folks like myself living in an
 high
traffic
 site are forced to generate script look for old page store
 cache
files.

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


 Johan Compagner wrote:
 
 
   And from top of my head there is no api to get all the
  current
 session
  id's
   from
   an instance when the instance does start up..
 
 

Re: How To Change Page Store Size in DiskPageStore?

2007-11-14 Thread Johan Compagner
i don't get this picture. What do you mean with a PageStore thread touches
this
file every 5 minutes? What does that bring us? Why can it suddenly remove
files?
Because yes the previous page store isn't there anymore, the server did
restart
so the file isn't being touched. and then what? Why can't it delete?

Again it a PageStore is not leading, yes it creates the files but it has no
way to know
if it can delete it, The only possible way i could think of if there was an
API in the servlet
spec for example on the context where i could ask for all the live session
ids.
That would be the only way to do it.

An unique file or unique id its still the same, there is nothing unique
about a pagestore
a page store from process B can or must be able to read files in from a
previous process B
that doesnt matter. There is no automatic way, it has to be configured for
deployment
wicket can't assume anything.

But still i am also not conviced that wicket needs to do this by a thread.
We just have to document
it then there must be a cleanup processs or scheduler if the server does
crash or is not terminated gracefully.
We could introduce such a thread in wicket if users really see the need for
it.

johan


On Nov 14, 2007 8:25 PM, Chris Lintz [EMAIL PROTECTED] wrote:


 There are still other ways around this.  If every process registered
 itself
 via unique file in a known directory and a Page Store thread touched this
 file every say 5 minutes, this gives more information to a thread to know
 whether or not delete a Page Store directory associated with unique ID.

 For example,

 MyWebSite-filestore/running_processes/uid1
 MyWebSite-filestore/running_processes/uid2
 MyWebSite-filestore/running_processes/uid2

 Each Page store thread would then check the uid files that it did not
 create.  For example, process 1 would check to see if uid1 and uid2 have
 been touched in the last hour (just making up something way greater than 5
 minutes).  If not, remove their associated PageStore files.

 I will admit this is a bit more involved, but i am trying to present a
 solution that doesn't require any configuration from a user perspective.




 Johan Compagner wrote:
 
  no it doesnt matter what id i generate or get. This is still not
  enough because it doesnt say any thing if i can delete it or not. i
  have an id 1 then i restart and i have id 2 can i then delete
  everything from 1? No i cant because there could be live sessions from
  1.
 
  On 11/14/07, Chris Lintz [EMAIL PROTECTED] wrote:
 
  The process ID is just an idea for a unique ID.  If that wont work for
  you,
  lets dream another unique ID .
 
 
 
  Johan Compagner wrote:
  
   ohh wait that also doesn't work (process id can also be generated
 once
   ofcourse) but you can have mulitply dirs created with 10 different
   processes that are all valid. so that doesn't solve anything
  
   On 11/14/07, Johan Compagner [EMAIL PROTECTED] wrote:
   can you get the current process id by general api in java? have to
   look at Runtime then.
  
   On 11/14/07, Chris Lintz [EMAIL PROTECTED] wrote:
   
That makes sense.  Another thought that possibly makes it a bit
  easier
   is
   to
name the page store directories with a unique process identifier.
  For
example, if my session ID is B31598D4B206B75161AFE08FB5610D54.n1and
   the
process ID is 123456, then the Page store directory would be:
   
   MyWebSite-filestore/123456/B31598D4B206B75161AFE08FB5610D54.n1
   
With a structure like that it would be easy for a thread to remove
  the
   Page
store directories that do not have the current process ID.
   
Just a thought.
   
   
   
   
   
Johan Compagner wrote:

 Yes the pagestore knows which files it makes, but it is not the
   controller
 of those files
 because the only thing that controls if the file must be deleted
  or
   not
   is
 the servlet container
 with the session objects.

 and as far as i know there is no api where i can ask which
  sessions
   are
 still active.
 So the only thing we could do is have a thread running that is
  waking
   up
 every day once
 and checks if there are files older then X. And that thread must
  be
 configured by you
 explicitly setting the timeout that you want to have.

 johan




 On Nov 14, 2007 12:04 AM, Chris Lintz
  [EMAIL PROTECTED]
 wrote:


 I think from previous threads there was discussion about
  something
   that
 you
 could do.  For instance, the Page store should know what cache
  files
   it
 is
 controlling.  By that logic alone it can deduce what it is no
  longer
 referencing and cleanup what was left form it.

 It seems silly to me to ask people to rely on graceful restarts
  or
   write
 your own cleanup script from a framework that created cache
  files.
   It
 seems
 fairly standard to ask clean up what was yours.   I'd like to
  

more back button fun

2007-11-14 Thread Evan Chooly
Using rc1 when I click on a link in a DataView, click the back button, and
click on another link I get the following stack trace.  Now, this data view
is populated after an ajax update from another link on the page which might
contribute to the problem.  Any ideas what the story is?

WicketMessage: component container:users:table:rows:3:cells:1:cell:link not
found on page com.foo.BarPage[id = 2], listener interface =
[RequestListenerInterface name=IBehaviorListener, method=public abstract
void org.apache.wicket.behavior.IBehaviorListener.onRequest()]

Root cause:

org.apache.wicket.WicketRuntimeException: component
container:users:table:rows:3:cells:1:cell:link not found on page
com.foo.BarPage[id = 2], listener interface = [RequestListenerInterface
name=IBehaviorListener, method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget
(AbstractRequestCycleProcessor.java:411)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(
AbstractRequestCycleProcessor.java:456)
at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(
WebRequestCycleProcessor.java:139)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1152)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1248)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:489)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:343)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java
:121)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
ServletHandler.java:1093)
at
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal
(OpenEntityManagerInViewFilter.java:111)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(
OncePerRequestFilter.java:75)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java
:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(
HttpConnection.java:830)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java
:227)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(
BoundedThreadPool.java:442)


Re: How To Change Page Store Size in DiskPageStore?

2007-11-14 Thread Johan Compagner
we discussed it and maybe there is a way by using the life cycle event of
the wicket servlet/filter..

When we get a clean shutdown we then just write a file to disk.
and the wicket load we read that file in and delete it again.

If there is no file it was a hard kill, and we can delete the pagestore
files.

Then i hope that the life cycle events works always when you shutdown the
complete container
or undeploy/redeploy the webapplication in a live system.

johan



On Nov 14, 2007 9:21 PM, Johan Compagner [EMAIL PROTECTED] wrote:

 i don't get this picture. What do you mean with a PageStore thread touches
 this
 file every 5 minutes? What does that bring us? Why can it suddenly remove
 files?
 Because yes the previous page store isn't there anymore, the server did
 restart
 so the file isn't being touched. and then what? Why can't it delete?

 Again it a PageStore is not leading, yes it creates the files but it has
 no way to know
 if it can delete it, The only possible way i could think of if there was
 an API in the servlet
 spec for example on the context where i could ask for all the live session
 ids.
 That would be the only way to do it.

 An unique file or unique id its still the same, there is nothing unique
 about a pagestore
 a page store from process B can or must be able to read files in from a
 previous process B
 that doesnt matter. There is no automatic way, it has to be configured for
 deployment
 wicket can't assume anything.

 But still i am also not conviced that wicket needs to do this by a thread.
 We just have to document
 it then there must be a cleanup processs or scheduler if the server does
 crash or is not terminated gracefully.
 We could introduce such a thread in wicket if users really see the need
 for it.

 johan


 On Nov 14, 2007 8:25 PM, Chris Lintz [EMAIL PROTECTED] wrote:

 
  There are still other ways around this.  If every process registered
  itself
  via unique file in a known directory and a Page Store thread touched
  this
  file every say 5 minutes, this gives more information to a thread to
  know
  whether or not delete a Page Store directory associated with unique ID.
 
  For example,
 
  MyWebSite-filestore/running_processes/uid1
  MyWebSite-filestore/running_processes/uid2
  MyWebSite-filestore/running_processes/uid2
 
  Each Page store thread would then check the uid files that it did not
  create.  For example, process 1 would check to see if uid1 and uid2 have
 
  been touched in the last hour (just making up something way greater than
  5
  minutes).  If not, remove their associated PageStore files.
 
  I will admit this is a bit more involved, but i am trying to present a
  solution that doesn't require any configuration from a user perspective.
 
 
 
 
  Johan Compagner wrote:
  
   no it doesnt matter what id i generate or get. This is still not
   enough because it doesnt say any thing if i can delete it or not. i
   have an id 1 then i restart and i have id 2 can i then delete
   everything from 1? No i cant because there could be live sessions from
   1.
  
   On 11/14/07, Chris Lintz [EMAIL PROTECTED] wrote:
  
   The process ID is just an idea for a unique ID.  If that wont work
  for
   you,
   lets dream another unique ID .
  
  
  
   Johan Compagner wrote:
   
ohh wait that also doesn't work (process id can also be generated
  once
ofcourse) but you can have mulitply dirs created with 10 different
processes that are all valid. so that doesn't solve anything
   
On 11/14/07, Johan Compagner [EMAIL PROTECTED] wrote:
can you get the current process id by general api in java? have to
 
look at Runtime then.
   
On 11/14/07, Chris Lintz [EMAIL PROTECTED] wrote:

 That makes sense.  Another thought that possibly makes it a bit
   easier
is
to
 name the page store directories with a unique process
  identifier.
   For
 example, if my session ID is B31598D4B206B75161AFE08FB5610D54.n1and
the
 process ID is 123456, then the Page store directory would be:


   MyWebSite-filestore/123456/B31598D4B206B75161AFE08FB5610D54.n1

 With a structure like that it would be easy for a thread to
  remove
   the
Page
 store directories that do not have the current process ID.

 Just a thought.





 Johan Compagner wrote:
 
  Yes the pagestore knows which files it makes, but it is not
  the
controller
  of those files
  because the only thing that controls if the file must be
  deleted
   or
not
is
  the servlet container
  with the session objects.
 
  and as far as i know there is no api where i can ask which
   sessions
are
  still active.
  So the only thing we could do is have a thread running that is
   waking
up
  every day once
  and checks if there are files older then X. And that thread
  must
   be
  configured by you
  explicitly setting the timeout that you want 

Wicket-Auth

2007-11-14 Thread rmoskal

Forgive having more questions than answers, but I'm really been enjoying
putting together a real application with Wicket and have been working with
the Wicket-auth code, specifically with annotations.

I have no problem with using 

@AuthorizeInstantiation(ADMIN)

when applied to a page or even a panel

However, the AuthorizeAction doesn't seem to have any effect at all

@AuthorizeAction(action=Component.RENDER, roles={ADMIN})

Is there something special I have to do to enable this feature? Any push in
the right direction would be greatly appreciated.


Thanks and regards,
-- 
View this message in context: 
http://www.nabble.com/Wicket-Auth-tf4808151.html#a13756953
Sent from the Wicket - User mailing list archive at Nabble.com.


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



French companies working with Wicket

2007-11-14 Thread Hugues Pichereau

Hi,

I was wondering if there are companies in France (and especially near Paris)
known to use Wicket (except Anyware Technologies, at Toulouse, which seems
well known for that) ?

Regards,
Hugues

-
Regards,
Hugues
-- 
View this message in context: 
http://www.nabble.com/French-companies-working-with-Wicket-tf4808136.html#a13756899
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Using the WicketTester WITHOUT rendering a response on submit

2007-11-14 Thread mclev



mclev wrote:
 
 4. Can I test that the response page is what I expect when when I first
 render and when i submit my form
 
 So, call me crazy, but it occurs to me that it would be nice if I could
 unit test just my page, verifying that when the code in my page finishes
 executing everything is what I expect. I don't really care if the response
 page renders properly (I'll test that in a unit test for that page), I
 just want to know that the logic in my page in sending off to the new
 page.
 
 

So I figured out a way to do this by extending the
WebRequestCycleProcessor.respond methods. :

public class TestingWebRequestCycleProcessor extends
WebRequestCycleProcessor {

private boolean respondingSuspended = false;

public TestingWebRequestCycleProcessor(){
super();
}

public boolean isRespondingSuspended() {
return respondingSuspended;
}

public void setRespondingSuspended(boolean respondingSuspended) {
this.respondingSuspended = respondingSuspended;
}

@Override
public void respond(RequestCycle requestCycle)
{
if (isRespondingSuspended()){
return;
}

super.respond(requestCycle);
}

@Override
public void respond(RuntimeException e, RequestCycle requestCycle)
{
if (isRespondingSuspended()){
return;
}

super.respond(e, requestCycle);
}
}

then overriding the WicketTester.DummyApplication:

public class TestingWebApplication  extends
WicketTester.DummyWebApplication{

private TestingWebRequestCycleProcessor requestProcessor;

@Override
protected IRequestCycleProcessor newRequestCycleProcessor()
{
requestProcessor =  new TestingWebRequestCycleProcessor();
return requestProcessor;
}

public void suspendResponding(){
requestProcessor.setRespondingSuspended(true);
}

public void unsuspendResponding(){
requestProcessor.setRespondingSuspended(false); 
}
}


now my test looks like this:

@Test
public void testSubmitExistingPart(){
// setup for modifying a part (part has an id -- found by dao)
setUp();
final Part part = new MockPart(10);
final PartDAO mockDAO = module.getmock();
mockery.checking(new Expectations(){{
one(mockDAO).findPart(part.getId()); 
will(returnValue(part));
one(mockDAO).save(with(same(part)));
}});
PageParameters params = new PageParameters(id=+ part.getId());
Page page = new PartDetailPage(params); 
tester.startPage(page);

// simulate entry of part data
FormTester formTester = tester.newFormTester(inputForm);
String barcode = 123;
String name = ABC;
String description = XYZ;
enterFormData(formTester, barcode, name, description);

testApp.suspendResponding(); // so response won't be rendered
formTester.submit();

// verify values set properly in model;
assertModelUpdated(part, barcode, name, description);

// verify that response page is correct
// this now works -- even though the page isn't really
renderd
tester.assertRenderedPage(PartListPage.class);
}

I'm still new to wicket so if anybody thinks this is this is crazy please
let me know.


-- 
View this message in context: 
http://www.nabble.com/Using-the-WicketTester-WITHOUT-rendering-a-response-on-submit-tf4801394.html#a13757593
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Injecting services into Resources using wicket-spring-annotations

2007-11-14 Thread Enrique Rodriguez
On Nov 13, 2007 3:02 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 in the resource's constructor add this line:

 InjectorHolder.getInjector().inject(this);

 then you can use that class just like a component

 -igor

Thank you!  Of course, this worked perfectly.  I was happy to find I
could also pass parameters similar to the strategy employed by
mountBookmarkablePage.

Enrique

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



Re: Using the WicketTester WITHOUT rendering a response on submit

2007-11-14 Thread Timo Rantalaiho
On Tue, 13 Nov 2007, mclev wrote:
 1. Can I use Guice injection in a way that I can test my forms without the
 need for a test database.

In the little experimentation I've done, I have found that
the most straightforward way with single components without
contained guice-depndent components is to set the dependencies
directly to the fields, without going via Guice.

In more complex scenarios where you don't have control over 
the creation of all guice-dependent components you can easily
add a custom GuiceComponentInstantiationListener to your 
Application in the test case after creating the Application but
before creating the component under test.

 I figured out how to extend the WicketTester to do Guice injection (pretty
 simple) with a little playing around. Then I was able to mock my DAO (using
 JMock) which then gets injected by Guice via my GuiceWicketTester. This is
 great: my tests can run without a backend DB.

This is unconventional as far as I know. Normally you would
not extend WicketTester but maybe provide a testing subclass
of your APplication to it and just make WicketTester use 
that (in 1.3, I think that in 1.2 this was more limited).
Even that is not strictly needed as you can always add
custom IComponentInstantiationListeners to any APplication, 
including DummyWebApplication that WicketTester uses by
default.

 So, call me crazy, but it occurs to me that it would be nice if I could
 unit test just my page, verifying that when the code in my page finishes
 executing everything is what I expect. I don't really care if the response
 page renders properly (I'll test that in a unit test for that page), I just
 want to know that the logic in my page in sending off to the new page.

Rendering the page causes some overhead (WicketTester tests
seem to be a bit slower that orthodox unit tests, and XML
parsing has shown up in some profiling we did a while back)
but for me the added benefit of simplicity and automatic
checking of matching component hierarchy in Java and HTML
has outweighed the cost.

Still your approach is academically very interesting :)

BTW, if you're interested in testing and use jMock you 
might want to check out JDave and its excellent Wicket
support, http://www.jdave.org/ .

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

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



Re: Wicket OSGi

2007-11-14 Thread Ernesto Reinaldo Barreiro

Hi Serge,

The main benefits I see are:

-modularity: now our applications are composed of small modules adding 
specific functionality (e.g. scheduling, reporting,...). You don't need 
to use the whole stack but just those needed for your particular 
application (or those for which a customer has paid for;-).
-pluggability. For instance, just by dropping a new bundle into the 
OSGi runtime all tables in our applications can suddenly  export 
themselves to excel or pdf, or by adding another bundle tables can save 
snapshots of themselves, or a new bundle may add menu entries to the 
main application flow. All  this without the need to stop the 
application. This is possible because many of our components consult 
some services, acting as extension points, at the time of building 
themselves. The bundles adding extra functionality can have  also 
extension points  that you can use to configure them  (e.g. you may 
define  exactly how  you want to export to PDF or excel (headers, 
colors, and so on). So it opens up a lot of possibilities...


Ernesto

Serge Libotte wrote:

Hi Ernesto,

You tell about some problems you met but could you summarize the benefits
you had by adopting OSGI?

Thanks,

Serge.


2007/11/14, Ernesto Reinaldo Barreiro [EMAIL PROTECTED]:
  

We have gather some experience on using wicket and OSGi:  we have been
using them together for almost a year now. Instead of going the PAX way
we chose to tie ourselves to equinox implementation of OSGi and we use
some eclipse extensions to avoid class loading problems (look for
*Eclipse*-*RegisterBuddy* header on manifest files). We have encountered
all kinds of class loading related problems (e.g. when you want to
integrate Hibernate into the picture or deploying the applicition into a
real application server) but after having dealt with all these
problems  we are quite happy with the decision of going OSGi.
Additionally, if you use eclipse 3.3. for development, it comes  with a
plugin version  of Jetty that is quite handy for development...

AFAIK if you plan to deploy your application in a real application
server  you will have to use equinox anyway because is the only
implementation providing a Bridge servlet (that allows to start an OSGi
runtime insede your application server). Here we have had class loading
problems well as (in some application servers) you cannot simply do a
JNDI lookup from withing a not WEB thread...

Best regards,

Ernesto

Thies Edeling wrote:


Hello all,

Does anyone have any experience with using Wicket and OSGi? I'm
looking for the most flexible way of composing an application and
deploying Wicket pages/panels as OSGi bundles seems like a nice way.I
noticed the Pax Wicket project but am not sure how stable that is.

regards,
Thies

  



  




Re: How can I switch page direction (LTR-RTL)?

2007-11-14 Thread nlif

Thanks. What is the attribute modifier?

Naaman



alshamsi wrote:
 
 In your html page you can use the set the dir attribute of the html tag 
 to the direction you want
 
 html xmlns=http://www.w3.org/1999/xhtml;  dir=ltr
 
 I believe you can do so automatically using the new attribute modifier.
 
 Regards
 Alshamsi
 
 
 nlif wrote:
 Hi all,

 I would like to be able to set the page direction: right-to-left or
 left-to-right.
 This can be done via the browser's view - switch page direction
 menu-option,
 but I need to be able to set this dynamically (i.e. by the application),
 based on the locale.
 Is this supported in Wicket?


 Thanks,
 Naaman


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

-- 
View this message in context: 
http://www.nabble.com/How-can-I-switch-page-direction-%28LTR-RTL%29--tf4805391.html#a13762990
Sent from the Wicket - User mailing list archive at Nabble.com.


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