Re: Session timeout - AJAX-enabled controls

2009-11-20 Thread David Matoušek
It was happening to me on Wicket examples page too. Especially on 
AjaxFallbackDataTable Example. 
?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.AjaxDataTablePage
I just checked it but now it seems to be working correctly. What version 
of Wicket are examples on url:

http://www.wicket-library.com/wicket-examples/
running and were they changed lately?
I am using 1.3.6 so maybe it was fixed in 1.4.x versions.

David Matousek


I do not have that problem: if session expires any action the user does
triggering a server round trip, AJAX or not, on a protected page redirects
me to the login page... Can you post more details?

Best,

Ernesto

2009/11/20 Carlo Camerino carlo.camer...@gmail.com

  

yes we also have this prob lem For example i use a wicket in
dicating ajax button in our logi n page. If thne user doesn t click a
link that moves a page he will not be able to k now that the session
has i ndeed expired. The screen o ly shows the rotating image  but
nothing happens.  but if i use a normal submit li nk, im immeddiately
redirected..
Some clients didnt mind it bbut some clients do

thanks

On 11/20/09, Igor Vaynberg igor.vaynb...@gmail.com wrote:


afair any ajax interaction on an expired page causes the same reaction
as a non-ajax interaction - going to the page expired page. open a bug
with a quickstart if that is not the case.

-igor

2009/11/19 David Matoušek david.matou...@monetplus.cz:
  

Hi,
I have a problem with ajax behavior, that i use to fill various


dropdowns


by
data from database.
When session expires(user was inactive), non-ajax controls correctly
redirect me to some kind of Error page. Thats correct.
Components that have defined ajax behavior to update another components
don't redirect, and doesn't update another components either.
Is that Wicket feature, or a bug? Can components with ajax behaviors be
forced to redirect to error page on session expire like non-ajax ones


do?


Any suggestions?

Thanks for reply

David Matousek




--
Tato zprava byla prohledana na vyskyt viru
a nebezpecneho obsahu antivirovym systemem
MailScanner a zda se byt cista.


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




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


  

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





  



--
Tato zprava byla prohledana na vyskyt viru
a nebezpecneho obsahu antivirovym systemem
MailScanner a zda se byt cista.



Re: CompoundPropertyModel

2009-11-20 Thread Николай Кучумов
Hello, Alex, Jeremy and others.

That's weird. Really weird.
You know what?
Seems that my browser was causing the error...
If i open my site via a bookmark, it outputs the error.
However if i open a new tab and type in the URL manually, the error doesn't
appear.
So, an advice to all of the Firefox users: don't bookmark the link to your
web application!


2009/11/14 Alex Rass a...@itbsllc.com

 Kolya,

 2 things:
 1) If you still have the old setup:
  Try stopping server, deploying your stuff to it, starting server.
  I've had issues with redeploying at runtime (hot deploy) with Tomcat
 (which is what Glassfish is based on).  This is where Jeremy's advice to
 run
 Jetty is a good idea.

 2) Make sure that you refresh the form in your web browser before you try
 to
 enter data and submit.  Wicket needs to do stuff to that form before you
 can
 submit it and if you keep same browser open between deployments, you are
 sending data back to wicket that it knows nothing about, so it blows up
 with
 pageexpired.

 The fact that you don't get serialization errors in the log (if it wasn't
 serialized) is b/c it didn't get that far yet, so problems are elsewhere.

 Hope this helps,
 - Alex.

 -Original Message-
 From: Николай Кучумов [mailto:kuchum...@gmail.com]
 Sent: Saturday, November 14, 2009 9:33 AM
 To: users@wicket.apache.org
 Subject: Re: CompoundPropertyModel

 Hi, Jeremy.
 No, the log contained only this error...
 But to be honest, although it didn't fix the error, your advice is still
 valuable, because not all of the classes were Serializable.
 And you know what?
 I think I'll reinstall my application server.
 I used Glassfish 2 before, and this time I tried Glassfish 3, but it
 appeared to be a bitch...
 It hangs oftenly and operates strangely...
 So maybe it somehow messes with the sessions...
 I'll install Glassfish 2 back then, when I have more time for this (maybe
 tomorrow), and then I'll post the results here.
 Thanks for your reply.

 On Sat, Nov 14, 2009 at 5:11 PM, Jeremy Thomerson 
 jer...@wickettraining.com
  wrote:

  Do both Person and Credentials (and everything else Person holds on to)
  implement Serializable?
 
  Watch the logs to see if there are serialization errors.  It's a problem
 of
  the page not being in the session - which means it either didn't make it
  there or the session is somehow gone.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
  On Sat, Nov 14, 2009 at 7:26 AM, Николай Кучумов kuchum...@gmail.com
  wrote:
 
   Hello.
   I have a Person class, describing a person, which has a member
   credentials of type Credentials (username/password).
   I tried to make a registration page in this way:
  
   Page
   {
  super();
  
  Person person = [create a person with empty credentials];
  
  Form form = new Form(form, new CompoundPropertyModel(person));
  
  add(form);
  
  form.add(new TextField(familyName));
  form.add(new TextField(givenName));
  
  form.add(new TextField(credentials.userName));
  form.add(new TextField(credentials.passWord));
  
  // also add a submit button
   }
  
   And now when I push the Submit button, it outputs this error:
  
   org.apache.wicket.protocol.http.PageExpiredException: Cannot find the
   rendered page in session [pagemap=null,componentPath=0,versionNumber=0]
  
   I like the idea of compound object model, and I wouldn't like to
 deprive
   myself from using it just because of this strange error...
   Can you give me a hint on what have I done wrong in the code above?
  
 


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




Re: JQuery slider implementation broken in 1.4?

2009-11-20 Thread Martin Grigorov
for some reason the Javascript doesn't work.
the initializers do work, the handles are set at the specified positions
but 'change' and/or 'slide' events never come ...

On Fri, 2009-11-20 at 08:52 +0100, pieter claassen wrote:
 Has anybody recently made the JQuery slider implementation or or even just
 ran the demo? I don't get Ajax debug info in my debug window and no data
 makes it back to onChange().
 
 Thanks,
 Pieter



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



problems with WicketTester and Scala

2009-11-20 Thread Haim Ashkenazi
Hi

I'm playing around with wicket/scala and I found some odd behavior with 
WicketTester.

The code is here:
http://github.com/babysnakes/comnshours
revision: 6196415aa5910d984dd582e7a6aa28017e6f0dbc

The specific test is here:
http://github.com/babysnakes/comnshours/blob/6196415aa5910d984dd582e7a6aa28017e6f0dbc/web/src/test/scala/test/components/TechTableComponents.scala

The first problem is in line 78. When running the server manually when I follow 
the same steps I do in the test the feedback panel is empty, but in the test 
(if I remove the skip) it will fail because the feedback is not empty.

The second problem is in line 120. The form (val b) should have a Technician 
object as it's ModelObject but b.getModelObject returns null.

In order to run the server (although it's not required for these tests), 
CouchDB is required to run on localhost.

Any ideas?

Bye

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



PageExpiredException: Cannot find the rendered page in session

2009-11-20 Thread Wayne Pope
Hi,

we're seeing a few of these in production of late. I however cannot
reproduce them locally at the moment.
We're using wicket rc7.

Any ideas?

2009-11-20 13:43:09,170 ERROR -
hub.app.wicket.app.HubWebRequestCycle.onRuntimeException(HubWebRequestCycle.java:72)
72 HubWebRequestCycle - Runtime Exception!
org.apache.wicket.protocol.http.PageExpiredException: Cannot find the
rendered page in session
[pagemap=wicket-2,componentPath=20,versionNumber=0]
at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:190)
at 
hub.app.wicket.app.HubRequestCycleProcessor.resolve(HubRequestCycleProcessor.java:137)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:501)
at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
com.wideplay.warp.persist.PersistenceFilter$3.run(PersistenceFilter.java:141)
at 
com.wideplay.warp.persist.internal.Lifecycles.failEarlyAndLeaveNoOneBehind(Lifecycles.java:29)
at 
com.wideplay.warp.persist.PersistenceFilter.doFilter(PersistenceFilter.java:155)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at 
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)

thanks
Wayne

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



Flash and Wicket crossdomain.xml

2009-11-20 Thread Mathias Nilsson
Hi,

I have built a flash movie that get's data from a webservice. When trying to
access it in my webapp it complains. I read that I need to add a
crossdomain.xml so that
www.mysite.com/crossdomain.xml can be accessed.

How can I make this file viewable this way using wicket?


Wicket datepicker disable weekdays

2009-11-20 Thread Muro Copenhagen
Hi,

I tried to google for this feature i want without any luck :)

I want to use the wicket datepicker but i want to disable fridays, saturdays
and sundays.

Does anyone have a clue on how to achieve this with the datepicker ?

Thanks in advance...

Best Regards
Muro


Re: Wicket datepicker disable weekdays

2009-11-20 Thread Martin Makundi
Hi!

Did you look at the api documentation:

http://developer.yahoo.com/yui/calendar/

**
Martin

2009/11/20 Muro Copenhagen copenha...@gmail.com:
 Hi,

 I tried to google for this feature i want without any luck :)

 I want to use the wicket datepicker but i want to disable fridays, saturdays
 and sundays.

 Does anyone have a clue on how to achieve this with the datepicker ?

 Thanks in advance...

 Best Regards
 Muro


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



Re: Wicket datepicker disable weekdays

2009-11-20 Thread Muro Copenhagen
Hi Martin,

Thanks actually i did...but could not find something...

Maybe i have overlooked stuff ?

Best Regards

Muro

On Fri, Nov 20, 2009 at 3:27 PM, Martin Makundi 
martin.maku...@koodaripalvelut.com wrote:

 Hi!

 Did you look at the api documentation:

 http://developer.yahoo.com/yui/calendar/

 **
 Martin

 2009/11/20 Muro Copenhagen copenha...@gmail.com:
  Hi,
 
  I tried to google for this feature i want without any luck :)
 
  I want to use the wicket datepicker but i want to disable fridays,
 saturdays
  and sundays.
 
  Does anyone have a clue on how to achieve this with the datepicker ?
 
  Thanks in advance...
 
  Best Regards
  Muro
 

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




Re: strange error

2009-11-20 Thread Douglas Ferguson
I am on goto meeting watching a user get this on the app in real time.

I can recreate it when using XP.

D/

On Nov 20, 2009, at 1:12 AM, Martin Makundi wrote:

 I get this quite often on our production site, how can you reproduce
 it?  My guess is that it somehow relates to invalid session and
 clicking stale links on the page. We get this whenever googlebot or
 similar browses our pages.

 **
 Martin

 2009/11/20 Douglas Ferguson doug...@douglasferguson.us:
 I am able to consistently reproduce this but only on win xp.

 D/

 On Nov 19, 2009, at 4:27 PM, Douglas Ferguson wrote:

 I have a user who is reporting a really strange error.

 The error seems to indicate that the a component is not on the page when it 
 is visible on the page.
 The error is also intermittent.


 D/

 Nov 19 16:06:56 ERROR [TP-Processor28] errors.NotifyUserOfException - 
 org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found on 
 page com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface name=IBehaviorListener, 
 method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()] source null
 org.apache.wicket.protocol.http.request.InvalidUrlException: 
 org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found on 
 page com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface name=IBehaviorListener, 
 method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
   at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
   at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
   at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
   at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
   at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
   at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
   at 
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
   at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
   at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
   at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
   at 
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
   at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
   at java.lang.Thread.run(Unknown Source)
 Caused by: org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found on 
 page com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface name=IBehaviorListener, 
 method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
   at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
   ... 20 more


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



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



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



-
To unsubscribe, e-mail: 

Re: request scoped variables

2009-11-20 Thread Douglas Ferguson
Yeah, but how to I guarantee that it will be detached and reloaded on every 
request.

Also, the application is already using the session as the factory for this 
loadable detachable.
Just out of curiosity, I cached it rather than always constructing a new one, 
and I started getting all sorts of errors. 

So then I started to think that perhaps I could try make sure that a new one is 
generated per request.
I tried using a thread local to hold the LDM on the session but that caused the 
same errors.

D/
 
On Nov 19, 2009, at 5:32 PM, Igor Vaynberg wrote:

 the whole point of LoadableDetachable is that you load it once and
 reuse it until detached, at least this is how LDM works.
 
 -igor
 
 On Thu, Nov 19, 2009 at 2:50 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 I am maintaining an app that is written in wicket.
 
 When a user logs in the userId is stored on the session.
 There is a method on the session object that returns a 
 UserAccountLoadableDetachable.
 This loadable detachable is created every time the method is called.
 
 My thought was that I could share it across the request.
 
 D/
 
 
 On Nov 19, 2009, at 3:53 PM, Igor Vaynberg wrote:
 
 whats the usecase for a request-scoped variable?
 
 you can have a transient field on the page that you null in ondetach()...
 
 otherwise you can access httpservletrequest and use attributes.
 
 -igor
 
 On Thu, Nov 19, 2009 at 1:51 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 is there a best practice for request scoped variables in wicket?
 
 D/
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


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



Re: Wicket datepicker disable weekdays

2009-11-20 Thread Martin Makundi
If it is'nt in the yui specs then you might have to hack it.

**
Martin

2009/11/20 Muro Copenhagen copenha...@gmail.com:
 Hi Martin,

 Thanks actually i did...but could not find something...

 Maybe i have overlooked stuff ?

 Best Regards

 Muro

 On Fri, Nov 20, 2009 at 3:27 PM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Hi!

 Did you look at the api documentation:

 http://developer.yahoo.com/yui/calendar/

 **
 Martin

 2009/11/20 Muro Copenhagen copenha...@gmail.com:
  Hi,
 
  I tried to google for this feature i want without any luck :)
 
  I want to use the wicket datepicker but i want to disable fridays,
 saturdays
  and sundays.
 
  Does anyone have a clue on how to achieve this with the datepicker ?
 
  Thanks in advance...
 
  Best Regards
  Muro
 

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




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



Re: Wicket datepicker disable weekdays

2009-11-20 Thread Martin Makundi
Or contribute ;)

2009/11/20 Martin Makundi martin.maku...@koodaripalvelut.com:
 If it is'nt in the yui specs then you might have to hack it.

 **
 Martin

 2009/11/20 Muro Copenhagen copenha...@gmail.com:
 Hi Martin,

 Thanks actually i did...but could not find something...

 Maybe i have overlooked stuff ?

 Best Regards

 Muro

 On Fri, Nov 20, 2009 at 3:27 PM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Hi!

 Did you look at the api documentation:

 http://developer.yahoo.com/yui/calendar/

 **
 Martin

 2009/11/20 Muro Copenhagen copenha...@gmail.com:
  Hi,
 
  I tried to google for this feature i want without any luck :)
 
  I want to use the wicket datepicker but i want to disable fridays,
 saturdays
  and sundays.
 
  Does anyone have a clue on how to achieve this with the datepicker ?
 
  Thanks in advance...
 
  Best Regards
  Muro
 

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





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



Re: strange error

2009-11-20 Thread Martin Makundi
 I can recreate it when using XP.

Doing what recreates it?

 D/

 On Nov 20, 2009, at 1:12 AM, Martin Makundi wrote:

 I get this quite often on our production site, how can you reproduce
 it?  My guess is that it somehow relates to invalid session and
 clicking stale links on the page. We get this whenever googlebot or
 similar browses our pages.

 **
 Martin

 2009/11/20 Douglas Ferguson doug...@douglasferguson.us:
 I am able to consistently reproduce this but only on win xp.

 D/

 On Nov 19, 2009, at 4:27 PM, Douglas Ferguson wrote:

 I have a user who is reporting a really strange error.

 The error seems to indicate that the a component is not on the page when 
 it is visible on the page.
 The error is also intermittent.


 D/

 Nov 19 16:06:56 ERROR [TP-Processor28] errors.NotifyUserOfException - 
 org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found on 
 page com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()] source null
 org.apache.wicket.protocol.http.request.InvalidUrlException: 
 org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found on 
 page com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
       at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
       at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
       at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
       at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
       at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
       at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
       at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
       at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
       at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
       at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
       at 
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
       at 
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
       at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
       at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
       at 
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
       at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
       at java.lang.Thread.run(Unknown Source)
 Caused by: org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found on 
 page com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
       at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
       at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
       at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
       ... 20 more


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



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



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



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

Re: request scoped variables

2009-11-20 Thread Martin Makundi
Why should it be detached every request if it is lightweight?

It seems you have a problem elsewhere? Maybe you have problems with
object equalities etc?

YOu can override MySession.detach to detach it.

**
Martin

2009/11/20 Douglas Ferguson doug...@douglasferguson.us:
 Yeah, but how to I guarantee that it will be detached and reloaded on every 
 request.

 Also, the application is already using the session as the factory for this 
 loadable detachable.
 Just out of curiosity, I cached it rather than always constructing a new one, 
 and I started getting all sorts of errors.

 So then I started to think that perhaps I could try make sure that a new one 
 is generated per request.
 I tried using a thread local to hold the LDM on the session but that caused 
 the same errors.

 D/

 On Nov 19, 2009, at 5:32 PM, Igor Vaynberg wrote:

 the whole point of LoadableDetachable is that you load it once and
 reuse it until detached, at least this is how LDM works.

 -igor

 On Thu, Nov 19, 2009 at 2:50 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 I am maintaining an app that is written in wicket.

 When a user logs in the userId is stored on the session.
 There is a method on the session object that returns a 
 UserAccountLoadableDetachable.
 This loadable detachable is created every time the method is called.

 My thought was that I could share it across the request.

 D/


 On Nov 19, 2009, at 3:53 PM, Igor Vaynberg wrote:

 whats the usecase for a request-scoped variable?

 you can have a transient field on the page that you null in ondetach()...

 otherwise you can access httpservletrequest and use attributes.

 -igor

 On Thu, Nov 19, 2009 at 1:51 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 is there a best practice for request scoped variables in wicket?

 D/

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



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



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



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



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



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



Re: strange error

2009-11-20 Thread Douglas Ferguson
I load the app and hit an ajax link.
It is a specific ajax link that fails not all..



On Nov 20, 2009, at 9:16 AM, Martin Makundi wrote:

 I can recreate it when using XP.
 
 Doing what recreates it?
 
 D/
 
 On Nov 20, 2009, at 1:12 AM, Martin Makundi wrote:
 
 I get this quite often on our production site, how can you reproduce
 it?  My guess is that it somehow relates to invalid session and
 clicking stale links on the page. We get this whenever googlebot or
 similar browses our pages.
 
 **
 Martin
 
 2009/11/20 Douglas Ferguson doug...@douglasferguson.us:
 I am able to consistently reproduce this but only on win xp.
 
 D/
 
 On Nov 19, 2009, at 4:27 PM, Douglas Ferguson wrote:
 
 I have a user who is reporting a really strange error.
 
 The error seems to indicate that the a component is not on the page when 
 it is visible on the page.
 The error is also intermittent.
 
 
 D/
 
 Nov 19 16:06:56 ERROR [TP-Processor28] errors.NotifyUserOfException - 
 org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found on 
 page com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()] source null
 org.apache.wicket.protocol.http.request.InvalidUrlException: 
 org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found on 
 page com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
   at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
   at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
   at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
   at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
   at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
   at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
   at 
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
   at 
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
   at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
   at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
   at 
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
   at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
   at java.lang.Thread.run(Unknown Source)
 Caused by: org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found on 
 page com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
   at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
   at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
   ... 20 more
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 

Re: request scoped variables

2009-11-20 Thread Douglas Ferguson
Good idea, I will double check the equals method.

The object is a hibernate pojo, which has to be detached because it can't be 
used after the hibernate session dies.
The hibernate session dies on every request.

D/

On Nov 20, 2009, at 9:19 AM, Martin Makundi wrote:

 Why should it be detached every request if it is lightweight?

 It seems you have a problem elsewhere? Maybe you have problems with
 object equalities etc?

 YOu can override MySession.detach to detach it.

 **
 Martin

 2009/11/20 Douglas Ferguson doug...@douglasferguson.us:
 Yeah, but how to I guarantee that it will be detached and reloaded on every 
 request.

 Also, the application is already using the session as the factory for this 
 loadable detachable.
 Just out of curiosity, I cached it rather than always constructing a new 
 one, and I started getting all sorts of errors.

 So then I started to think that perhaps I could try make sure that a new one 
 is generated per request.
 I tried using a thread local to hold the LDM on the session but that caused 
 the same errors.

 D/

 On Nov 19, 2009, at 5:32 PM, Igor Vaynberg wrote:

 the whole point of LoadableDetachable is that you load it once and
 reuse it until detached, at least this is how LDM works.

 -igor

 On Thu, Nov 19, 2009 at 2:50 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 I am maintaining an app that is written in wicket.

 When a user logs in the userId is stored on the session.
 There is a method on the session object that returns a 
 UserAccountLoadableDetachable.
 This loadable detachable is created every time the method is called.

 My thought was that I could share it across the request.

 D/


 On Nov 19, 2009, at 3:53 PM, Igor Vaynberg wrote:

 whats the usecase for a request-scoped variable?

 you can have a transient field on the page that you null in ondetach()...

 otherwise you can access httpservletrequest and use attributes.

 -igor

 On Thu, Nov 19, 2009 at 1:51 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 is there a best practice for request scoped variables in wicket?

 D/

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



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



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



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



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



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



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



Re: request scoped variables

2009-11-20 Thread Martin Makundi
 The object is a hibernate pojo, which has to be detached because it can't be
 used after the hibernate session dies. The hibernate session dies on every 
 request.

Why not? I reuse the hibernate pojos throughout the whole user web session.

**
Martin



 D/

 On Nov 20, 2009, at 9:19 AM, Martin Makundi wrote:

 Why should it be detached every request if it is lightweight?

 It seems you have a problem elsewhere? Maybe you have problems with
 object equalities etc?

 YOu can override MySession.detach to detach it.

 **
 Martin

 2009/11/20 Douglas Ferguson doug...@douglasferguson.us:
 Yeah, but how to I guarantee that it will be detached and reloaded on every 
 request.

 Also, the application is already using the session as the factory for this 
 loadable detachable.
 Just out of curiosity, I cached it rather than always constructing a new 
 one, and I started getting all sorts of errors.

 So then I started to think that perhaps I could try make sure that a new 
 one is generated per request.
 I tried using a thread local to hold the LDM on the session but that caused 
 the same errors.

 D/

 On Nov 19, 2009, at 5:32 PM, Igor Vaynberg wrote:

 the whole point of LoadableDetachable is that you load it once and
 reuse it until detached, at least this is how LDM works.

 -igor

 On Thu, Nov 19, 2009 at 2:50 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 I am maintaining an app that is written in wicket.

 When a user logs in the userId is stored on the session.
 There is a method on the session object that returns a 
 UserAccountLoadableDetachable.
 This loadable detachable is created every time the method is called.

 My thought was that I could share it across the request.

 D/


 On Nov 19, 2009, at 3:53 PM, Igor Vaynberg wrote:

 whats the usecase for a request-scoped variable?

 you can have a transient field on the page that you null in ondetach()...

 otherwise you can access httpservletrequest and use attributes.

 -igor

 On Thu, Nov 19, 2009 at 1:51 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 is there a best practice for request scoped variables in wicket?

 D/

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



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



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



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



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



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



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



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



Wicket YUI - Integration (Slider Question)

2009-11-20 Thread Corbin, James
Hello,

 

I am using the framework off the wicket-stuff trunk that wraps yui to
work with wicket.  I must say it works pretty well.

 

I did have a few questions on the slider that I hoped someone had
experience with at solving,

 

1. I cannot seem to get the tick marks to show up on the control?  Is
this not supported in the current implementation of the framework
wrapper?

2. Does the slider component support attaching ajax behaviors?  I am
looking to bind an ajax behavior (onchange) that updates a label with a
current value of the slider.  I assume this is possible and will try it
this morning but wanted to check the forum to see if its wasted effort.

 

Thanks,
J.D.



Re: Flash and Wicket crossdomain.xml

2009-11-20 Thread Jonas
Is the content of you crossdomain.xml 'static'? If so, I guess
you can just put that file into your web app's context root.
If you need the file content generated dynamically, I doubt
generating it in wicket is the easiest way to do it. I think
I would rather just use a simple servlet.

On Fri, Nov 20, 2009 at 2:23 PM, Mathias Nilsson
wicket.program...@gmail.com wrote:
 Hi,

 I have built a flash movie that get's data from a webservice. When trying to
 access it in my webapp it complains. I read that I need to add a
 crossdomain.xml so that
 www.mysite.com/crossdomain.xml can be accessed.

 How can I make this file viewable this way using wicket?


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



Re: PageExpiredException: Cannot find the rendered page in session

2009-11-20 Thread Igor Vaynberg
its a regular page expired exception...

-igor

On Fri, Nov 20, 2009 at 4:49 AM, Wayne Pope
waynemailingli...@googlemail.com wrote:
 Hi,

 we're seeing a few of these in production of late. I however cannot
 reproduce them locally at the moment.
 We're using wicket rc7.

 Any ideas?

 2009-11-20 13:43:09,170 ERROR -
 hub.app.wicket.app.HubWebRequestCycle.onRuntimeException(HubWebRequestCycle.java:72)
 72 HubWebRequestCycle         - Runtime Exception!
 org.apache.wicket.protocol.http.PageExpiredException: Cannot find the
 rendered page in session
 [pagemap=wicket-2,componentPath=20,versionNumber=0]
        at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:190)
        at 
 hub.app.wicket.app.HubRequestCycleProcessor.resolve(HubRequestCycleProcessor.java:137)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:501)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288)
        at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
 com.wideplay.warp.persist.PersistenceFilter$3.run(PersistenceFilter.java:141)
        at 
 com.wideplay.warp.persist.internal.Lifecycles.failEarlyAndLeaveNoOneBehind(Lifecycles.java:29)
        at 
 com.wideplay.warp.persist.PersistenceFilter.doFilter(PersistenceFilter.java:155)
        at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at 
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
        at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
        at 
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
        at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:619)

 thanks
 Wayne

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



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



Re: PageExpiredException: Cannot find the rendered page in session

2009-11-20 Thread Wayne Pope
 Ok I just want to clarify that if we get:

[pagemap=null,componentPath=20,versionNumber=0]

pagemap null thats not a problem?

thanks

On Fri, Nov 20, 2009 at 5:16 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 its a regular page expired exception...

 -igor

 On Fri, Nov 20, 2009 at 4:49 AM, Wayne Pope
 waynemailingli...@googlemail.com wrote:
 Hi,

 we're seeing a few of these in production of late. I however cannot
 reproduce them locally at the moment.
 We're using wicket rc7.

 Any ideas?

 2009-11-20 13:43:09,170 ERROR -
 hub.app.wicket.app.HubWebRequestCycle.onRuntimeException(HubWebRequestCycle.java:72)
 72 HubWebRequestCycle         - Runtime Exception!
 org.apache.wicket.protocol.http.PageExpiredException: Cannot find the
 rendered page in session
 [pagemap=wicket-2,componentPath=20,versionNumber=0]
        at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:190)
        at 
 hub.app.wicket.app.HubRequestCycleProcessor.resolve(HubRequestCycleProcessor.java:137)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:501)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288)
        at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
 com.wideplay.warp.persist.PersistenceFilter$3.run(PersistenceFilter.java:141)
        at 
 com.wideplay.warp.persist.internal.Lifecycles.failEarlyAndLeaveNoOneBehind(Lifecycles.java:29)
        at 
 com.wideplay.warp.persist.PersistenceFilter.doFilter(PersistenceFilter.java:155)
        at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at 
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
        at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
        at 
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
        at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:619)

 thanks
 Wayne

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



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



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



Corrupt URL for shared resource

2009-11-20 Thread Russell Morrisey
We are getting erroneous requests in our access log, where a URL for a shared 
resource, which is supposed to look like:
com.mycompany.mywidgets.Widget/icon.gif

...instead looks like:
com.mycompany.m564ywidgets.Widget/icon.gif

These bad requests result in an application error like:

ERROR [2009-11-18 08:20:11,080] SharedResourceRequestTarget - unable to lazily 
register shared resource com.mycompany.m564ywidgets.Widget/icon.gif
java.lang.ClassNotFoundException: com.mycompany.m564ywidgets.Widget/icon.gif
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at 
org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:103)
at 
org.apache.wicket.request.target.resource.SharedResourceRequestTarget.respond(SharedResourceRequestTarget.java:148)
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:680)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:979)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1054)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:706)
at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:356)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:201)

Can anyone provide insight as to where this bad URL might come from, or how to 
troubleshoot it? Any help is appreciated. Thanks!



RUSSELL E. MORRISEY
Programmer Analyst Professional
Mission Solutions Engineering, LLC

| p: 856.252.5084 | f: 856.778.7342 | russell.morri...@missionse.com | 
www.missionse.comhttp://www.missionse.com/
304 West Route 38, Moorestown, NJ 08057



This is a PRIVATE message. If you are not the intended recipient, please delete 
without copying and kindly advise us by e-mail of the mistake in delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any 
order or other contract unless pursuant to explicit written agreement or 
government initiative expressly permitting the use of e-mail for such purpose.


Re: PageExpiredException: Cannot find the rendered page in session

2009-11-20 Thread Igor Vaynberg
no, null is the name of the default pagemap

-igor

On Fri, Nov 20, 2009 at 8:30 AM, Wayne Pope
waynemailingli...@googlemail.com wrote:
  Ok I just want to clarify that if we get:

 [pagemap=null,componentPath=20,versionNumber=0]

 pagemap null thats not a problem?

 thanks

 On Fri, Nov 20, 2009 at 5:16 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 its a regular page expired exception...

 -igor

 On Fri, Nov 20, 2009 at 4:49 AM, Wayne Pope
 waynemailingli...@googlemail.com wrote:
 Hi,

 we're seeing a few of these in production of late. I however cannot
 reproduce them locally at the moment.
 We're using wicket rc7.

 Any ideas?

 2009-11-20 13:43:09,170 ERROR -
 hub.app.wicket.app.HubWebRequestCycle.onRuntimeException(HubWebRequestCycle.java:72)
 72 HubWebRequestCycle         - Runtime Exception!
 org.apache.wicket.protocol.http.PageExpiredException: Cannot find the
 rendered page in session
 [pagemap=wicket-2,componentPath=20,versionNumber=0]
        at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:190)
        at 
 hub.app.wicket.app.HubRequestCycleProcessor.resolve(HubRequestCycleProcessor.java:137)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:501)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288)
        at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
 com.wideplay.warp.persist.PersistenceFilter$3.run(PersistenceFilter.java:141)
        at 
 com.wideplay.warp.persist.internal.Lifecycles.failEarlyAndLeaveNoOneBehind(Lifecycles.java:29)
        at 
 com.wideplay.warp.persist.PersistenceFilter.doFilter(PersistenceFilter.java:155)
        at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at 
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at 
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
        at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
        at 
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
        at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:619)

 thanks
 Wayne

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



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



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



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



Re: PageExpiredException: Cannot find the rendered page in session

2009-11-20 Thread Ilja Pavkovic
Hi,

  Ok I just want to clarify that if we get:
 
 [pagemap=null,componentPath=20,versionNumber=0]
 
 pagemap null thats not a problem?
pagemap with name null indicates the default pagemap. Everything is fine :)

Best Regards,
Ilja Pavkovic

-- 
binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker

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



UploadWebRequest is actually a UploadWebRequest$MultipartRequest

2009-11-20 Thread Wayne Pope
Hello,

we get the following warning in our logs:
(UploadProgressBar.java:106) - UploadProgressBar will not work without
an UploadWebRequest. See the javadoc for details.

We do override in the application:
@Override
protected WebRequest
newWebRequest(javax.servlet.http.HttpServletRequest servletRequest) {
return new UploadWebRequest(servletRequest);
};


When I debug UploadProgressBar I see that:
if (!(RequestCycle.get().getRequest() instanceof UploadWebRequest))
{
log.warn(UploadProgressBar will not work without an
UploadWebRequest. See the javadoc for details.);
}

However RequestCycle.get().getRequest() is returning a
UploadWebRequest$MultipartRequest instance.

What are we doing wrong or is this a bug?

thanks

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



Re: Corrupt URL for shared resource

2009-11-20 Thread Igor Vaynberg
well. something is mangling it.

are all the requests coming from the same ip? maybe someone is just
messing with your server.

-igor

On Fri, Nov 20, 2009 at 8:41 AM, Russell Morrisey
russell.morri...@missionse.com wrote:
 We are getting erroneous requests in our access log, where a URL for a shared 
 resource, which is supposed to look like:
 com.mycompany.mywidgets.Widget/icon.gif

 ...instead looks like:
 com.mycompany.m564ywidgets.Widget/icon.gif

 These bad requests result in an application error like:

 ERROR [2009-11-18 08:20:11,080] SharedResourceRequestTarget - unable to 
 lazily register shared resource com.mycompany.m564ywidgets.Widget/icon.gif
 java.lang.ClassNotFoundException: com.mycompany.m564ywidgets.Widget/icon.gif
                at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
                at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
                at 
 org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:103)
                at 
 org.apache.wicket.request.target.resource.SharedResourceRequestTarget.respond(SharedResourceRequestTarget.java:148)
                at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
                at 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:680)
                at org.apache.wicket.RequestCycle.step(RequestCycle.java:979)
                at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1054)
                at 
 org.apache.wicket.RequestCycle.request(RequestCycle.java:706)
                at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:356)
                at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:201)

 Can anyone provide insight as to where this bad URL might come from, or how 
 to troubleshoot it? Any help is appreciated. Thanks!

 

 RUSSELL E. MORRISEY
 Programmer Analyst Professional
 Mission Solutions Engineering, LLC

 | p: 856.252.5084 | f: 856.778.7342 | russell.morri...@missionse.com | 
 www.missionse.comhttp://www.missionse.com/
 304 West Route 38, Moorestown, NJ 08057


 
 This is a PRIVATE message. If you are not the intended recipient, please 
 delete without copying and kindly advise us by e-mail of the mistake in 
 delivery.
 NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any 
 order or other contract unless pursuant to explicit written agreement or 
 government initiative expressly permitting the use of e-mail for such purpose.


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



Re: PageExpiredException: Cannot find the rendered page in session

2009-11-20 Thread Wayne Pope
thanks IIja and Igor
:-)

On Fri, Nov 20, 2009 at 5:54 PM, Ilja Pavkovic
ilja.pavko...@binaere-bauten.de wrote:
 Hi,

  Ok I just want to clarify that if we get:

 [pagemap=null,componentPath=20,versionNumber=0]

 pagemap null thats not a problem?
 pagemap with name null indicates the default pagemap. Everything is fine :)

 Best Regards,
        Ilja Pavkovic

 --
 binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
 Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker

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



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



Passing models to panels - Couldn't resolve model type of Model

2009-11-20 Thread Kogel, Jonck-van-der
Hi,
I'm have a question about my application design and whether I should
pass a model to a panel or an id and create a new
LoadableDetachableModel in the panel. Here is a basic layout of my app:
 
I have taken out the non-relevant parts for brevity.
 
My domain model is basically as follows:
Base class is ARF. It has an owner, a keeper and a user. The owner,
keeper and user all have a correspondence address and a visiting
address.
 
The layout of my application reflects this. The main screen has 3 tabs,
one for owner, one for user and one for keeper. These tabs are panels. I
also defined one addressPanel to display all the addresses.
 
So when I am building my view, it is as follows:
 
On my page I create a LoadableDetachableModel as follows:
 
IModelARF arfModel = new LoadableDetachableModelARF() {
 @Override
 protected ARF load() {
  return arfService.load(arfId);
 }
}; 
 
I pass this model on to my tabs panel:
 
public class ArfPageTabsPanel extends Panel {
 public ArfPageTabsPanel(String id, IModelARF arfModel) {
  super(id);
  add(new TabOwner(tabOwner, arfModel));
  add(new TabKeeper(tabKeeper, arfModel));
  add(new TabUser(tabUser, arfModel));
 }
}
 
The TabOwner class is as follows:
 
public class TabOwner extends Panel {
 public TabOwner(String id, IModelARF arfModel) {
  super(id);
  
  add(new AddressPanel(correspondenceAddress, Correspondentie-adres,
new PropertyModelAddress(arfModel, owner.correspondenceAddress)));
  add(new AddressPanel(visitingAddress, Bezoekadres, new
PropertyModelAddress(arfModel, owner.visitingAddress)));
 }
}
 
the TabKeeper and TabUser classes are much the same as the TabOwner
class (probably I could do some code reuse here, I'll do that when
everything is working and I understand it all).
 
And then the AddressPanel is as follows:
 
public class AddressPanel extends Panel {
 public AddressPanel(String id, String addressHeader, IModelAddress
addressModel) {
  super(id);
  add(new Label(addressHeader, addressHeader));
  add(new TextFieldString(street, new
PropertyModelString(addressModel, street)));
  add(new TextFieldString(houseNr, new
PropertyModelString(addressModel, houseNr)));
  add(new TextFieldString(houseNrExt, new
PropertyModelString(addressModel, houseNrExt)));
  add(new TextFieldString(zipcode, new
PropertyModelString(addressModel, zipcode)));
  add(new TextFieldString(city, new
PropertyModelString(addressModel, city)));
 }
}
 
 
So I am nesting all my models here, since the underlying arfModel is a
LoadableDetachableModel and I don't want to get my panels and the main
view out of sync. The problem is however that sometimes there is no
owner/keeper/user and hence also no addresses for that relation. When I
do load an ARF that has a null keeper for example, my console is flooded
with the following message:
 
2009-11-20 17:42:02,274 WARN [AbstractTextComponent] Couldn't resolve
model type of
Model:classname=[org.apache.wicket.model.PropertyModel]:nestedModel=[Mod
el:classname=[org.apache.wicket.model.PropertyModel]:nestedModel=[Model:
classname=[com.bmw.preparer2.view.ArfPage$1]:attached=true:tempModelObje
ct=[com.bmw.preparer2.domain@d737e3]]:expression=[user.visitingAddre
ss]]:expression=[city] for [MarkupContainer [Component id = city]],
please set the type yourself.

 

I am assuming that this has to do with that I am nesting my models and
that one of them is null. So in the AddressPanel I am creating a
PropertyModel where the passed on model is potentially null.

So my question is, how do I handle such a situation? Please advise.

Thanks very much, Jonck van der Kogel



How can I disable a IFormValidator?

2009-11-20 Thread Wayne Pope
Hello,

I have a form that has a AbstractFormValidator added to it. This does
some validation on a couple of formcomponents.

However in some situations on of the components is not visible and we
get the warming:

IFormValidator in form `formContainer:form` depends on a component
that has been removed from the page or is no longer visible.

How can I diable the AbstractFormValidator so that we don't get this
warning? (as it doesn't need validating).

many thanks
Wayne

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



Posting A Form To NonWicket

2009-11-20 Thread Balaji C
I've a wicket form with input elements. I would like to post this form to a
non-wicket url. Is it possible to post this form from submit event of wicket
button? I google and couldn't find any clear solution. Any help is
appreciated. If any other alternative, please let me know. Thanks.


Re: Posting A Form To NonWicket

2009-11-20 Thread Edward Zarecor
Is there a requirement to process the data in any way before
submitting to the remote application?  Why wouldn't you just use an
HTML form with the appropriate action pointing to the remote host?
Wicket may not need to know about this form.

Ed.


On Fri, Nov 20, 2009 at 12:14 PM, Balaji C cho...@gmail.com wrote:
 I've a wicket form with input elements. I would like to post this form to a
 non-wicket url. Is it possible to post this form from submit event of wicket
 button? I google and couldn't find any clear solution. Any help is
 appreciated. If any other alternative, please let me know. Thanks.


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



RE: Posting A Form To NonWicket

2009-11-20 Thread Alex Rass
You could write something on the server end (or your wicket app) that would
do it for you.
Just use apache http commons or write your own post code. Easy stuff (open
socket, couple commands, dump input, close socket).

It can even get back to the user with error codes from the other server etc
if you wanna be spiffy.


-Original Message-
From: Balaji C [mailto:cho...@gmail.com] 
Sent: Friday, November 20, 2009 12:15 PM
To: users@wicket.apache.org
Subject: Posting A Form To NonWicket

I've a wicket form with input elements. I would like to post this form to a
non-wicket url. Is it possible to post this form from submit event of wicket
button? I google and couldn't find any clear solution. Any help is
appreciated. If any other alternative, please let me know. Thanks.


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



Re: UploadWebRequest is actually a UploadWebRequest$MultipartRequest

2009-11-20 Thread Igor Vaynberg
looks like a bug.

-igor

On Fri, Nov 20, 2009 at 8:55 AM, Wayne Pope
waynemailingli...@googlemail.com wrote:
 Hello,

 we get the following warning in our logs:
 (UploadProgressBar.java:106) - UploadProgressBar will not work without
 an UploadWebRequest. See the javadoc for details.

 We do override in the application:
 @Override
        protected WebRequest
 newWebRequest(javax.servlet.http.HttpServletRequest servletRequest) {
                return new UploadWebRequest(servletRequest);
        };


 When I debug UploadProgressBar I see that:
 if (!(RequestCycle.get().getRequest() instanceof UploadWebRequest))
 {
        log.warn(UploadProgressBar will not work without an
 UploadWebRequest. See the javadoc for details.);
 }

 However RequestCycle.get().getRequest() is returning a
 UploadWebRequest$MultipartRequest instance.

 What are we doing wrong or is this a bug?

 thanks

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



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



Resolving image locations

2009-11-20 Thread Loritsch, Berin C.
I'm using the Wicket Image object, and I'm having a hard time ensuring
that it resolves properly.

I have a base class to set up the UI template for the site, including
the logo image.  I added a new page in a child package, and as a result
the Image declared in the base class is resolving relative to the new
class.  This is counter-intuitive, and violates the expectations of
object oriented programming.  Here is the basic situation:

package.SiteTemplate

Declares Image(Logo)


package.images.Logo
---
Contains the image


package.subsystem.NewPage
-
Uses logo declared in SiteTemplate,
But browser can't find it



What I want to do is tell Wicket to always provide one path for the Logo
image, so I don't have to duplicate the logo in several packages.  I
attempted to hardcode the path in plain HTML, but that URL broke as soon
as the IDE put the app in a context.  I'd like Wicket to take care of
the base path, but not treat it like a resource that needs to be
internationalized.  How do I do that?

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



Re: Passing models to panels - Couldn't resolve model type of Model

2009-11-20 Thread Igor Vaynberg
hrm, we should change that message to info rather then warn, warn is a
little too strong.

the problem is that textfield tries to resolve what type of object it
is bound to (a string, an int, etc) but cant because the model object
is null.

you can silence the warning by explicitly setting a type on the textfield, eg

 add(new TextFieldString(street, new
PropertyModelString(addressModel, street), ***String.class***));

or, since you will get an NPE if you submit the form, a better way
would be to hide the form entirely

addresspanel { isvisible() { return getmodelobject()!=null; }}

-igor


On Fri, Nov 20, 2009 at 9:31 AM, Kogel, Jonck-van-der
jonck-van-der.ko...@bmw.nl wrote:
 Hi,
 I'm have a question about my application design and whether I should
 pass a model to a panel or an id and create a new
 LoadableDetachableModel in the panel. Here is a basic layout of my app:

 I have taken out the non-relevant parts for brevity.

 My domain model is basically as follows:
 Base class is ARF. It has an owner, a keeper and a user. The owner,
 keeper and user all have a correspondence address and a visiting
 address.

 The layout of my application reflects this. The main screen has 3 tabs,
 one for owner, one for user and one for keeper. These tabs are panels. I
 also defined one addressPanel to display all the addresses.

 So when I am building my view, it is as follows:

 On my page I create a LoadableDetachableModel as follows:

 IModelARF arfModel = new LoadableDetachableModelARF() {
 �...@override
  protected ARF load() {
  return arfService.load(arfId);
  }
 };

 I pass this model on to my tabs panel:

 public class ArfPageTabsPanel extends Panel {
  public ArfPageTabsPanel(String id, IModelARF arfModel) {
  super(id);
  add(new TabOwner(tabOwner, arfModel));
  add(new TabKeeper(tabKeeper, arfModel));
  add(new TabUser(tabUser, arfModel));
  }
 }

 The TabOwner class is as follows:

 public class TabOwner extends Panel {
  public TabOwner(String id, IModelARF arfModel) {
  super(id);

  add(new AddressPanel(correspondenceAddress, Correspondentie-adres,
 new PropertyModelAddress(arfModel, owner.correspondenceAddress)));
  add(new AddressPanel(visitingAddress, Bezoekadres, new
 PropertyModelAddress(arfModel, owner.visitingAddress)));
  }
 }

 the TabKeeper and TabUser classes are much the same as the TabOwner
 class (probably I could do some code reuse here, I'll do that when
 everything is working and I understand it all).

 And then the AddressPanel is as follows:

 public class AddressPanel extends Panel {
  public AddressPanel(String id, String addressHeader, IModelAddress
 addressModel) {
  super(id);
  add(new Label(addressHeader, addressHeader));
  add(new TextFieldString(street, new
 PropertyModelString(addressModel, street)));
  add(new TextFieldString(houseNr, new
 PropertyModelString(addressModel, houseNr)));
  add(new TextFieldString(houseNrExt, new
 PropertyModelString(addressModel, houseNrExt)));
  add(new TextFieldString(zipcode, new
 PropertyModelString(addressModel, zipcode)));
  add(new TextFieldString(city, new
 PropertyModelString(addressModel, city)));
  }
 }


 So I am nesting all my models here, since the underlying arfModel is a
 LoadableDetachableModel and I don't want to get my panels and the main
 view out of sync. The problem is however that sometimes there is no
 owner/keeper/user and hence also no addresses for that relation. When I
 do load an ARF that has a null keeper for example, my console is flooded
 with the following message:

 2009-11-20 17:42:02,274 WARN [AbstractTextComponent] Couldn't resolve
 model type of
 Model:classname=[org.apache.wicket.model.PropertyModel]:nestedModel=[Mod
 el:classname=[org.apache.wicket.model.PropertyModel]:nestedModel=[Model:
 classname=[com.bmw.preparer2.view.ArfPage$1]:attached=true:tempModelObje
 ct=[com.bmw.preparer2.domain@d737e3]]:expression=[user.visitingAddre
 ss]]:expression=[city] for [MarkupContainer [Component id = city]],
 please set the type yourself.



 I am assuming that this has to do with that I am nesting my models and
 that one of them is null. So in the AddressPanel I am creating a
 PropertyModel where the passed on model is potentially null.

 So my question is, how do I handle such a situation? Please advise.

 Thanks very much, Jonck van der Kogel



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



Re: How can I disable a IFormValidator?

2009-11-20 Thread Igor Vaynberg
i dont think currently there is a way, please add an rfe.

as an alternative you can move your validation logic into
form.onvalidate() where you can perform the appropriate checks.

-igor

On Fri, Nov 20, 2009 at 9:46 AM, Wayne Pope
waynemailingli...@googlemail.com wrote:
 Hello,

 I have a form that has a AbstractFormValidator added to it. This does
 some validation on a couple of formcomponents.

 However in some situations on of the components is not visible and we
 get the warming:

 IFormValidator in form `formContainer:form` depends on a component
 that has been removed from the page or is no longer visible.

 How can I diable the AbstractFormValidator so that we don't get this
 warning? (as it doesn't need validating).

 many thanks
 Wayne

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



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



RE: Resolving image locations

2009-11-20 Thread Loritsch, Berin C.
Never mind.  The problem was using Image instead of ContextImage.  I
guess that's the danger of relying on type-ahead to suggest the right
thing.

-Original Message-
From: Loritsch, Berin C. [mailto:berin.lorit...@gd-ais.com] 
Sent: Friday, November 20, 2009 1:23 PM
To: users@wicket.apache.org
Subject: Resolving image locations

I'm using the Wicket Image object, and I'm having a hard time ensuring
that it resolves properly.

I have a base class to set up the UI template for the site, including
the logo image.  I added a new page in a child package, and as a result
the Image declared in the base class is resolving relative to the new
class.  This is counter-intuitive, and violates the expectations of
object oriented programming.  Here is the basic situation:

package.SiteTemplate

Declares Image(Logo)


package.images.Logo
---
Contains the image


package.subsystem.NewPage
-
Uses logo declared in SiteTemplate,
But browser can't find it



What I want to do is tell Wicket to always provide one path for the Logo
image, so I don't have to duplicate the logo in several packages.  I
attempted to hardcode the path in plain HTML, but that URL broke as soon
as the IDE put the app in a context.  I'd like Wicket to take care of
the base path, but not treat it like a resource that needs to be
internationalized.  How do I do that?

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


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



Complications with loadable detachable models

2009-11-20 Thread bht
Hi

It appears that I am fighting against the framework that limits my
choices when I start using LDMs (LoadableDetachableModel).

Many examples in the framework documentation don't use LDMs. For
simplicity, they assume that the domain object e.g. person is
available to a model in an instance variable.

But LDM use is Wicket best practice. So if I switch to LDMs, then I
remove instance variables containing domain objects to avoid their
leakage into the session.

As a consequence of that, I must use wrapped PropertyModels that use
reflection and that are not refactor safe.

In addition, in onSubmit() methods, I have to manually extract the
domain object from the model.

If I use simple custom models per form field, overriding
org.apache.wicket.model.Model with inner classes, then I have to
manually extract the domain object from the LDM for each
setObject(...) and getObject() method.

To avoid these obstacles I would keep for convenience a transient
instance of the domain object. In onDetach(), I would set it to null
to avoid leakage into the session.

But how do I initialize it? I can do it in a Panel's constructor, but
in a stateful page, the constructor of a Panel is not called when it
is taken out of the session.

I found Page.onPageAttached() interesting for that, but I cannot use
it with a Panel sub class that is not hard-wired into the Page.

How can I use LDMs without this conflict? In the described scenario,
Wicket is really difficult to use, and that is because one has to be
so careful about domain objects leaking into the session.

Many thanks

Bernard


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



Re: Complications with loadable detachable models

2009-11-20 Thread Igor Vaynberg
initialize them lazily just like the model would

private transient Foo foo;

private Foo getFoo() { if (foo==null) { foo=...; } return foo; }

-igor

On Fri, Nov 20, 2009 at 10:54 AM,  b...@actrix.gen.nz wrote:
 Hi

 It appears that I am fighting against the framework that limits my
 choices when I start using LDMs (LoadableDetachableModel).

 Many examples in the framework documentation don't use LDMs. For
 simplicity, they assume that the domain object e.g. person is
 available to a model in an instance variable.

 But LDM use is Wicket best practice. So if I switch to LDMs, then I
 remove instance variables containing domain objects to avoid their
 leakage into the session.

 As a consequence of that, I must use wrapped PropertyModels that use
 reflection and that are not refactor safe.

 In addition, in onSubmit() methods, I have to manually extract the
 domain object from the model.

 If I use simple custom models per form field, overriding
 org.apache.wicket.model.Model with inner classes, then I have to
 manually extract the domain object from the LDM for each
 setObject(...) and getObject() method.

 To avoid these obstacles I would keep for convenience a transient
 instance of the domain object. In onDetach(), I would set it to null
 to avoid leakage into the session.

 But how do I initialize it? I can do it in a Panel's constructor, but
 in a stateful page, the constructor of a Panel is not called when it
 is taken out of the session.

 I found Page.onPageAttached() interesting for that, but I cannot use
 it with a Panel sub class that is not hard-wired into the Page.

 How can I use LDMs without this conflict? In the described scenario,
 Wicket is really difficult to use, and that is because one has to be
 so careful about domain objects leaking into the session.

 Many thanks

 Bernard


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



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



Re: Wicket datepicker disable weekdays

2009-11-20 Thread Leo Erlandsson

This is certainly possible.

You need to use YUI Calendar Renderers. They are documented in the YUI Cal2
API Doc. You can find an example of what you are trying to achieve here
(thanks Google):

http://www.stephaniebender.de/extras/yui/examples/calendar/render/1.html

Basically, you'll want to do this for all disallowed weekdays:

var myCustomRenderer = function(workingDate, cell) { 
cell.innerHTML = X; 
YAHOO.util.Dom.addClass(cell, disallowed); 
return YAHOO.widget.Calendar.STOP_RENDER; 
} 
YAHOO.example.calendar.cal1.addWeekdayRenderer(1, myCustomRenderer);

This will put an X on all Sundays, making them disabled. Also, it will add a
CSS class ('disallowed') that can be customized if you want to change the
appearance of disabled cells.


-- 
View this message in context: 
http://old.nabble.com/Wicket-datepicker-disable-weekdays-tp26444084p26447477.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: strange error

2009-11-20 Thread Douglas Ferguson
Does anybody have any idea of how to debug this? 
I.E. A component is visible in the screen but when clicked wicket barfs.

D/

On Nov 20, 2009, at 9:28 AM, Douglas Ferguson wrote:

 I load the app and hit an ajax link.
 It is a specific ajax link that fails not all..
 
 
 
 On Nov 20, 2009, at 9:16 AM, Martin Makundi wrote:
 
 I can recreate it when using XP.
 
 Doing what recreates it?
 
 D/
 
 On Nov 20, 2009, at 1:12 AM, Martin Makundi wrote:
 
 I get this quite often on our production site, how can you reproduce
 it?  My guess is that it somehow relates to invalid session and
 clicking stale links on the page. We get this whenever googlebot or
 similar browses our pages.
 
 **
 Martin
 
 2009/11/20 Douglas Ferguson doug...@douglasferguson.us:
 I am able to consistently reproduce this but only on win xp.
 
 D/
 
 On Nov 19, 2009, at 4:27 PM, Douglas Ferguson wrote:
 
 I have a user who is reporting a really strange error.
 
 The error seems to indicate that the a component is not on the page when 
 it is visible on the page.
 The error is also intermittent.
 
 
 D/
 
 Nov 19 16:06:56 ERROR [TP-Processor28] errors.NotifyUserOfException - 
 org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found on 
 page com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()] source null
 org.apache.wicket.protocol.http.request.InvalidUrlException: 
 org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found on 
 page com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
  at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
  at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
  at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
  at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
  at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
  at 
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
  at 
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
  at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
  at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
  at 
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
  at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  at java.lang.Thread.run(Unknown Source)
 Caused by: org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found on 
 page com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
  at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
  at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
  at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
  ... 20 more
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 

Re: strange error

2009-11-20 Thread James Carman
I've seen this also, but it's not reliably reproducible.

On Fri, Nov 20, 2009 at 3:30 PM, Douglas Ferguson
doug...@douglasferguson.us wrote:
 Does anybody have any idea of how to debug this?
 I.E. A component is visible in the screen but when clicked wicket barfs.

 D/

 On Nov 20, 2009, at 9:28 AM, Douglas Ferguson wrote:

 I load the app and hit an ajax link.
 It is a specific ajax link that fails not all..



 On Nov 20, 2009, at 9:16 AM, Martin Makundi wrote:

 I can recreate it when using XP.

 Doing what recreates it?

 D/

 On Nov 20, 2009, at 1:12 AM, Martin Makundi wrote:

 I get this quite often on our production site, how can you reproduce
 it?  My guess is that it somehow relates to invalid session and
 clicking stale links on the page. We get this whenever googlebot or
 similar browses our pages.

 **
 Martin

 2009/11/20 Douglas Ferguson doug...@douglasferguson.us:
 I am able to consistently reproduce this but only on win xp.

 D/

 On Nov 19, 2009, at 4:27 PM, Douglas Ferguson wrote:

 I have a user who is reporting a really strange error.

 The error seems to indicate that the a component is not on the page 
 when it is visible on the page.
 The error is also intermittent.


 D/

 Nov 19 16:06:56 ERROR [TP-Processor28] errors.NotifyUserOfException - 
 org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found 
 on page 
 com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 18], 
 listener interface = [RequestListenerInterface name=IBehaviorListener, 
 method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()] source null
 org.apache.wicket.protocol.http.request.InvalidUrlException: 
 org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found 
 on page 
 com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 18], 
 listener interface = [RequestListenerInterface name=IBehaviorListener, 
 method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
      at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
      at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
      at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
      at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
      at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
      at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
      at 
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
      at 
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
      at 
 org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
      at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
      at 
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
      at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
      at java.lang.Thread.run(Unknown Source)
 Caused by: org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found 
 on page 
 com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 18], 
 listener interface = [RequestListenerInterface name=IBehaviorListener, 
 method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
      at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
      at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
      at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
      ... 20 more


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



 -
 To unsubscribe, e-mail: 

Re: Posting A Form To NonWicket

2009-11-20 Thread Jeremy Thomerson
http://www.google.co.uk/search?q=nabble+wicket+posting+form+external+site
http://old.nabble.com/post-a-form-to-external-website-td25506726.html

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



On Fri, Nov 20, 2009 at 11:14 AM, Balaji C cho...@gmail.com wrote:

 I've a wicket form with input elements. I would like to post this form to a
 non-wicket url. Is it possible to post this form from submit event of
 wicket
 button? I google and couldn't find any clear solution. Any help is
 appreciated. If any other alternative, please let me know. Thanks.



Generating standards compliant responses

2009-11-20 Thread Loritsch, Berin C.
I've set up in my SiteTemplate base class a call to set the content type
for the response, however it is not making it to the browser.  Any
ideas?  When I inspect the request headers and run the site validator
against my page the server content type is set to text/html even
though I've told it otherwise.  What am I missing here?  If it helps, it
is hosted in Tomcat 6.  I need the Content-Type HTTP response header
to return application/xhtml+xml

public class SiteTemplate extends WebPage {
//
public void onBeforeRender() {  

super.getResponse().setContentType(application/xhtml+xml; utf-8);
super.getResponse().setCharacterEncoding(utf-8);

user = IMSSession.get().getUser();

if (null == user  ! (this instanceof LoginPage)) {
this.redirectToInterceptPage(new
LoginPage(null));
}

if (get(content) == null) {
BookmarkablePageLinkString homeLink = new
BookmarkablePageLinkString(home,
IMSApplication.get().getHomePage());
homeLink.add(new ContextImage(logo,
images/logo.png));
add(homeLink);
add(newUserInfo(userinfo));
add(newContentPanel(content));
add(newUserPanel(userbar));
}

super.onBeforeRender();
}
//  define the newUserInfo, newContentPanel, and newUserPanel
abstract methods
}


Re: strange error

2009-11-20 Thread Martijn Dashorst
Probably you have a repeater serving out those ajax thingies.

1. Make sure you have a reuse items strategy set
2. Make sure you don't get 2 events right after one another: the link
that is clicked and a seperate behavior you've attached: if one event
updates the repeater, the component is not available anymore.

3. to debug: really look closely at the generated behavior URLs and
look closely at the generated IDs to see if they update to another
value than expected

Martijn

On Fri, Nov 20, 2009 at 9:32 PM, James Carman
jcar...@carmanconsulting.com wrote:
 I've seen this also, but it's not reliably reproducible.

 On Fri, Nov 20, 2009 at 3:30 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 Does anybody have any idea of how to debug this?
 I.E. A component is visible in the screen but when clicked wicket barfs.

 D/

 On Nov 20, 2009, at 9:28 AM, Douglas Ferguson wrote:

 I load the app and hit an ajax link.
 It is a specific ajax link that fails not all..



 On Nov 20, 2009, at 9:16 AM, Martin Makundi wrote:

 I can recreate it when using XP.

 Doing what recreates it?

 D/

 On Nov 20, 2009, at 1:12 AM, Martin Makundi wrote:

 I get this quite often on our production site, how can you reproduce
 it?  My guess is that it somehow relates to invalid session and
 clicking stale links on the page. We get this whenever googlebot or
 similar browses our pages.

 **
 Martin

 2009/11/20 Douglas Ferguson doug...@douglasferguson.us:
 I am able to consistently reproduce this but only on win xp.

 D/

 On Nov 19, 2009, at 4:27 PM, Douglas Ferguson wrote:

 I have a user who is reporting a really strange error.

 The error seems to indicate that the a component is not on the page 
 when it is visible on the page.
 The error is also intermittent.


 D/

 Nov 19 16:06:56 ERROR [TP-Processor28] errors.NotifyUserOfException - 
 org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found 
 on page 
 com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()] source null
 org.apache.wicket.protocol.http.request.InvalidUrlException: 
 org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found 
 on page 
 com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
      at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
      at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
      at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
      at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
      at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
      at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
      at 
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
      at 
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
      at 
 org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
      at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
      at 
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
      at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
      at java.lang.Thread.run(Unknown Source)
 Caused by: org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found 
 on page 
 com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
      at 
 

3rd party js wicket

2009-11-20 Thread Douglas Ferguson
Hey,

I added a third party js to my MainPage class, which is the base class for 
all my pages (header, footer, etc).

This js has 2 sections. One goes to the top of the body tag and then the other 
at the bottom of the body tag.

Now the requirement has come that I need to add the js to only 1 page.

If I just add it to the sub page, it won't actually be at the very top or very 
bottom of the body tag.

One way to do this is to put it in 2 divs (top and bottom) and show/hide those 
divs based on the page that you are on.

But I am worried that having it divs may not be a good thing.

Is there a way that I could have it dynamically injected into the page?


D/


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



Re: Generating standards compliant responses

2009-11-20 Thread Igor Vaynberg
Try setting it in configureresponse()

-igor

On Friday, November 20, 2009, Loritsch, Berin C.
berin.lorit...@gd-ais.com wrote:
 I've set up in my SiteTemplate base class a call to set the content type
 for the response, however it is not making it to the browser.  Any
 ideas?  When I inspect the request headers and run the site validator
 against my page the server content type is set to text/html even
 though I've told it otherwise.  What am I missing here?  If it helps, it
 is hosted in Tomcat 6.  I need the Content-Type HTTP response header
 to return application/xhtml+xml

 public class SiteTemplate extends WebPage {
 //
         public void onBeforeRender() {

 super.getResponse().setContentType(application/xhtml+xml; utf-8);
                 super.getResponse().setCharacterEncoding(utf-8);

                 user = IMSSession.get().getUser();

                 if (null == user  ! (this instanceof LoginPage)) {
                         this.redirectToInterceptPage(new
 LoginPage(null));
                 }

                 if (get(content) == null) {
                         BookmarkablePageLinkString homeLink = new
 BookmarkablePageLinkString(home,
 IMSApplication.get().getHomePage());
                         homeLink.add(new ContextImage(logo,
 images/logo.png));
                         add(homeLink);
                         add(newUserInfo(userinfo));
                         add(newContentPanel(content));
                         add(newUserPanel(userbar));
                 }

                 super.onBeforeRender();
         }
 //  define the newUserInfo, newContentPanel, and newUserPanel
 abstract methods
 }


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



RE: Generating standards compliant responses

2009-11-20 Thread Loritsch, Berin C.
I just found this out.  Thank you.



-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Friday, November 20, 2009 3:44 PM
To: users@wicket.apache.org
Subject: Re: Generating standards compliant responses

Try setting it in configureresponse()

-igor

On Friday, November 20, 2009, Loritsch, Berin C.
berin.lorit...@gd-ais.com wrote:
 I've set up in my SiteTemplate base class a call to set the content type
 for the response, however it is not making it to the browser.  Any
 ideas?  When I inspect the request headers and run the site validator
 against my page the server content type is set to text/html even
 though I've told it otherwise.  What am I missing here?  If it helps, it
 is hosted in Tomcat 6.  I need the Content-Type HTTP response header
 to return application/xhtml+xml

 public class SiteTemplate extends WebPage {
 //
         public void onBeforeRender() {

 super.getResponse().setContentType(application/xhtml+xml; utf-8);
                 super.getResponse().setCharacterEncoding(utf-8);

                 user = IMSSession.get().getUser();

                 if (null == user  ! (this instanceof LoginPage)) {
                         this.redirectToInterceptPage(new
 LoginPage(null));
                 }

                 if (get(content) == null) {
                         BookmarkablePageLinkString homeLink = new
 BookmarkablePageLinkString(home,
 IMSApplication.get().getHomePage());
                         homeLink.add(new ContextImage(logo,
 images/logo.png));
                         add(homeLink);
                         add(newUserInfo(userinfo));
                         add(newContentPanel(content));
                         add(newUserPanel(userbar));
                 }

                 super.onBeforeRender();
         }
 //  define the newUserInfo, newContentPanel, and newUserPanel
 abstract methods
 }


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


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



Re: strange error

2009-11-20 Thread Douglas Ferguson

On Nov 20, 2009, at 2:42 PM, Martijn Dashorst wrote:

 Probably you have a repeater serving out those ajax thingies.
 
 1. Make sure you have a reuse items strategy set

What is this?

 2. Make sure you don't get 2 events right after one another: the link
 that is clicked and a seperate behavior you've attached: if one event
 updates the repeater, the component is not available anymore.
 

Yeah.. we have a drop down that updates a repeater. The link is inside the 
repeater.
But I'm not sure why the link is getting messed up.
Also, this only effects XP.


 3. to debug: really look closely at the generated behavior URLs and
 look closely at the generated IDs to see if they update to another
 value than expected

thanks

 
 Martijn
 
 On Fri, Nov 20, 2009 at 9:32 PM, James Carman
 jcar...@carmanconsulting.com wrote:
 I've seen this also, but it's not reliably reproducible.
 
 On Fri, Nov 20, 2009 at 3:30 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 Does anybody have any idea of how to debug this?
 I.E. A component is visible in the screen but when clicked wicket barfs.
 
 D/
 
 On Nov 20, 2009, at 9:28 AM, Douglas Ferguson wrote:
 
 I load the app and hit an ajax link.
 It is a specific ajax link that fails not all..
 
 
 
 On Nov 20, 2009, at 9:16 AM, Martin Makundi wrote:
 
 I can recreate it when using XP.
 
 Doing what recreates it?
 
 D/
 
 On Nov 20, 2009, at 1:12 AM, Martin Makundi wrote:
 
 I get this quite often on our production site, how can you reproduce
 it?  My guess is that it somehow relates to invalid session and
 clicking stale links on the page. We get this whenever googlebot or
 similar browses our pages.
 
 **
 Martin
 
 2009/11/20 Douglas Ferguson doug...@douglasferguson.us:
 I am able to consistently reproduce this but only on win xp.
 
 D/
 
 On Nov 19, 2009, at 4:27 PM, Douglas Ferguson wrote:
 
 I have a user who is reporting a really strange error.
 
 The error seems to indicate that the a component is not on the page 
 when it is visible on the page.
 The error is also intermittent.
 
 
 D/
 
 Nov 19 16:06:56 ERROR [TP-Processor28] errors.NotifyUserOfException - 
 org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found 
 on page 
 com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()] source null
 org.apache.wicket.protocol.http.request.InvalidUrlException: 
 org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found 
 on page 
 com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
  at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
  at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
  at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
  at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
  at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
  at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
  at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
  at 
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
  at 
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
  at 
 org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
  at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
  at 
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
  at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
  at java.lang.Thread.run(Unknown Source)
 Caused by: org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not found 
 on page 
 com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener 

Re: request scoped variables

2009-11-20 Thread Douglas Ferguson
When the hibernate session is closed you will get a lazy initialization error 
if they proxy tries to load any lazy fields.


On Nov 20, 2009, at 9:34 AM, Martin Makundi wrote:

 The object is a hibernate pojo, which has to be detached because it can't be
 used after the hibernate session dies. The hibernate session dies on every 
 request.
 
 Why not? I reuse the hibernate pojos throughout the whole user web session.
 
 **
 Martin
 
 
 
 D/
 
 On Nov 20, 2009, at 9:19 AM, Martin Makundi wrote:
 
 Why should it be detached every request if it is lightweight?
 
 It seems you have a problem elsewhere? Maybe you have problems with
 object equalities etc?
 
 YOu can override MySession.detach to detach it.
 
 **
 Martin
 
 2009/11/20 Douglas Ferguson doug...@douglasferguson.us:
 Yeah, but how to I guarantee that it will be detached and reloaded on 
 every request.
 
 Also, the application is already using the session as the factory for this 
 loadable detachable.
 Just out of curiosity, I cached it rather than always constructing a new 
 one, and I started getting all sorts of errors.
 
 So then I started to think that perhaps I could try make sure that a new 
 one is generated per request.
 I tried using a thread local to hold the LDM on the session but that 
 caused the same errors.
 
 D/
 
 On Nov 19, 2009, at 5:32 PM, Igor Vaynberg wrote:
 
 the whole point of LoadableDetachable is that you load it once and
 reuse it until detached, at least this is how LDM works.
 
 -igor
 
 On Thu, Nov 19, 2009 at 2:50 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 I am maintaining an app that is written in wicket.
 
 When a user logs in the userId is stored on the session.
 There is a method on the session object that returns a 
 UserAccountLoadableDetachable.
 This loadable detachable is created every time the method is called.
 
 My thought was that I could share it across the request.
 
 D/
 
 
 On Nov 19, 2009, at 3:53 PM, Igor Vaynberg wrote:
 
 whats the usecase for a request-scoped variable?
 
 you can have a transient field on the page that you null in 
 ondetach()...
 
 otherwise you can access httpservletrequest and use attributes.
 
 -igor
 
 On Thu, Nov 19, 2009 at 1:51 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 is there a best practice for request scoped variables in wicket?
 
 D/
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


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



Validating markup on non bookmarkable pages?

2009-11-20 Thread Loritsch, Berin C.
I'm using the TotalValidator plugin combined with a local basic
validator installation.  It's a great tool to keep me honest with the
accessibility and standards compliant code.  However certain pages that
aren't linked with a BookmarkableLink can't be validated with the tool.
I end up getting an error like the following:

Nov 20, 2009 3:46:43 PM com.totalvalidator.Validator main
SEVERE: Validation Failed
com.totalvalidator.exceptions.ValidationException: Error retrieving
page: http://localhost:8010/incidents/?wicket:interface=:1 : 404 Not
Found
at com.totalvalidator.utils.FileUtils.getReader(Unknown Source)
at com.totalvalidator.Validator.validate(Unknown Source)
at com.totalvalidator.Validator.main(Unknown Source)


The odd thing is that if I put the same exact URL in my browser the page
renders perfectly fine.  My guess is that because the tool doesn't have
the JSESSIONID cookie and/or has a different browser type that Wicket
expires the page.  Is that correct?  If so, is there any way to work
around it?

If I'm using the redirectToInterceptPage() to get to a login page, is
there a way I can make it bookmarkable?

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



Re: 3rd party js wicket

2009-11-20 Thread Igor Vaynberg
wicket only supports dynamic injection into the head element which
is where all the scripts should go.

as far as your particular usecase you can simple put the script into
wicket:container tags instead of div tags, wicket:container tags
render into nothing.

-igor

On Fri, Nov 20, 2009 at 12:43 PM, Douglas Ferguson
doug...@douglasferguson.us wrote:
 Hey,

 I added a third party js to my MainPage class, which is the base class for 
 all my pages (header, footer, etc).

 This js has 2 sections. One goes to the top of the body tag and then the 
 other at the bottom of the body tag.

 Now the requirement has come that I need to add the js to only 1 page.

 If I just add it to the sub page, it won't actually be at the very top or 
 very bottom of the body tag.

 One way to do this is to put it in 2 divs (top and bottom) and show/hide 
 those divs based on the page that you are on.

 But I am worried that having it divs may not be a good thing.

 Is there a way that I could have it dynamically injected into the page?


 D/


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



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



xmlhttp to another domain

2009-11-20 Thread Ed _

Hi,

I have an application A that needs to make a call via the browser and not the 
backend to a go  across an internal subdomain applicationB to get the status of 
a user and update the session of the main application A.

Is there a way to add xmlhttpRequest from a panel on the page rendered by A to 
application B and feed the into the  session of application A.


thanks!
  
_
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141665/direct/01/

Re: Transaction error dont reach onRuntimeException(Page page, RuntimeException e) method

2009-11-20 Thread Fernando Wermus
Igor,
 My exception is thrown at
   @Override protected void onEndRequest() {


when I commit the transaction.

I reviewed that is not wrapped with a WicketRuntimeException, actually I got
a TransientObjectException.


On Tue, Nov 10, 2009 at 5:16 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 where is your exception is thrown from?

 also, check that its not being wrapped in another exception such as a
 WicketRuntimeException.

 -igor

 On Tue, Nov 10, 2009 at 9:57 AM, Fernando Wermus
 fernando.wer...@gmail.com wrote:
  Hi all,
 I am testing transactionability in a site which I am developing. I got
  to roll back the app in case of a Hibernate DataException, but I couldnt
  reach my custom request cycle method onRutimeException
 
  @Override public Page onRuntimeException(Page page, RuntimeException e)
 
  Why is this?
 
  The roll back is done in endRequestCycle, while I had instructed a new
 model
  to be shown in the original page in case of succeded. It shows the
 succeded
  page instead the error one.
 
  Thanks in advance
 
 
 
  --
  Fernando Wermus.
 
  www.linkedin.com/in/fernandowermus
 

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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: 3rd party js wicket

2009-11-20 Thread Douglas Ferguson
Interesting..

Is wicket:container the same as using wicket:enclosure with an child?

D/

On Nov 20, 2009, at 3:39 PM, Igor Vaynberg wrote:

 wicket only supports dynamic injection into the head element which
 is where all the scripts should go.

 as far as your particular usecase you can simple put the script into
 wicket:container tags instead of div tags, wicket:container tags
 render into nothing.

 -igor

 On Fri, Nov 20, 2009 at 12:43 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 Hey,

 I added a third party js to my MainPage class, which is the base class for 
 all my pages (header, footer, etc).

 This js has 2 sections. One goes to the top of the body tag and then the 
 other at the bottom of the body tag.

 Now the requirement has come that I need to add the js to only 1 page.

 If I just add it to the sub page, it won't actually be at the very top or 
 very bottom of the body tag.

 One way to do this is to put it in 2 divs (top and bottom) and show/hide 
 those divs based on the page that you are on.

 But I am worried that having it divs may not be a good thing.

 Is there a way that I could have it dynamically injected into the page?


 D/


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



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



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



Re: Transaction error dont reach onRuntimeException(Page page, RuntimeException e) method

2009-11-20 Thread Igor Vaynberg
hrm, throwing an exception from onendrequest may be too late for it to
be picked up by onruntimeexception, you may have to do that yourself.

-igor

On Fri, Nov 20, 2009 at 4:45 PM, Fernando Wermus
fernando.wer...@gmail.com wrote:
 I forgot to mention that I persist some entities in onfinish wizard method
 and call

 setResponsePage(getApplication().getHomePage());

 On Fri, Nov 20, 2009 at 10:44 PM, Fernando Wermus fernando.wer...@gmail.com
 wrote:

 Igor,
      My exception is thrown at
       �...@override protected void onEndRequest() {


 when I commit the transaction.

 I reviewed that is not wrapped with a WicketRuntimeException, actually I
 got a TransientObjectException.


 On Tue, Nov 10, 2009 at 5:16 PM, Igor Vaynberg 
 igor.vaynb...@gmail.comwrote:

 where is your exception is thrown from?

 also, check that its not being wrapped in another exception such as a
 WicketRuntimeException.

 -igor

 On Tue, Nov 10, 2009 at 9:57 AM, Fernando Wermus
 fernando.wer...@gmail.com wrote:
  Hi all,
     I am testing transactionability in a site which I am developing. I
 got
  to roll back the app in case of a Hibernate DataException, but I couldnt
  reach my custom request cycle method onRutimeException
 
  @Override public Page onRuntimeException(Page page, RuntimeException e)
 
  Why is this?
 
  The roll back is done in endRequestCycle, while I had instructed a new
 model
  to be shown in the original page in case of succeded. It shows the
 succeded
  page instead the error one.
 
  Thanks in advance
 
 
 
  --
  Fernando Wermus.
 
  www.linkedin.com/in/fernandowermus
 

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




 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus




 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus


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



[1.4.3] RequestUtils.toAbsolutePath() skips the last value

2009-11-20 Thread smallufo
The code is following :

WebApplication :
mountBookmarkablePage(/TestPage , TestPage.class);

TestPage.html :
url = span wicket:id=url/span

TestPage.java :
final String url = RequestUtils.toAbsolutePath();
add(new Label(url , Model.of(url)));

If I open
http://foobar:8080/quickstart/app/TestPage
it shows  http://foobar:8080/quickstart/app/TestPage  , correct

if I open http://foobar:8080/quickstart/app/TestPage/a/b/
it shows : http://foobar:8080/quickstart/app/TestPage/a/b/ , correct

BUT ,
if I open http://foobar:8080/quickstart/app/TestPage/a/b
it shows : http://foobar:8080/quickstart/app/TestPage/a , WRONG


Re: strange error

2009-11-20 Thread Douglas Ferguson

On Nov 20, 2009, at 2:47 PM, Douglas Ferguson wrote:


 On Nov 20, 2009, at 2:42 PM, Martijn Dashorst wrote:

 Probably you have a repeater serving out those ajax thingies.

 1. Make sure you have a reuse items strategy set

 What is this?

Ok. I investigated and we are sub classes DataView, so we should inherit the 
default reuse strategy.
Which is DefaultItemReuseStrategy

Do I still have to explicit set it?

It is still odd to me that this only happens in XP?!


 2. Make sure you don't get 2 events right after one another: the link
 that is clicked and a seperate behavior you've attached: if one event
 updates the repeater, the component is not available anymore.


 Yeah.. we have a drop down that updates a repeater. The link is inside the 
 repeater.
 But I'm not sure why the link is getting messed up.
 Also, this only effects XP.


 3. to debug: really look closely at the generated behavior URLs and
 look closely at the generated IDs to see if they update to another
 value than expected

 thanks


 Martijn

 On Fri, Nov 20, 2009 at 9:32 PM, James Carman
 jcar...@carmanconsulting.com wrote:
 I've seen this also, but it's not reliably reproducible.

 On Fri, Nov 20, 2009 at 3:30 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 Does anybody have any idea of how to debug this?
 I.E. A component is visible in the screen but when clicked wicket barfs.

 D/

 On Nov 20, 2009, at 9:28 AM, Douglas Ferguson wrote:

 I load the app and hit an ajax link.
 It is a specific ajax link that fails not all..



 On Nov 20, 2009, at 9:16 AM, Martin Makundi wrote:

 I can recreate it when using XP.

 Doing what recreates it?

 D/

 On Nov 20, 2009, at 1:12 AM, Martin Makundi wrote:

 I get this quite often on our production site, how can you reproduce
 it?  My guess is that it somehow relates to invalid session and
 clicking stale links on the page. We get this whenever googlebot or
 similar browses our pages.

 **
 Martin

 2009/11/20 Douglas Ferguson doug...@douglasferguson.us:
 I am able to consistently reproduce this but only on win xp.

 D/

 On Nov 19, 2009, at 4:27 PM, Douglas Ferguson wrote:

 I have a user who is reporting a really strange error.

 The error seems to indicate that the a component is not on the page 
 when it is visible on the page.
 The error is also intermittent.


 D/

 Nov 19 16:06:56 ERROR [TP-Processor28] errors.NotifyUserOfException 
 - org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not 
 found on page 
 com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()] source null
 org.apache.wicket.protocol.http.request.InvalidUrlException: 
 org.apache.wicket.WicketRuntimeException: component 
 contentPart:results:478:result:hideableBlock:form:sentiment not 
 found on page 
 com.conducive.ui.userPages.monitor.result.MonitorsResultsPage[id = 
 18], listener interface = [RequestListenerInterface 
 name=IBehaviorListener, method=public abstract void 
 org.apache.wicket.behavior.IBehaviorListener.onRequest()]
 at 
 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
 at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
 at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
 at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
 at 
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
 at 
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
 at 
 org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
 at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
 at 
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
 at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
 at 

Re: request scoped variables

2009-11-20 Thread Martin Makundi
 When the hibernate session is closed you will get a lazy initialization
 error if they proxy tries to load any lazy fields.

In my opinnion it's a design flaw if you lazy-load suff that you keep
in session. Stop that.

**
Martin



 On Nov 20, 2009, at 9:34 AM, Martin Makundi wrote:

 The object is a hibernate pojo, which has to be detached because it can't be
 used after the hibernate session dies. The hibernate session dies on every 
 request.

 Why not? I reuse the hibernate pojos throughout the whole user web session.

 **
 Martin



 D/

 On Nov 20, 2009, at 9:19 AM, Martin Makundi wrote:

 Why should it be detached every request if it is lightweight?

 It seems you have a problem elsewhere? Maybe you have problems with
 object equalities etc?

 YOu can override MySession.detach to detach it.

 **
 Martin

 2009/11/20 Douglas Ferguson doug...@douglasferguson.us:
 Yeah, but how to I guarantee that it will be detached and reloaded on 
 every request.

 Also, the application is already using the session as the factory for 
 this loadable detachable.
 Just out of curiosity, I cached it rather than always constructing a new 
 one, and I started getting all sorts of errors.

 So then I started to think that perhaps I could try make sure that a new 
 one is generated per request.
 I tried using a thread local to hold the LDM on the session but that 
 caused the same errors.

 D/

 On Nov 19, 2009, at 5:32 PM, Igor Vaynberg wrote:

 the whole point of LoadableDetachable is that you load it once and
 reuse it until detached, at least this is how LDM works.

 -igor

 On Thu, Nov 19, 2009 at 2:50 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 I am maintaining an app that is written in wicket.

 When a user logs in the userId is stored on the session.
 There is a method on the session object that returns a 
 UserAccountLoadableDetachable.
 This loadable detachable is created every time the method is called.

 My thought was that I could share it across the request.

 D/


 On Nov 19, 2009, at 3:53 PM, Igor Vaynberg wrote:

 whats the usecase for a request-scoped variable?

 you can have a transient field on the page that you null in 
 ondetach()...

 otherwise you can access httpservletrequest and use attributes.

 -igor

 On Thu, Nov 19, 2009 at 1:51 PM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 is there a best practice for request scoped variables in wicket?

 D/

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



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



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



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



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



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



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



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



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



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