Martin,
I found you "single-page-instance" sample very interesting.
I have the following question if you can spare some time:
What happens if you completely remove the local map in SinglePageManager
(and the associated) code?
I.e. if SinglePageManager#getPage(int id) always delegates to the
und
Hi,
What you describe is what several users currently do by using
NoVersionMapper.
NoVersionMapper is the thing that hides the ?pageId from the url in the
address bar.
The changes you suggest to be done in SinglePageManager (effectively remove
SinglePageManager completely) is the current default
Okay I see.
I imagine this approach breaks if the render strategy is REDIRECT_TO_RENDER
and works in ONE_PASS_RENDER and REDIRECT_TO_BUFFER.
Also REDIRECT_TO_BUFFER works sort of by chance? What would happen if
somehow requests from different tabs for the same page (url) were handled
simultaneous
On Fri, Sep 26, 2014 at 12:23 PM, mscoon wrote:
> Okay I see.
>
> I imagine this approach breaks if the render strategy is REDIRECT_TO_RENDER
> and works in ONE_PASS_RENDER and REDIRECT_TO_BUFFER.
>
Wicket will redirect only if the requested url differs with the response
url.
Since the ?pageId i
I just tried your demo, it does seem to redirect (the requested url is ?0
while the current url has no version number)...
But I was referring to the use of NoVersionMapper without
SinglePageManager. I tried this too, and redirect to render breaks because
the redirect is to http://blahblah/a and ha
Thanks for testing!
I'm sure there will be problems to be solved.
The app is just a proof of concept that it is not that hard to accomplish
what Garret wanted.
If someone wants to use this in production then (s)he will have to test and
optimize it further.
Martin Grigorov
Wicket Training and Consu
Hi all,
we've recently moved to Wicket 6.17 from 1.4 and I'm having trouble with
NOT showing the default wicket error page when a runtime exception is
thrown from an AjaxLink.
I've set the following in the application:
getApplicationSettings().setInternalErrorPage(ErrorPage.class);
getException
Hi,
Check org.apache.wicket.settings.ExceptionSettings#setAjaxErrorHandlingStrategy
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Fri, Sep 26, 2014 at 1:25 PM, Wayne W
wrote:
> Hi all,
>
> we've recently moved to Wicket 6.17 from 1.4 and I'm having trouble wi
As a follow-up: How can the Http Error code then be checked using WicketTester?
Currently, after your suggested change, the browser shows my 404 page
and status is 404, but in WicketTester, I get
In MyPage.java:
@Override
protected void onInitialize() {
super.onInitialize();
Hi,
I think it is 200 because this is the status code of the error page - it is
rendered successfully.
You
need org.apache.wicket.util.tester.BaseWicketTester#setFollowRedirects(false)
if you want to assert the response for MyPage.
Martin Grigorov
Wicket Training and Consulting
https://twitter.co
Hello, I have a weird issue in my tests. I have a html file with that line :
wich is supposed to add a question circle in my page.
When I run my tests, I do :
public void testWicketExist() throws Exception {
// GIVEN : Page was created
// Page creation
ModuleCreatePanel
Hi,
WicketHelper is your own class. We cannot know how it works.
You can use WicketTester.getTagBy(Wicket)Id() instead.
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Fri, Sep 26, 2014 at 1:41 PM, Maxime00
wrote:
> Hello, I have a weird issue in my tests. I ha
One last question: what code is involved in the redirect to buffer
strategy? Where to start to search if using the NoVersionMapper without the
SinglePageManager will have problems with redirect to buffer?
Thanks a lot for your time so far. As always you rock (and so does the
list) :)
On Fri, Sep
The magic happens in WebPageRenderer#respond() method.
But beware that this is one of the most scary (to reason about) code in
Wicket. We know about this problem, we simplified it somehow for Wicket 7,
but still as the comments there say "it is hairy".
Martin Grigorov
Wicket Training and Consultin
Hm, so the Error Page itself is does not render during the test
(debugger does not enter constructor at all).
My Error Page has:
@Override
protected void configureResponse(WebResponse response) {
super.configureResponse(response);
response.setStatus(HttpServletResponse.SC_NO
OK. Right.
ErrorCodeRequestHandler returns a response with code 404 and then the web
container uses the definition in web.xml to get the url for 404 ...
There is no web.xml with WicketTester and thus no redirect to /404.html.
Your code is good!
Martin Grigorov
Wicket Training and Consulting
https:
Sorry I just realized I pasted something wrong in my last message. My
current workaround would be:
assertThat(TESTER_SCOPE.getTester().getPreviousResponses().get(0).getStatus())
.isEqualTo(HttpServletResponse.SC_NOT_FOUND);
But that is a bit annoying for us when we reuse a tester
Use getLastResponse().
getRequest() and getResponse() return the ones which will be used for the
next interaction.
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Fri, Sep 26, 2014 at 2:04 PM, Thibault Kruse
wrote:
> Sorry I just realized I pasted something wro
duh, sorry, could have seen that myself.
It is still a bit confusing that the WicketTester ends up in a state
with a new request and response which are undefined. Somehow I think
if the web.xml for testing did not define a response for 404, there
should not be any new request. But that's not bad e
I agree that getResponse() is indeed confusing
I don't see why someone would use it before making a request but I am not
sure how much harm it will cause if we move its initialization
to #processRequest() (this is where the request processing starts in
WicketTester)
changing #getResponse() to retur
We used :
TagTester tagById = this.tester.getTagByWicketId("address-helper");
assertNotNull(tagById);
Assert fail
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Problem-Attribute-not-found-tp4667711p4667721.html
Sent from the Users forum mailing list archive
See IMarkupSettings#setStripWicketTags().
It has to be 'false' to be able to use tester.getTagByWicketId().
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Fri, Sep 26, 2014 at 2:29 PM, Maxime00
wrote:
> We used :
>
> TagTester tagById = this.tester.getTagByWick
It is false :(
Another idea ?
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Problem-Attribute-not-found-tp4667711p4667723.html
Sent from the Users forum mailing list archive at Nabble.com.
-
To unsu
Use org.apache.wicket.util.tester.BaseWicketTester#getLastResponseAsString()
to print the response. Make sure the element is there.
If it is there then fire the debugger and see why getTagByWicketId()
doesn't see it. Then file a bug at JIRA.
Martin Grigorov
Wicket Training and Consulting
https://t
We chose to use java instead, thank you for your help. (we couldn't find
where the error is)
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Problem-Attribute-not-found-tp4667711p4667728.html
Sent from the Users forum mailing list archive at Nabble.com.
--
25 matches
Mail list logo