Hi,

>http://examples7x.wicket.apache.org/forminput/?0-1.IFormSubmitListener-inputForm

"0-1.IFormSubmitListener-inputForm" *is* a parameter, it just doesn't have a value.

How would renaming that parameter improve anything?

Have fun
Sven


Am 30.06.2018 um 12:06 schrieb Korbinian Bachl:
Thanks for the answer - that gives me the right direction. Say, do you know if 
it would be possible to have the wicket component part not in the url like 
currently but using a named parameter? e.g.:

http://examples7x.wicket.apache.org/forminput/?0-1.IFormSubmitListener-inputForm

should instead be

http://examples7x.wicket.apache.org/forminput/?wicketHandling=0-1.IFormSubmitListener-inputForm

where wicketHandling would be the global named paramter where the wicket puts 
all its infos into that parameter and not just add it to the url?

Best,

KB



----- Ursprüngliche Mail -----
Von: "Bas Gooren" <b...@iswd.nl>
An: users@wicket.apache.org, "Korbinian Bachl" <korbinian.ba...@whiskyworld.de>
Gesendet: Freitag, 29. Juni 2018 12:06:39
Betreff: Re: ListenerRequestHandler / urls from the past... - component not 
found
Hi!

I think there are many ways to fix this, ranging from easy to complex.

The easiest one: either catch it in a IRequestCycleListener (in
onException), and “fix” the request handler by stripping the
pageAndComponent info from it
Next option: override wicket’s exception mapper (see
DefaultExceptionMapper), and catch/fix it there.

Since this is a common issue for you, I’d got with a request cycle listener
since it’s quite easy to plug in:
- catch ComponentNotFoundException
- check if the request handler is a ListenerInterfaceRequestHandler
- return a BookmarkablePageRequestHandler or a RenderPageRequestHandler,
depending on the type of page that was being rendered (stateless,
bookmarkable)

Good luck.

Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 29 juni 2018 bij 11:50:27, Korbinian Bachl (
korbinian.ba...@whiskyworld.de) schreef:

Hi,

I've got some problems with 404/ 500 error codes in my wicket app that
happen to come from the past... Now, when wicket makes any url for a
component this one gets added to the path, e.g.:
http://examples7x.wicket.apache.org/forminput/?0-1.IFormSubmitListener-inputForm

So when time goes by and the component name changes to e.g.: inputForm3 and
one then calls the above URL wicket annoys with an 500 error...
(attention: it is also related to the fact if there is an active session or
there is not! - happy debugging !)

reason:

org.apache.wicket.core.request.handler.ComponentNotFoundException:
Component 'brix-tile-24:form' has been removed from page.
at
org.apache.wicket.core.request.handler.ListenerRequestHandler.respond(ListenerRequestHandler.java:166)

at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:912)

....
(error from my app - u get a bit different one from the wicket examples app
if you manually change the component info part - sometimes just an 404,
sometimes 500)


So, how can this be fixed that instead of giving us this 500er error in
live systems that wicket should just ignore the problem? I mean failing in
dev is OK but in deploy? So basically wicket shall treat it as

http://examples7x.wicket.apache.org/forminput/

request;


IMHO the problem here is in ListenerRequestHandler at 164:

if ((component == null && !freshPage) || (component != null &&
component.getPage() != page))
{
throw new ComponentNotFoundException("Component '" + getComponentPath()
+ "' has been removed from page.");
}

so we know there is no component and then wicket goes berserk and throws
it... Problem arises with many URLs indexed anywhere on the web and
pointing to ones page as well as bookmarked pages from users - they have
the old component info in the paths and there is no way to remove that!


Best
KB

---------------------------------------------------------------------
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

Reply via email to