Re: ThreadLocal with ajax

2013-03-11 Thread Ann Baert
Hi,

Is their anything on the page that is triggered when an ajaxcall has
happened?
The onBeforeRenderer of the page is not called when their was an ajaxcall.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ThreadLocal-with-ajax-tp4657018p4657141.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



ThreadLocal with ajax

2013-03-06 Thread Ann Baert
Hi,

I have a springbean with a ThreadLocal property. On the page (constructor
and onBeforeRenderer) I set a value to that ThreadLocal property. When I do
the get of that property after an ajax call, the value is null.

I made a quickstart to simulate the problem. I print the ThreadLocal value
on the page (correct) and
after call on the ajaxlink the value is null.
Does anyone know a solution for this?

ThreadLocalTest.zip
  



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ThreadLocal-with-ajax-tp4657018.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



Treads on timed_waiting with lockPage

2013-02-06 Thread Ann Baert
We have a wicket application in production, and from time to time a strange
phenomenon happens.
We're using jetty, and at a certain moment, the whole pool of jetty worker
treads is filled up.
I've made a program that dumps the stack traces of all active treads, and a
lot of treads are
blocking on the same piece of code. Could there be some threading issue in
the wicket code?
Below you find the stack trace where most of the treads are blocking on.

1131 qtp2146332552-1131 TIMED_WAITING:
  at java.lang.Object.wait(Native Method)
  at
org.apache.wicket.page.PageAccessSynchronizer.lockPage(PageAccessSynchronizer.java:126)
  at
org.apache.wicket.page.PageAccessSynchronizer$2.getPage(PageAccessSynchronizer.java:256)
  at
org.apache.wicket.DefaultMapperContext.getPageInstance(DefaultMapperContext.java:117)
  at
org.apache.wicket.request.handler.PageProvider.getStoredPage(PageProvider.java:302)
  at
org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:257)
  at
org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)
  at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:100)
  at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:165)
  at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
  at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
  at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
  at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
  at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
  at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
  at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244)
  at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
  at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
  at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
  at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
  at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
  at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
  at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
  at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
  at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
  at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
  at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
  at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
  at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
  at org.eclipse.jetty.server.Server.handle(Server.java:365)
  at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
  at
org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937)
  at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998)
  at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856)
  at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
  at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
  at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
  at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
  at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
  at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
  at java.lang.Thread.run(Thread.java:722)




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Treads-on-timed-waiting-with-lockPage-tp4656126.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



autocomplete js error in IE

2011-10-20 Thread Ann Baert
A wicket autocomplete gives errors in Internet Explorer. The error is on 
line 42 of wicket-autocomplete.js.
On that line stands the following code: objonkeyup=obj.onkeyup;
I'm using Wicket 1.5.1. And you can reproduce the problem on the wicket 
examples: http://www.wicket-library.com/wicket-examples/ajax/autocomplete

I created a jira issue for this: 
https://issues.apache.org/jira/browse/WICKET-4150
 DISCLAIMER 

http://www.tvh.com/newen2/emaildisclaimer/default.html 

"This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message."


DownloadLink with AjaxIndicator

2010-10-13 Thread Ann Baert
I would like to add an ajaxindicator on a DownloadLink.
How can I do this?

But because DownloadLink isn't ajax, I tried the following:

AjaxLink downloadLink = new AjaxLink("id") {

@Override
public void onClick(AjaxRequestTarget target) {
 
}
};
downloadLink.add(new AjaxEventBehavior("onclick") {
 
@Override
public void onEvent(final AjaxRequestTarget target) {
RequestCycle.get().setRequestTarget(new IRequestTarget() {

public void detach(RequestCycle requestCycle) {
}

public Object getLock(RequestCycle requestCycle) {
return null;
}

public void respond(RequestCycle requestCycle) {
WebResponse r = (WebResponse) requestCycle.getResponse();
r.setAttachmentHeader("header.ext");
r.setContentType("application/contentype");

...
Streams.copy(bais, r.getOutputStream());
 
target.appendJavascript("...");
}
});
 
}

@Override
protected CharSequence getEventHandler() {
AppendingStringBuffer handler = new AppendingStringBuffer();
handler.append("...");
handler.append(super.getEventHandler());
return handler;
}
});
add(downloadLink);



Thanks
Ann
 DISCLAIMER 

http://www.tvh.com/newen2/emaildisclaimer/default.html 

"This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message."


Combination CompoundPropertyModel and ChoiceRenderer on DropDownChoice gives problems

2009-11-08 Thread Ann Baert
I've created a jira issue with more information and an example for this 
problem:
https://issues.apache.org/jira/browse/WICKET-2565
 DISCLAIMER 

http://www.tvh.com/newen2/emaildisclaimer/default.html 

"This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message."


Problem with wicket:extend / wicket:child and ListView on not visible component

2009-10-23 Thread Ann Baert
I have a problem with inheritance from panels with listview on a not 
visible component.
I think it's a bug, so I've made a jira issue for it with more explanation 
and an example:
https://issues.apache.org/jira/browse/WICKET-2537

Ann
 DISCLAIMER 
http://www.tvh.be/newen/pages/emaildisclaimer.html";>
http://www.tvh.be/newen/pages/emaildisclaimer.html 

"This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message."


Re: AutoComplete textfield ignores "visible" property within hierarchy.

2009-09-29 Thread Ann Baert

I already opened a jira issue:
https://issues.apache.org/jira/browse/WICKET-2497



igor.vaynberg wrote:
> 
> please open a jira issue.
> 
> -igor
> 
> On Tue, Sep 29, 2009 at 7:59 AM, Ann Baert  wrote:
>> When writing an autocomplete textfield on a form that is first visible,
>> and after an ajax call rendered invisible, the autocomplete textfields
>> on this form get rendered anyway in the ajax response.
>>
>> The method "renderAutocompleteHead" in AbstractAutocompleteBehavior gets
>> executed,
>> even if the AutoComplete component to which it is attached is not visible
>> within the
>> component hierarchy.
>>
>> Below the snippet of code that solved it for us ...
>>
>> In the class AbstractAutoCompleteBehavior, a test on the visibility was
>> added.
>>
>>
>>
>> public void renderHead(IHeaderResponse response) {
>>        if(this.getComponent().isVisibleInHierarchy()) {
>>            super.renderHead(response);
>>            renderAutocompleteHead(response);
>>        }
>>    }
>>
>>
>> The error becomes visible in the debug window on the webpage.
>>
>> There is already a bug report filed within jira, and a demo application
>> is
>> included to simulate the problem.
>>
>> https://issues.apache.org/jira/browse/WICKET-2497
>>
>> Met vriendelijke groeten,
>>
>> ANN BAERT
>> ICT-DEPARTMENT
>> Internet technologie: Software Engineer
>> Tel.:    +32 56 43 42 11
>> Fax:    +32 56 43 44 88
>> E-mail: ann.ba...@tvh.com
>> Contactsheet: ANN BAERT TVH FORKLIFT PARTS nv-sa -  BRABANTSTRAAT 15 -
>> B-8790 WAREGEM
>> Neem even pauze om onze website te bekijken en vertel ons hoe we u kunnen
>> helpen: www.tvh.com/nl Vooraleer ik print, denk ik aan het milieu.
>>  DISCLAIMER 
>>  http://www.tvh.be/newen/pages/emaildisclaimer.html 
>> http://www.tvh.be/newen/pages/emaildisclaimer.html  
>>
>> "This message is delivered to all addressees subject to the conditions
>> set forth in the attached disclaimer, which is an integral part of this
>> message."
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/AutoComplete-textfield-ignores-%22visible%22-property-within-hierarchy.-tp25664687p25675445.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



AutoComplete textfield ignores "visible" property within hierarchy.

2009-09-29 Thread Ann Baert
When writing an autocomplete textfield on a form that is first visible,
and after an ajax call rendered invisible, the autocomplete textfields
on this form get rendered anyway in the ajax response.

The method "renderAutocompleteHead" in AbstractAutocompleteBehavior gets 
executed,
even if the AutoComplete component to which it is attached is not visible 
within the
component hierarchy. 

Below the snippet of code that solved it for us ...

In the class AbstractAutoCompleteBehavior, a test on the visibility was 
added.



public void renderHead(IHeaderResponse response) {
if(this.getComponent().isVisibleInHierarchy()) {
super.renderHead(response);
renderAutocompleteHead(response);
}
} 


The error becomes visible in the debug window on the webpage.

There is already a bug report filed within jira, and a demo application is 
included to simulate the problem.

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

Met vriendelijke groeten,

ANN BAERT
ICT-DEPARTMENT
Internet technologie: Software Engineer
Tel.:+32 56 43 42 11
Fax:+32 56 43 44 88
E-mail: ann.ba...@tvh.com
Contactsheet: ANN BAERT TVH FORKLIFT PARTS nv-sa -  BRABANTSTRAAT 15 - 
B-8790 WAREGEM 
Neem even pauze om onze website te bekijken en vertel ons hoe we u kunnen 
helpen: www.tvh.com/nl Vooraleer ik print, denk ik aan het milieu. 
 DISCLAIMER 
http://www.tvh.be/newen/pages/emaildisclaimer.html";>
http://www.tvh.be/newen/pages/emaildisclaimer.html 

"This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message."


Re: How to throw new PageExpiredException?

2009-07-16 Thread Ann Baert

I do that already, see my previous post.
But the PageExpiredException is wrapped into WicketRuntimeException, so that
he doesn't come on those pages.




Linda van der Pal wrote:
> 
> A quote from Wicket in Action:
> =
> The three custom error pages can be set in the init method of your 
> Application using the application settings. Here’s an example:
> 
> @Override
> protected void init() {
> IApplicationSettings settings = getApplicationSettings();
> settings.setAccessDeniedPage(CheesrAccessDeniedPage.class);
> settings.setPageExpiredErrorPage(CheesrPageExpiredErrorPage.class);
> settings.setInternalErrorPage(CheesrInternalErrorPage.class);
> }
> =
> Doesn't this accomplish what you want?
> 
> Regards,
> Linda
> 
> Ann Baert wrote:
>> That's not how I want it.
>> I have a custom PageExpiredErrorPage (and AccessDenied...), so he has to
>> take those automaticly.
>> getApplicationSettings().setPageExpiredErrorPage(CustomPageExpiredErrorPage.class);
>> With your solution I have to repeat them everywhere, like I do now with
>> setResponsePage().
>>
>>
>>
>> Serkan Camurcuoglu-3 wrote:
>>   
>>> If all you want is to display a page expired page, maybe you could just
>>> use
>>>
>>> throw new RestartResponseException(PageExpiredErrorPage.class);
>>>
>>> in your page constructor.
>>>
>>>
>>>
>>> Ann Baert wrote:
>>> 
>>>> Can anyone help me with this problem please?
>>>> Thanks in advance, Ann.
>>>>
>>>>
>>>>
>>>> Ann Baert wrote:
>>>>   
>>>>   
>>>>> I have overridden the RequestCycle.onRuntimeException method:
>>>>>
>>>>> @Override
>>>>> public RequestCycle newRequestCycle(final Request request, final
>>>>> Response
>>>>> response) {
>>>>> return new WebRequestCycle(this, (WebRequest) request,
>>>>> (WebResponse)
>>>>> response) {
>>>>>
>>>>> @Override
>>>>> public Page onRuntimeException(Page page, RuntimeException e)
>>>>> {
>>>>> Throwable t = e.getCause();
>>>>> while(t != null) {
>>>>> if(t instanceof PageExpiredException) {
>>>>> return super.onRuntimeException(page, new
>>>>> PageExpiredException("test"));
>>>>> }
>>>>>
>>>>> t = t.getCause();
>>>>> }
>>>>> return super.onRuntimeException(page, e);
>>>>> }
>>>>> };
>>>>> }
>>>>>
>>>>> He comes in the if(t instanceof PageExpiredException)..., but in the
>>>>> AbstractRequestCycleProcessor.respond(RuntimeException e, RequestCycle
>>>>> requestCycle) method he doesn't do anything with the RuntimeException.
>>>>> So
>>>>> he has still a WicketRuntimeException instead of the
>>>>> PageExpiredException.
>>>>>
>>>>> Ann
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> igor.vaynberg wrote:
>>>>> 
>>>>> 
>>>>>> you can try unwrapping the exceptions in
>>>>>> requestcycle.onruntimeexception and call super with the page exipred
>>>>>> exception.
>>>>>>
>>>>>> -igor
>>>>>>
>>>>>> On Fri, Jul 10, 2009 at 3:00 AM, Ann Baert wrote:
>>>>>>   
>>>>>>   
>>>>>>> Hello,
>>>>>>>
>>>>>>> How can I throw a PageExpiredException in the constructor of my
>>>>>>> WebPage?
>>>>>>> Because the exception is wrapped by Wicket with
>>>>>>> WicketRuntimeException
>>>>>>> it
>>>>>>> goes to the InternalErrorPage.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Ann
>>>>>>>  DISCLAIMER 
>>>>>>>  http://www.tvh.be/newen/pages/emaildisclaimer.html 
>>>>>>> http://www.tvh.be/newen/pages/emaildisclaimer.html  
>>>>>>>
>>>>>>> "This message is deliver

Re: How to throw new PageExpiredException?

2009-07-16 Thread Ann Baert

That's not how I want it.
I have a custom PageExpiredErrorPage (and AccessDenied...), so he has to
take those automaticly.
getApplicationSettings().setPageExpiredErrorPage(CustomPageExpiredErrorPage.class);
With your solution I have to repeat them everywhere, like I do now with
setResponsePage().



Serkan Camurcuoglu-3 wrote:
> 
> If all you want is to display a page expired page, maybe you could just
> use
> 
> throw new RestartResponseException(PageExpiredErrorPage.class);
> 
> in your page constructor.
> 
> 
> 
> Ann Baert wrote:
>> Can anyone help me with this problem please?
>> Thanks in advance, Ann.
>>
>>
>>
>> Ann Baert wrote:
>>   
>>> I have overridden the RequestCycle.onRuntimeException method:
>>>
>>> @Override
>>> public RequestCycle newRequestCycle(final Request request, final
>>> Response
>>> response) {
>>> return new WebRequestCycle(this, (WebRequest) request, (WebResponse)
>>> response) {
>>>
>>> @Override
>>> public Page onRuntimeException(Page page, RuntimeException e) {
>>> Throwable t = e.getCause();
>>> while(t != null) {
>>> if(t instanceof PageExpiredException) {
>>> return super.onRuntimeException(page, new
>>> PageExpiredException("test"));
>>> }
>>>
>>> t = t.getCause();
>>> }
>>> return super.onRuntimeException(page, e);
>>> }
>>> };
>>> }
>>>
>>> He comes in the if(t instanceof PageExpiredException)..., but in the
>>> AbstractRequestCycleProcessor.respond(RuntimeException e, RequestCycle
>>> requestCycle) method he doesn't do anything with the RuntimeException.
>>> So
>>> he has still a WicketRuntimeException instead of the
>>> PageExpiredException.
>>>
>>> Ann
>>>
>>>
>>>
>>>
>>> igor.vaynberg wrote:
>>> 
>>>> you can try unwrapping the exceptions in
>>>> requestcycle.onruntimeexception and call super with the page exipred
>>>> exception.
>>>>
>>>> -igor
>>>>
>>>> On Fri, Jul 10, 2009 at 3:00 AM, Ann Baert wrote:
>>>>   
>>>>> Hello,
>>>>>
>>>>> How can I throw a PageExpiredException in the constructor of my
>>>>> WebPage?
>>>>> Because the exception is wrapped by Wicket with WicketRuntimeException
>>>>> it
>>>>> goes to the InternalErrorPage.
>>>>>
>>>>> Thanks,
>>>>> Ann
>>>>>  DISCLAIMER 
>>>>>  http://www.tvh.be/newen/pages/emaildisclaimer.html 
>>>>> http://www.tvh.be/newen/pages/emaildisclaimer.html  
>>>>>
>>>>> "This message is delivered to all addressees subject to the conditions
>>>>> set forth in the attached disclaimer, which is an integral part of
>>>>> this
>>>>> message."
>>>>>
>>>>> 
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>>
>>>>
>>>>   
>>> 
>>
>>   
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-throw-new-PageExpiredException--tp24424791p24512739.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to throw new PageExpiredException?

2009-07-16 Thread Ann Baert

Can anyone help me with this problem please?
Thanks in advance, Ann.



Ann Baert wrote:
> 
> I have overridden the RequestCycle.onRuntimeException method:
> 
> @Override
> public RequestCycle newRequestCycle(final Request request, final Response
> response) {
> return new WebRequestCycle(this, (WebRequest) request, (WebResponse)
> response) {
> 
> @Override
> public Page onRuntimeException(Page page, RuntimeException e) {
> Throwable t = e.getCause();
> while(t != null) {
> if(t instanceof PageExpiredException) {
> return super.onRuntimeException(page, new
> PageExpiredException("test"));
> }
> 
> t = t.getCause();
> }
> return super.onRuntimeException(page, e);
> }
> };
> }
> 
> He comes in the if(t instanceof PageExpiredException)..., but in the
> AbstractRequestCycleProcessor.respond(RuntimeException e, RequestCycle
> requestCycle) method he doesn't do anything with the RuntimeException. So
> he has still a WicketRuntimeException instead of the PageExpiredException.
> 
> Ann
> 
> 
> 
> 
> igor.vaynberg wrote:
>> 
>> you can try unwrapping the exceptions in
>> requestcycle.onruntimeexception and call super with the page exipred
>> exception.
>> 
>> -igor
>> 
>> On Fri, Jul 10, 2009 at 3:00 AM, Ann Baert wrote:
>>> Hello,
>>>
>>> How can I throw a PageExpiredException in the constructor of my WebPage?
>>> Because the exception is wrapped by Wicket with WicketRuntimeException
>>> it
>>> goes to the InternalErrorPage.
>>>
>>> Thanks,
>>> Ann
>>>  DISCLAIMER 
>>>  http://www.tvh.be/newen/pages/emaildisclaimer.html 
>>> http://www.tvh.be/newen/pages/emaildisclaimer.html  
>>>
>>> "This message is delivered to all addressees subject to the conditions
>>> set forth in the attached disclaimer, which is an integral part of this
>>> message."
>>>
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-throw-new-PageExpiredException--tp24424791p24512117.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to throw new PageExpiredException?

2009-07-13 Thread Ann Baert

I have overridden the RequestCycle.onRuntimeException method:

@Override
public RequestCycle newRequestCycle(final Request request, final Response
response) {
return new WebRequestCycle(this, (WebRequest) request, (WebResponse)
response) {

@Override
public Page onRuntimeException(Page page, RuntimeException e) {
Throwable t = e.getCause();
while(t != null) {
if(t instanceof PageExpiredException) {
return super.onRuntimeException(page, new
PageExpiredException("test"));
}

t = t.getCause();
}
return super.onRuntimeException(page, e);
}
};
}

He comes in the if(t instanceof PageExpiredException)..., but in the
AbstractRequestCycleProcessor.respond(RuntimeException e, RequestCycle
requestCycle) method he doesn't do anything with the RuntimeException. So he
has still a WicketRuntimeException instead of the PageExpiredException.

Ann




igor.vaynberg wrote:
> 
> you can try unwrapping the exceptions in
> requestcycle.onruntimeexception and call super with the page exipred
> exception.
> 
> -igor
> 
> On Fri, Jul 10, 2009 at 3:00 AM, Ann Baert wrote:
>> Hello,
>>
>> How can I throw a PageExpiredException in the constructor of my WebPage?
>> Because the exception is wrapped by Wicket with WicketRuntimeException it
>> goes to the InternalErrorPage.
>>
>> Thanks,
>> Ann
>>  DISCLAIMER 
>>  http://www.tvh.be/newen/pages/emaildisclaimer.html 
>> http://www.tvh.be/newen/pages/emaildisclaimer.html  
>>
>> "This message is delivered to all addressees subject to the conditions
>> set forth in the attached disclaimer, which is an integral part of this
>> message."
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-throw-new-PageExpiredException--tp24424791p24457324.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



How to throw new PageExpiredException?

2009-07-10 Thread Ann Baert
Hello,

How can I throw a PageExpiredException in the constructor of my WebPage?
Because the exception is wrapped by Wicket with WicketRuntimeException it 
goes to the InternalErrorPage.

Thanks,
Ann
 DISCLAIMER 
http://www.tvh.be/newen/pages/emaildisclaimer.html";>
http://www.tvh.be/newen/pages/emaildisclaimer.html 

"This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message."


url-escaping is not undone for requestcodingstrategy

2008-09-09 Thread Ann Baert

When a resourceUrl with special characters is invoked by Wicket. Wicket does
not read it correctly. 

I've made a jira issue with an example:
https://issues.apache.org/jira/browse/WICKET-1825
-- 
View this message in context: 
http://www.nabble.com/url-escaping-is-not-undone-for-requestcodingstrategy-tp19406715p19406715.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]



In IE6, a hash string is automatically appended to an ajax

2008-09-01 Thread Ann Baert

In IE6, a hash string is automatically appended to an ajax request if the
page from which the ajax request originates, was invoked with that specific
hash string.

For example, a page that contains an AjaxLink is requested with an hash
string in the url (url + #topfocus). 

I've created an jira issue (with an example)
https://issues.apache.org/jira/browse/WICKET-1814
-- 
View this message in context: 
http://www.nabble.com/In-IE6%2C-a-hash-string-is-automatically-appended-to-an-ajax-tp19253747p19253747.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: Need XML pages in iso-8859-1 encoding ipv utf-8

2008-01-15 Thread Ann Baert

I tried getMarkupSettings().setDefaultMarkupEncoding( "ISO-8859-1" ); and
-Dfile.encoding=ISO-8859-1 but they didn't work.

Instead I used :
getRequestCycleSettings().setResponseRequestEncoding("ISO-8859-1"); which
solves the problem.



Tom Desmet wrote:
> 
> Hi,
> 
> I have a problem with XML page incodings. We use wicket for applications
> on our cisco ip phones. The firmware http client on these phones does not
> understand utf-8 xml. So we need to provide iso-8859-1 encoded xml
> responses so that the output is rendered correctly. 
> We tried setting the correct xml header ...  encoding="ISO-8859-1"?>,
> and the xml page is in the correct encoding.
> Wicket reads this page, and re-encodes it as UTF-8. So the output is no
> longer displayed correctly on our phones. Is there some possibility to
> have the output rendered as ISO-8859-1 ?
> 

-- 
View this message in context: 
http://www.nabble.com/Need-XML-pages-in-iso-8859-1-encoding-ipv-utf-8-tp14797286p14834105.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]



Doc. of final method getReplaceModel says it can be overridden

2007-07-30 Thread Ann Baert

The "getReplaceModel" method of the AttributeModifier is declared protected &
final, and its docs say that it can be used in subclasses. 
I use wicket 1.3 beta 2 
How can this final method be overridden in subclasses? 
Is this a misperception over here, or is this a documentation or an API
mistake? 

protected final IModel getReplaceModel() 

Gets the replacement model. Allows subclasses access to replace model.
-- 
View this message in context: 
http://www.nabble.com/Doc.-of-final-method-getReplaceModel-says-it-can-be-overridden-tf4170263.html#a11863815
Sent from the Wicket Users New mailing list archive at Nabble.com.


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