Re: WicketRuntimeException: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference

2020-01-17 Thread Francois Meillet
Hi Prasanna,

Could you make a quickstart ?

François



> Le 17 janv. 2020 à 19:29, prasanna bajracharya 
>  a écrit :
> 
> Dear Wicket Community,
> 
> I am a new to wicket. I am trying to run someone else's legacy code in my
> local machine which is currently working in production environment. All my
> MyPanel.java, MyPanel.html and MyPanel.properties are in same package but
> still i'm getting following error in my weblogic console:
> 
> [image: enter image description here] 
> 
> Below is my Project structure for one of the component "sessionId": [image:
> enter image description here] 
> 
> I am using Ant build.xml to create MyApplication.jar and deploy it in my
> local weblogic server. I'm using eclipse as my IDE.
> 
> 
> Best regards,
> 
> Prasanna


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



WicketRuntimeException: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference

2020-01-17 Thread prasanna bajracharya
Dear Wicket Community,

I am a new to wicket. I am trying to run someone else's legacy code in my
local machine which is currently working in production environment. All my
MyPanel.java, MyPanel.html and MyPanel.properties are in same package but
still i'm getting following error in my weblogic console:

[image: enter image description here] 

Below is my Project structure for one of the component "sessionId": [image:
enter image description here] 

I am using Ant build.xml to create MyApplication.jar and deploy it in my
local weblogic server. I'm using eclipse as my IDE.


Best regards,

Prasanna


Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2015-03-26 Thread Martin Grigorov
Hi,

It must have been in the component tree during the page rendering time.
But later it has been removed, most probably within some Ajax operation.
Perhaps in a different browser tab/window.

Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Mar 26, 2015 at 5:53 PM, TylerDurden69 
wrote:

> I get the same exception.
>
> The question is why the component is still visible and activated if it 'has
> been removed from page'?
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-removed-links-WicketRuntimeException-Component-xxx-has-been-removed-from-page-tp4666431p4670105.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2015-03-26 Thread TylerDurden69
I get the same exception.

The question is why the component is still visible and activated if it 'has
been removed from page'?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-removed-links-WicketRuntimeException-Component-xxx-has-been-removed-from-page-tp4666431p4670105.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-08-04 Thread Martin Grigorov
https://issues.apache.org/jira/browse/WICKET-5660

>From now on Wicket will throw ComponentNotFoundException instead of the
more generic WicketRuntimeException.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Sat, Jul 12, 2014 at 8:40 PM, Martin Grigorov 
wrote:

> Ticket + a quickstart please!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
>
> On Wed, Jul 9, 2014 at 7:52 PM, Thomas Heigl  wrote:
>
>> +1
>>
>> We're also seeing these sporadically and a custom exception would help a
>> lot.
>>
>> Thomas
>> On Jul 7, 2014 10:12 AM, "Martin Grigorov"  wrote:
>>
>> > Please create a ticket!
>> > With a patch with the custom exception will make its processing even
>> > faster!
>> > Thank you!
>> >
>> > Martin Grigorov
>> > Wicket Training and Consulting
>> > https://twitter.com/mtgrigorov
>> >
>> >
>> > On Mon, Jul 7, 2014 at 11:08 AM, Daniel Stoch 
>> > wrote:
>> >
>> > > I think the simplest solution for now (until we invent a better one)
>> > > is to define a dedicated exception class for such case (similar to
>> > > ListenerInvocationNotAllowedException which is raised if user tries
>> > > click on disabled links). Then we can catch such exception and handle
>> > > it eg. as described by Martin in my previous post ("How to handle
>> > > click on disabled links - ListenerInvocationNotAllowedException?").
>> > >
>> > > --
>> > > Daniel
>> > >
>> > > On Fri, Jul 4, 2014 at 5:38 PM, Ernesto Reinaldo Barreiro
>> > >  wrote:
>> > > > maybe what is needed is a "fail silently ajax request" ;-)
>> > > >
>> > > >
>> > > > On Fri, Jul 4, 2014 at 5:36 PM, Ernesto Reinaldo Barreiro <
>> > > > reier...@gmail.com> wrote:
>> > > >
>> > > >> Hi,
>> > > >>
>> > > >>
>> > > >> On Fri, Jul 4, 2014 at 4:59 PM, Daniel Stoch <
>> daniel.st...@gmail.com>
>> > > >> wrote:
>> > > >>
>> > > >>> Sorry, but for me all these solutions are hacks :).
>> > > >>>
>> > > >>
>> > > >> Why? As far as they are under control... Isn't software development
>> > > >> production controlled "hacks"? Wicket itself is a "hack" and so do
>> are
>> > > >> other WEB frameworks like GWT. As far as you remain in control I do
>> > not
>> > > see
>> > > >> the problem. All frameworks have limitations... Why not get the
>> best
>> > of
>> > > >> them and circumvent those.
>> > > >>
>> > > >>
>> > > >>> I want to use standard components (eg. AjaxLink) to do simple
>> things.
>> > > >>> I don't want to think everywhere how to handle such scenarios. It
>> > > >>> should be handled properly on a framework level. I think there is
>> > > >>> always possibility that component state on server and DOM tree on
>> > > >>> client browser are inconsistent (and not necessary because of push
>> > > >>> requests). Maybe it should be a dedicated exception on such
>> situation
>> > > >>> ("Component 'xxx' has been removed from page.") at least or maybe
>> we
>> > > >>> can invent a better solution in core?
>> > > >>>
>> > > >>
>> > > >> I do agree that would be optimal.
>> > > >>
>> > > >>
>> > > >>
>> > > >>>
>> > > >>> --
>> > > >>> Daniel
>> > > >>>
>> > > >>> On Fri, Jul 4, 2014 at 4:11 PM, Ernesto Reinaldo Barreiro
>> > > >>>  wrote:
>> > > >>> > Maybe you could even just push JSON to client side and generate
>> > items
>> > > >>> > content at client side which is going to be way faster
>> > > >>> >
>> > > >>> >
>> > > >>> > On Fri, Jul 4, 2014 at 4:06 PM, Ernesto Reinaldo Barreiro <
>> > > >>> > reier...@gmail.com> wrote:
>> > > >>> &g

Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-12 Thread Martin Grigorov
 of item. This way
> > > click
> > > >>> will
> > > >>> >> never fail and it is still sort of object oriented...
> > > >>> >>
> > > >>> >>
> > > >>> >>
> > > >>> >> On Fri, Jul 4, 2014 at 3:59 PM, Daniel Stoch <
> > > daniel.st...@gmail.com>
> > > >>> >> wrote:
> > > >>> >>
> > > >>> >>> On Fri, Jul 4, 2014 at 3:14 PM, Martin Grigorov <
> > > mgrigo...@apache.org
> > > >>> >
> > > >>> >>> wrote:
> > > >>> >>> > Hi,
> > > >>> >>> >
> > > >>> >>> > You can use Atmopshere to hide/disable the client side too,
> not
> > > >>> just the
> > > >>> >>> > server side.
> > > >>> >>>
> > > >>> >>> Of course, I already do that.
> > > >>> >>> But user can click the link after state was changed on the
> server
> > > side
> > > >>> >>> but before these changes are pushed to client browser.
> > > >>> >>>
> > > >>> >>> --
> > > >>> >>> Daniel
> > > >>> >>>
> > > >>> >>>
> > > >>> >>> >
> > > >>> >>> > Martin Grigorov
> > > >>> >>> > Wicket Training and Consulting
> > > >>> >>> > https://twitter.com/mtgrigorov
> > > >>> >>> >
> > > >>> >>> >
> > > >>> >>> > On Fri, Jul 4, 2014 at 1:46 PM, Daniel Stoch <
> > > >>> daniel.st...@gmail.com>
> > > >>> >>> wrote:
> > > >>> >>> >
> > > >>> >>> >> On Fri, Jul 4, 2014 at 12:33 PM, Sven Meier <
> s...@meiers.net>
> > > >>> wrote:
> > > >>> >>> >> >> So page was rendered in a browser,
> > > >>> >>> >> >> on the server component tree was changed
> > > >>> >>> >> >
> > > >>> >>> >> >
> > > >>> >>> >> > What triggers the change to the component tree? On which
> > > thread?
> > > >>> Are
> > > >>> >>> you
> > > >>> >>> >> > using websockets?
> > > >>> >>> >> >
> > > >>> >>> >> > Sven
> > > >>> >>> >>
> > > >>> >>> >> In general this thread is not initialized by user action but
> > by
> > > >>> >>> >> application. So yes, it can be push from a server (eg. using
> > > >>> >>> >> Atmosphere - this is my case) or by ajax self updating
> > behavior.
> > > >>> >>> >>
> > > >>> >>> >> --
> > > >>> >>> >> DS
> > > >>> >>> >>
> > > >>> >>> >> >
> > > >>> >>> >> >
> > > >>> >>> >> >
> > > >>> >>> >> > On 07/04/2014 12:13 PM, Daniel Stoch wrote:
> > > >>> >>> >> >>
> > > >>> >>> >> >> Hi all,
> > > >>> >>> >> >>
> > > >>> >>> >> >> I think such question occurs from time to time on this
> > list,
> > > >>> but I
> > > >>> >>> >> >> have never found a good answer how to solve such problem
> in
> > > >>> general.
> > > >>> >>> >> >> The problem is similar to my last question:
> > > >>> >>> >> >>
> > > >>> >>> >> >>
> > > >>> >>> >>
> > > >>> >>>
> > > >>>
> > >
> >
> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
> > > >>> >>> >> >

Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-09 Thread Thomas Heigl
;> >>> > You can use Atmopshere to hide/disable the client side too, not
> > >>> just the
> > >>> >>> > server side.
> > >>> >>>
> > >>> >>> Of course, I already do that.
> > >>> >>> But user can click the link after state was changed on the server
> > side
> > >>> >>> but before these changes are pushed to client browser.
> > >>> >>>
> > >>> >>> --
> > >>> >>> Daniel
> > >>> >>>
> > >>> >>>
> > >>> >>> >
> > >>> >>> > Martin Grigorov
> > >>> >>> > Wicket Training and Consulting
> > >>> >>> > https://twitter.com/mtgrigorov
> > >>> >>> >
> > >>> >>> >
> > >>> >>> > On Fri, Jul 4, 2014 at 1:46 PM, Daniel Stoch <
> > >>> daniel.st...@gmail.com>
> > >>> >>> wrote:
> > >>> >>> >
> > >>> >>> >> On Fri, Jul 4, 2014 at 12:33 PM, Sven Meier 
> > >>> wrote:
> > >>> >>> >> >> So page was rendered in a browser,
> > >>> >>> >> >> on the server component tree was changed
> > >>> >>> >> >
> > >>> >>> >> >
> > >>> >>> >> > What triggers the change to the component tree? On which
> > thread?
> > >>> Are
> > >>> >>> you
> > >>> >>> >> > using websockets?
> > >>> >>> >> >
> > >>> >>> >> > Sven
> > >>> >>> >>
> > >>> >>> >> In general this thread is not initialized by user action but
> by
> > >>> >>> >> application. So yes, it can be push from a server (eg. using
> > >>> >>> >> Atmosphere - this is my case) or by ajax self updating
> behavior.
> > >>> >>> >>
> > >>> >>> >> --
> > >>> >>> >> DS
> > >>> >>> >>
> > >>> >>> >> >
> > >>> >>> >> >
> > >>> >>> >> >
> > >>> >>> >> > On 07/04/2014 12:13 PM, Daniel Stoch wrote:
> > >>> >>> >> >>
> > >>> >>> >> >> Hi all,
> > >>> >>> >> >>
> > >>> >>> >> >> I think such question occurs from time to time on this
> list,
> > >>> but I
> > >>> >>> >> >> have never found a good answer how to solve such problem in
> > >>> general.
> > >>> >>> >> >> The problem is similar to my last question:
> > >>> >>> >> >>
> > >>> >>> >> >>
> > >>> >>> >>
> > >>> >>>
> > >>>
> >
> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
> > >>> >>> >> >> but now there is a situation when link was removed from
> page
> > >>> (not
> > >>> >>> >> >> disabled).
> > >>> >>> >> >>
> > >>> >>> >> >> So page was rendered in a browser, on the server component
> > tree
> > >>> was
> > >>> >>> >> >> changed, but user clicks a link in a browser before this
> > changes
> > >>> >>> will
> > >>> >>> >> >> be pushed to it. It leads to an exception:
> > >>> >>> >> >>
> > >>> >>> >> >> org.apache.wicket.WicketRuntimeException: Component 'xxx'
> has
> > >>> been
> > >>> >>> >> >> removed from page.
> > >>> >>> >> >> at
> > >>> >>> >> >>
> > >>> >>> >>
> > >>> >>>
> > >>>
> >
> org.apache.wicket.core.request

Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-07 Thread Martin Grigorov
t;>> >>> > Martin Grigorov
> >>> >>> > Wicket Training and Consulting
> >>> >>> > https://twitter.com/mtgrigorov
> >>> >>> >
> >>> >>> >
> >>> >>> > On Fri, Jul 4, 2014 at 1:46 PM, Daniel Stoch <
> >>> daniel.st...@gmail.com>
> >>> >>> wrote:
> >>> >>> >
> >>> >>> >> On Fri, Jul 4, 2014 at 12:33 PM, Sven Meier 
> >>> wrote:
> >>> >>> >> >> So page was rendered in a browser,
> >>> >>> >> >> on the server component tree was changed
> >>> >>> >> >
> >>> >>> >> >
> >>> >>> >> > What triggers the change to the component tree? On which
> thread?
> >>> Are
> >>> >>> you
> >>> >>> >> > using websockets?
> >>> >>> >> >
> >>> >>> >> > Sven
> >>> >>> >>
> >>> >>> >> In general this thread is not initialized by user action but by
> >>> >>> >> application. So yes, it can be push from a server (eg. using
> >>> >>> >> Atmosphere - this is my case) or by ajax self updating behavior.
> >>> >>> >>
> >>> >>> >> --
> >>> >>> >> DS
> >>> >>> >>
> >>> >>> >> >
> >>> >>> >> >
> >>> >>> >> >
> >>> >>> >> > On 07/04/2014 12:13 PM, Daniel Stoch wrote:
> >>> >>> >> >>
> >>> >>> >> >> Hi all,
> >>> >>> >> >>
> >>> >>> >> >> I think such question occurs from time to time on this list,
> >>> but I
> >>> >>> >> >> have never found a good answer how to solve such problem in
> >>> general.
> >>> >>> >> >> The problem is similar to my last question:
> >>> >>> >> >>
> >>> >>> >> >>
> >>> >>> >>
> >>> >>>
> >>>
> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
> >>> >>> >> >> but now there is a situation when link was removed from page
> >>> (not
> >>> >>> >> >> disabled).
> >>> >>> >> >>
> >>> >>> >> >> So page was rendered in a browser, on the server component
> tree
> >>> was
> >>> >>> >> >> changed, but user clicks a link in a browser before this
> changes
> >>> >>> will
> >>> >>> >> >> be pushed to it. It leads to an exception:
> >>> >>> >> >>
> >>> >>> >> >> org.apache.wicket.WicketRuntimeException: Component 'xxx' has
> >>> been
> >>> >>> >> >> removed from page.
> >>> >>> >> >> at
> >>> >>> >> >>
> >>> >>> >>
> >>> >>>
> >>>
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
> >>> >>> >> >> at
> >>> >>> >> >>
> >>> >>> >>
> >>> >>>
> >>>
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
> >>> >>> >> >> at
> >>> >>> >> >>
> >>> >>> >>
> >>> >>>
> >>>
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
> >>> >>> >> >> at
> >>> >>> >> >>
> >>> >>> >>
> >>> >>>
> >>>
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
> >>> >>> >> >> at
> >>> >>> >> >>
> >>> >>> >>
> >>> >>>
> >>>
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
> >>> >>> >> >> at
> >>> >>> >> >>
> >>> >>> >>
> >>> >>>
> >>>
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
> >>> >>> >> >> at
> >>> >>> >> >>
> >>> >>> >>
> >>> >>>
> >>>
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
> >>> >>> >> >> at
> >>> >>> >> >>
> >>> >>> >>
> >>> >>>
> >>>
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
> >>> >>> >> >> at
> >>> >>> >> >>
> >>> >>> >>
> >>> >>>
> >>>
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
> >>> >>> >> >> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
> >>> >>> >> >> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
> >>> >>> >> >>
> >>> >>> >> >> How it should be properly handled in application?
> Unfortunately
> >>> this
> >>> >>> >> >> is not a dedicated exception to catch somewhere, but a common
> >>> >>> >> >> WicketRuntimeException.
> >>> >>> >> >>
> >>> >>> >> >> --
> >>> >>> >> >> Best regards,
> >>> >>> >> >> Daniel
> >>> >>> >> >>
> >>> >>> >> >>
> >>> >>>
> -
> >>> >>> >> >> 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
> >>> >>>
> >>> >>>
> >>> >>
> >>> >>
> >>> >> --
> >>> >> Regards - Ernesto Reinaldo Barreiro
> >>> >>
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Regards - Ernesto Reinaldo Barreiro
> >>>
> >>> -
> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>> For additional commands, e-mail: users-h...@wicket.apache.org
> >>>
> >>>
> >>
> >>
> >> --
> >> Regards - Ernesto Reinaldo Barreiro
> >>
> >
> >
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-07 Thread Daniel Stoch
ead?
>>> Are
>>> >>> you
>>> >>> >> > using websockets?
>>> >>> >> >
>>> >>> >> > Sven
>>> >>> >>
>>> >>> >> In general this thread is not initialized by user action but by
>>> >>> >> application. So yes, it can be push from a server (eg. using
>>> >>> >> Atmosphere - this is my case) or by ajax self updating behavior.
>>> >>> >>
>>> >>> >> --
>>> >>> >> DS
>>> >>> >>
>>> >>> >> >
>>> >>> >> >
>>> >>> >> >
>>> >>> >> > On 07/04/2014 12:13 PM, Daniel Stoch wrote:
>>> >>> >> >>
>>> >>> >> >> Hi all,
>>> >>> >> >>
>>> >>> >> >> I think such question occurs from time to time on this list,
>>> but I
>>> >>> >> >> have never found a good answer how to solve such problem in
>>> general.
>>> >>> >> >> The problem is similar to my last question:
>>> >>> >> >>
>>> >>> >> >>
>>> >>> >>
>>> >>>
>>> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
>>> >>> >> >> but now there is a situation when link was removed from page
>>> (not
>>> >>> >> >> disabled).
>>> >>> >> >>
>>> >>> >> >> So page was rendered in a browser, on the server component tree
>>> was
>>> >>> >> >> changed, but user clicks a link in a browser before this changes
>>> >>> will
>>> >>> >> >> be pushed to it. It leads to an exception:
>>> >>> >> >>
>>> >>> >> >> org.apache.wicket.WicketRuntimeException: Component 'xxx' has
>>> been
>>> >>> >> >> removed from page.
>>> >>> >> >> at
>>> >>> >> >>
>>> >>> >>
>>> >>>
>>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
>>> >>> >> >> at
>>> >>> >> >>
>>> >>> >>
>>> >>>
>>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
>>> >>> >> >> at
>>> >>> >> >>
>>> >>> >>
>>> >>>
>>> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
>>> >>> >> >> at
>>> >>> >> >>
>>> >>> >>
>>> >>>
>>> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
>>> >>> >> >> at
>>> >>> >> >>
>>> >>> >>
>>> >>>
>>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
>>> >>> >> >> at
>>> >>> >> >>
>>> >>> >>
>>> >>>
>>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
>>> >>> >> >> at
>>> >>> >> >>
>>> >>> >>
>>> >>>
>>> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
>>> >>> >> >> at
>>> >>> >> >>
>>> >>> >>
>>> >>>
>>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
>>> >>> >> >> at
>>> >>> >> >>
>>> >>> >>
>>> >>>
>>> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
>>> >>> >> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
>>> >>> >> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>> >>> >> >>
>>> >>> >> >> How it should be properly handled in application? Unfortunately
>>> this
>>> >>> >> >> is not a dedicated exception to catch somewhere, but a common
>>> >>> >> >> WicketRuntimeException.
>>> >>> >> >>
>>> >>> >> >> --
>>> >>> >> >> Best regards,
>>> >>> >> >> Daniel
>>> >>> >> >>
>>> >>> >> >>
>>> >>> -
>>> >>> >> >> 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
>>> >>>
>>> >>>
>>> >>
>>> >>
>>> >> --
>>> >> Regards - Ernesto Reinaldo Barreiro
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Regards - Ernesto Reinaldo Barreiro
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>>
>> --
>> Regards - Ernesto Reinaldo Barreiro
>>
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro

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



Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-04 Thread Ernesto Reinaldo Barreiro
gt; Hi all,
>> >>> >> >>
>> >>> >> >> I think such question occurs from time to time on this list,
>> but I
>> >>> >> >> have never found a good answer how to solve such problem in
>> general.
>> >>> >> >> The problem is similar to my last question:
>> >>> >> >>
>> >>> >> >>
>> >>> >>
>> >>>
>> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
>> >>> >> >> but now there is a situation when link was removed from page
>> (not
>> >>> >> >> disabled).
>> >>> >> >>
>> >>> >> >> So page was rendered in a browser, on the server component tree
>> was
>> >>> >> >> changed, but user clicks a link in a browser before this changes
>> >>> will
>> >>> >> >> be pushed to it. It leads to an exception:
>> >>> >> >>
>> >>> >> >> org.apache.wicket.WicketRuntimeException: Component 'xxx' has
>> been
>> >>> >> >> removed from page.
>> >>> >> >> at
>> >>> >> >>
>> >>> >>
>> >>>
>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
>> >>> >> >> at
>> >>> >> >>
>> >>> >>
>> >>>
>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
>> >>> >> >> at
>> >>> >> >>
>> >>> >>
>> >>>
>> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
>> >>> >> >> at
>> >>> >> >>
>> >>> >>
>> >>>
>> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
>> >>> >> >> at
>> >>> >> >>
>> >>> >>
>> >>>
>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
>> >>> >> >> at
>> >>> >> >>
>> >>> >>
>> >>>
>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
>> >>> >> >> at
>> >>> >> >>
>> >>> >>
>> >>>
>> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
>> >>> >> >> at
>> >>> >> >>
>> >>> >>
>> >>>
>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
>> >>> >> >> at
>> >>> >> >>
>> >>> >>
>> >>>
>> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
>> >>> >> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
>> >>> >> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>> >>> >> >>
>> >>> >> >> How it should be properly handled in application? Unfortunately
>> this
>> >>> >> >> is not a dedicated exception to catch somewhere, but a common
>> >>> >> >> WicketRuntimeException.
>> >>> >> >>
>> >>> >> >> --
>> >>> >> >> Best regards,
>> >>> >> >> Daniel
>> >>> >> >>
>> >>> >> >>
>> >>> -
>> >>> >> >> 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
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >> Regards - Ernesto Reinaldo Barreiro
>> >>
>> >
>> >
>> >
>> > --
>> > Regards - Ernesto Reinaldo Barreiro
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>



-- 
Regards - Ernesto Reinaldo Barreiro


Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-04 Thread Ernesto Reinaldo Barreiro
87.html
> >>> >> >> but now there is a situation when link was removed from page (not
> >>> >> >> disabled).
> >>> >> >>
> >>> >> >> So page was rendered in a browser, on the server component tree
> was
> >>> >> >> changed, but user clicks a link in a browser before this changes
> >>> will
> >>> >> >> be pushed to it. It leads to an exception:
> >>> >> >>
> >>> >> >> org.apache.wicket.WicketRuntimeException: Component 'xxx' has
> been
> >>> >> >> removed from page.
> >>> >> >> at
> >>> >> >>
> >>> >>
> >>>
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
> >>> >> >> at
> >>> >> >>
> >>> >>
> >>>
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
> >>> >> >> at
> >>> >> >>
> >>> >>
> >>>
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
> >>> >> >> at
> >>> >> >>
> >>> >>
> >>>
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
> >>> >> >> at
> >>> >> >>
> >>> >>
> >>>
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
> >>> >> >> at
> >>> >> >>
> >>> >>
> >>>
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
> >>> >> >> at
> >>> >> >>
> >>> >>
> >>>
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
> >>> >> >> at
> >>> >> >>
> >>> >>
> >>>
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
> >>> >> >> at
> >>> >> >>
> >>> >>
> >>>
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
> >>> >> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
> >>> >> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
> >>> >> >>
> >>> >> >> How it should be properly handled in application? Unfortunately
> this
> >>> >> >> is not a dedicated exception to catch somewhere, but a common
> >>> >> >> WicketRuntimeException.
> >>> >> >>
> >>> >> >> --
> >>> >> >> Best regards,
> >>> >> >> Daniel
> >>> >> >>
> >>> >> >>
> >>> -
> >>> >> >> 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
> >>>
> >>>
> >>
> >>
> >> --
> >> Regards - Ernesto Reinaldo Barreiro
> >>
> >
> >
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro


Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-04 Thread Daniel Stoch
Sorry, but for me all these solutions are hacks :).
I want to use standard components (eg. AjaxLink) to do simple things.
I don't want to think everywhere how to handle such scenarios. It
should be handled properly on a framework level. I think there is
always possibility that component state on server and DOM tree on
client browser are inconsistent (and not necessary because of push
requests). Maybe it should be a dedicated exception on such situation
("Component 'xxx' has been removed from page.") at least or maybe we
can invent a better solution in core?

--
Daniel

On Fri, Jul 4, 2014 at 4:11 PM, Ernesto Reinaldo Barreiro
 wrote:
> Maybe you could even just push JSON to client side and generate items
> content at client side which is going to be way faster
>
>
> On Fri, Jul 4, 2014 at 4:06 PM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
>> Why don't you try routing all the click to a part of you application that
>> is always available? E.g.
>>
>> 1- You have a list of items that are pushed... They are in a certain
>> container that is "always" there... At client and server side
>> 2- The items are pushed but instead of normal AJAX link you use link to
>> the parent never changing container passing ID of item. This way click will
>> never fail and it is still sort of object oriented...
>>
>>
>>
>> On Fri, Jul 4, 2014 at 3:59 PM, Daniel Stoch 
>> wrote:
>>
>>> On Fri, Jul 4, 2014 at 3:14 PM, Martin Grigorov 
>>> wrote:
>>> > Hi,
>>> >
>>> > You can use Atmopshere to hide/disable the client side too, not just the
>>> > server side.
>>>
>>> Of course, I already do that.
>>> But user can click the link after state was changed on the server side
>>> but before these changes are pushed to client browser.
>>>
>>> --
>>> Daniel
>>>
>>>
>>> >
>>> > Martin Grigorov
>>> > Wicket Training and Consulting
>>> > https://twitter.com/mtgrigorov
>>> >
>>> >
>>> > On Fri, Jul 4, 2014 at 1:46 PM, Daniel Stoch 
>>> wrote:
>>> >
>>> >> On Fri, Jul 4, 2014 at 12:33 PM, Sven Meier  wrote:
>>> >> >> So page was rendered in a browser,
>>> >> >> on the server component tree was changed
>>> >> >
>>> >> >
>>> >> > What triggers the change to the component tree? On which thread? Are
>>> you
>>> >> > using websockets?
>>> >> >
>>> >> > Sven
>>> >>
>>> >> In general this thread is not initialized by user action but by
>>> >> application. So yes, it can be push from a server (eg. using
>>> >> Atmosphere - this is my case) or by ajax self updating behavior.
>>> >>
>>> >> --
>>> >> DS
>>> >>
>>> >> >
>>> >> >
>>> >> >
>>> >> > On 07/04/2014 12:13 PM, Daniel Stoch wrote:
>>> >> >>
>>> >> >> Hi all,
>>> >> >>
>>> >> >> I think such question occurs from time to time on this list, but I
>>> >> >> have never found a good answer how to solve such problem in general.
>>> >> >> The problem is similar to my last question:
>>> >> >>
>>> >> >>
>>> >>
>>> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
>>> >> >> but now there is a situation when link was removed from page (not
>>> >> >> disabled).
>>> >> >>
>>> >> >> So page was rendered in a browser, on the server component tree was
>>> >> >> changed, but user clicks a link in a browser before this changes
>>> will
>>> >> >> be pushed to it. It leads to an exception:
>>> >> >>
>>> >> >> org.apache.wicket.WicketRuntimeException: Component 'xxx' has been
>>> >> >> removed from page.
>>> >> >> at
>>> >> >>
>>> >>
>>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
>>> >> >> at
>>> >> >>
>>> >>
>>> org.apache.wicke

Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-04 Thread Ernesto Reinaldo Barreiro
Maybe you could even just push JSON to client side and generate items
content at client side which is going to be way faster


On Fri, Jul 4, 2014 at 4:06 PM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Why don't you try routing all the click to a part of you application that
> is always available? E.g.
>
> 1- You have a list of items that are pushed... They are in a certain
> container that is "always" there... At client and server side
> 2- The items are pushed but instead of normal AJAX link you use link to
> the parent never changing container passing ID of item. This way click will
> never fail and it is still sort of object oriented...
>
>
>
> On Fri, Jul 4, 2014 at 3:59 PM, Daniel Stoch 
> wrote:
>
>> On Fri, Jul 4, 2014 at 3:14 PM, Martin Grigorov 
>> wrote:
>> > Hi,
>> >
>> > You can use Atmopshere to hide/disable the client side too, not just the
>> > server side.
>>
>> Of course, I already do that.
>> But user can click the link after state was changed on the server side
>> but before these changes are pushed to client browser.
>>
>> --
>> Daniel
>>
>>
>> >
>> > Martin Grigorov
>> > Wicket Training and Consulting
>> > https://twitter.com/mtgrigorov
>> >
>> >
>> > On Fri, Jul 4, 2014 at 1:46 PM, Daniel Stoch 
>> wrote:
>> >
>> >> On Fri, Jul 4, 2014 at 12:33 PM, Sven Meier  wrote:
>> >> >> So page was rendered in a browser,
>> >> >> on the server component tree was changed
>> >> >
>> >> >
>> >> > What triggers the change to the component tree? On which thread? Are
>> you
>> >> > using websockets?
>> >> >
>> >> > Sven
>> >>
>> >> In general this thread is not initialized by user action but by
>> >> application. So yes, it can be push from a server (eg. using
>> >> Atmosphere - this is my case) or by ajax self updating behavior.
>> >>
>> >> --
>> >> DS
>> >>
>> >> >
>> >> >
>> >> >
>> >> > On 07/04/2014 12:13 PM, Daniel Stoch wrote:
>> >> >>
>> >> >> Hi all,
>> >> >>
>> >> >> I think such question occurs from time to time on this list, but I
>> >> >> have never found a good answer how to solve such problem in general.
>> >> >> The problem is similar to my last question:
>> >> >>
>> >> >>
>> >>
>> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
>> >> >> but now there is a situation when link was removed from page (not
>> >> >> disabled).
>> >> >>
>> >> >> So page was rendered in a browser, on the server component tree was
>> >> >> changed, but user clicks a link in a browser before this changes
>> will
>> >> >> be pushed to it. It leads to an exception:
>> >> >>
>> >> >> org.apache.wicket.WicketRuntimeException: Component 'xxx' has been
>> >> >> removed from page.
>> >> >> at
>> >> >>
>> >>
>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
>> >> >> at
>> >> >>
>> >>
>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
>> >> >> at
>> >> >>
>> >>
>> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
>> >> >> at
>> >> >>
>> >>
>> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
>> >> >> at
>> >> >>
>> >>
>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
>> >> >> at
>> >> >>
>> >>
>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
>> >> >> at
>> >> >>
>> >>
>> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
>> >> >> at
>> >> >>
>> >>
>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
>

Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-04 Thread Ernesto Reinaldo Barreiro
Why don't you try routing all the click to a part of you application that
is always available? E.g.

1- You have a list of items that are pushed... They are in a certain
container that is "always" there... At client and server side
2- The items are pushed but instead of normal AJAX link you use link to the
parent never changing container passing ID of item. This way click will
never fail and it is still sort of object oriented...



On Fri, Jul 4, 2014 at 3:59 PM, Daniel Stoch  wrote:

> On Fri, Jul 4, 2014 at 3:14 PM, Martin Grigorov 
> wrote:
> > Hi,
> >
> > You can use Atmopshere to hide/disable the client side too, not just the
> > server side.
>
> Of course, I already do that.
> But user can click the link after state was changed on the server side
> but before these changes are pushed to client browser.
>
> --
> Daniel
>
>
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> >
> > On Fri, Jul 4, 2014 at 1:46 PM, Daniel Stoch 
> wrote:
> >
> >> On Fri, Jul 4, 2014 at 12:33 PM, Sven Meier  wrote:
> >> >> So page was rendered in a browser,
> >> >> on the server component tree was changed
> >> >
> >> >
> >> > What triggers the change to the component tree? On which thread? Are
> you
> >> > using websockets?
> >> >
> >> > Sven
> >>
> >> In general this thread is not initialized by user action but by
> >> application. So yes, it can be push from a server (eg. using
> >> Atmosphere - this is my case) or by ajax self updating behavior.
> >>
> >> --
> >> DS
> >>
> >> >
> >> >
> >> >
> >> > On 07/04/2014 12:13 PM, Daniel Stoch wrote:
> >> >>
> >> >> Hi all,
> >> >>
> >> >> I think such question occurs from time to time on this list, but I
> >> >> have never found a good answer how to solve such problem in general.
> >> >> The problem is similar to my last question:
> >> >>
> >> >>
> >>
> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
> >> >> but now there is a situation when link was removed from page (not
> >> >> disabled).
> >> >>
> >> >> So page was rendered in a browser, on the server component tree was
> >> >> changed, but user clicks a link in a browser before this changes will
> >> >> be pushed to it. It leads to an exception:
> >> >>
> >> >> org.apache.wicket.WicketRuntimeException: Component 'xxx' has been
> >> >> removed from page.
> >> >> at
> >> >>
> >>
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
> >> >> at
> >> >>
> >>
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
> >> >> at
> >> >>
> >>
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
> >> >> at
> >> >>
> >>
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
> >> >> at
> >> >>
> >>
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
> >> >> at
> >> >>
> >>
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
> >> >> at
> >> >>
> >>
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
> >> >> at
> >> >>
> >>
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
> >> >> at
> >> >>
> >>
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
> >> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
> >> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
> >> >>
> >> >> How it should be properly handled in application? Unfortunately this
> >> >> is not a dedicated exception to catch somewhere, but a common
> >> >> WicketRuntimeException.
> >> >>
> >> >> --
> >> >> Best regards,
> >> >> Daniel
> >> >>
> >> >> -
> >> >> 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
>
>


-- 
Regards - Ernesto Reinaldo Barreiro


Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-04 Thread Daniel Stoch
On Fri, Jul 4, 2014 at 3:14 PM, Martin Grigorov  wrote:
> Hi,
>
> You can use Atmopshere to hide/disable the client side too, not just the
> server side.

Of course, I already do that.
But user can click the link after state was changed on the server side
but before these changes are pushed to client browser.

--
Daniel


>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
>
> On Fri, Jul 4, 2014 at 1:46 PM, Daniel Stoch  wrote:
>
>> On Fri, Jul 4, 2014 at 12:33 PM, Sven Meier  wrote:
>> >> So page was rendered in a browser,
>> >> on the server component tree was changed
>> >
>> >
>> > What triggers the change to the component tree? On which thread? Are you
>> > using websockets?
>> >
>> > Sven
>>
>> In general this thread is not initialized by user action but by
>> application. So yes, it can be push from a server (eg. using
>> Atmosphere - this is my case) or by ajax self updating behavior.
>>
>> --
>> DS
>>
>> >
>> >
>> >
>> > On 07/04/2014 12:13 PM, Daniel Stoch wrote:
>> >>
>> >> Hi all,
>> >>
>> >> I think such question occurs from time to time on this list, but I
>> >> have never found a good answer how to solve such problem in general.
>> >> The problem is similar to my last question:
>> >>
>> >>
>> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
>> >> but now there is a situation when link was removed from page (not
>> >> disabled).
>> >>
>> >> So page was rendered in a browser, on the server component tree was
>> >> changed, but user clicks a link in a browser before this changes will
>> >> be pushed to it. It leads to an exception:
>> >>
>> >> org.apache.wicket.WicketRuntimeException: Component 'xxx' has been
>> >> removed from page.
>> >> at
>> >>
>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
>> >> at
>> >>
>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
>> >> at
>> >>
>> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
>> >> at
>> >>
>> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
>> >> at
>> >>
>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
>> >> at
>> >>
>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
>> >> at
>> >>
>> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
>> >> at
>> >>
>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
>> >> at
>> >>
>> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
>> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
>> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>> >>
>> >> How it should be properly handled in application? Unfortunately this
>> >> is not a dedicated exception to catch somewhere, but a common
>> >> WicketRuntimeException.
>> >>
>> >> --
>> >> Best regards,
>> >> Daniel
>> >>
>> >> -
>> >> 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: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-04 Thread Martin Grigorov
Hi,

You can use Atmopshere to hide/disable the client side too, not just the
server side.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Fri, Jul 4, 2014 at 1:46 PM, Daniel Stoch  wrote:

> On Fri, Jul 4, 2014 at 12:33 PM, Sven Meier  wrote:
> >> So page was rendered in a browser,
> >> on the server component tree was changed
> >
> >
> > What triggers the change to the component tree? On which thread? Are you
> > using websockets?
> >
> > Sven
>
> In general this thread is not initialized by user action but by
> application. So yes, it can be push from a server (eg. using
> Atmosphere - this is my case) or by ajax self updating behavior.
>
> --
> DS
>
> >
> >
> >
> > On 07/04/2014 12:13 PM, Daniel Stoch wrote:
> >>
> >> Hi all,
> >>
> >> I think such question occurs from time to time on this list, but I
> >> have never found a good answer how to solve such problem in general.
> >> The problem is similar to my last question:
> >>
> >>
> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
> >> but now there is a situation when link was removed from page (not
> >> disabled).
> >>
> >> So page was rendered in a browser, on the server component tree was
> >> changed, but user clicks a link in a browser before this changes will
> >> be pushed to it. It leads to an exception:
> >>
> >> org.apache.wicket.WicketRuntimeException: Component 'xxx' has been
> >> removed from page.
> >> at
> >>
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
> >> at
> >>
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
> >> at
> >>
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
> >> at
> >>
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
> >> at
> >>
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
> >> at
> >>
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
> >> at
> >>
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
> >> at
> >>
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
> >> at
> >>
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
> >>
> >> How it should be properly handled in application? Unfortunately this
> >> is not a dedicated exception to catch somewhere, but a common
> >> WicketRuntimeException.
> >>
> >> --
> >> Best regards,
> >> Daniel
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-04 Thread Daniel Stoch
I have added the appropriate information in that thread.

On Fri, Jul 4, 2014 at 12:47 PM, Ernesto Reinaldo Barreiro
 wrote:
> Sven's question goes straight to the point: do you know what is causing the
> mismacth?
>
>
> On Fri, Jul 4, 2014 at 12:44 PM, Daniel Stoch 
> wrote:
>
>> This is a popular answer on such querstions ("use veil" and so on) :).
>> But it is not the case here, because we do not know whet to block here.
>> Beside this, in general I think it is not a good solution.
>>
>> It works for me in many applications.
>
>
>> On Fri, Jul 4, 2014 at 12:30 PM, Ernesto Reinaldo Barreiro
>>  wrote:
>> > Block the UI?
>> >
>> >
>> > On Fri, Jul 4, 2014 at 12:13 PM, Daniel Stoch 
>> > wrote:
>> >
>> >> Hi all,
>> >>
>> >> I think such question occurs from time to time on this list, but I
>> >> have never found a good answer how to solve such problem in general.
>> >> The problem is similar to my last question:
>> >>
>> >>
>> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
>> >> but now there is a situation when link was removed from page (not
>> >> disabled).
>> >>
>> >> So page was rendered in a browser, on the server component tree was
>> >> changed, but user clicks a link in a browser before this changes will
>> >> be pushed to it. It leads to an exception:
>> >>
>> >> org.apache.wicket.WicketRuntimeException: Component 'xxx' has been
>> >> removed from page.
>> >> at
>> >>
>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
>> >> at
>> >>
>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
>> >> at
>> >>
>> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
>> >> at
>> >>
>> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
>> >> at
>> >>
>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
>> >> at
>> >>
>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
>> >> at
>> >>
>> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
>> >> at
>> >>
>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
>> >> at
>> >>
>> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
>> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
>> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>> >>
>> >> How it should be properly handled in application? Unfortunately this
>> >> is not a dedicated exception to catch somewhere, but a common
>> >> WicketRuntimeException.
>> >>
>> >> --
>> >> Best regards,
>> >> Daniel
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> For additional commands, e-mail: users-h...@wicket.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > Regards - Ernesto Reinaldo Barreiro
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro

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



Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-04 Thread Ernesto Reinaldo Barreiro
Sven's question goes straight to the point: do you know what is causing the
mismacth?


On Fri, Jul 4, 2014 at 12:44 PM, Daniel Stoch 
wrote:

> This is a popular answer on such querstions ("use veil" and so on) :).
> But it is not the case here, because we do not know whet to block here.
> Beside this, in general I think it is not a good solution.
>
> It works for me in many applications.


> On Fri, Jul 4, 2014 at 12:30 PM, Ernesto Reinaldo Barreiro
>  wrote:
> > Block the UI?
> >
> >
> > On Fri, Jul 4, 2014 at 12:13 PM, Daniel Stoch 
> > wrote:
> >
> >> Hi all,
> >>
> >> I think such question occurs from time to time on this list, but I
> >> have never found a good answer how to solve such problem in general.
> >> The problem is similar to my last question:
> >>
> >>
> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
> >> but now there is a situation when link was removed from page (not
> >> disabled).
> >>
> >> So page was rendered in a browser, on the server component tree was
> >> changed, but user clicks a link in a browser before this changes will
> >> be pushed to it. It leads to an exception:
> >>
> >> org.apache.wicket.WicketRuntimeException: Component 'xxx' has been
> >> removed from page.
> >> at
> >>
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
> >> at
> >>
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
> >> at
> >>
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
> >> at
> >>
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
> >> at
> >>
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
> >> at
> >>
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
> >> at
> >>
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
> >> at
> >>
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
> >> at
> >>
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
> >>
> >> How it should be properly handled in application? Unfortunately this
> >> is not a dedicated exception to catch somewhere, but a common
> >> WicketRuntimeException.
> >>
> >> --
> >> Best regards,
> >> Daniel
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro


Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-04 Thread Daniel Stoch
On Fri, Jul 4, 2014 at 12:33 PM, Sven Meier  wrote:
>> So page was rendered in a browser,
>> on the server component tree was changed
>
>
> What triggers the change to the component tree? On which thread? Are you
> using websockets?
>
> Sven

In general this thread is not initialized by user action but by
application. So yes, it can be push from a server (eg. using
Atmosphere - this is my case) or by ajax self updating behavior.

--
DS

>
>
>
> On 07/04/2014 12:13 PM, Daniel Stoch wrote:
>>
>> Hi all,
>>
>> I think such question occurs from time to time on this list, but I
>> have never found a good answer how to solve such problem in general.
>> The problem is similar to my last question:
>>
>> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
>> but now there is a situation when link was removed from page (not
>> disabled).
>>
>> So page was rendered in a browser, on the server component tree was
>> changed, but user clicks a link in a browser before this changes will
>> be pushed to it. It leads to an exception:
>>
>> org.apache.wicket.WicketRuntimeException: Component 'xxx' has been
>> removed from page.
>> at
>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
>> at
>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
>> at
>> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
>> at
>> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
>> at
>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
>> at
>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
>> at
>> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
>> at
>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
>> at
>> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>
>> How it should be properly handled in application? Unfortunately this
>> is not a dedicated exception to catch somewhere, but a common
>> WicketRuntimeException.
>>
>> --
>> Best regards,
>> Daniel
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

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



Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-04 Thread Daniel Stoch
This is a popular answer on such querstions ("use veil" and so on) :).
But it is not the case here, because we do not know whet to block here.
Beside this, in general I think it is not a good solution.

On Fri, Jul 4, 2014 at 12:30 PM, Ernesto Reinaldo Barreiro
 wrote:
> Block the UI?
>
>
> On Fri, Jul 4, 2014 at 12:13 PM, Daniel Stoch 
> wrote:
>
>> Hi all,
>>
>> I think such question occurs from time to time on this list, but I
>> have never found a good answer how to solve such problem in general.
>> The problem is similar to my last question:
>>
>> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
>> but now there is a situation when link was removed from page (not
>> disabled).
>>
>> So page was rendered in a browser, on the server component tree was
>> changed, but user clicks a link in a browser before this changes will
>> be pushed to it. It leads to an exception:
>>
>> org.apache.wicket.WicketRuntimeException: Component 'xxx' has been
>> removed from page.
>> at
>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
>> at
>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
>> at
>> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
>> at
>> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
>> at
>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
>> at
>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
>> at
>> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
>> at
>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
>> at
>> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>
>> How it should be properly handled in application? Unfortunately this
>> is not a dedicated exception to catch somewhere, but a common
>> WicketRuntimeException.
>>
>> --
>> Best regards,
>> Daniel
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro

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



Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-04 Thread Sven Meier

So page was rendered in a browser,
on the server component tree was changed


What triggers the change to the component tree? On which thread? Are you using 
websockets?

Sven


On 07/04/2014 12:13 PM, Daniel Stoch wrote:

Hi all,

I think such question occurs from time to time on this list, but I
have never found a good answer how to solve such problem in general.
The problem is similar to my last question:
http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
but now there is a situation when link was removed from page (not disabled).

So page was rendered in a browser, on the server component tree was
changed, but user clicks a link in a browser before this changes will
be pushed to it. It leads to an exception:

org.apache.wicket.WicketRuntimeException: Component 'xxx' has been
removed from page.
at 
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)

How it should be properly handled in application? Unfortunately this
is not a dedicated exception to catch somewhere, but a common
WicketRuntimeException.

--
Best regards,
Daniel

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




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



Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-04 Thread Ernesto Reinaldo Barreiro
Block the UI?


On Fri, Jul 4, 2014 at 12:13 PM, Daniel Stoch 
wrote:

> Hi all,
>
> I think such question occurs from time to time on this list, but I
> have never found a good answer how to solve such problem in general.
> The problem is similar to my last question:
>
> http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
> but now there is a situation when link was removed from page (not
> disabled).
>
> So page was rendered in a browser, on the server component tree was
> changed, but user clicks a link in a browser before this changes will
> be pushed to it. It leads to an exception:
>
> org.apache.wicket.WicketRuntimeException: Component 'xxx' has been
> removed from page.
> at
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
> at
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
> at
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
> at
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
> at
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
> at
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
> at
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
> at
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
> at
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>
> How it should be properly handled in application? Unfortunately this
> is not a dedicated exception to catch somewhere, but a common
> WicketRuntimeException.
>
> --
> Best regards,
> Daniel
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro


How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-04 Thread Daniel Stoch
Hi all,

I think such question occurs from time to time on this list, but I
have never found a good answer how to solve such problem in general.
The problem is similar to my last question:
http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
but now there is a situation when link was removed from page (not disabled).

So page was rendered in a browser, on the server component tree was
changed, but user clicks a link in a browser before this changes will
be pushed to it. It leads to an exception:

org.apache.wicket.WicketRuntimeException: Component 'xxx' has been
removed from page.
at 
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)

How it should be properly handled in application? Unfortunately this
is not a dedicated exception to catch somewhere, but a common
WicketRuntimeException.

--
Best regards,
Daniel

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



Re: WicketRuntimeException: Attempted to set property value on a null object

2012-12-01 Thread Sven Meier

Ah, silly Hibernate ;).

AFAICS sooner or later a Wicket component will have to write a value 
into the embedded address, so obviously it has to be there.
You can of course build a specialized model doing some magic here, but 
at the moment I don't know how that might look like.


Sven

On 12/01/2012 12:43 AM, Andrew Geery wrote:

The problem with doing that is that Hibernate detects that as a change
(a null object is not the same as an empty object) and does a database
update (see some of the comments on this:
https://issues.jboss.org/browse/HIBERNATE-50).

Andrew

On Fri, Nov 30, 2012 at 5:59 PM, Sven Meier  wrote:

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



Re: WicketRuntimeException: Attempted to set property value on a null object

2012-11-30 Thread Andrew Geery
The problem with doing that is that Hibernate detects that as a change
(a null object is not the same as an empty object) and does a database
update (see some of the comments on this:
https://issues.jboss.org/browse/HIBERNATE-50).

Andrew

On Fri, Nov 30, 2012 at 5:59 PM, Sven Meier  wrote:
> d

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



Re: WicketRuntimeException: Attempted to set property value on a null object

2012-11-30 Thread Sven Meier

Why not handle this in your domain objects already?

@Entity
public class Person {
...
  @Embedded
  private Address address;
...

  public Address getAddress() {
if (address == null) {
  address = new Address();
}

return address;
  }
}
 


Sven

On 11/30/2012 11:49 PM, Andrew Geery wrote:

I have a Person Hibernate/JPA entity with an @Embedded address object in it:

@Entity
public class Person {
...
   @Embedded
   private Address address;
...
}

I have a Panel with a Form for editing the Address
(EditAddressFormPanel) and a panel for editing the Person which uses
the Panel for editing (EditPersonFormPanel).

public class EditPersonFormPanel extends Panel {

   public EditPersonFormPanel(String cid, IModel model) {
 super(cid, model);
 // create the person form
 Form form = ...
 // add the address form panel to it
 form.add(new EditAddressFormPanel("address", new
PropertyModel(model, "address"));
 ...
   }

}

This works if the Person.address field is not null.  However, because
of the way that JPA works, the address field will be null if all of
the fields in the class are null.  For example, if a Person object was
persisted without an initial address (i.e., address = null).  When
this happens, 
org.apache.wicket.model.AbstractPropertyModel.getInnermostModelOrObject()
returns null and I ultimately get a WicketRuntimeException: Attempted
to set property value on a null object in PropertyResolver.setValue
because the object is null.

My question is how to deal this this correctly at the model level.  I
think IModel.setObject should create a new object if the incoming
object is null and IModel.getObject should return null if no fields
are set on the object to match how JPA/Hibernate handles this.

How do other people handle this problem?  Is there a good model to
extend from (maybe something like IWrapModel)?  Any examples?

Thanks
Andrew

PS I'm already using EntityModels
(http://wicketinaction.com/2008/09/building-a-smart-entitymodel/)

-
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



WicketRuntimeException: Attempted to set property value on a null object

2012-11-30 Thread Andrew Geery
I have a Person Hibernate/JPA entity with an @Embedded address object in it:

@Entity
public class Person {
...
  @Embedded
  private Address address;
...
}

I have a Panel with a Form for editing the Address
(EditAddressFormPanel) and a panel for editing the Person which uses
the Panel for editing (EditPersonFormPanel).

public class EditPersonFormPanel extends Panel {

  public EditPersonFormPanel(String cid, IModel model) {
super(cid, model);
// create the person form
Form form = ...
// add the address form panel to it
form.add(new EditAddressFormPanel("address", new
PropertyModel(model, "address"));
...
  }

}

This works if the Person.address field is not null.  However, because
of the way that JPA works, the address field will be null if all of
the fields in the class are null.  For example, if a Person object was
persisted without an initial address (i.e., address = null).  When
this happens, 
org.apache.wicket.model.AbstractPropertyModel.getInnermostModelOrObject()
returns null and I ultimately get a WicketRuntimeException: Attempted
to set property value on a null object in PropertyResolver.setValue
because the object is null.

My question is how to deal this this correctly at the model level.  I
think IModel.setObject should create a new object if the incoming
object is null and IModel.getObject should return null if no fields
are set on the object to match how JPA/Hibernate handles this.

How do other people handle this problem?  Is there a good model to
extend from (maybe something like IWrapModel)?  Any examples?

Thanks
Andrew

PS I'm already using EntityModels
(http://wicketinaction.com/2008/09/building-a-smart-entitymodel/)

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



Re: WicketRuntimeException: "Submit Button ... is not enabled"

2012-10-16 Thread eugenebalt
Thanks Sven, that was it! They were clicking again while the form was still
processing.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180p4653019.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: WicketRuntimeException: "Submit Button ... is not enabled"

2012-10-16 Thread Sven Meier

You're probably experiencing double clicks on your ajax buttons.
When the second request reaches the button, is is already disabled again.

Check this:
http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-lines-of-code/

Sven

On 10/16/2012 06:24 PM, eugenebalt wrote:

Hi,

Sorry, I have to bump thread back up again. We still have no clear idea how
to address this issue, which only happens sporadically on our production
server (and we can't reproduce it locally).

We have screens with Ajax Buttons which submit forms, but also disable/hide
these Ajax buttons. I am guessing, based on earlier answers, that sometimes,
the disable/hide happens *BEFORE* the Form Submit, and Wicket doesn't like
that. Wicket requires that all form fields be enabled and visible to ensure
form integrity.

The simplest question is, how do we turn off this check in Wicket, or how do
we guard against this error?

"Submit button is not visible" or "Submit button is enabled".

We can't rewrite our app from scratch, it has a lot of screens and a lot of
functionality, we do need to toggle these buttons when submitting the form.
Please, any help would be appreciated.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180p4653012.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: WicketRuntimeException: "Submit Button ... is not enabled"

2012-10-16 Thread eugenebalt
Hi,

Sorry, I have to bump thread back up again. We still have no clear idea how
to address this issue, which only happens sporadically on our production
server (and we can't reproduce it locally).

We have screens with Ajax Buttons which submit forms, but also disable/hide
these Ajax buttons. I am guessing, based on earlier answers, that sometimes,
the disable/hide happens *BEFORE* the Form Submit, and Wicket doesn't like
that. Wicket requires that all form fields be enabled and visible to ensure
form integrity.

The simplest question is, how do we turn off this check in Wicket, or how do
we guard against this error? 

"Submit button is not visible" or "Submit button is enabled".

We can't rewrite our app from scratch, it has a lot of screens and a lot of
functionality, we do need to toggle these buttons when submitting the form.
Please, any help would be appreciated.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180p4653012.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: WicketRuntimeException: "Submit Button ... is not enabled"

2012-08-14 Thread Paul Bors
As an idea, I tend to keep the panel edit/view state as a boolean and then
toggle the label on the button and control the behavior of the button press
via an if-else statement in the onSubmit() of the button.

This helps because I only have a single Edit/Save button and I toggle from
labels to form fields on the fly controlling those components via
AjaxFallback*** implemented in a single refrechPanel() method that calls
setVisable(editMode) for all the components that are to toggle or hide.

Also you can do this to the DataTable rows when necessary similar to how the
Editable tree table works:
http://www.wicket-library.com/wicket-examples/ajax/tree/table/editable?3

I get away with all this because I have my own generic labeled form
component that can toggle from a label to a form component and have a
 html tag as well as an Help icon and feedback panel associated with
it.

~ Thank you,
  Paul Bors

-Original Message-
From: eugenebalt [mailto:eugeneb...@yahoo.com] 
Sent: Tuesday, August 14, 2012 12:16 PM
To: users@wicket.apache.org
Subject: Re: WicketRuntimeException: "Submit Button ... is not enabled"

It is true that we have multiple buttons on our form that we are
disabling/hiding selectively.

Our scenario: a panel that contains the button "Edit", and then when it's
clicked, the panel opens and "Edit" is replaced by two other visible buttons
- "Submit" and "Cancel". "Edit" is gone. We need this dynamic behavior to
enable rich, "self-changing" forms.

Example:

add(new Button ("editButton"){
  @Override
 public boolean isVisible() {
 return showeditbutton;
}
@Override
public void onSubmit() { 
  showeditbutton = false;// hide this one
  showsavebutton = true;   // show the others
  showcancelbutton = true;
}
}

These are global variables/flags on the form. 

So given this "self-changing form" requirement, what's the fastest way to
get rid of this intermittent "Not Enabled / Visible" error? Is there a way
to turn off this validation in Wicket?



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-But
ton-is-not-enabled-tp4651180p4651233.html
Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: WicketRuntimeException: "Submit Button ... is not enabled"

2012-08-14 Thread eugenebalt
It is true that we have multiple buttons on our form that we are
disabling/hiding selectively.

Our scenario: a panel that contains the button "Edit", and then when it's
clicked, the panel opens and "Edit" is replaced by two other visible buttons
- "Submit" and "Cancel". "Edit" is gone. We need this dynamic behavior to
enable rich, "self-changing" forms.

Example:

add(new Button ("editButton"){
  @Override
 public boolean isVisible() {
 return showeditbutton;
}
@Override
public void onSubmit() { 
  showeditbutton = false;// hide this one
  showsavebutton = true;   // show the others
  showcancelbutton = true;
}
}

These are global variables/flags on the form. 

So given this "self-changing form" requirement, what's the fastest way to
get rid of this intermittent "Not Enabled / Visible" error? Is there a way
to turn off this validation in Wicket?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180p4651233.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: WicketRuntimeException: "Submit Button ... is not enabled"

2012-08-14 Thread Bertrand Guay-Paquet

No, they are interchangeable.

On 14/08/2012 11:42 AM, eugenebalt wrote:

Thanks a lot. In our case, we have an AjaxButton that maps to a "input
type=submit".

Would using the input type "Button" get rid of this problem?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180p4651231.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: WicketRuntimeException: "Submit Button ... is not enabled"

2012-08-14 Thread eugenebalt
Thanks a lot. In our case, we have an AjaxButton that maps to a "input
type=submit".

Would using the input type "Button" get rid of this problem?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180p4651231.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: WicketRuntimeException: "Submit Button ... is not enabled"

2012-08-13 Thread Bertrand Guay-Paquet

Hi,

When a form is submitted, it checks whether the submitting component is 
a Wicket component. If it is (your case), it makes sure that it's 
enabled and visible. I guess this is to prevent users manipulating with 
the form submission process. In any case, if any of the 2 conditions is 
not met, the exception is thrown.


This might or might not be caused by a race condition, but it would most 
likely be caused by disabling buttons (or their parents) in your code.


Bertrand

On 13/08/2012 10:40 AM, eugenebalt wrote:

We have an Ajax button which, when clicked, occasionally produces this
WicketRuntimeException:

  ERROR [WebContainer : 17] (RequestCycle.java:1521) - Submit Button
myPanel:editButton (path=myForm:myPanel:editButton) is not enabled
org.apache.wicket.WicketRuntimeException: Submit Button myPanel:editButton
(path=myForm:myPanel:editButton) is not enabled
 at
org.apache.wicket.markup.html.form.Form$2.component(Form.java:626)
 at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:878)
 at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:893)
 at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:893)
 at
org.apache.wicket.markup.html.form.Form.findSubmittingButton(Form.java:602)
 at
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:875)
 at sun.reflect.GeneratedMethodAccessor2603.invoke(Unknown Source)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
 at java.lang.reflect.Method.invoke(Method.java:599)
 at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
 at

Is there a race condition of some kind happening here? Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



WicketRuntimeException: "Submit Button ... is not enabled"

2012-08-13 Thread eugenebalt
We have an Ajax button which, when clicked, occasionally produces this
WicketRuntimeException:

 ERROR [WebContainer : 17] (RequestCycle.java:1521) - Submit Button
myPanel:editButton (path=myForm:myPanel:editButton) is not enabled
org.apache.wicket.WicketRuntimeException: Submit Button myPanel:editButton
(path=myForm:myPanel:editButton) is not enabled
at
org.apache.wicket.markup.html.form.Form$2.component(Form.java:626)
at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:878)
at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:893)
at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:893)
at
org.apache.wicket.markup.html.form.Form.findSubmittingButton(Form.java:602)
at
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:875)
at sun.reflect.GeneratedMethodAccessor2603.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
at 

Is there a race condition of some kind happening here? Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-Button-is-not-enabled-tp4651180.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Cannot reproduce a WicketRuntimeException.

2011-12-19 Thread cosmindumy
Hi, I know it's off topic but I didn't want to create a separate topic for a
simple question.

I've got an error on production server and I cannot reproduce on my
development machine. The error says :
woUploadFilesContainer:calculateButton
(path=inputForm:stepTwoUploadFilesContainer:calculateButton) is not visible
org.apache.wicket.WicketRuntimeException: Submit Button
stepTwoUploadFilesContainer:calculateButton
(path=inputForm:stepTwoUploadFilesContainer:calculateButton) is not visible

Which can be the cause? The submit button is never hidden, but the container
that holds it.
Here is the button code:
calculateButton = new CalculateButton("calculateButton",
"/wos/stepTwoUploadFiles/calculate");
calculateButton.setDefaultFormProcessing(false);
add(calculateButton);

I suppose that this is the code where it enters from Form class from wicket
sources :
if (!component.isVisibleInHierarchy())
{
        throw new
WicketRuntimeException("Submit Button " +
   
submittingComponent.getInputName() + " (path=" +
   
component.getPageRelativePath() + ") is not visible");
}

Has anyone any idea? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-reproduce-a-WicketRuntimeException-tp4185488p4214363.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Cannot reproduce a WicketRuntimeException.

2011-12-12 Thread cosmindumy
Actually it didn't work. I put setTimeout(..). to delay the hiding of loading
image but I still got the exception sometimes. 
Do you have any other ideea?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-reproduce-a-WicketRuntimeException-tp4185488p4186479.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Cannot reproduce a WicketRuntimeException.

2011-12-12 Thread cosmindumy
I put a setTimeout(..). I hope this will solve the problem. I didn't get this
error after puting setTimeout().
Thanks for your response.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-reproduce-a-WicketRuntimeException-tp4185488p4186446.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Cannot reproduce a WicketRuntimeException.

2011-12-12 Thread cosmindumy
Thanks for your idea. 
I manages to reproduce the error. It happens extremely rare. Here is the
situation. 
I have a AjaxSubmitLink that make an action. To prevent multiple submit, I
use a AjaxCallDecorate that calls a javascript that shows a loading image
over the whole form, so that the form is inaccessible. After the submit is
finished, on decorateOnSucces or decorateOnFailure the image is again hidden
and the form is again available. 
I think that the problem is when the user click on the link right after the
form is available again but the ajaxsubmitlink is not yet updated. 
How can I tell to javascript to wait just a little more before it hides
again the loading image? 
I hope is clear what I said.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-reproduce-a-WicketRuntimeException-tp4185488p4186262.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Cannot reproduce a WicketRuntimeException.

2011-12-12 Thread cosmindumy
I'm afraid I didn't understand what exactly do you mean. 
How can I reproduce this in the development machine? This doesn't happened
again. What should I update on client side?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-reproduce-a-WicketRuntimeException-tp4185488p4185720.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Cannot reproduce a WicketRuntimeException.

2011-12-12 Thread Martin Grigorov
Hi,

The problem is that you have a stale link.
Initially you rendered this repeater and then you updated it in the
server side (the items inside have new ids) and you forgot to update
it in at the client side. Then the user clicks such stale link and the
server side cannot find an item with id == 0.

On Mon, Dec 12, 2011 at 11:37 AM, cosmindumy  wrote:
> On the production server I received an exception. The problem is that I
> cannot reproduce and I coudn't find the cause.
> Probably it must be something with browser setting, but I'm not sure.
> Has anyone an ideea which can be the cause? It says that the component is
> not found, but the component is there.
> This is some part of stack trace:
>
>
> org.apache.wicket.protocol.http.request.InvalidUrlException:
> org.apache.wicket.WicketRuntimeException: component
> inputForm:editQuoteContainer:rowPanel:repeater:1:addCombination not found on
> page
> com.lingo24.orderingsystem.customer.web.wicket.wos.estimator.EditQuoteDetails[id
> = 1], listener interface = [RequestListenerInterface
> name=IActivePageBehaviorListener, method=public abstract void
> org.apache.wicket.behavior.IBehaviorListener.onRequest()]
> at
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
> ..
> ..
> ..Caused by: org.apache.wicket.WicketRuntimeException: component
> inputForm:editQuoteContainer:rowPanel:repeater:1:addCombination not found on
> page
> com.lingo24.orderingsystem.customer.web.wicket.wos.estimator.EditQuoteDetails[id
> = 1], listener interface = [RequestListenerInterface
> name=IActivePageBehaviorListener, method=public abstract void
> org.apache.wicket.behavior.IBehaviorListener.onRequest()]
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Cannot-reproduce-a-WicketRuntimeException-tp4185488p4185488.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



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

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



Cannot reproduce a WicketRuntimeException.

2011-12-12 Thread cosmindumy
On the production server I received an exception. The problem is that I
cannot reproduce and I coudn't find the cause. 
Probably it must be something with browser setting, but I'm not sure. 
Has anyone an ideea which can be the cause? It says that the component is
not found, but the component is there.
This is some part of stack trace:


org.apache.wicket.protocol.http.request.InvalidUrlException:
org.apache.wicket.WicketRuntimeException: component
inputForm:editQuoteContainer:rowPanel:repeater:1:addCombination not found on
page
com.lingo24.orderingsystem.customer.web.wicket.wos.estimator.EditQuoteDetails[id
= 1], listener interface = [RequestListenerInterface
name=IActivePageBehaviorListener, method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
..
..
..Caused by: org.apache.wicket.WicketRuntimeException: component
inputForm:editQuoteContainer:rowPanel:repeater:1:addCombination not found on
page
com.lingo24.orderingsystem.customer.web.wicket.wos.estimator.EditQuoteDetails[id
= 1], listener interface = [RequestListenerInterface
name=IActivePageBehaviorListener, method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-reproduce-a-WicketRuntimeException-tp4185488p4185488.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: WicketRuntimeException

2011-06-08 Thread Jeffrey Schneller
I don't see anything in the logs but I will look.  I will try kill -3 pid   
when it happens again.

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Wednesday, June 08, 2011 9:38 AM
To: users@wicket.apache.org
Subject: Re: WicketRuntimeException

This is the wrong thread.
I bet there is another one with longer stack.

On Wed, Jun 8, 2011 at 3:27 PM, Jeffrey Schneller
 wrote:
> Thanks for the idea of using kill -3 pid
>
> I don't see the page in the stack trace which is below, unless it is the line 
> I have started with ===>.
>
>
>
> org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap null is 
> still locked by: Thread[TP-Processor24,5,main], giving up trying to get the 
> page for path: 4:products:0:prodBuyLink
>
> Stack Trace:
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
> org.apache.wicket.protocol.https.HttpsRequestCycleProcessor.resolve(HttpsRequestCycleProcessor.java:219)
> org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
> org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
> org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> ===>com.myapp.web.MDCSessionFilter.doFilter(MDCSessionFilter.java:40)
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
> java.lang.Thread.run(Thread.java:619)
>
> -Original Message-
> From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com]
> Sent: Wednesday, June 08, 2011 3:30 AM
> To: users@wicket.apache.org
> Subject: Re: WicketRuntimeException
>
> The stack trace shows the page that is holding the lock as well
>
> Martijn
>
> On Wed, Jun 8, 2011 at 7:20 AM, Martin Grigorov  wrote:
>> On Wed, Jun 8, 2011 at 7:00 AM, Jeffrey Schneller
>>  wrote:
>>> I have started to see more and more of the following exception when
>>> users are using the wicket app.
>>>
>>>
>>>
>>> org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap
>>> null is still locked by: Thread[TP-Processor24,5,main], giving up trying
>>> to get the page for path: 4:products:0:prodBuyLink
>>>
>>>
>>>
>>> If my understanding is right, it is a timeout that is occurring because
>>> the app is still processing for the page that is trying to be viewed.
>>> Is this correct?  Any ideas on how to debug or solve?  What are some
>>> common reasons for this type of exception?
>>
>> Correct. You can dump the thread's state with tools like jconsole or
>> on unix machines with "kill -3 pid".
>> Making several dumps you will see the thread that is "stuck".
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com

Re: WicketRuntimeException

2011-06-08 Thread Martin Grigorov
This is the wrong thread.
I bet there is another one with longer stack.

On Wed, Jun 8, 2011 at 3:27 PM, Jeffrey Schneller
 wrote:
> Thanks for the idea of using kill -3 pid
>
> I don't see the page in the stack trace which is below, unless it is the line 
> I have started with ===>.
>
>
>
> org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap null is 
> still locked by: Thread[TP-Processor24,5,main], giving up trying to get the 
> page for path: 4:products:0:prodBuyLink
>
> Stack Trace:
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
> org.apache.wicket.protocol.https.HttpsRequestCycleProcessor.resolve(HttpsRequestCycleProcessor.java:219)
> org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
> org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
> org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> ===>com.myapp.web.MDCSessionFilter.doFilter(MDCSessionFilter.java:40)
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
> java.lang.Thread.run(Thread.java:619)
>
> -Original Message-
> From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com]
> Sent: Wednesday, June 08, 2011 3:30 AM
> To: users@wicket.apache.org
> Subject: Re: WicketRuntimeException
>
> The stack trace shows the page that is holding the lock as well
>
> Martijn
>
> On Wed, Jun 8, 2011 at 7:20 AM, Martin Grigorov  wrote:
>> On Wed, Jun 8, 2011 at 7:00 AM, Jeffrey Schneller
>>  wrote:
>>> I have started to see more and more of the following exception when
>>> users are using the wicket app.
>>>
>>>
>>>
>>> org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap
>>> null is still locked by: Thread[TP-Processor24,5,main], giving up trying
>>> to get the page for path: 4:products:0:prodBuyLink
>>>
>>>
>>>
>>> If my understanding is right, it is a timeout that is occurring because
>>> the app is still processing for the page that is trying to be viewed.
>>> Is this correct?  Any ideas on how to debug or solve?  What are some
>>> common reasons for this type of exception?
>>
>> Correct. You can dump the thread's state with tools like jconsole or
>> on unix machines with "kill -3 pid".
>> Making several dumps you will see the thread that is "stuck".
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
>
> --
> Become a W

RE: WicketRuntimeException

2011-06-08 Thread Jeffrey Schneller
Thanks for the idea of using kill -3 pid

I don't see the page in the stack trace which is below, unless it is the line I 
have started with ===>.



org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap null is 
still locked by: Thread[TP-Processor24,5,main], giving up trying to get the 
page for path: 4:products:0:prodBuyLink
 
Stack Trace: 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
org.apache.wicket.protocol.https.HttpsRequestCycleProcessor.resolve(HttpsRequestCycleProcessor.java:219)
org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
===>com.myapp.web.MDCSessionFilter.doFilter(MDCSessionFilter.java:40)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
java.lang.Thread.run(Thread.java:619)

-Original Message-
From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] 
Sent: Wednesday, June 08, 2011 3:30 AM
To: users@wicket.apache.org
Subject: Re: WicketRuntimeException

The stack trace shows the page that is holding the lock as well

Martijn

On Wed, Jun 8, 2011 at 7:20 AM, Martin Grigorov  wrote:
> On Wed, Jun 8, 2011 at 7:00 AM, Jeffrey Schneller
>  wrote:
>> I have started to see more and more of the following exception when
>> users are using the wicket app.
>>
>>
>>
>> org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap
>> null is still locked by: Thread[TP-Processor24,5,main], giving up trying
>> to get the page for path: 4:products:0:prodBuyLink
>>
>>
>>
>> If my understanding is right, it is a timeout that is occurring because
>> the app is still processing for the page that is trying to be viewed.
>> Is this correct?  Any ideas on how to debug or solve?  What are some
>> common reasons for this type of exception?
>
> Correct. You can dump the thread's state with tools like jconsole or
> on unix machines with "kill -3 pid".
> Making several dumps you will see the thread that is "stuck".
>>
>>
>>
>>
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

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


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



Re: WicketRuntimeException

2011-06-08 Thread Martijn Dashorst
The stack trace shows the page that is holding the lock as well

Martijn

On Wed, Jun 8, 2011 at 7:20 AM, Martin Grigorov  wrote:
> On Wed, Jun 8, 2011 at 7:00 AM, Jeffrey Schneller
>  wrote:
>> I have started to see more and more of the following exception when
>> users are using the wicket app.
>>
>>
>>
>> org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap
>> null is still locked by: Thread[TP-Processor24,5,main], giving up trying
>> to get the page for path: 4:products:0:prodBuyLink
>>
>>
>>
>> If my understanding is right, it is a timeout that is occurring because
>> the app is still processing for the page that is trying to be viewed.
>> Is this correct?  Any ideas on how to debug or solve?  What are some
>> common reasons for this type of exception?
>
> Correct. You can dump the thread's state with tools like jconsole or
> on unix machines with "kill -3 pid".
> Making several dumps you will see the thread that is "stuck".
>>
>>
>>
>>
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

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



Re: WicketRuntimeException

2011-06-07 Thread Martin Grigorov
On Wed, Jun 8, 2011 at 7:00 AM, Jeffrey Schneller
 wrote:
> I have started to see more and more of the following exception when
> users are using the wicket app.
>
>
>
> org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap
> null is still locked by: Thread[TP-Processor24,5,main], giving up trying
> to get the page for path: 4:products:0:prodBuyLink
>
>
>
> If my understanding is right, it is a timeout that is occurring because
> the app is still processing for the page that is trying to be viewed.
> Is this correct?  Any ideas on how to debug or solve?  What are some
> common reasons for this type of exception?

Correct. You can dump the thread's state with tools like jconsole or
on unix machines with "kill -3 pid".
Making several dumps you will see the thread that is "stuck".
>
>
>
>
>
>



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

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



WicketRuntimeException

2011-06-07 Thread Jeffrey Schneller
I have started to see more and more of the following exception when
users are using the wicket app.

 

org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap
null is still locked by: Thread[TP-Processor24,5,main], giving up trying
to get the page for path: 4:products:0:prodBuyLink

 

If my understanding is right, it is a timeout that is occurring because
the app is still processing for the page that is trying to be viewed.
Is this correct?  Any ideas on how to debug or solve?  What are some
common reasons for this type of exception?

 

 



Re: WicketRuntimeException

2011-03-29 Thread Martijn Dashorst
How to Get Help

Whenever you are reporting a problem, please be sure to include as
much information as possible; the more we know, the better the chance
of a quicker resolution.

which version of the software
what platform and JDK
any particular JEE container being used - if so what version
stack traces generally really help! If in doubt include the whole
thing; often exceptions get wrapped in other exceptions and the
exception right near the bottom explains the actual error, not the
first few lines at the top. Its very easy for us to skim-read past
unnecessary parts of a stack trace.
log output can be useful too; sometimes enabling DEBUG logging can
help your code & configuration files are often useful
How to get help faster

We can help you much quicker if you try the following

provide us with a JUnit test case that demonstrates your issue. e.g.
if you think you’ve found a bug, can you create a test case to
demonstrate the bug?
submit a patch fixing the bug! (We also buy you beer when we meet you
if you submit bug fixes for memory leaks or performance related
issues, if you can run a profiler on your test case and attach the
output as a file (or zipped file if its huge) to the JIRA we can
normally fix things much faster. e.g. run JProfiler or YourKit on your
code and send us the output. To find memory leaks its quicker to
resolve if you can tell us what classes are taking up all of the RAM;
we can normally figure out whats wrong from that.

On Tue, Mar 29, 2011 at 2:15 PM, Jan Juno  wrote:
> Can somebody help me with this exception? What can be wrong am
> desperate. What to look for?
>
>
> ERROR [org.apache.wicket.RequestCycle] [, http-8080-1, /jumbo/,
> 101.11.149.90:-33771be0:12f
> 0171a0c1:-8000, , ] Exception in rendering component: [MarkupContainer
> [Component id = html]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component:
> [MarkupContainer [Component id = html]]
>        at org.apache.wicket.Component.renderComponent(Component.java:2725)
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

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



Re: WicketRuntimeException

2011-03-29 Thread Bruno Borges
Could you provide us a quickstart to reproduce de error ?


Bruno Borges
www.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
 - Francois de La Rochefoucauld



On Tue, Mar 29, 2011 at 10:08 AM, Jan Juno  wrote:

> The problem is even stranger
> There is no problem with IE no problem with Opera
>
> the only problem is with Firefox 4.0
>
> strange
>
>
> On 29 March 2011 14:19, Wilhelmsen Tor Iver  wrote:
>
> > > Can somebody help me with this exception? What can be wrong am
> > > desperate. What to look for?
> >
> > Typically, the real error is further down in the text that what you
> > included. Common causes are:
> > * Having a wicket:id the the HTML with no corresponding component
> > * Adding a component without adding the wicket:id (inverse of the above)
> > * Having both a component and a wicket:id but the nesting is wrong
> >
> > - Tor Iver
> >
>


Re: WicketRuntimeException

2011-03-29 Thread Jan Juno
The problem is even stranger
There is no problem with IE no problem with Opera

the only problem is with Firefox 4.0

strange


On 29 March 2011 14:19, Wilhelmsen Tor Iver  wrote:

> > Can somebody help me with this exception? What can be wrong am
> > desperate. What to look for?
>
> Typically, the real error is further down in the text that what you
> included. Common causes are:
> * Having a wicket:id the the HTML with no corresponding component
> * Adding a component without adding the wicket:id (inverse of the above)
> * Having both a component and a wicket:id but the nesting is wrong
>
> - Tor Iver
>


RE: WicketRuntimeException

2011-03-29 Thread Wilhelmsen Tor Iver
> Can somebody help me with this exception? What can be wrong am
> desperate. What to look for?

Typically, the real error is further down in the text that what you included. 
Common causes are:
* Having a wicket:id the the HTML with no corresponding component
* Adding a component without adding the wicket:id (inverse of the above)
* Having both a component and a wicket:id but the nesting is wrong

- Tor Iver


WicketRuntimeException

2011-03-29 Thread Jan Juno
Can somebody help me with this exception? What can be wrong am
desperate. What to look for?


ERROR [org.apache.wicket.RequestCycle] [, http-8080-1, /jumbo/,
101.11.149.90:-33771be0:12f
0171a0c1:-8000, , ] Exception in rendering component: [MarkupContainer
[Component id = html]]
org.apache.wicket.WicketRuntimeException: Exception in rendering component:
[MarkupContainer [Component id = html]]
at org.apache.wicket.Component.renderComponent(Component.java:2725)


Re: WicketRuntimeException: component not found on page

2010-12-13 Thread Takeo Hosomi
Hello,

The problem was solved by the advice I got from a wiquery developer.

He said it was a common problem which happens when double ajax
requests are issued where the first ajax request rewrite a component,
and the next one refer to it.

I solved the problem by preventing it by using the technique
introduced at the following link, and it works.
http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-lines-of-code/

Thanks,
Takeo Hosomi

On Thu, Dec 9, 2010 at 4:56 PM, Takeo Hosomi  wrote:
> I attached it to a JIRA.
> https://issues.apache.org/jira/browse/WICKET-3248
>
> Thanks,
> Takeo Hosomi
>
> On Thu, Dec 9, 2010 at 4:12 PM, Jeremy Thomerson
>  wrote:
>> Attach the zip of the quickstart to a JIRA.
>>
>> Jeremy Thomerson
>> http://wickettraining.com
>> -- sent from my "smart" phone, so please excuse spelling, formatting, or
>> compiler errors
>>
>> On Dec 9, 2010 4:15 PM, "Takeo Hosomi"  wrote:
>>
>> Hello,
>>
>> I have the same issue which is discussed in the following link:
>> http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-component-not-found-on-page-td3055902.html
>>
>> I made a quickstart to reproduce it. Any idea on how to workaround
>> this behavior?
>> I'm using wicket 1.4.12, wiquery 1.1.2, and wiquery-plugin for tooltip
>> (other-plugins-1.1.jar).
>>
>> Thanks,
>> Takeo Hosomi
>>
>> Step1.
>> Use following source code to reproduce the problem.
>>
>> Java:
>>
>> import java.io.Serializable;
>> import java.util.ArrayList;
>> import java.util.List;
>>
>> import org.apache.wicket.Component;
>> import org.apache.wicket.ajax.AjaxRequestTarget;
>> import
>> org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
>> import org.apache.wicket.behavior.SimpleAttributeModifier;
>> import org.apache.wicket.markup.html.CSSPackageResource;
>> import org.apache.wicket.markup.html.WebMarkupContainer;
>> import org.apache.wicket.markup.html.basic.Label;
>> import org.apache.wicket.markup.html.list.ListItem;
>> import org.apache.wicket.markup.html.list.PageableListView;
>> import org.apache.wicket.markup.html.panel.Panel;
>> import org.odlabs.wiquery.ui.themes.ThemeUiHelper;
>> import org.odlabs.wiquery.ui.themes.UiIcon;
>> import org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour;
>> import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior;
>> import
>> org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour.IToolTipOnBeforeShowUIEventHandler;
>> import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Offset;
>> import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Position;
>>
>> public class TestPanel extends Panel {
>>       private static final long serialVersionUID = 1L;
>>
>>       private static int rowHeight = 40;
>>
>>       public TestPanel(String id) {
>>               super(id);
>>               setOutputMarkupId(true);
>>
>>
>>  add(CSSPackageResource.getHeaderContribution(TooltipBehavior.CSS));
>>
>>       // Tooltip Indicator
>>       final WebMarkupContainer indiIcon = new
>> WebMarkupContainer("indiIcon");
>>       ThemeUiHelper.iconComponent(indiIcon, UiIcon.CARAT_1_EAST);
>>       final WebMarkupContainer tooltipIndicator = new
>> WebMarkupContainer("indi");
>>       tooltipIndicator.add(indiIcon);
>>       tooltipIndicator.add(new SimpleAttributeModifier("style",
>>
>>  "display:none;background-color:#C4C4C4;" +
>>                                       "height:"+20+"px;" +
>>
>>  "padding-top:"+((rowHeight-20)/2-1)+"px;padding-bottom:"+((rowHeight-20)/2-1)+"px;"));
>>       tooltipIndicator.setOutputMarkupId(true);
>>       add(tooltipIndicator);
>>
>>           // Container
>>       WebMarkupContainer container = new WebMarkupContainer("container");
>>       container.setOutputMarkupId(true);
>>       add(container);
>>
>>               PageableListView users = new
>> PageableListView("user", dummyUsers(), 3){
>>               /***/
>>                       private static final long serialVersionUID = 1L;
>>
>>                       @Override
>>                       protected void populateItem(ListItem item)
>> {
>>                               item.add(new
>> SimpleAttributeModifier("style","height:"+rowHeight+"px;"));
>>                       

Re: WicketRuntimeException: component not found on page

2010-12-09 Thread Takeo Hosomi
I attached it to a JIRA.
https://issues.apache.org/jira/browse/WICKET-3248

Thanks,
Takeo Hosomi

On Thu, Dec 9, 2010 at 4:12 PM, Jeremy Thomerson
 wrote:
> Attach the zip of the quickstart to a JIRA.
>
> Jeremy Thomerson
> http://wickettraining.com
> -- sent from my "smart" phone, so please excuse spelling, formatting, or
> compiler errors
>
> On Dec 9, 2010 4:15 PM, "Takeo Hosomi"  wrote:
>
> Hello,
>
> I have the same issue which is discussed in the following link:
> http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-component-not-found-on-page-td3055902.html
>
> I made a quickstart to reproduce it. Any idea on how to workaround
> this behavior?
> I'm using wicket 1.4.12, wiquery 1.1.2, and wiquery-plugin for tooltip
> (other-plugins-1.1.jar).
>
> Thanks,
> Takeo Hosomi
>
> Step1.
> Use following source code to reproduce the problem.
>
> Java:
>
> import java.io.Serializable;
> import java.util.ArrayList;
> import java.util.List;
>
> import org.apache.wicket.Component;
> import org.apache.wicket.ajax.AjaxRequestTarget;
> import
> org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
> import org.apache.wicket.behavior.SimpleAttributeModifier;
> import org.apache.wicket.markup.html.CSSPackageResource;
> import org.apache.wicket.markup.html.WebMarkupContainer;
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.markup.html.list.ListItem;
> import org.apache.wicket.markup.html.list.PageableListView;
> import org.apache.wicket.markup.html.panel.Panel;
> import org.odlabs.wiquery.ui.themes.ThemeUiHelper;
> import org.odlabs.wiquery.ui.themes.UiIcon;
> import org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour;
> import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior;
> import
> org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour.IToolTipOnBeforeShowUIEventHandler;
> import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Offset;
> import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Position;
>
> public class TestPanel extends Panel {
>       private static final long serialVersionUID = 1L;
>
>       private static int rowHeight = 40;
>
>       public TestPanel(String id) {
>               super(id);
>               setOutputMarkupId(true);
>
>
>  add(CSSPackageResource.getHeaderContribution(TooltipBehavior.CSS));
>
>       // Tooltip Indicator
>       final WebMarkupContainer indiIcon = new
> WebMarkupContainer("indiIcon");
>       ThemeUiHelper.iconComponent(indiIcon, UiIcon.CARAT_1_EAST);
>       final WebMarkupContainer tooltipIndicator = new
> WebMarkupContainer("indi");
>       tooltipIndicator.add(indiIcon);
>       tooltipIndicator.add(new SimpleAttributeModifier("style",
>
>  "display:none;background-color:#C4C4C4;" +
>                                       "height:"+20+"px;" +
>
>  "padding-top:"+((rowHeight-20)/2-1)+"px;padding-bottom:"+((rowHeight-20)/2-1)+"px;"));
>       tooltipIndicator.setOutputMarkupId(true);
>       add(tooltipIndicator);
>
>           // Container
>       WebMarkupContainer container = new WebMarkupContainer("container");
>       container.setOutputMarkupId(true);
>       add(container);
>
>               PageableListView users = new
> PageableListView("user", dummyUsers(), 3){
>               /***/
>                       private static final long serialVersionUID = 1L;
>
>                       @Override
>                       protected void populateItem(ListItem item)
> {
>                               item.add(new
> SimpleAttributeModifier("style","height:"+rowHeight+"px;"));
>                               item.add(new Label("name",
> item.getModelObject().getName()));
>                               item.add(new Label("first",
> item.getModelObject().getFirst()));
>                               item.add(new Label("last",
> item.getModelObject().getLast()));
>                       item.add(new TooltipAjaxBehaviour()
>                               .setDelay(0) // TODO magic number 400ms
>                               .setPredelay(0)
>                               .setPosition(Position.bottom_right)
>                               .setOffset(new Offset(-(rowHeight-1),-15)) //
> y,x
>                               .setTip(tooltipIndicator)
>                               .setOnBeforeShow(new
> IToolTipOnBeforeShowUIEventHandler() {
>                                       private static final long
> serialVersionUID = 1L;
>
>   

Re: WicketRuntimeException: component not found on page

2010-12-09 Thread Jeremy Thomerson
Attach the zip of the quickstart to a JIRA.

Jeremy Thomerson
http://wickettraining.com
-- sent from my "smart" phone, so please excuse spelling, formatting, or
compiler errors

On Dec 9, 2010 4:15 PM, "Takeo Hosomi"  wrote:

Hello,

I have the same issue which is discussed in the following link:
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-component-not-found-on-page-td3055902.html

I made a quickstart to reproduce it. Any idea on how to workaround
this behavior?
I'm using wicket 1.4.12, wiquery 1.1.2, and wiquery-plugin for tooltip
(other-plugins-1.1.jar).

Thanks,
Takeo Hosomi

Step1.
Use following source code to reproduce the problem.

Java:

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import
org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
import org.apache.wicket.behavior.SimpleAttributeModifier;
import org.apache.wicket.markup.html.CSSPackageResource;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.PageableListView;
import org.apache.wicket.markup.html.panel.Panel;
import org.odlabs.wiquery.ui.themes.ThemeUiHelper;
import org.odlabs.wiquery.ui.themes.UiIcon;
import org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour;
import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior;
import
org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour.IToolTipOnBeforeShowUIEventHandler;
import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Offset;
import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Position;

public class TestPanel extends Panel {
   private static final long serialVersionUID = 1L;

   private static int rowHeight = 40;

   public TestPanel(String id) {
   super(id);
   setOutputMarkupId(true);


 add(CSSPackageResource.getHeaderContribution(TooltipBehavior.CSS));

   // Tooltip Indicator
   final WebMarkupContainer indiIcon = new
WebMarkupContainer("indiIcon");
   ThemeUiHelper.iconComponent(indiIcon, UiIcon.CARAT_1_EAST);
   final WebMarkupContainer tooltipIndicator = new
WebMarkupContainer("indi");
   tooltipIndicator.add(indiIcon);
   tooltipIndicator.add(new SimpleAttributeModifier("style",

 "display:none;background-color:#C4C4C4;" +
   "height:"+20+"px;" +

 
"padding-top:"+((rowHeight-20)/2-1)+"px;padding-bottom:"+((rowHeight-20)/2-1)+"px;"));
   tooltipIndicator.setOutputMarkupId(true);
   add(tooltipIndicator);

   // Container
   WebMarkupContainer container = new WebMarkupContainer("container");
   container.setOutputMarkupId(true);
   add(container);

   PageableListView users = new
PageableListView("user", dummyUsers(), 3){
   /***/
   private static final long serialVersionUID = 1L;

   @Override
   protected void populateItem(ListItem item)
{
   item.add(new
SimpleAttributeModifier("style","height:"+rowHeight+"px;"));
   item.add(new Label("name",
item.getModelObject().getName()));
   item.add(new Label("first",
item.getModelObject().getFirst()));
   item.add(new Label("last",
item.getModelObject().getLast()));
   item.add(new TooltipAjaxBehaviour()
   .setDelay(0) // TODO magic number 400ms
   .setPredelay(0)
   .setPosition(Position.bottom_right)
   .setOffset(new Offset(-(rowHeight-1),-15)) //
y,x
   .setTip(tooltipIndicator)
   .setOnBeforeShow(new
IToolTipOnBeforeShowUIEventHandler() {
   private static final long
serialVersionUID = 1L;

   public void onEvent(AjaxRequestTarget
target, Component
component, int top, int left) {
   // do something...
   }
   })
   );
   }
   };
   container.add(users);
   container.add(new AjaxPagingNavigator("navigator", users));
   }

   private List dummyUsers() {
   List ret = new ArrayList();
   for (int i=0; i<10 ; i++){
   ret.add(new DummyUser("name"+i,"first&q

WicketRuntimeException: component not found on page

2010-12-09 Thread Takeo Hosomi
Hello,

I have the same issue which is discussed in the following link:
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-component-not-found-on-page-td3055902.html

I made a quickstart to reproduce it. Any idea on how to workaround
this behavior?
I'm using wicket 1.4.12, wiquery 1.1.2, and wiquery-plugin for tooltip
(other-plugins-1.1.jar).

Thanks,
Takeo Hosomi

Step1.
Use following source code to reproduce the problem.

Java:

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
import org.apache.wicket.behavior.SimpleAttributeModifier;
import org.apache.wicket.markup.html.CSSPackageResource;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.PageableListView;
import org.apache.wicket.markup.html.panel.Panel;
import org.odlabs.wiquery.ui.themes.ThemeUiHelper;
import org.odlabs.wiquery.ui.themes.UiIcon;
import org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour;
import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior;
import 
org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour.IToolTipOnBeforeShowUIEventHandler;
import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Offset;
import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Position;

public class TestPanel extends Panel {
private static final long serialVersionUID = 1L;

private static int rowHeight = 40;

public TestPanel(String id) {
super(id);
setOutputMarkupId(true);

add(CSSPackageResource.getHeaderContribution(TooltipBehavior.CSS));

// Tooltip Indicator
final WebMarkupContainer indiIcon = new WebMarkupContainer("indiIcon");
ThemeUiHelper.iconComponent(indiIcon, UiIcon.CARAT_1_EAST);
final WebMarkupContainer tooltipIndicator = new 
WebMarkupContainer("indi");
tooltipIndicator.add(indiIcon);
tooltipIndicator.add(new SimpleAttributeModifier("style",

"display:none;background-color:#C4C4C4;" +
"height:"+20+"px;" +

"padding-top:"+((rowHeight-20)/2-1)+"px;padding-bottom:"+((rowHeight-20)/2-1)+"px;"));
tooltipIndicator.setOutputMarkupId(true);
add(tooltipIndicator);

// Container
WebMarkupContainer container = new WebMarkupContainer("container");
container.setOutputMarkupId(true);
add(container);

PageableListView users = new
PageableListView("user", dummyUsers(), 3){
/***/
private static final long serialVersionUID = 1L;

@Override
protected void populateItem(ListItem item) {
item.add(new 
SimpleAttributeModifier("style","height:"+rowHeight+"px;"));
item.add(new Label("name", 
item.getModelObject().getName()));
item.add(new Label("first", 
item.getModelObject().getFirst()));
item.add(new Label("last", 
item.getModelObject().getLast()));
item.add(new TooltipAjaxBehaviour()
.setDelay(0) // TODO magic number 400ms
.setPredelay(0)
.setPosition(Position.bottom_right) 

.setOffset(new Offset(-(rowHeight-1),-15)) // 
y,x
.setTip(tooltipIndicator)
.setOnBeforeShow(new 
IToolTipOnBeforeShowUIEventHandler() {
private static final long 
serialVersionUID = 1L;

public void onEvent(AjaxRequestTarget 
target, Component
component, int top, int left) {
// do something...
}
})
);
}
};
container.add(users);
container.add(new AjaxPagingNavigator("navigator", users));
}

private List dummyUsers() {
List ret = new ArrayList();
for (int i=0; i<10 ; i++){
ret.add(new DummyUser("name"+i,"firs

Re: WicketRuntimeException: component not found on page @L

2010-11-24 Thread Alec Swan
The biggest problem with this issue is that it's intermittent. I saw
this happening a few time and I was not able to reproduce it manually
right after I saw it. One time I sat there for 15 minutes repeating
the sequence of clicks that had caused the error just a minute before
that and was not able to reproduce it.

One thing I could do is to take your recommendations, deploy them on
our QA server and let you know if we see this problem again.

Any thoughts on this?

On Tue, Nov 23, 2010 at 10:40 PM, Igor Vaynberg  wrote:
> start by creating a quickstart that reproduces it so we can better understand 
> it
>
> -igor
>
> On Tue, Nov 23, 2010 at 9:38 PM, Alec Swan  wrote:
>> I noticed that all "component not found on page" exceptions were
>> thrown for AjaxEditableLabel and AjaxLink components located inside of
>> a DataView.
>>
>> It seems like other people had a "component not found on page" problem
>> inside of DataView components:
>> http://www.mail-archive.com/users@wicket.apache.org/msg08636.html
>> http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-td1892913.html#a2229885
>>
>> A workaround in JIRA 923 recommends turn off browser caching to solve
>> "component not found on page" problem when using the Back button.
>> However, in my case the Back button is not used, instead the DataView
>> is refreshed using Ajax.
>>
>> Could anybody provide any suggestions on how to fix this problem?
>>
>> Thanks
>>
>> On Tue, Nov 23, 2010 at 10:58 AM, Alec Swan  wrote:
>>>
>>> Hello,
>>>
>>> We upgraded our app to use Wicket 1.4.13. After that we started getting 
>>> sporadic WicketRuntimeExceptions about components not being found on a some 
>>> pages. We made changes to some, but not all pages, which exhibit this 
>>> behavior. Has anyone else noticed this with 1.4.14? Any ideas on how to 
>>> troubleshoot this intermittent behavior?
>>>
>>> Here is an example:
>>>
>>> microSitePanel:mainMenuContentPanel:secondMenuItem:1:secondMenuItemLink not 
>>> found on page
>>> com.galecsy.lrm.web.wicket.offer.OfferManagementPage[id = 1], 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:26
>>>
>>> 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
>
>

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



Re: WicketRuntimeException: component not found on page

2010-11-23 Thread Igor Vaynberg
start by creating a quickstart that reproduces it so we can better understand it

-igor

On Tue, Nov 23, 2010 at 9:38 PM, Alec Swan  wrote:
> I noticed that all "component not found on page" exceptions were
> thrown for AjaxEditableLabel and AjaxLink components located inside of
> a DataView.
>
> It seems like other people had a "component not found on page" problem
> inside of DataView components:
> http://www.mail-archive.com/users@wicket.apache.org/msg08636.html
> http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-td1892913.html#a2229885
>
> A workaround in JIRA 923 recommends turn off browser caching to solve
> "component not found on page" problem when using the Back button.
> However, in my case the Back button is not used, instead the DataView
> is refreshed using Ajax.
>
> Could anybody provide any suggestions on how to fix this problem?
>
> Thanks
>
> On Tue, Nov 23, 2010 at 10:58 AM, Alec Swan  wrote:
>>
>> Hello,
>>
>> We upgraded our app to use Wicket 1.4.13. After that we started getting 
>> sporadic WicketRuntimeExceptions about components not being found on a some 
>> pages. We made changes to some, but not all pages, which exhibit this 
>> behavior. Has anyone else noticed this with 1.4.14? Any ideas on how to 
>> troubleshoot this intermittent behavior?
>>
>> Here is an example:
>>
>> microSitePanel:mainMenuContentPanel:secondMenuItem:1:secondMenuItemLink not 
>> found on page
>> com.galecsy.lrm.web.wicket.offer.OfferManagementPage[id = 1], 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:26
>>
>> 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



Re: WicketRuntimeException: component not found on page

2010-11-23 Thread Alec Swan
I noticed that all "component not found on page" exceptions were
thrown for AjaxEditableLabel and AjaxLink components located inside of
a DataView.

It seems like other people had a "component not found on page" problem
inside of DataView components:
http://www.mail-archive.com/users@wicket.apache.org/msg08636.html
http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-td1892913.html#a2229885

A workaround in JIRA 923 recommends turn off browser caching to solve
"component not found on page" problem when using the Back button.
However, in my case the Back button is not used, instead the DataView
is refreshed using Ajax.

Could anybody provide any suggestions on how to fix this problem?

Thanks

On Tue, Nov 23, 2010 at 10:58 AM, Alec Swan  wrote:
>
> Hello,
>
> We upgraded our app to use Wicket 1.4.13. After that we started getting 
> sporadic WicketRuntimeExceptions about components not being found on a some 
> pages. We made changes to some, but not all pages, which exhibit this 
> behavior. Has anyone else noticed this with 1.4.14? Any ideas on how to 
> troubleshoot this intermittent behavior?
>
> Here is an example:
>
> microSitePanel:mainMenuContentPanel:secondMenuItem:1:secondMenuItemLink not 
> found on page
> com.galecsy.lrm.web.wicket.offer.OfferManagementPage[id = 1], 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:26
>
> Thanks

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



WicketRuntimeException: component not found on page

2010-11-23 Thread Alec Swan
Hello,

We upgraded our app to use Wicket 1.4.13. After that we started getting
sporadic WicketRuntimeExceptions about components not being found on a some
pages. We made changes to some, but not all pages, which exhibit this
behavior. Has anyone else noticed this with 1.4.14? Any ideas on how to
troubleshoot this intermittent behavior?

Here is an example:

microSitePanel:mainMenuContentPanel:secondMenuItem:1:secondMenuItemLink not
found on page
com.galecsy.lrm.web.wicket.offer.OfferManagementPage[id = 1], 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:26

Thanks


WicketRuntimeException when injecting into hidden form field

2010-09-06 Thread Bernhard Schauer

Hello,

in wicket forms get a hidden field. I found on the web, that this hidden 
field is needed for some kind of event handling. (Anyone knows more 
details?)


I played around with XSS-Me 
(https://addons.mozilla.org/de/firefox/addon/7598/) a firefox plugin, 
that tries to find XSS vulnerabilities.
What the addon does, is that it injects some values into that hidden 
field, and then wicket throws :
   WicketRuntimeException: Attempt to access unknown request listener 
interface null


Has anyone an idea, how this exception could be prevented? or caught?

mfg bernhard

the full trace is:

ERROR - RequestCycle   - Attempt to access unknown request 
listener interface null
org.apache.wicket.WicketRuntimeException: Attempt to access unknown 
request listener interface null

   at org.apache.wicket.markup.html.form.Form.dispatchEvent(Form.java:1327)
   at 
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:874)

   at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   at java.lang.reflect.Method.invoke(Method.java:597)
   at 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
   at 
org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
   at 
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
   at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)

   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
   at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
   at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
   at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
   at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
   at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
   at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)

   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
   at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

   at org.mortbay.jetty.Server.handle(Server.java:295)
   at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
   at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:841)

   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:639)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
   at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
   at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
** 
<http://dict.leo.org/ende?lp=ende&p=Ci4HO3kMAA&search=vulnerability&trestr=0x8001> 



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



Re: WicketRuntimeException: loginPage is already mounted for BookmarkablePageEncoder[page=class com.xxx.LoginPage]

2010-09-03 Thread Fernando Wermus
Igor,
I did what you pointed me out. However, I got a MarkupNoFoundExpcetion.

My code

 try{
 application=(WebApplication) MiSession.get().getApplication();
 }catch(Exception e){
 application=new BaseWicketTester.DummyWebApplication(){
protected void init(){

getApplicationSettings().setDefaultMaximumUploadSize(Bytes.bytes(500));
 getResourceSettings().addResourceFolder("/WEB-INF/html");
}
};
 application.mountBookmarkablePage("mensaje",
PaginaMensajeEvento.class);
 }
It says that PaginaMensajeEvento doesn't have a markup which is not true.
Actually, when I don't use this code into a separate servlet, It runs
smoothly.

thanks in advance



On Thu, Sep 2, 2010 at 6:49 PM, Igor Vaynberg wrote:

> you can create a new instance
>
> -igor
>
> On Thu, Sep 2, 2010 at 1:49 PM, Fernando Wermus
>  wrote:
> > Igor,
> >When I don't pass the application I got the following error
> >
> > RuntimeException: There is no application attached to current thread
> > btpool0-3 - /messagebroker/amf
> >
> > This is because I need to render the emails from a different servlet. Do
> I
> > have any solution for this situation?
> >
> > How can I get the WebApplication from a different servlet?
> >
> > On Thu, Sep 2, 2010 at 1:26 PM, Igor Vaynberg  >wrote:
> >
> >> you should pass a new instance of application. wicket tester inits the
> >> application and so it would call the init method which will execute
> >> the mounts - and on already initialized instance it would cause that
> >> error.
> >>
> >> -igor
> >>
> >> On Thu, Sep 2, 2010 at 9:13 AM, Fernando Wermus
> >>  wrote:
> >> > Hi all,
> >> >I am using wicketTester to render html for emails. I pass my
> current
> >> app
> >> > to WicketTester and I get the following error:
> >> >
> >> > WicketRuntimeException: loginPage is already mounted for
> >> > BookmarkablePageEncoder[page=class com.xxx.LoginPage]
> >> >
> >> > Which makes no sense. The Application is running and I just passing it
> to
> >> > the WicketTester constructor.
> >> >
> >> > any help would be really appreciated.
> >> >
> >> > 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
> >
>
> -
> 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: WicketRuntimeException: loginPage is already mounted for BookmarkablePageEncoder[page=class com.xxx.LoginPage]

2010-09-02 Thread Igor Vaynberg
you can create a new instance

-igor

On Thu, Sep 2, 2010 at 1:49 PM, Fernando Wermus
 wrote:
> Igor,
>    When I don't pass the application I got the following error
>
> RuntimeException: There is no application attached to current thread
> btpool0-3 - /messagebroker/amf
>
> This is because I need to render the emails from a different servlet. Do I
> have any solution for this situation?
>
> How can I get the WebApplication from a different servlet?
>
> On Thu, Sep 2, 2010 at 1:26 PM, Igor Vaynberg wrote:
>
>> you should pass a new instance of application. wicket tester inits the
>> application and so it would call the init method which will execute
>> the mounts - and on already initialized instance it would cause that
>> error.
>>
>> -igor
>>
>> On Thu, Sep 2, 2010 at 9:13 AM, Fernando Wermus
>>  wrote:
>> > Hi all,
>> >    I am using wicketTester to render html for emails. I pass my current
>> app
>> > to WicketTester and I get the following error:
>> >
>> > WicketRuntimeException: loginPage is already mounted for
>> > BookmarkablePageEncoder[page=class com.xxx.LoginPage]
>> >
>> > Which makes no sense. The Application is running and I just passing it to
>> > the WicketTester constructor.
>> >
>> > any help would be really appreciated.
>> >
>> > 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
>

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



Re: WicketRuntimeException: loginPage is already mounted for BookmarkablePageEncoder[page=class com.xxx.LoginPage]

2010-09-02 Thread Fernando Wermus
Igor,
When I don't pass the application I got the following error

RuntimeException: There is no application attached to current thread
btpool0-3 - /messagebroker/amf

This is because I need to render the emails from a different servlet. Do I
have any solution for this situation?

How can I get the WebApplication from a different servlet?

On Thu, Sep 2, 2010 at 1:26 PM, Igor Vaynberg wrote:

> you should pass a new instance of application. wicket tester inits the
> application and so it would call the init method which will execute
> the mounts - and on already initialized instance it would cause that
> error.
>
> -igor
>
> On Thu, Sep 2, 2010 at 9:13 AM, Fernando Wermus
>  wrote:
> > Hi all,
> >I am using wicketTester to render html for emails. I pass my current
> app
> > to WicketTester and I get the following error:
> >
> > WicketRuntimeException: loginPage is already mounted for
> > BookmarkablePageEncoder[page=class com.xxx.LoginPage]
> >
> > Which makes no sense. The Application is running and I just passing it to
> > the WicketTester constructor.
> >
> > any help would be really appreciated.
> >
> > 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: WicketRuntimeException: loginPage is already mounted for BookmarkablePageEncoder[page=class com.xxx.LoginPage]

2010-09-02 Thread Igor Vaynberg
you should pass a new instance of application. wicket tester inits the
application and so it would call the init method which will execute
the mounts - and on already initialized instance it would cause that
error.

-igor

On Thu, Sep 2, 2010 at 9:13 AM, Fernando Wermus
 wrote:
> Hi all,
>    I am using wicketTester to render html for emails. I pass my current app
> to WicketTester and I get the following error:
>
> WicketRuntimeException: loginPage is already mounted for
> BookmarkablePageEncoder[page=class com.xxx.LoginPage]
>
> Which makes no sense. The Application is running and I just passing it to
> the WicketTester constructor.
>
> any help would be really appreciated.
>
> 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



WicketRuntimeException: loginPage is already mounted for BookmarkablePageEncoder[page=class com.xxx.LoginPage]

2010-09-02 Thread Fernando Wermus
Hi all,
I am using wicketTester to render html for emails. I pass my current app
to WicketTester and I get the following error:

WicketRuntimeException: loginPage is already mounted for
BookmarkablePageEncoder[page=class com.xxx.LoginPage]

Which makes no sense. The Application is running and I just passing it to
the WicketTester constructor.

any help would be really appreciated.

thanks in advance

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: wicketstuff-push causing WicketRuntimeException component not found on Page

2010-06-25 Thread david_

If that is the issue, it can be solved by overriding the method that sets
the id? But is it possible?

2010/6/25 Rodolfo Hansen [via Apache Wicket] <
ml-node+2268555-1340689353-232...@n4.nabble.com
>

> Yes, it may be something with the wicket session.
> Can you send me a quickstart with the issue??
>
> On Thu, 2010-06-24 at 23:22 -0700, david_ wrote:
>
> > Yes indeed.
> > Is it possible that wicket is updating for example 2 Component's of 2
> > different users with the same Component identifiers?
> > Maybe that's why Wicket is unable to process the action for a link one of
>
> > the 2 Components.
> >
> >
> > 2010/6/25 Rodolfo Hansen [via Apache Wicket] <
> > [hidden email] 
> > <http://user/SendEmail.jtp?type=node&node=2268555&i=0><[hidden
> email] <http://user/SendEmail.jtp?type=node&node=2268555&i=1>>
> > >
> >
> > > You mean to say the error is sporadic?
> > >
> > > On Wed, 2010-06-23 at 20:16 +0200, David Meulemans wrote:
> > >
> > > > Hi
> > > >
> > > > I have a Listener object with a Map in it containing
> > > > org.apache.wicket.Component objects that need to be updated every
> time
> > > the
> > > > onChange(); method is called. For example caused by another user's
> > > actions.
> > > > This works perfectly with wicketstuff-push.
> > > >
> > > > The org.apache.wicket.Component objects that need to be updated, have
>
> > > > org.apache.wicket.ajax.markup.html.AjaxLink objects.
> > > > Sometimes if I click on the one of the links, I get a
> > > WicketRuntimeException
> > > > telling me that the Link is not found on the Page.
> > > >
> > > > Any suggestions?
> > >
> > >
> > >
> > >
> > > --
> > >  View message @
> > >
> http://apache-wicket.1842946.n4.nabble.com/wicketstuff-push-causing-WicketRuntimeException-component-not-found-on-Page-tp2266008p2267816.html<http://apache-wicket.1842946.n4.nabble.com/wicketstuff-push-causing-WicketRuntimeException-component-not-found-on-Page-tp2266008p2267816.html?by-user=t>
> > > To start a new topic under Wicket - User, email
> > > [hidden email] 
> > > <http://user/SendEmail.jtp?type=node&node=2268555&i=2><[hidden
> email] <http://user/SendEmail.jtp?type=node&node=2268555&i=3>>
> > > To unsubscribe from Wicket - User, click here<
> http://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=bWV1bGVtYW5zLmRhdmlkQGdtYWlsLmNvbXwxODQyOTQ3fC0xOTcyOTcxMjQ2<http://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=bWV1bGVtYW5zLmRhdmlkQGdtYWlsLmNvbXwxODQyOTQ3fC0xOTcyOTcxMjQ2&by-user=t>>.
>
> > >
> > >
> > >
> >
>
>
>
>
> ------
>  View message @
> http://apache-wicket.1842946.n4.nabble.com/wicketstuff-push-causing-WicketRuntimeException-component-not-found-on-Page-tp2266008p2268555.html
> To start a new topic under Wicket - User, email
> ml-node+1842947-1066186228-232...@n4.nabble.com
> To unsubscribe from Wicket - User, click 
> here<http://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=bWV1bGVtYW5zLmRhdmlkQGdtYWlsLmNvbXwxODQyOTQ3fC0xOTcyOTcxMjQ2>.
>
>
>

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicketstuff-push-causing-WicketRuntimeException-component-not-found-on-Page-tp2266008p2268581.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: wicketstuff-push causing WicketRuntimeException component not found on Page

2010-06-25 Thread Rodolfo Hansen
Yes, it may be something with the wicket session.
Can you send me a quickstart with the issue??

On Thu, 2010-06-24 at 23:22 -0700, david_ wrote:

> Yes indeed.
> Is it possible that wicket is updating for example 2 Component's of 2
> different users with the same Component identifiers?
> Maybe that's why Wicket is unable to process the action for a link one of
> the 2 Components.
> 
> 
> 2010/6/25 Rodolfo Hansen [via Apache Wicket] <
> ml-node+2267816-1187617804-232...@n4.nabble.com
> >
> 
> > You mean to say the error is sporadic?
> >
> > On Wed, 2010-06-23 at 20:16 +0200, David Meulemans wrote:
> >
> > > Hi
> > >
> > > I have a Listener object with a Map in it containing
> > > org.apache.wicket.Component objects that need to be updated every time
> > the
> > > onChange(); method is called. For example caused by another user's
> > actions.
> > > This works perfectly with wicketstuff-push.
> > >
> > > The org.apache.wicket.Component objects that need to be updated, have
> > > org.apache.wicket.ajax.markup.html.AjaxLink objects.
> > > Sometimes if I click on the one of the links, I get a
> > WicketRuntimeException
> > > telling me that the Link is not found on the Page.
> > >
> > > Any suggestions?
> >
> >
> >
> >
> > --
> >  View message @
> > http://apache-wicket.1842946.n4.nabble.com/wicketstuff-push-causing-WicketRuntimeException-component-not-found-on-Page-tp2266008p2267816.html
> > To start a new topic under Wicket - User, email
> > ml-node+1842947-1066186228-232...@n4.nabble.com
> > To unsubscribe from Wicket - User, click 
> > here<http://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=bWV1bGVtYW5zLmRhdmlkQGdtYWlsLmNvbXwxODQyOTQ3fC0xOTcyOTcxMjQ2>.
> >
> >
> >
> 




Re: wicketstuff-push causing WicketRuntimeException component not found on Page

2010-06-24 Thread david_

Yes indeed.
Is it possible that wicket is updating for example 2 Component's of 2
different users with the same Component identifiers?
Maybe that's why Wicket is unable to process the action for a link one of
the 2 Components.


2010/6/25 Rodolfo Hansen [via Apache Wicket] <
ml-node+2267816-1187617804-232...@n4.nabble.com
>

> You mean to say the error is sporadic?
>
> On Wed, 2010-06-23 at 20:16 +0200, David Meulemans wrote:
>
> > Hi
> >
> > I have a Listener object with a Map in it containing
> > org.apache.wicket.Component objects that need to be updated every time
> the
> > onChange(); method is called. For example caused by another user's
> actions.
> > This works perfectly with wicketstuff-push.
> >
> > The org.apache.wicket.Component objects that need to be updated, have
> > org.apache.wicket.ajax.markup.html.AjaxLink objects.
> > Sometimes if I click on the one of the links, I get a
> WicketRuntimeException
> > telling me that the Link is not found on the Page.
> >
> > Any suggestions?
>
>
>
>
> --
>  View message @
> http://apache-wicket.1842946.n4.nabble.com/wicketstuff-push-causing-WicketRuntimeException-component-not-found-on-Page-tp2266008p2267816.html
> To start a new topic under Wicket - User, email
> ml-node+1842947-1066186228-232...@n4.nabble.com
> To unsubscribe from Wicket - User, click 
> here<http://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=bWV1bGVtYW5zLmRhdmlkQGdtYWlsLmNvbXwxODQyOTQ3fC0xOTcyOTcxMjQ2>.
>
>
>

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicketstuff-push-causing-WicketRuntimeException-component-not-found-on-Page-tp2266008p2268007.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: wicketstuff-push causing WicketRuntimeException component not found on Page

2010-06-24 Thread Rodolfo Hansen
You mean to say the error is sporadic?

On Wed, 2010-06-23 at 20:16 +0200, David Meulemans wrote:

> Hi
> 
> I have a Listener object with a Map in it containing
> org.apache.wicket.Component objects that need to be updated every time the
> onChange(); method is called. For example caused by another user's actions.
> This works perfectly with wicketstuff-push.
> 
> The org.apache.wicket.Component objects that need to be updated, have
> org.apache.wicket.ajax.markup.html.AjaxLink objects.
> Sometimes if I click on the one of the links, I get a WicketRuntimeException
> telling me that the Link is not found on the Page.
> 
> Any suggestions?




wicketstuff-push causing WicketRuntimeException component not found on Page

2010-06-23 Thread David Meulemans
Hi

I have a Listener object with a Map in it containing
org.apache.wicket.Component objects that need to be updated every time the
onChange(); method is called. For example caused by another user's actions.
This works perfectly with wicketstuff-push.

The org.apache.wicket.Component objects that need to be updated, have
org.apache.wicket.ajax.markup.html.AjaxLink objects.
Sometimes if I click on the one of the links, I get a WicketRuntimeException
telling me that the Link is not found on the Page.

Any suggestions?


Re: WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Ernesto Reinaldo Barreiro
Why not path the information you need to a runnable? and create a class you
use as context to communicate WEB and thread layer... IMHO that will be a
cleaner solution.

Ernesto

2010/4/16 Martin Asenov 

> Should I pass the application's instance to the thread, which I can split
> in a separate class?
>
> Best,
> Martin
>
>
> -Original Message-
> From: ce...@jweekend.com [mailto:ce...@jweekend.com] On Behalf Of Cemal
> Bayramoglu
> Sent: Friday, April 16, 2010 4:09 PM
> To: users
> Subject: Re: WicketRuntimeException: There is no application attached to
> current thread
>
> Component's getString method will try to get the laocalizer from the
> Application, and the Application instance (singleton for a Wicket
> web-app) is bound to the thread processing your request, not to the
> one you have spawned off of it
>
> Regards - Cemal
> jWeekend
> OO & Java Technologies, Wicket
> Consulting, Development, Training
> http://jWeekend.com
> .
>
> 2010/4/16 Martin Asenov :
> > Hello guys!
> > In a page, I have a button. The button starts a thread, just like this,
> but I get the exception in the bottom. Here is some code:
> >  @Override
> >  protected void onSubmit(final AjaxRequestTarget target, Form
> form) {
> >final FileUpload fileUpload = fileUploadField.getFileUpload();
> >if (fileUpload != null) {
> >
> >  final PhonebookImporter importer = new
> PhonebookImporter(((AppSession) Session.get()).getManager());
> >
> >  logger.debug("User " + context.getEmail()
> >  + " uploaded an import file - " +
> fileUpload.getClientFileName());
> >
> >  byte[] bytes = fileUpload.getBytes();
> >
> >  String uploadFolder;
> >
> >  try {
> >uploadFolder = System.getenv("CATALINA_HOME")
> >+ props.get("uploadFolder");
> >  } catch (SMSOfficeException e1) {
> >logger.error("Could not resolve property!", e1);
> >uploadFolder =
> "/home/project/services/apache-tomcat-6.0.20/webapps/ROOT/temp/";
> >  }
> >
> >  User currentUser = ((AppSession) Session.get()).getContext()
> >  .getUser();
> >
> >  final File uploaded = new File(uploadFolder
> >  + String.valueOf(currentUser.getId()) + "/" +
> fileUpload.getClientFileName());
> >
> >  uploaded.getParentFile().mkdirs();
> >
> >  try {
> >FileOutputStream fos = new FileOutputStream(uploaded, false);
> >fos.write(bytes);
> >fos.close();
> >logger.info("File written on " + uploaded.getAbsolutePath());
> >  } catch (IOException e) {
> >logger.error("I/O Exception occurred!", e);
> >return;
> >  }
> >
> >  final ImportListener listener = new ImportListener() {
> >
> >public void info(String object, ImportMessage type) {
> >  textModel.append(getString(type.toString()) + object +
> "\n");
> >}
> >
> >  };
> >
> >  importer.setUser(((AppSession)
> Session.get()).getContext().getUser());
> >  importer.setDomain(((AppSession) Session.get()).getContext()
> >  .getDomain());
> >
> >  importer.addImportListener(listener);
> >
> >
> >  new Thread(new Runnable() {
> >
> >public void run() {
> >
> >  try {
> >
> >boolean flag = importer.importContacts(uploaded, null);
> >
> >if (flag) {
> >  BulkImport.this.info
> (BulkImport.this.getString("imported"));
> >  logger.debug("User " + context.getEmail()
> >  + " managed to import the contacts!");
> >} else {
> >
>  BulkImport.this.error(BulkImport.this.getString("enc_error"));
> >  logger.error("User " + context.getEmail()
> >  + " did NOT manage to import the contacts!");
> >}
> >  } catch (Exception e) {
> >logger.error("User " + context.getEmail()
> >+ " did NOT manage to import the contacts!", e);
> >
>  BulkImport.this.error(BulkImport.this.getSt

RE: WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Martin Asenov
Should I pass the application's instance to the thread, which I can split in a 
separate class?

Best,
Martin


-Original Message-
From: ce...@jweekend.com [mailto:ce...@jweekend.com] On Behalf Of Cemal 
Bayramoglu
Sent: Friday, April 16, 2010 4:09 PM
To: users
Subject: Re: WicketRuntimeException: There is no application attached to 
current thread

Component's getString method will try to get the laocalizer from the
Application, and the Application instance (singleton for a Wicket
web-app) is bound to the thread processing your request, not to the
one you have spawned off of it

Regards - Cemal
jWeekend
OO & Java Technologies, Wicket
Consulting, Development, Training
http://jWeekend.com
.

2010/4/16 Martin Asenov :
> Hello guys!
> In a page, I have a button. The button starts a thread, just like this, but I 
> get the exception in the bottom. Here is some code:
>     �...@override
>      protected void onSubmit(final AjaxRequestTarget target, Form form) {
>        final FileUpload fileUpload = fileUploadField.getFileUpload();
>        if (fileUpload != null) {
>
>          final PhonebookImporter importer = new 
> PhonebookImporter(((AppSession) Session.get()).getManager());
>
>          logger.debug("User " + context.getEmail()
>              + " uploaded an import file - " + 
> fileUpload.getClientFileName());
>
>          byte[] bytes = fileUpload.getBytes();
>
>          String uploadFolder;
>
>          try {
>            uploadFolder = System.getenv("CATALINA_HOME")
>                + props.get("uploadFolder");
>          } catch (SMSOfficeException e1) {
>            logger.error("Could not resolve property!", e1);
>            uploadFolder = 
> "/home/project/services/apache-tomcat-6.0.20/webapps/ROOT/temp/";
>          }
>
>          User currentUser = ((AppSession) Session.get()).getContext()
>              .getUser();
>
>          final File uploaded = new File(uploadFolder
>              + String.valueOf(currentUser.getId()) + "/" + 
> fileUpload.getClientFileName());
>
>          uploaded.getParentFile().mkdirs();
>
>          try {
>            FileOutputStream fos = new FileOutputStream(uploaded, false);
>            fos.write(bytes);
>            fos.close();
>            logger.info("File written on " + uploaded.getAbsolutePath());
>          } catch (IOException e) {
>            logger.error("I/O Exception occurred!", e);
>            return;
>          }
>
>          final ImportListener listener = new ImportListener() {
>
>            public void info(String object, ImportMessage type) {
>              textModel.append(getString(type.toString()) + object + "\n");
>            }
>
>          };
>
>          importer.setUser(((AppSession) 
> Session.get()).getContext().getUser());
>          importer.setDomain(((AppSession) Session.get()).getContext()
>              .getDomain());
>
>          importer.addImportListener(listener);
>
>
>          new Thread(new Runnable() {
>
>            public void run() {
>
>              try {
>
>                boolean flag = importer.importContacts(uploaded, null);
>
>                if (flag) {
>                  BulkImport.this.info(BulkImport.this.getString("imported"));
>                  logger.debug("User " + context.getEmail()
>                      + " managed to import the contacts!");
>                } else {
>                  
> BulkImport.this.error(BulkImport.this.getString("enc_error"));
>                  logger.error("User " + context.getEmail()
>                      + " did NOT manage to import the contacts!");
>                }
>              } catch (Exception e) {
>                logger.error("User " + context.getEmail()
>                    + " did NOT manage to import the contacts!", e);
>                
> BulkImport.this.error(BulkImport.this.getString("not_imported"));
>              }
>
>              importer.removeImportListener(listener);
>              target.addComponent(feed);
>
>            }
>
>          }).start();
>
>        } else {
>          BulkImport.this.error(getString("no_uploaded_file"));
>        }
>
>      }
> And the exception:
> 16-04-2010 14:44:20,175 ERROR 
> com.company.project.ui.bulk.BulkImport$2$2.run:183 - User mase...@velti.com 
> did NOT manage to import the contacts!
>   org.apache.wicket.WicketRuntimeException: There is no application attached 
> to current thread Thread-17
>            at org.apache.wicket.Application.get(Application.java:1

RE: WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Martin Asenov
I already saw one in javathoughts.com, but I don't see any major differences.

Best,
Martin


-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Friday, April 16, 2010 4:17 PM
To: users@wicket.apache.org
Subject: Re: WicketRuntimeException: There is no application attached to 
current thread

If you need an example on how to do this I can point you to a somewhat
similar example.

Ernesto

On Fri, Apr 16, 2010 at 3:15 PM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Do not use make references to components on the thread. Instead create an
> instance of runnable to which you pass all the information you need and use
> a kind of "context" to communicate with the Web layer if you need to pass
> back information.
>
> Best,
>
> Ernesto
>
>
> 2010/4/16 Martin Asenov 
>
>> Hello guys!
>>
>> In a page, I have a button. The button starts a thread, just like this,
>> but I get the exception in the bottom. Here is some code:
>>  @Override
>>  protected void onSubmit(final AjaxRequestTarget target, Form form)
>> {
>>final FileUpload fileUpload = fileUploadField.getFileUpload();
>>if (fileUpload != null) {
>>
>>  final PhonebookImporter importer = new
>> PhonebookImporter(((AppSession) Session.get()).getManager());
>>
>>  logger.debug("User " + context.getEmail()
>>  + " uploaded an import file - " +
>> fileUpload.getClientFileName());
>>
>>  byte[] bytes = fileUpload.getBytes();
>>
>>  String uploadFolder;
>>
>>  try {
>>uploadFolder = System.getenv("CATALINA_HOME")
>>+ props.get("uploadFolder");
>>  } catch (SMSOfficeException e1) {
>>logger.error("Could not resolve property!", e1);
>>uploadFolder =
>> "/home/project/services/apache-tomcat-6.0.20/webapps/ROOT/temp/";
>>  }
>>
>>  User currentUser = ((AppSession) Session.get()).getContext()
>>  .getUser();
>>
>>  final File uploaded = new File(uploadFolder
>>  + String.valueOf(currentUser.getId()) + "/" +
>> fileUpload.getClientFileName());
>>
>>  uploaded.getParentFile().mkdirs();
>>
>>  try {
>>FileOutputStream fos = new FileOutputStream(uploaded, false);
>>fos.write(bytes);
>>fos.close();
>>logger.info("File written on " + uploaded.getAbsolutePath());
>>  } catch (IOException e) {
>>logger.error("I/O Exception occurred!", e);
>>return;
>>  }
>>
>>  final ImportListener listener = new ImportListener() {
>>
>>public void info(String object, ImportMessage type) {
>>  textModel.append(getString(type.toString()) + object + "\n");
>>}
>>
>>  };
>>
>>  importer.setUser(((AppSession)
>> Session.get()).getContext().getUser());
>>  importer.setDomain(((AppSession) Session.get()).getContext()
>>  .getDomain());
>>
>>  importer.addImportListener(listener);
>>
>>
>>  new Thread(new Runnable() {
>>
>>public void run() {
>>
>>  try {
>>
>>boolean flag = importer.importContacts(uploaded, null);
>>
>>if (flag) {
>>  BulkImport.this.info
>> (BulkImport.this.getString("imported"));
>>  logger.debug("User " + context.getEmail()
>>  + " managed to import the contacts!");
>>} else {
>>
>>  BulkImport.this.error(BulkImport.this.getString("enc_error"));
>>  logger.error("User " + context.getEmail()
>>  + " did NOT manage to import the contacts!");
>>}
>>  } catch (Exception e) {
>>logger.error("User " + context.getEmail()
>>+ " did NOT manage to import the contacts!", e);
>>
>>  BulkImport.this.error(BulkImport.this.getString("not_imported"));
>>  }
>>
>>  importer.removeImportListener(listener);
>>  target.addComponent(feed);
>>
>>}
>>
>>

Re: WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Ernesto Reinaldo Barreiro
If you need an example on how to do this I can point you to a somewhat
similar example.

Ernesto

On Fri, Apr 16, 2010 at 3:15 PM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Do not use make references to components on the thread. Instead create an
> instance of runnable to which you pass all the information you need and use
> a kind of "context" to communicate with the Web layer if you need to pass
> back information.
>
> Best,
>
> Ernesto
>
>
> 2010/4/16 Martin Asenov 
>
>> Hello guys!
>>
>> In a page, I have a button. The button starts a thread, just like this,
>> but I get the exception in the bottom. Here is some code:
>>  @Override
>>  protected void onSubmit(final AjaxRequestTarget target, Form form)
>> {
>>final FileUpload fileUpload = fileUploadField.getFileUpload();
>>if (fileUpload != null) {
>>
>>  final PhonebookImporter importer = new
>> PhonebookImporter(((AppSession) Session.get()).getManager());
>>
>>  logger.debug("User " + context.getEmail()
>>  + " uploaded an import file - " +
>> fileUpload.getClientFileName());
>>
>>  byte[] bytes = fileUpload.getBytes();
>>
>>  String uploadFolder;
>>
>>  try {
>>uploadFolder = System.getenv("CATALINA_HOME")
>>+ props.get("uploadFolder");
>>  } catch (SMSOfficeException e1) {
>>logger.error("Could not resolve property!", e1);
>>uploadFolder =
>> "/home/project/services/apache-tomcat-6.0.20/webapps/ROOT/temp/";
>>  }
>>
>>  User currentUser = ((AppSession) Session.get()).getContext()
>>  .getUser();
>>
>>  final File uploaded = new File(uploadFolder
>>  + String.valueOf(currentUser.getId()) + "/" +
>> fileUpload.getClientFileName());
>>
>>  uploaded.getParentFile().mkdirs();
>>
>>  try {
>>FileOutputStream fos = new FileOutputStream(uploaded, false);
>>fos.write(bytes);
>>fos.close();
>>logger.info("File written on " + uploaded.getAbsolutePath());
>>  } catch (IOException e) {
>>logger.error("I/O Exception occurred!", e);
>>return;
>>  }
>>
>>  final ImportListener listener = new ImportListener() {
>>
>>public void info(String object, ImportMessage type) {
>>  textModel.append(getString(type.toString()) + object + "\n");
>>}
>>
>>  };
>>
>>  importer.setUser(((AppSession)
>> Session.get()).getContext().getUser());
>>  importer.setDomain(((AppSession) Session.get()).getContext()
>>  .getDomain());
>>
>>  importer.addImportListener(listener);
>>
>>
>>  new Thread(new Runnable() {
>>
>>public void run() {
>>
>>  try {
>>
>>boolean flag = importer.importContacts(uploaded, null);
>>
>>if (flag) {
>>  BulkImport.this.info
>> (BulkImport.this.getString("imported"));
>>  logger.debug("User " + context.getEmail()
>>  + " managed to import the contacts!");
>>} else {
>>
>>  BulkImport.this.error(BulkImport.this.getString("enc_error"));
>>  logger.error("User " + context.getEmail()
>>  + " did NOT manage to import the contacts!");
>>}
>>  } catch (Exception e) {
>>logger.error("User " + context.getEmail()
>>+ " did NOT manage to import the contacts!", e);
>>
>>  BulkImport.this.error(BulkImport.this.getString("not_imported"));
>>  }
>>
>>  importer.removeImportListener(listener);
>>  target.addComponent(feed);
>>
>>}
>>
>>  }).start();
>>
>>} else {
>>  BulkImport.this.error(getString("no_uploaded_file"));
>>}
>>
>>  }
>> And the exception:
>> 16-04-2010 14:44:20,175 ERROR
>> com.company.project.ui.bulk.BulkImport$2$2.run:183 - User
>> mase...@velti.com did NOT manage to import the contacts!
>>   org.apache.wicket.WicketRuntimeException: There is no application
>> attached to current thread Thread-17
>>at org.apache.wicket.Application.get(Application.java:179)
>>at
>> org.apache.wicket.Component.getApplication(Component.java:1323)
>>at
>> org.apache.wicket.Component.getLocalizer(Component.java:1436)
>>at org.apache.wicket.Component.getString(Component.java:1903)
>>at org.apache.wicket.Component.getString(Component.java:1890)
>>at com. company.project.ui.bulk.BulkImport$2$1.info
>> (BulkImport.java:153)
>>at com.
>> company.project.phonebook.bulk.PhonebookImporter.fireImportInfo(PhonebookImporter.java:76)
>>at com.
>> company.project.core.ManagerBean.saveContacts(ManagerBean.java:212)
>>at com.
>> company.project.core.ManagerBean$$FastClassByCGLIB$$a2c3fbf0.invoke(

Re: WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Ernesto Reinaldo Barreiro
Do not use make references to components on the thread. Instead create an
instance of runnable to which you pass all the information you need and use
a kind of "context" to communicate with the Web layer if you need to pass
back information.

Best,

Ernesto


2010/4/16 Martin Asenov 

> Hello guys!
> In a page, I have a button. The button starts a thread, just like this, but
> I get the exception in the bottom. Here is some code:
>  @Override
>  protected void onSubmit(final AjaxRequestTarget target, Form form)
> {
>final FileUpload fileUpload = fileUploadField.getFileUpload();
>if (fileUpload != null) {
>
>  final PhonebookImporter importer = new
> PhonebookImporter(((AppSession) Session.get()).getManager());
>
>  logger.debug("User " + context.getEmail()
>  + " uploaded an import file - " +
> fileUpload.getClientFileName());
>
>  byte[] bytes = fileUpload.getBytes();
>
>  String uploadFolder;
>
>  try {
>uploadFolder = System.getenv("CATALINA_HOME")
>+ props.get("uploadFolder");
>  } catch (SMSOfficeException e1) {
>logger.error("Could not resolve property!", e1);
>uploadFolder =
> "/home/project/services/apache-tomcat-6.0.20/webapps/ROOT/temp/";
>  }
>
>  User currentUser = ((AppSession) Session.get()).getContext()
>  .getUser();
>
>  final File uploaded = new File(uploadFolder
>  + String.valueOf(currentUser.getId()) + "/" +
> fileUpload.getClientFileName());
>
>  uploaded.getParentFile().mkdirs();
>
>  try {
>FileOutputStream fos = new FileOutputStream(uploaded, false);
>fos.write(bytes);
>fos.close();
>logger.info("File written on " + uploaded.getAbsolutePath());
>  } catch (IOException e) {
>logger.error("I/O Exception occurred!", e);
>return;
>  }
>
>  final ImportListener listener = new ImportListener() {
>
>public void info(String object, ImportMessage type) {
>  textModel.append(getString(type.toString()) + object + "\n");
>}
>
>  };
>
>  importer.setUser(((AppSession)
> Session.get()).getContext().getUser());
>  importer.setDomain(((AppSession) Session.get()).getContext()
>  .getDomain());
>
>  importer.addImportListener(listener);
>
>
>  new Thread(new Runnable() {
>
>public void run() {
>
>  try {
>
>boolean flag = importer.importContacts(uploaded, null);
>
>if (flag) {
>  BulkImport.this.info
> (BulkImport.this.getString("imported"));
>  logger.debug("User " + context.getEmail()
>  + " managed to import the contacts!");
>} else {
>
>  BulkImport.this.error(BulkImport.this.getString("enc_error"));
>  logger.error("User " + context.getEmail()
>  + " did NOT manage to import the contacts!");
>}
>  } catch (Exception e) {
>logger.error("User " + context.getEmail()
>+ " did NOT manage to import the contacts!", e);
>
>  BulkImport.this.error(BulkImport.this.getString("not_imported"));
>  }
>
>  importer.removeImportListener(listener);
>  target.addComponent(feed);
>
>}
>
>  }).start();
>
>} else {
>  BulkImport.this.error(getString("no_uploaded_file"));
>}
>
>  }
> And the exception:
> 16-04-2010 14:44:20,175 ERROR
> com.company.project.ui.bulk.BulkImport$2$2.run:183 - User
> mase...@velti.com did NOT manage to import the contacts!
>   org.apache.wicket.WicketRuntimeException: There is no application
> attached to current thread Thread-17
>at org.apache.wicket.Application.get(Application.java:179)
>at
> org.apache.wicket.Component.getApplication(Component.java:1323)
>at org.apache.wicket.Component.getLocalizer(Component.java:1436)
>at org.apache.wicket.Component.getString(Component.java:1903)
>at org.apache.wicket.Component.getString(Component.java:1890)
>at com. company.project.ui.bulk.BulkImport$2$1.info
> (BulkImport.java:153)
>at com.
> company.project.phonebook.bulk.PhonebookImporter.fireImportInfo(PhonebookImporter.java:76)
>at com.
> company.project.core.ManagerBean.saveContacts(ManagerBean.java:212)
>at com.
> company.project.core.ManagerBean$$FastClassByCGLIB$$a2c3fbf0.invoke()
>at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
>at
> org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:692)
>at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
> 

Re: WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Cemal Bayramoglu
Component's getString method will try to get the laocalizer from the
Application, and the Application instance (singleton for a Wicket
web-app) is bound to the thread processing your request, not to the
one you have spawned off of it

Regards - Cemal
jWeekend
OO & Java Technologies, Wicket
Consulting, Development, Training
http://jWeekend.com
.

2010/4/16 Martin Asenov :
> Hello guys!
> In a page, I have a button. The button starts a thread, just like this, but I 
> get the exception in the bottom. Here is some code:
>     �...@override
>      protected void onSubmit(final AjaxRequestTarget target, Form form) {
>        final FileUpload fileUpload = fileUploadField.getFileUpload();
>        if (fileUpload != null) {
>
>          final PhonebookImporter importer = new 
> PhonebookImporter(((AppSession) Session.get()).getManager());
>
>          logger.debug("User " + context.getEmail()
>              + " uploaded an import file - " + 
> fileUpload.getClientFileName());
>
>          byte[] bytes = fileUpload.getBytes();
>
>          String uploadFolder;
>
>          try {
>            uploadFolder = System.getenv("CATALINA_HOME")
>                + props.get("uploadFolder");
>          } catch (SMSOfficeException e1) {
>            logger.error("Could not resolve property!", e1);
>            uploadFolder = 
> "/home/project/services/apache-tomcat-6.0.20/webapps/ROOT/temp/";
>          }
>
>          User currentUser = ((AppSession) Session.get()).getContext()
>              .getUser();
>
>          final File uploaded = new File(uploadFolder
>              + String.valueOf(currentUser.getId()) + "/" + 
> fileUpload.getClientFileName());
>
>          uploaded.getParentFile().mkdirs();
>
>          try {
>            FileOutputStream fos = new FileOutputStream(uploaded, false);
>            fos.write(bytes);
>            fos.close();
>            logger.info("File written on " + uploaded.getAbsolutePath());
>          } catch (IOException e) {
>            logger.error("I/O Exception occurred!", e);
>            return;
>          }
>
>          final ImportListener listener = new ImportListener() {
>
>            public void info(String object, ImportMessage type) {
>              textModel.append(getString(type.toString()) + object + "\n");
>            }
>
>          };
>
>          importer.setUser(((AppSession) 
> Session.get()).getContext().getUser());
>          importer.setDomain(((AppSession) Session.get()).getContext()
>              .getDomain());
>
>          importer.addImportListener(listener);
>
>
>          new Thread(new Runnable() {
>
>            public void run() {
>
>              try {
>
>                boolean flag = importer.importContacts(uploaded, null);
>
>                if (flag) {
>                  BulkImport.this.info(BulkImport.this.getString("imported"));
>                  logger.debug("User " + context.getEmail()
>                      + " managed to import the contacts!");
>                } else {
>                  
> BulkImport.this.error(BulkImport.this.getString("enc_error"));
>                  logger.error("User " + context.getEmail()
>                      + " did NOT manage to import the contacts!");
>                }
>              } catch (Exception e) {
>                logger.error("User " + context.getEmail()
>                    + " did NOT manage to import the contacts!", e);
>                
> BulkImport.this.error(BulkImport.this.getString("not_imported"));
>              }
>
>              importer.removeImportListener(listener);
>              target.addComponent(feed);
>
>            }
>
>          }).start();
>
>        } else {
>          BulkImport.this.error(getString("no_uploaded_file"));
>        }
>
>      }
> And the exception:
> 16-04-2010 14:44:20,175 ERROR 
> com.company.project.ui.bulk.BulkImport$2$2.run:183 - User mase...@velti.com 
> did NOT manage to import the contacts!
>   org.apache.wicket.WicketRuntimeException: There is no application attached 
> to current thread Thread-17
>            at org.apache.wicket.Application.get(Application.java:179)
>            at org.apache.wicket.Component.getApplication(Component.java:1323)
>            at org.apache.wicket.Component.getLocalizer(Component.java:1436)
>            at org.apache.wicket.Component.getString(Component.java:1903)
>            at org.apache.wicket.Component.getString(Component.java:1890)
>            at com. 
> company.project.ui.bulk.BulkImport$2$1.info(BulkImport.java:153)
>            at com. 
> company.project.phonebook.bulk.PhonebookImporter.fireImportInfo(PhonebookImporter.java:76)
>            at com. 
> company.project.core.ManagerBean.saveContacts(ManagerBean.java:212)
>            at com. 
> company.project.core.ManagerBean$$FastClassByCGLIB$$a2c3fbf0.invoke()
>            at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
>            at 
> org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:69

WicketRuntimeException: There is no application attached to current thread

2010-04-16 Thread Martin Asenov
Hello guys!
In a page, I have a button. The button starts a thread, just like this, but I 
get the exception in the bottom. Here is some code:
  @Override
  protected void onSubmit(final AjaxRequestTarget target, Form form) {
final FileUpload fileUpload = fileUploadField.getFileUpload();
if (fileUpload != null) {

  final PhonebookImporter importer = new 
PhonebookImporter(((AppSession) Session.get()).getManager());

  logger.debug("User " + context.getEmail()
  + " uploaded an import file - " + fileUpload.getClientFileName());

  byte[] bytes = fileUpload.getBytes();

  String uploadFolder;

  try {
uploadFolder = System.getenv("CATALINA_HOME")
+ props.get("uploadFolder");
  } catch (SMSOfficeException e1) {
logger.error("Could not resolve property!", e1);
uploadFolder = 
"/home/project/services/apache-tomcat-6.0.20/webapps/ROOT/temp/";
  }

  User currentUser = ((AppSession) Session.get()).getContext()
  .getUser();

  final File uploaded = new File(uploadFolder
  + String.valueOf(currentUser.getId()) + "/" + 
fileUpload.getClientFileName());

  uploaded.getParentFile().mkdirs();

  try {
FileOutputStream fos = new FileOutputStream(uploaded, false);
fos.write(bytes);
fos.close();
logger.info("File written on " + uploaded.getAbsolutePath());
  } catch (IOException e) {
logger.error("I/O Exception occurred!", e);
return;
  }

  final ImportListener listener = new ImportListener() {

public void info(String object, ImportMessage type) {
  textModel.append(getString(type.toString()) + object + "\n");
}

  };

  importer.setUser(((AppSession) Session.get()).getContext().getUser());
  importer.setDomain(((AppSession) Session.get()).getContext()
  .getDomain());

  importer.addImportListener(listener);


  new Thread(new Runnable() {

public void run() {

  try {

boolean flag = importer.importContacts(uploaded, null);

if (flag) {
  BulkImport.this.info(BulkImport.this.getString("imported"));
  logger.debug("User " + context.getEmail()
  + " managed to import the contacts!");
} else {
  BulkImport.this.error(BulkImport.this.getString("enc_error"));
  logger.error("User " + context.getEmail()
  + " did NOT manage to import the contacts!");
}
  } catch (Exception e) {
logger.error("User " + context.getEmail()
+ " did NOT manage to import the contacts!", e);

BulkImport.this.error(BulkImport.this.getString("not_imported"));
  }

  importer.removeImportListener(listener);
  target.addComponent(feed);

}

  }).start();

} else {
  BulkImport.this.error(getString("no_uploaded_file"));
}

  }
And the exception:
16-04-2010 14:44:20,175 ERROR 
com.company.project.ui.bulk.BulkImport$2$2.run:183 - User mase...@velti.com did 
NOT manage to import the contacts!
   org.apache.wicket.WicketRuntimeException: There is no application attached 
to current thread Thread-17
at org.apache.wicket.Application.get(Application.java:179)
at org.apache.wicket.Component.getApplication(Component.java:1323)
at org.apache.wicket.Component.getLocalizer(Component.java:1436)
at org.apache.wicket.Component.getString(Component.java:1903)
at org.apache.wicket.Component.getString(Component.java:1890)
at com. 
company.project.ui.bulk.BulkImport$2$1.info(BulkImport.java:153)
at com. 
company.project.phonebook.bulk.PhonebookImporter.fireImportInfo(PhonebookImporter.java:76)
at com. 
company.project.core.ManagerBean.saveContacts(ManagerBean.java:212)
at com. 
company.project.core.ManagerBean$$FastClassByCGLIB$$a2c3fbf0.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
at 
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:692)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at 
org.springfra

WicketRuntimeException: Unable to initialize org.apache.wicket.extensions.Initializer

2009-06-09 Thread David Brown
Hello Wicket bunch, I have basically usurped all of the Datatable example from 
the wicket-examples.repeater folder. The result builds OK but as you see in the 
subject line a nasty RTE. I have Googled and mail-listed this issue but not 
much comes up. If anyone can shed some light please advise, David.

















Yet some, not wise, go to the other side of the globe, to barbarous and 
unhealthy regions, and devote ten or twenty years, in that they may live,-that 
is, keep comfortably warm,- and die in New England at last. Henry David Thoreau 
- Walden - 1845

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



Re: [jira] Resolved: (WICKET-1712) Inheritance inside a Container throws WicketRuntimeException

2009-02-03 Thread smallufo
2009/2/4 Igor Vaynberg 

> PulldownBorder border = new PulldownBorder("border" , "Test Title" ,
> true);
>   border.setTransparentResolver(true);
>   add(border);
>
> ^ that is all wrong
>
> you should create a border and to it add a panel that will be
> expanded/collapsed. so the panel that is the content should be inside
> the border.


Hi
But MyPanel's  HTML is like this :


  
   //  blah
  



According to the hierarchy , I have to new a PulldownBorder and add it to
MyPanel , isn't it ?

As to the onClick() , I change to Timo Rantalaiho's suggestion :

ExpandCollapseListener listener = (ExpandCollapseListener)
findParent(ExpandCollapseListener.class);
if (listener != null)
  listener.setExpanded(expanded);

And it worked !!!


Re: [jira] Resolved: (WICKET-1712) Inheritance inside a Container throws WicketRuntimeException

2009-02-03 Thread Igor Vaynberg
PulldownBorder border = new PulldownBorder("border" , "Test Title" ,
true);
   border.setTransparentResolver(true);
   add(border);

^ that is all wrong

you should create a border and to it add a panel that will be
expanded/collapsed. so the panel that is the content should be inside
the border.

-igor

On Tue, Feb 3, 2009 at 11:56 AM, smallufo  wrote:
> Thank you for such a practical IVisitor tutorial.
>
> But I have another problem :
> When traversalling the nodes , it cannot find any Component that implements
> ExpandCollapseListener.
> But the Panel that wrapped by the Border indeed implements
> ExpandCollapseListener
>
> Can you check where goes wrong ?
>
> Here is the code :
>
>
> public class PulldownBorder extends Border
> {
>  private final WebMarkupContainer content;
>
>  private boolean expanded;
>
>  public PulldownBorder(String id , String title , boolean defaultShown)
>  {
>super(id);
>
>Label titleLabel = new Label("title" , title );
>expanded = defaultShown;
>
>content = new WebMarkupContainer("content");
>
>content.setOutputMarkupPlaceholderTag(true);
>content.setVisible(defaultShown);
>add(content);
>content.add(getBodyContainer());
>
>final Label collapseExpandText = new Label("collapseExpandText");
>collapseExpandText.setOutputMarkupPlaceholderTag(true);
>if (content.isVisible())
>  collapseExpandText.setModel(new StringResourceModel("collapse" , this
> , null));
>else
>  collapseExpandText.setModel(new StringResourceModel("expand" , this ,
> null));
>
>
>Link collapseExpandLink = new AjaxFallbackLink("collapseExpandLink")
>{
>  @Override
>  public void onClick(AjaxRequestTarget target)
>  {
>expanded=!expanded;
>target.addComponent(content.setVisible(expanded));
>
>PulldownBorder.this.visitChildren(new IVisitor()
>{
>  @Override
>  public Object component(Component c)
>  {
>if (c instanceof ExpandCollapseListener)
>{
>  System.out.println(c + " is ExpandCollapseListener ");
>  ((ExpandCollapseListener)c).setExpanded(expanded);
>  return CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
>}
>else
>{
>  System.out.println(c + " is NOT ExpandCollapseListener ");
>  return CONTINUE_TRAVERSAL;
>}
>  }
>});
>
>if (!expanded)
>  target.addComponent(collapseExpandText.setModel(new
> StringResourceModel("expand" , this , null)));
>else
>  target.addComponent(collapseExpandText.setModel(new
> StringResourceModel("collapse" , this , null)));
>  }
>};
>add(collapseExpandLink);
>collapseExpandLink.add(collapseExpandText);
>collapseExpandLink.add(titleLabel);
>  }
> }
>
> Here is the Panel that wrapped by PulldownBorder :
>
> public class MyPanel extends Panel implements ExpandCollapseListener
> {
>  public MyPanel(String id)
>  {
>super(id);
>
>PulldownBorder border = new PulldownBorder("border" , "Test Title" ,
> true);
>border.setTransparentResolver(true);
>add(border);
>
>// blah
>  }
>
>  @Override
>  public void setExpanded(boolean value)
>  {
>// blah...
>  }
> }
>
> Here is the output (click collapse, and folding the content) :
>
> [MarkupContainer [Component id = content]] is NOT ExpandCollapseListener
> [MarkupContainer [Component id = _body]] is NOT ExpandCollapseListener
> [MarkupContainer [Component id = collapseExpandLink]] is NOT
> ExpandCollapseListener
> [Component id = collapseExpandText] is NOT ExpandCollapseListener
> [Component id = title] is NOT ExpandCollapseListener
>
> Why it cannot find any component implementing ExpandCollapseListener ? Where
> goes wrong ?
>
> Thanks a lot
>
> --
> smallufo
>
> 2009/2/4 Igor Vaynberg 
>
>> add(new link("collapseOrExpand") {
>>  onclick() {
>>   expanded=!expanded;
>>   updateState(expanded);
>>   Border.this.visitChildren(new IVisitor() {
>>public int onComponent(Component c) {
>> if (c instanceof ExpandCollapseListener) {
>>   ((ExpandCollapseListener)c).onEvent(expanded);
>>   return CONTINUE_BUT_DO_NOT_GO_ANY_DEEPER;
>> } else {
>>return CONTINUE;
>> }
>>  }
>>});
>>  }
>>
>> -igor
>

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



Re: [jira] Resolved: (WICKET-1712) Inheritance inside a Container throws WicketRuntimeException

2009-02-03 Thread Timo Rantalaiho
On Wed, 04 Feb 2009, smallufo wrote:
> When traversalling the nodes , it cannot find any Component that implements
> ExpandCollapseListener.
> But the Panel that wrapped by the Border indeed implements
> ExpandCollapseListener

> PulldownBorder.this.visitChildren(new IVisitor()
...

> Here is the Panel that wrapped by PulldownBorder :
> 
> public class MyPanel extends Panel implements ExpandCollapseListener
...

You're visiting the children of the border, which traverses
only all its children recursively. As you add the border to
the panel, the border is a child of the panel, but not the
other way around.

As the name "visitChildren" implies, the visitor never goes
up to its parents. 

Maybe you want 

   ExpandCollapseListener listener = ((ExpandCollapseListener) 
findParent(ExpandCollapseListener.class));

or 

  getPage().visitChildren(ExpandCollapseListener.class, new IVisitor() { ... });

(For visitChildern(), you can supply a type of the
Components you want to visit directly)

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

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



Re: [jira] Resolved: (WICKET-1712) Inheritance inside a Container throws WicketRuntimeException

2009-02-03 Thread smallufo
Thank you for such a practical IVisitor tutorial.

But I have another problem :
When traversalling the nodes , it cannot find any Component that implements
ExpandCollapseListener.
But the Panel that wrapped by the Border indeed implements
ExpandCollapseListener

Can you check where goes wrong ?

Here is the code :


public class PulldownBorder extends Border
{
  private final WebMarkupContainer content;

  private boolean expanded;

  public PulldownBorder(String id , String title , boolean defaultShown)
  {
super(id);

Label titleLabel = new Label("title" , title );
expanded = defaultShown;

content = new WebMarkupContainer("content");

content.setOutputMarkupPlaceholderTag(true);
content.setVisible(defaultShown);
add(content);
content.add(getBodyContainer());

final Label collapseExpandText = new Label("collapseExpandText");
collapseExpandText.setOutputMarkupPlaceholderTag(true);
if (content.isVisible())
  collapseExpandText.setModel(new StringResourceModel("collapse" , this
, null));
else
  collapseExpandText.setModel(new StringResourceModel("expand" , this ,
null));


Link collapseExpandLink = new AjaxFallbackLink("collapseExpandLink")
{
  @Override
  public void onClick(AjaxRequestTarget target)
  {
expanded=!expanded;
target.addComponent(content.setVisible(expanded));

PulldownBorder.this.visitChildren(new IVisitor()
{
  @Override
  public Object component(Component c)
  {
if (c instanceof ExpandCollapseListener)
{
  System.out.println(c + " is ExpandCollapseListener ");
  ((ExpandCollapseListener)c).setExpanded(expanded);
  return CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
}
else
{
  System.out.println(c + " is NOT ExpandCollapseListener ");
  return CONTINUE_TRAVERSAL;
}
  }
});

if (!expanded)
  target.addComponent(collapseExpandText.setModel(new
StringResourceModel("expand" , this , null)));
else
  target.addComponent(collapseExpandText.setModel(new
StringResourceModel("collapse" , this , null)));
  }
};
add(collapseExpandLink);
collapseExpandLink.add(collapseExpandText);
collapseExpandLink.add(titleLabel);
  }
}

Here is the Panel that wrapped by PulldownBorder :

public class MyPanel extends Panel implements ExpandCollapseListener
{
  public MyPanel(String id)
  {
super(id);

PulldownBorder border = new PulldownBorder("border" , "Test Title" ,
true);
border.setTransparentResolver(true);
add(border);

// blah
  }

  @Override
  public void setExpanded(boolean value)
  {
// blah...
  }
}

Here is the output (click collapse, and folding the content) :

[MarkupContainer [Component id = content]] is NOT ExpandCollapseListener
[MarkupContainer [Component id = _body]] is NOT ExpandCollapseListener
[MarkupContainer [Component id = collapseExpandLink]] is NOT
ExpandCollapseListener
[Component id = collapseExpandText] is NOT ExpandCollapseListener
[Component id = title] is NOT ExpandCollapseListener

Why it cannot find any component implementing ExpandCollapseListener ? Where
goes wrong ?

Thanks a lot

--
smallufo

2009/2/4 Igor Vaynberg 

> add(new link("collapseOrExpand") {
>  onclick() {
>   expanded=!expanded;
>   updateState(expanded);
>   Border.this.visitChildren(new IVisitor() {
>public int onComponent(Component c) {
> if (c instanceof ExpandCollapseListener) {
>   ((ExpandCollapseListener)c).onEvent(expanded);
>   return CONTINUE_BUT_DO_NOT_GO_ANY_DEEPER;
> } else {
>return CONTINUE;
> }
>  }
>});
>  }
>
> -igor


Re: [jira] Resolved: (WICKET-1712) Inheritance inside a Container throws WicketRuntimeException

2009-02-03 Thread Igor Vaynberg
add(new link("collapseOrExpand") {
 onclick() {
   expanded=!expanded;
   updateState(expanded);
   Border.this.visitChildren(new IVisitor() {
public int onComponent(Component c) {
 if (c instanceof ExpandCollapseListener) {
   ((ExpandCollapseListener)c).onEvent(expanded);
   return CONTINUE_BUT_DO_NOT_GO_ANY_DEEPER;
 } else {
return CONTINUE;
 }
  }
});
 }

-igor

On Tue, Feb 3, 2009 at 9:01 AM, smallufo  wrote:
>
> But if I implement this "Window-like" panel by extending Border
> I have no way to notify the collapse/expand events to the containing content
> .
>
> In my previous implementation , the AbstractPullDownPanel defines two
> methods invisible()/visible() for successor to override , if they want to
> handle the collapse / expand events.
>
> But if I implement it in Border , and place the "expand / collapse" link to
> the top of the Border .
> Because the border is added to the panel , I find no way to notify the
> "expand/collapse" events to its containing panel.
>
> I don't know how to gracefully solve this problem just like the
> AbstractPullDownPanel ... (define two methods for successor to override)
>
> Does anybody know how to accomplish it ?
>
> Thank you.
>
> 2009/2/1 Igor Vaynberg (JIRA) 
>>
>> [
>> https://issues.apache.org/jira/browse/WICKET-1712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
>> ]
>>
>> Igor Vaynberg resolved WICKET-1712.
>> ---
>>
>>Resolution: Won't Fix
>>  Assignee: Igor Vaynberg
>>
>> this usecase is not supported - you are abusing istransparentresolver - it
>> is not meant to toggle visibility of "nested" components because it does not
>> really nest them.
>>
>> i would suggest using a border instead because it is meant for usecases
>> just like this
>>
>> > Inheritance inside a Container throws WicketRuntimeException
>> > 
>> >
>> > Key: WICKET-1712
>> > URL: https://issues.apache.org/jira/browse/WICKET-1712
>> > Project: Wicket
>> >  Issue Type: Bug
>> >  Components: wicket
>> >Affects Versions: 1.3.3, 1.3.4
>> > Environment: Linux , resin-3.0.24 , Wicket 1.3.3
>> >Reporter: smallufo
>> >Assignee: Igor Vaynberg
>> > Attachments: AbstractPullDownPanel.html,
>> > AbstractPullDownPanel.java, RadioGroupPanel.html, RadioGroupPanel.java,
>> > TestPage.html, TestPage.java, TestSession.java
>> >
>> >
>> > This is related to WICKET-1095 , associating discussions can be found
>> > here :
>> > http://www.nabble.com/Inheritance-inside-a-Container-ts16514647.html
>> > To summarize :
>> > I want to make a "Widget"  , AbstractPullDownPanel , that I can
>> > "collapse / expand" it.
>> > Any panel extends AbstractPullDownPanel  will have a title bar , with
>> > ajax-enabled collapse / expand link in the upper right of the panel.
>> > When the panel is collapsed , it will leave a title bar there.
>> > The state of the panel (open / closed) is stored in WebSession
>> > Now , I have a RadioGroupPanel extends AbstractPullDownPanel .
>> > If it only contains an empty RadioGroup :
>> > RadioGroup selectDeselectGroup = new RadioGroup("selectDeselectGroup");
>> > Everything works fine , no matter the panel is collapsed or expanded ,
>> > page reloading is ok
>> > But if I add Radio(s) inside the RadioGroup , only when the panel is
>> > expanded , page-reloading is ok.
>> > If the panel is collapsed , page reloading will throw
>> > WicketRuntimeException :
>> > WicketMessage: The component(s) below failed to render. A common problem
>> > is that you have added a component in code but forgot to reference it in 
>> > the
>> > markup (thus the component will never be rendered).
>> > 1. [MarkupContainer [Component id = selectDeselectGroup, page =
>> > destiny.wicket.test.TestPage, path =
>> > 1:radioGroupPanel:selectDeselectGroup.RadioGroup, isVisible = true,
>> > isVersioned = false]]
>> > 2. [MarkupContainer [Component id = selectAll, page =
>> > destiny.wicket.test.TestPage, path =
>> > 1:radioGroupPanel:selectDeselectGroup:selectAll.Radio, isVisible = true,
>> > isVersioned = false

Re: [jira] Resolved: (WICKET-1712) Inheritance inside a Container throws WicketRuntimeException

2009-02-03 Thread smallufo
But if I implement this "Window-like" panel by extending Border
I have no way to notify the collapse/expand events to the containing content
.

In my previous implementation , the AbstractPullDownPanel defines two
methods invisible()/visible() for successor to override , if they want to
handle the collapse / expand events.

But if I implement it in Border , and place the "expand / collapse" link to
the top of the Border .
Because the border is added to the panel , I find no way to notify the
"expand/collapse" events to its containing panel.

I don't know how to gracefully solve this problem just like the
AbstractPullDownPanel ... (define two methods for successor to override)

Does anybody know how to accomplish it ?

Thank you.

2009/2/1 Igor Vaynberg (JIRA) 

>
> [
> https://issues.apache.org/jira/browse/WICKET-1712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>
> Igor Vaynberg resolved WICKET-1712.
> ---
>
>Resolution: Won't Fix
>  Assignee: Igor Vaynberg
>
> this usecase is not supported - you are abusing istransparentresolver - it
> is not meant to toggle visibility of "nested" components because it does not
> really nest them.
>
> i would suggest using a border instead because it is meant for usecases
> just like this
>
> > Inheritance inside a Container throws WicketRuntimeException
> > 
> >
> > Key: WICKET-1712
> > URL: https://issues.apache.org/jira/browse/WICKET-1712
> > Project: Wicket
> >  Issue Type: Bug
> >  Components: wicket
> >Affects Versions: 1.3.3, 1.3.4
> > Environment: Linux , resin-3.0.24 , Wicket 1.3.3
> >Reporter: smallufo
> >Assignee: Igor Vaynberg
> > Attachments: AbstractPullDownPanel.html,
> AbstractPullDownPanel.java, RadioGroupPanel.html, RadioGroupPanel.java,
> TestPage.html, TestPage.java, TestSession.java
> >
> >
> > This is related to WICKET-1095 , associating discussions can be found
> here :
> > http://www.nabble.com/Inheritance-inside-a-Container-ts16514647.html
> > To summarize :
> > I want to make a "Widget"  , AbstractPullDownPanel , that I can "collapse
> / expand" it.
> > Any panel extends AbstractPullDownPanel  will have a title bar , with
> ajax-enabled collapse / expand link in the upper right of the panel.
> > When the panel is collapsed , it will leave a title bar there.
> > The state of the panel (open / closed) is stored in WebSession
> > Now , I have a RadioGroupPanel extends AbstractPullDownPanel .
> > If it only contains an empty RadioGroup :
> > RadioGroup selectDeselectGroup = new RadioGroup("selectDeselectGroup");
> > Everything works fine , no matter the panel is collapsed or expanded ,
> page reloading is ok
> > But if I add Radio(s) inside the RadioGroup , only when the panel is
> expanded , page-reloading is ok.
> > If the panel is collapsed , page reloading will throw
> WicketRuntimeException :
> > WicketMessage: The component(s) below failed to render. A common problem
> is that you have added a component in code but forgot to reference it in the
> markup (thus the component will never be rendered).
> > 1. [MarkupContainer [Component id = selectDeselectGroup, page =
> destiny.wicket.test.TestPage, path =
> 1:radioGroupPanel:selectDeselectGroup.RadioGroup, isVisible = true,
> isVersioned = false]]
> > 2. [MarkupContainer [Component id = selectAll, page =
> destiny.wicket.test.TestPage, path =
> 1:radioGroupPanel:selectDeselectGroup:selectAll.Radio, isVisible = true,
> isVersioned = false]]
> > 3. [MarkupContainer [Component id = deselectAll, page =
> destiny.wicket.test.TestPage, path =
> 1:radioGroupPanel:selectDeselectGroup:deselectAll.Radio, isVisible = true,
> isVersioned = false]]
> > Root cause:
> > org.apache.wicket.WicketRuntimeException: The component(s) below failed
> to render. A common problem is that you have added a component in code but
> forgot to reference it in the markup (thus the component will never be
> rendered).
> > 1. [MarkupContainer [Component id = selectDeselectGroup, page =
> destiny.wicket.test.TestPage, path =
> 1:radioGroupPanel:selectDeselectGroup.RadioGroup, isVisible = true,
> isVersioned = false]]
> > 2. [MarkupContainer [Component id = selectAll, page =
> destiny.wicket.test.TestPage, path =
> 1:radioGroupPanel:selectDeselectGroup:selectAll.Radio, isVisible = true,
> isVersioned = false]]
> > 3. [MarkupCo

Re: WicketRuntimeException

2009-01-19 Thread francisco treacy
you may want to focus on the actual errors.

- you're having some trouble in your classpath / wicket jar versions:

Caused by: java.lang.NoSuchMethodError:
org.apache.wicket.markup.html.form.Form.add(Lorg/apache/wicket/
Component;)Lorg/apache/wicket/MarkupContainer;
  at com.jasp.ecommfwk.categoria.PageCategoria.
(PageCategoria.java:36)

- and check your security settings:

does not permit action RENDER
org.apache.wicket.authorization.UnauthorizedActionException: Component
[Page class = org.apache.wicket.markup.html.pages.ExceptionErrorPage,
id = 1, version = 0] does not permit action RENDER


francisco




On Mon, Jan 19, 2009 at 2:55 PM, Daniel Ferreira Castro
 wrote:
> Morning all guys,
>
> I am looking for this error on Google, but till now without success, for the
> reason of why this error occurs..
> Can anyone help me?
>
> Thanks in advance.
>
> ==
> Stacktrace
> ==
>
> 11:23:45,500 ERROR RequestCycle:1450 - Can't instantiate page using
> constructor public com.jasp.ecommfwk.categoria.PageCategoria()
> org.apache.wicket.WicketRuntimeException: Can't instantiate page using
> constructor public com.jasp.ecommfwk.categoria.PageCategoria()
>   at org.apache.wicket.session.DefaultPageFactory.newPage
> (DefaultPageFactory.java:172)
>   at org.apache.wicket.session.DefaultPageFactory.newPage
> (DefaultPageFactory.java:58)
>   at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage
> (BookmarkablePageRequestTarget.java:286)
>   at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage
> (BookmarkablePageRequestTarget.java:308)
>   at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents
> (BookmarkablePageRequestTarget.java:223)
>   at
> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents
> (AbstractRequestCycleProcessor.java:91)
>   at org.apache.wicket.RequestCycle.processEventsAndRespond
> (RequestCycle.java:1188)
>   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1265)
>   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1366)
>   at org.apache.wicket.RequestCycle.request(RequestCycle.java:498)
>   at org.apache.wicket.protocol.http.WicketFilter.doGet
> (WicketFilter.java:444)
>   at org.apache.wicket.protocol.http.WicketFilter.doFilter
> (WicketFilter.java:282)
>   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:235)
>   at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:206)
>   at org.apache.catalina.core.StandardWrapperValve.invoke
> (StandardWrapperValve.java:233)
>   at org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValve.java:175)
>   at org.apache.catalina.core.StandardHostValve.invoke
> (StandardHostValve.java:128)
>   at org.apache.catalina.valves.ErrorReportValve.invoke
> (ErrorReportValve.java:102)
>   at org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.java:109)
>   at org.apache.catalina.connector.CoyoteAdapter.service
> (CoyoteAdapter.java:263)
>   at org.apache.coyote.http11.Http11Processor.process
> (Http11Processor.java:844)
>   at org.apache.coyote.http11.Http11Protocol
> $Http11ConnectionHandler.process(Http11Protocol.java:584)
>   at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
> 447)
>   at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.reflect.InvocationTargetException
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance
> (NativeConstructorAccessorImpl.java:39)
>   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
> (DelegatingConstructorAccessorImpl.java:27)
>   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>   at org.apache.wicket.session.DefaultPageFactory.newPage
> (DefaultPageFactory.java:153)
>   ... 23 more
> Caused by: java.lang.NoSuchMethodError:
> org.apache.wicket.markup.html.form.Form.add(Lorg/apache/wicket/
> Component;)Lorg/apache/wicket/MarkupContainer;
>   at com.jasp.ecommfwk.categoria.PageCategoria.
> (PageCategoria.java:36)
>   ... 28 more
> 11:23:45,515 ERROR RequestCycle:1321 - unexpected exception when
> handling another exception: Component [Page class =
> org.apache.wicket.markup.html.pages.ExceptionErrorPage, id = 1,
> version = 0] does not permit action RENDER
> org.apache.wicket.authorization.UnauthorizedActionException: Component
> [Page class = org.apache.wicket.markup.html.pages.ExceptionErrorPage,
> id = 1, version = 0] does not permit action RENDER
>   at org.apache.wicket.Page.renderPage(Page.java:868)
>   at

WicketRuntimeException

2009-01-19 Thread Daniel Ferreira Castro
Morning all guys,

I am looking for this error on Google, but till now without success, for the
reason of why this error occurs..
Can anyone help me?

Thanks in advance.

==
Stacktrace
==

11:23:45,500 ERROR RequestCycle:1450 - Can't instantiate page using
constructor public com.jasp.ecommfwk.categoria.PageCategoria()
org.apache.wicket.WicketRuntimeException: Can't instantiate page using
constructor public com.jasp.ecommfwk.categoria.PageCategoria()
   at org.apache.wicket.session.DefaultPageFactory.newPage
(DefaultPageFactory.java:172)
   at org.apache.wicket.session.DefaultPageFactory.newPage
(DefaultPageFactory.java:58)
   at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage
(BookmarkablePageRequestTarget.java:286)
   at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage
(BookmarkablePageRequestTarget.java:308)
   at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents
(BookmarkablePageRequestTarget.java:223)
   at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents
(AbstractRequestCycleProcessor.java:91)
   at org.apache.wicket.RequestCycle.processEventsAndRespond
(RequestCycle.java:1188)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1265)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1366)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:498)
   at org.apache.wicket.protocol.http.WicketFilter.doGet
(WicketFilter.java:444)
   at org.apache.wicket.protocol.http.WicketFilter.doFilter
(WicketFilter.java:282)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:175)
   at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:263)
   at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:844)
   at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:584)
   at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
447)
   at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance
(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at org.apache.wicket.session.DefaultPageFactory.newPage
(DefaultPageFactory.java:153)
   ... 23 more
Caused by: java.lang.NoSuchMethodError:
org.apache.wicket.markup.html.form.Form.add(Lorg/apache/wicket/
Component;)Lorg/apache/wicket/MarkupContainer;
   at com.jasp.ecommfwk.categoria.PageCategoria.
(PageCategoria.java:36)
   ... 28 more
11:23:45,515 ERROR RequestCycle:1321 - unexpected exception when
handling another exception: Component [Page class =
org.apache.wicket.markup.html.pages.ExceptionErrorPage, id = 1,
version = 0] does not permit action RENDER
org.apache.wicket.authorization.UnauthorizedActionException: Component
[Page class = org.apache.wicket.markup.html.pages.ExceptionErrorPage,
id = 1, version = 0] does not permit action RENDER
   at org.apache.wicket.Page.renderPage(Page.java:868)
   at
org.apache.wicket.request.target.component.PageRequestTarget.respond
(PageRequestTarget.java:63)
   at org.apache.wicket.request.AbstractRequestCycleProcessor.respond
(AbstractRequestCycleProcessor.java:104)
   at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1203)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1270)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1366)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:498)
   at org.apache.wicket.protocol.http.WicketFilter.doGet
(WicketFilter.java:444)
   at org.apache.wicket.protocol.http.WicketFilter.doFilter
(WicketFilter.java:282)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.Application

AW: SessionHandling: WicketRuntimeException: There is no application attached to current thread http-8080-1

2008-11-12 Thread Agent Mahone
Hello Igor,
I just right now came back to my point.
Followed your hint and thinking once about it. You´re right, it works with 
vanilla spring :-)
Thank you very much for your great help!!!






Von: Igor Vaynberg <[EMAIL PROTECTED]>
An: users@wicket.apache.org
Gesendet: Dienstag, den 11. November 2008, 23:45:33 Uhr
Betreff: Re: SessionHandling: WicketRuntimeException: There is no application 
attached to current thread http-8080-1

you can retrieve the application context via the servlet context and
use vanilla spring to do whatever it is you are trying to do. you only
need the proxies when dealing from inside wicket - which you do not
appear to be doing.

-igor

On Tue, Nov 11, 2008 at 1:06 PM, Agent Mahone <[EMAIL PROTECTED]> wrote:
> Hello guys
>
> The only thing what I was trying to do was, to execute some code
> if a time out occurs. (mark that user is not anymore available or online).
> How then can I achieve this behaviour?
>
> Am I forced to use the classic instantiation through the new operator?
> Or is there any other solution?
>
>
>
> 
> Von: Igor Vaynberg <[EMAIL PROTECTED]>
> An: users@wicket.apache.org
> Gesendet: Dienstag, den 11. November 2008, 18:48:24 Uhr
> Betreff: Re: SessionHandling: WicketRuntimeException: There is no application 
> attached to current thread http-8080-1
>
> wouldnt say its a bug, looks like a method invocation is done on a
> wicket-spring proxy outside a wicket request and it cannot find the
> application when it tries to resolve the application context. those
> proxies are not mean to be used outside wicket requests.
>
> -igor
>
> On Tue, Nov 11, 2008 at 7:11 AM, Martijn Dashorst
> <[EMAIL PROTECTED]> wrote:
>> I guess 
>> org.apache.wicket.spring.SpringWebApplication$1.getSpringContext(SpringWebApplication.java:51)
>> has a bug because it assumes it is always called inside the scope of a
>> wicket request.
>>
>> Martijn
>>
>> On Tue, Nov 11, 2008 at 12:59 PM, Agent Mahone <[EMAIL PROTECTED]> wrote:
>>> Hi guys
>>>
>>> I´m just trying to execute some code after a session timeout occurs.
>>> I´m using spring / wicket / hibernate frameworks.
>>> Why do I get this error "WicketRuntimeException: There is no application 
>>> attached to current thread http-8080-1"?
>>> I´m not getting it...I appreciate any hints. Thanks in advance !!!
>>>
>>> Here is my application class:
>>>
>>> public class MyApplication extends SpringWebApplication implements 
>>> HttpSessionListener {
>>>
>>> protected void init() {
>>> //some code
>>> }
>>>
>>> public Session newSession(Request request, Response response) {
>>>return new MySession(request);
>>> }
>>>
>>> public Class getHomePage() {
>>>return IndexPage.class;
>>>  }
>>>
>>> public Object getBean(Class clazz, String beanName) {
>>>return createSpringBeanProxy(clazz, beanName);
>>> }
>>>
>>>  @Override
>>> public void sessionCreated(HttpSessionEvent arg0) {
>>>//nothing sepcial
>>> }
>>>
>>> @Override
>>> public void sessionDestroyed(HttpSessionEvent arg0) {
>>>  String sessionId = arg0.getSession().getId();
>>>
>>>  IRegistrationLoginUseCase bean = 
>>> (ILoginService)getBean(ILoginService.class, "loginService");
>>>
>>>  bean.logout(sessionId);
>>> }
>>>
>>> Here is my error stack trace:
>>>
>>> org.apache.wicket.WicketRuntimeException: There is no application attached 
>>> to current thread http-8080-1
>>>at org.apache.wicket.Application.get(Application.java:166)
>>>at 
>>> org.apache.wicket.spring.SpringWebApplication$1.getSpringContext(SpringWebApplication.java:51)
>>>at 
>>> org.apache.wicket.spring.SpringBeanLocator.getSpringContext(SpringBeanLocator.java:176)
>>>at 
>>> org.apache.wicket.spring.SpringBeanLocator.locateProxyTarget(SpringBeanLocator.java:162)
>>>at 
>>> org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:412)
>>>at org.apache.wicket.proxy.$Proxy3.logout(Unknown Source)
>>>at 
>>> com.studentcv.web.MyApplication.sessionDestroyed(StudentCVApplication.java:82)
>>>at 
>>> org.apache.catalina.session.StandardSession.expire(StandardSession.java:702)
>>>at 
>>> org.apache.catalina.sessio

Re: SessionHandling: WicketRuntimeException: There is no application attached to current thread http-8080-1

2008-11-11 Thread Igor Vaynberg
you can retrieve the application context via the servlet context and
use vanilla spring to do whatever it is you are trying to do. you only
need the proxies when dealing from inside wicket - which you do not
appear to be doing.

-igor

On Tue, Nov 11, 2008 at 1:06 PM, Agent Mahone <[EMAIL PROTECTED]> wrote:
> Hello guys
>
> The only thing what I was trying to do was, to execute some code
> if a time out occurs. (mark that user is not anymore available or online).
> How then can I achieve this behaviour?
>
> Am I forced to use the classic instantiation through the new operator?
> Or is there any other solution?
>
>
>
> 
> Von: Igor Vaynberg <[EMAIL PROTECTED]>
> An: users@wicket.apache.org
> Gesendet: Dienstag, den 11. November 2008, 18:48:24 Uhr
> Betreff: Re: SessionHandling: WicketRuntimeException: There is no application 
> attached to current thread http-8080-1
>
> wouldnt say its a bug, looks like a method invocation is done on a
> wicket-spring proxy outside a wicket request and it cannot find the
> application when it tries to resolve the application context. those
> proxies are not mean to be used outside wicket requests.
>
> -igor
>
> On Tue, Nov 11, 2008 at 7:11 AM, Martijn Dashorst
> <[EMAIL PROTECTED]> wrote:
>> I guess 
>> org.apache.wicket.spring.SpringWebApplication$1.getSpringContext(SpringWebApplication.java:51)
>> has a bug because it assumes it is always called inside the scope of a
>> wicket request.
>>
>> Martijn
>>
>> On Tue, Nov 11, 2008 at 12:59 PM, Agent Mahone <[EMAIL PROTECTED]> wrote:
>>> Hi guys
>>>
>>> I´m just trying to execute some code after a session timeout occurs.
>>> I´m using spring / wicket / hibernate frameworks.
>>> Why do I get this error "WicketRuntimeException: There is no application 
>>> attached to current thread http-8080-1"?
>>> I´m not getting it...I appreciate any hints. Thanks in advance !!!
>>>
>>> Here is my application class:
>>>
>>> public class MyApplication extends SpringWebApplication implements 
>>> HttpSessionListener {
>>>
>>> protected void init() {
>>> //some code
>>> }
>>>
>>> public Session newSession(Request request, Response response) {
>>>return new MySession(request);
>>> }
>>>
>>> public Class getHomePage() {
>>>return IndexPage.class;
>>>  }
>>>
>>> public Object getBean(Class clazz, String beanName) {
>>>return createSpringBeanProxy(clazz, beanName);
>>> }
>>>
>>>  @Override
>>> public void sessionCreated(HttpSessionEvent arg0) {
>>>//nothing sepcial
>>> }
>>>
>>> @Override
>>> public void sessionDestroyed(HttpSessionEvent arg0) {
>>>  String sessionId = arg0.getSession().getId();
>>>
>>>  IRegistrationLoginUseCase bean = 
>>> (ILoginService)getBean(ILoginService.class, "loginService");
>>>
>>>  bean.logout(sessionId);
>>> }
>>>
>>> Here is my error stack trace:
>>>
>>> org.apache.wicket.WicketRuntimeException: There is no application attached 
>>> to current thread http-8080-1
>>>at org.apache.wicket.Application.get(Application.java:166)
>>>at 
>>> org.apache.wicket.spring.SpringWebApplication$1.getSpringContext(SpringWebApplication.java:51)
>>>at 
>>> org.apache.wicket.spring.SpringBeanLocator.getSpringContext(SpringBeanLocator.java:176)
>>>at 
>>> org.apache.wicket.spring.SpringBeanLocator.locateProxyTarget(SpringBeanLocator.java:162)
>>>at 
>>> org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:412)
>>>at org.apache.wicket.proxy.$Proxy3.logout(Unknown Source)
>>>at 
>>> com.studentcv.web.MyApplication.sessionDestroyed(StudentCVApplication.java:82)
>>>at 
>>> org.apache.catalina.session.StandardSession.expire(StandardSession.java:702)
>>>at 
>>> org.apache.catalina.session.StandardSession.isValid(StandardSession.java:592)
>>>at org.apache.catalina.connector.Request.doGetSession(Request.java:2287)
>>>at org.apache.catalina.connector.Request.getSession(Request.java:2075)
>>>at 
>>> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
>>>at 
>>> org.apache.wicket.protocol.http.AbstractHttpSessionStore.getSessionId(AbstractHttpSessionStore.java:180)

AW: SessionHandling: WicketRuntimeException: There is no application attached to current thread http-8080-1

2008-11-11 Thread Agent Mahone
Hello guys

The only thing what I was trying to do was, to execute some code
if a time out occurs. (mark that user is not anymore available or online).
How then can I achieve this behaviour?

Am I forced to use the classic instantiation through the new operator?
Or is there any other solution?




Von: Igor Vaynberg <[EMAIL PROTECTED]>
An: users@wicket.apache.org
Gesendet: Dienstag, den 11. November 2008, 18:48:24 Uhr
Betreff: Re: SessionHandling: WicketRuntimeException: There is no application 
attached to current thread http-8080-1

wouldnt say its a bug, looks like a method invocation is done on a
wicket-spring proxy outside a wicket request and it cannot find the
application when it tries to resolve the application context. those
proxies are not mean to be used outside wicket requests.

-igor

On Tue, Nov 11, 2008 at 7:11 AM, Martijn Dashorst
<[EMAIL PROTECTED]> wrote:
> I guess 
> org.apache.wicket.spring.SpringWebApplication$1.getSpringContext(SpringWebApplication.java:51)
> has a bug because it assumes it is always called inside the scope of a
> wicket request.
>
> Martijn
>
> On Tue, Nov 11, 2008 at 12:59 PM, Agent Mahone <[EMAIL PROTECTED]> wrote:
>> Hi guys
>>
>> I´m just trying to execute some code after a session timeout occurs.
>> I´m using spring / wicket / hibernate frameworks.
>> Why do I get this error "WicketRuntimeException: There is no application 
>> attached to current thread http-8080-1"?
>> I´m not getting it...I appreciate any hints. Thanks in advance !!!
>>
>> Here is my application class:
>>
>> public class MyApplication extends SpringWebApplication implements 
>> HttpSessionListener {
>>
>> protected void init() {
>> //some code
>> }
>>
>> public Session newSession(Request request, Response response) {
>>return new MySession(request);
>> }
>>
>> public Class getHomePage() {
>>return IndexPage.class;
>>  }
>>
>> public Object getBean(Class clazz, String beanName) {
>>return createSpringBeanProxy(clazz, beanName);
>> }
>>
>>  @Override
>> public void sessionCreated(HttpSessionEvent arg0) {
>>//nothing sepcial
>> }
>>
>> @Override
>> public void sessionDestroyed(HttpSessionEvent arg0) {
>>  String sessionId = arg0.getSession().getId();
>>
>>  IRegistrationLoginUseCase bean = 
>> (ILoginService)getBean(ILoginService.class, "loginService");
>>
>>  bean.logout(sessionId);
>> }
>>
>> Here is my error stack trace:
>>
>> org.apache.wicket.WicketRuntimeException: There is no application attached 
>> to current thread http-8080-1
>>at org.apache.wicket.Application.get(Application.java:166)
>>at 
>> org.apache.wicket.spring.SpringWebApplication$1.getSpringContext(SpringWebApplication.java:51)
>>at 
>> org.apache.wicket.spring.SpringBeanLocator.getSpringContext(SpringBeanLocator.java:176)
>>at 
>> org.apache.wicket.spring.SpringBeanLocator.locateProxyTarget(SpringBeanLocator.java:162)
>>at 
>> org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:412)
>>at org.apache.wicket.proxy.$Proxy3.logout(Unknown Source)
>>at 
>> com.studentcv.web.MyApplication.sessionDestroyed(StudentCVApplication.java:82)
>>at 
>> org.apache.catalina.session.StandardSession.expire(StandardSession.java:702)
>>at 
>> org.apache.catalina.session.StandardSession.isValid(StandardSession.java:592)
>>at org.apache.catalina.connector.Request.doGetSession(Request.java:2287)
>>at org.apache.catalina.connector.Request.getSession(Request.java:2075)
>>at 
>> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
>>at 
>> org.apache.wicket.protocol.http.AbstractHttpSessionStore.getSessionId(AbstractHttpSessionStore.java:180)
>>at 
>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:303)
>>at 
>> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124)
>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>>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

Re: SessionHandling: WicketRuntimeException: There is no application attached to current thread http-8080-1

2008-11-11 Thread Igor Vaynberg
wouldnt say its a bug, looks like a method invocation is done on a
wicket-spring proxy outside a wicket request and it cannot find the
application when it tries to resolve the application context. those
proxies are not mean to be used outside wicket requests.

-igor

On Tue, Nov 11, 2008 at 7:11 AM, Martijn Dashorst
<[EMAIL PROTECTED]> wrote:
> I guess 
> org.apache.wicket.spring.SpringWebApplication$1.getSpringContext(SpringWebApplication.java:51)
> has a bug because it assumes it is always called inside the scope of a
> wicket request.
>
> Martijn
>
> On Tue, Nov 11, 2008 at 12:59 PM, Agent Mahone <[EMAIL PROTECTED]> wrote:
>> Hi guys
>>
>> I´m just trying to execute some code after a session timeout occurs.
>> I´m using spring / wicket / hibernate frameworks.
>> Why do I get this error "WicketRuntimeException: There is no application 
>> attached to current thread http-8080-1"?
>> I´m not getting it...I appreciate any hints. Thanks in advance !!!
>>
>> Here is my application class:
>>
>> public class MyApplication extends SpringWebApplication implements 
>> HttpSessionListener {
>>
>> protected void init() {
>> //some code
>> }
>>
>> public Session newSession(Request request, Response response) {
>>return new MySession(request);
>> }
>>
>> public Class getHomePage() {
>>return IndexPage.class;
>>  }
>>
>> public Object getBean(Class clazz, String beanName) {
>>return createSpringBeanProxy(clazz, beanName);
>> }
>>
>>  @Override
>> public void sessionCreated(HttpSessionEvent arg0) {
>>//nothing sepcial
>> }
>>
>> @Override
>> public void sessionDestroyed(HttpSessionEvent arg0) {
>>  String sessionId = arg0.getSession().getId();
>>
>>  IRegistrationLoginUseCase bean = 
>> (ILoginService)getBean(ILoginService.class, "loginService");
>>
>>  bean.logout(sessionId);
>> }
>>
>> Here is my error stack trace:
>>
>> org.apache.wicket.WicketRuntimeException: There is no application attached 
>> to current thread http-8080-1
>>at org.apache.wicket.Application.get(Application.java:166)
>>at 
>> org.apache.wicket.spring.SpringWebApplication$1.getSpringContext(SpringWebApplication.java:51)
>>at 
>> org.apache.wicket.spring.SpringBeanLocator.getSpringContext(SpringBeanLocator.java:176)
>>at 
>> org.apache.wicket.spring.SpringBeanLocator.locateProxyTarget(SpringBeanLocator.java:162)
>>at 
>> org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:412)
>>at org.apache.wicket.proxy.$Proxy3.logout(Unknown Source)
>>at 
>> com.studentcv.web.MyApplication.sessionDestroyed(StudentCVApplication.java:82)
>>at 
>> org.apache.catalina.session.StandardSession.expire(StandardSession.java:702)
>>at 
>> org.apache.catalina.session.StandardSession.isValid(StandardSession.java:592)
>>at org.apache.catalina.connector.Request.doGetSession(Request.java:2287)
>>at org.apache.catalina.connector.Request.getSession(Request.java:2075)
>>at 
>> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
>>at 
>> org.apache.wicket.protocol.http.AbstractHttpSessionStore.getSessionId(AbstractHttpSessionStore.java:180)
>>at 
>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:303)
>>at 
>> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124)
>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>>at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>>at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>>at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>>at 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>>at 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>>at 
>> org.apache.coyote.http11.Http11Processor.process(Ht

Re: SessionHandling: WicketRuntimeException: There is no application attached to current thread http-8080-1

2008-11-11 Thread Martijn Dashorst
I guess 
org.apache.wicket.spring.SpringWebApplication$1.getSpringContext(SpringWebApplication.java:51)
has a bug because it assumes it is always called inside the scope of a
wicket request.

Martijn

On Tue, Nov 11, 2008 at 12:59 PM, Agent Mahone <[EMAIL PROTECTED]> wrote:
> Hi guys
>
> I´m just trying to execute some code after a session timeout occurs.
> I´m using spring / wicket / hibernate frameworks.
> Why do I get this error "WicketRuntimeException: There is no application 
> attached to current thread http-8080-1"?
> I´m not getting it...I appreciate any hints. Thanks in advance !!!
>
> Here is my application class:
>
> public class MyApplication extends SpringWebApplication implements 
> HttpSessionListener {
>
> protected void init() {
> //some code
> }
>
> public Session newSession(Request request, Response response) {
>return new MySession(request);
> }
>
> public Class getHomePage() {
>return IndexPage.class;
>  }
>
> public Object getBean(Class clazz, String beanName) {
>return createSpringBeanProxy(clazz, beanName);
> }
>
>  @Override
> public void sessionCreated(HttpSessionEvent arg0) {
>//nothing sepcial
> }
>
> @Override
> public void sessionDestroyed(HttpSessionEvent arg0) {
>  String sessionId = arg0.getSession().getId();
>
>  IRegistrationLoginUseCase bean = 
> (ILoginService)getBean(ILoginService.class, "loginService");
>
>  bean.logout(sessionId);
> }
>
> Here is my error stack trace:
>
> org.apache.wicket.WicketRuntimeException: There is no application attached to 
> current thread http-8080-1
>at org.apache.wicket.Application.get(Application.java:166)
>at 
> org.apache.wicket.spring.SpringWebApplication$1.getSpringContext(SpringWebApplication.java:51)
>at 
> org.apache.wicket.spring.SpringBeanLocator.getSpringContext(SpringBeanLocator.java:176)
>at 
> org.apache.wicket.spring.SpringBeanLocator.locateProxyTarget(SpringBeanLocator.java:162)
>at 
> org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:412)
>at org.apache.wicket.proxy.$Proxy3.logout(Unknown Source)
>at 
> com.studentcv.web.MyApplication.sessionDestroyed(StudentCVApplication.java:82)
>at 
> org.apache.catalina.session.StandardSession.expire(StandardSession.java:702)
>at 
> org.apache.catalina.session.StandardSession.isValid(StandardSession.java:592)
>at org.apache.catalina.connector.Request.doGetSession(Request.java:2287)
>at org.apache.catalina.connector.Request.getSession(Request.java:2075)
>at 
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
>at 
> org.apache.wicket.protocol.http.AbstractHttpSessionStore.getSessionId(AbstractHttpSessionStore.java:180)
>at 
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:303)
>at 
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>at java.lang.Thread.run(Unknown Source)
>
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



SessionHandling: WicketRuntimeException: There is no application attached to current thread http-8080-1

2008-11-11 Thread Agent Mahone
Hi guys

I´m just trying to execute some code after a session timeout occurs. 
I´m using spring / wicket / hibernate frameworks.
Why do I get this error "WicketRuntimeException: There is no application 
attached to current thread http-8080-1"? 
I´m not getting it...I appreciate any hints. Thanks in advance !!!

Here is my application class:

public class MyApplication extends SpringWebApplication implements 
HttpSessionListener {

protected void init() { 
//some code
}

public Session newSession(Request request, Response response) {
return new MySession(request);
}

public Class getHomePage() {
return IndexPage.class;
 }

public Object getBean(Class clazz, String beanName) {
return createSpringBeanProxy(clazz, beanName);
}

 @Override
public void sessionCreated(HttpSessionEvent arg0) {
//nothing sepcial   
}

@Override
public void sessionDestroyed(HttpSessionEvent arg0) {
  String sessionId = arg0.getSession().getId();

  IRegistrationLoginUseCase bean = 
(ILoginService)getBean(ILoginService.class, "loginService");

  bean.logout(sessionId);
}

Here is my error stack trace:

org.apache.wicket.WicketRuntimeException: There is no application attached to 
current thread http-8080-1
at org.apache.wicket.Application.get(Application.java:166)
at 
org.apache.wicket.spring.SpringWebApplication$1.getSpringContext(SpringWebApplication.java:51)
at 
org.apache.wicket.spring.SpringBeanLocator.getSpringContext(SpringBeanLocator.java:176)
at 
org.apache.wicket.spring.SpringBeanLocator.locateProxyTarget(SpringBeanLocator.java:162)
at 
org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:412)
at org.apache.wicket.proxy.$Proxy3.logout(Unknown Source)
at 
com.studentcv.web.MyApplication.sessionDestroyed(StudentCVApplication.java:82)
at 
org.apache.catalina.session.StandardSession.expire(StandardSession.java:702)
at 
org.apache.catalina.session.StandardSession.isValid(StandardSession.java:592)
at org.apache.catalina.connector.Request.doGetSession(Request.java:2287)
at org.apache.catalina.connector.Request.getSession(Request.java:2075)
at 
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
at 
org.apache.wicket.protocol.http.AbstractHttpSessionStore.getSessionId(AbstractHttpSessionStore.java:180)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:303)
at 
org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)


  

Re: Changing WicketRuntimeException output

2008-10-29 Thread Ryan Gravener
Create your own RequestCycle and in the onRuntimeException(Page page,
RuntimeException e) do this.

Ryan Gravener
http://ryangravener.com/flex | http://twitter.com/ryangravener


On Wed, Oct 29, 2008 at 11:27 AM, Dane Laverty <[EMAIL PROTECTED]>wrote:

> I would like to make it so that whenever Wicket throws a
> WicketRuntimeException, it also prints out getSession().getUser(). I'm
> not especially clear on the flow for RuntimeExceptions, so any
> suggestions on where I would add the code to do this will be greatly
> appreciated.
>
>
>
> Dane Laverty
>
> Information Technology
>
> 503-365-4687
>
> [EMAIL PROTECTED]
>
>
>
>


Re: Changing WicketRuntimeException output

2008-10-29 Thread Maarten Bosteels
Should be possible to catch WicketRuntimeException with a servlet filter ...



On Wed, Oct 29, 2008 at 4:27 PM, Dane Laverty <[EMAIL PROTECTED]>wrote:

> I would like to make it so that whenever Wicket throws a
> WicketRuntimeException, it also prints out getSession().getUser(). I'm
> not especially clear on the flow for RuntimeExceptions, so any
> suggestions on where I would add the code to do this will be greatly
> appreciated.
>
>
>
> Dane Laverty
>
> Information Technology
>
> 503-365-4687
>
> [EMAIL PROTECTED]
>
>
>
>


Changing WicketRuntimeException output

2008-10-29 Thread Dane Laverty
I would like to make it so that whenever Wicket throws a
WicketRuntimeException, it also prints out getSession().getUser(). I'm
not especially clear on the flow for RuntimeExceptions, so any
suggestions on where I would add the code to do this will be greatly
appreciated.

 

Dane Laverty

Information Technology

503-365-4687

[EMAIL PROTECTED]

 



Re: WicketRuntimeException when using wicket-auth-roles in a frameset

2008-09-23 Thread shetc

Ok, some I'm a JIRA newbie, what can I say :blush:

Please see   https://issues.apache.org/jira/browse/WICKET-1845 WICKET-1845 .
-- 
View this message in context: 
http://www.nabble.com/WicketRuntimeException-when-using-wicket-auth-roles-in-a-frameset-tp19613863p19626703.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: WicketRuntimeException when using wicket-auth-roles in a frameset

2008-09-22 Thread Igor Vaynberg
well, the whole point of creating the project was that someone can
look at it :) upload it to our jira.

-igor

On Mon, Sep 22, 2008 at 7:10 PM, shetc <[EMAIL PROTECTED]> wrote:
>
> Alright, I created a quickstart project and the problem still exists. Do I
> upload the project for you to look at it?
> --
> View this message in context: 
> http://www.nabble.com/WicketRuntimeException-when-using-wicket-auth-roles-in-a-frameset-tp19613863p19620137.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



  1   2   >