Re: HybridUrlCodingStrategy SEO
I've considered stateless but I don't want google to follow any of my ajax links so I don't really need it (I think). I only want google to index my home page, but I can't provide a direct link with the HybridUrl strategy as far as I know. Also I've got a custom RequestCycle so I've got an integration with wicket-stateless. On 6/21/2011 2:28 AM, Martin Grigorov wrote: Hi, To avoid the redirect the page should be stateless. You can use Jolira's stateless Ajax behaviors/components instead. On Tue, Jun 21, 2011 at 9:16 AM, Phil Franken wrote: I've mapped my home page to "home" usingHybridUrlCodingStrategy. Testing with http://www.internetofficer.com/seo-tool/redirect-check/ shows a 302 redirect for; "domain.com" to "domain.com/home.0" "domain.com/home" to "domain.com/home.1" Google does not like the redirect and is reporting a redirect error in Webmaster Tools. Google will not follow the page with a redirect and wants a direct link in sitemap.xml. Well with HybridUrl I'm not sure this is possible because it will redirect to the numbered version, home.0, home.1, etc... I'm thinking of switching to a BookmarkablePage mount to solve this issue, but the home page has ajax controls and I'd prefer to support the browser back button without the cache control fix for ajax. Any other suggestions? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: HybridUrlCodingStrategy SEO
Hi, To avoid the redirect the page should be stateless. You can use Jolira's stateless Ajax behaviors/components instead. On Tue, Jun 21, 2011 at 9:16 AM, Phil Franken wrote: > I've mapped my home page to "home" usingHybridUrlCodingStrategy. > > Testing with http://www.internetofficer.com/seo-tool/redirect-check/ shows a > 302 redirect for; > > "domain.com" to "domain.com/home.0" > "domain.com/home" to "domain.com/home.1" > > Google does not like the redirect and is reporting a redirect error in > Webmaster Tools. Google will not follow the page with a redirect and wants > a direct link in sitemap.xml. Well with HybridUrl I'm not sure this is > possible because it will redirect to the numbered version, home.0, home.1, > etc... > > I'm thinking of switching to a BookmarkablePage mount to solve this issue, > but the home page has ajax controls and I'd prefer to support the browser > back button without the cache control fix for ajax. Any other suggestions? > -- 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
HybridUrlCodingStrategy SEO
I've mapped my home page to "home" usingHybridUrlCodingStrategy. Testing with http://www.internetofficer.com/seo-tool/redirect-check/ shows a 302 redirect for; "domain.com" to "domain.com/home.0" "domain.com/home" to "domain.com/home.1" Google does not like the redirect and is reporting a redirect error in Webmaster Tools. Google will not follow the page with a redirect and wants a direct link in sitemap.xml. Well with HybridUrl I'm not sure this is possible because it will redirect to the numbered version, home.0, home.1, etc... I'm thinking of switching to a BookmarkablePage mount to solve this issue, but the home page has ajax controls and I'd prefer to support the browser back button without the cache control fix for ajax. Any other suggestions?
Re: streaming files with wicket
i dont think there is a way once you start streaming with an attachment header... you can try rendering the page into memory and writing that out instead - so then you at least know your page rendered ok. -igor On Mon, Jun 20, 2011 at 1:50 PM, Douglas Ferguson wrote: > I built a page with markup type = xml and set the content type and > disposition so that the file will download. > > This is great except when there is a fatal exception thrown, my error page is > getting written to the downloaded file. > > Any ideas how make the browser load the error page? > > Only thought I had was to stream the file to disc and then send A) stream to > browser if there is no exception or B) forward to error page. > But that kinda sucks as it is not truing streaming back to browser. > > 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
streaming files with wicket
I built a page with markup type = xml and set the content type and disposition so that the file will download. This is great except when there is a fatal exception thrown, my error page is getting written to the downloaded file. Any ideas how make the browser load the error page? Only thought I had was to stream the file to disc and then send A) stream to browser if there is no exception or B) forward to error page. But that kinda sucks as it is not truing streaming back to browser. D/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: models and autoCompleteTextField
See AjaxFormComponentUpdatingBehavior. Sven -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/models-and-autoCompleteTextField-tp3612033p3612245.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: models and autoCompleteTextField
Thanks, Is it bad practice to manually call the model's setObject method if I want to change it on a non-form-submit action? Bottom line is I don't need this autoCompleteTextField to be in a form. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/models-and-autoCompleteTextField-tp3612033p3612201.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: models and autoCompleteTextField
what in the wicket framework causes setObject to be called on a component's model so that it changes? Normally each form component updates its model on form submit. Note that in the example a |AjaxFormSubmitBehavior"||onchange" ||is added to the field, thus the model is update|d on each change. Hope this helps Sven On 06/20/2011 07:59 PM, wmike1...@gmail.com wrote: I'm missing some fundamental concept here I think. I've got an AutoCompleteTextField whose model I put as the same kind as in the example found here: http://wicketstuff.org/wicket14/ajax/autocomplete.0;jsessionid=635817B09A5AC9E57C5553053D9C090F?wicket:bookmarkablePage=sources:org.apache.wicket.examples.source.SourcesPage&SourcesPage_class=org.apache.wicket.examples.ajax.builtin.AutoCompletePage Wicket Ajax Examples On the left column, click "AutoCompletePage.java" if you want to see the code I'm referencing. They are just using the Model class as the TextField's model, passing in a string to it. They then set a label's model to be autoComplete.getDefaultModel so that whatever the autoCompleteTextField's model is, the label's model also is. I did just this in my program, but the autoCompleteTextField's model and thus my label's model is not changing when I type something into the field. So my question is, what in the wicket framework causes setObject to be called on a component's model so that it changes? Is that up to us to determine? If that's so, how does the example code above use a regular old Model without overriding get/setObject and still manage to change the model to reflect what's typed in? Here that example code http://wicketstuff.org/wicket14/ajax/autocomplete.0 in action Thanks, Mike -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/models-and-autoCompleteTextField-tp3612033p3612033.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
models and autoCompleteTextField
I'm missing some fundamental concept here I think. I've got an AutoCompleteTextField whose model I put as the same kind as in the example found here: http://wicketstuff.org/wicket14/ajax/autocomplete.0;jsessionid=635817B09A5AC9E57C5553053D9C090F?wicket:bookmarkablePage=sources:org.apache.wicket.examples.source.SourcesPage&SourcesPage_class=org.apache.wicket.examples.ajax.builtin.AutoCompletePage Wicket Ajax Examples On the left column, click "AutoCompletePage.java" if you want to see the code I'm referencing. They are just using the Model class as the TextField's model, passing in a string to it. They then set a label's model to be autoComplete.getDefaultModel so that whatever the autoCompleteTextField's model is, the label's model also is. I did just this in my program, but the autoCompleteTextField's model and thus my label's model is not changing when I type something into the field. So my question is, what in the wicket framework causes setObject to be called on a component's model so that it changes? Is that up to us to determine? If that's so, how does the example code above use a regular old Model without overriding get/setObject and still manage to change the model to reflect what's typed in? Here that example code http://wicketstuff.org/wicket14/ajax/autocomplete.0 in action Thanks, Mike -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/models-and-autoCompleteTextField-tp3612033p3612033.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
Debugging page expired exception errors
I get two pageexpiredexception errors and I can't recreate the problem. With an error like this, what would cause this type of page expired exception error? Do you think that the page actually expired? Or is there something wrong with writing or reading from the page map file on disk. ERROR ONE: 2011-05-06 23:21:43,619 ERROR - Cannot find the rendered page in session [pagemap=null,componentPath=2:contentPanelContainer:contentPanel:panel:f ield,versionNumber=0] org.apache.wicket.protocol.http.PageExpiredException: Cannot find the rendered page in session [pagemap=null,componentPath=2:contentPanelContainer:contentPanel:panel:f ield,versionNumber=0] at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequ estCycleProcessor.java:197) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484 ) at org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java: 160) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja va:1146) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap per.java:592) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWr apper.java:525) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3548) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:831 ) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1 478) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:1 33) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminatio n(HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformatio n(HttpInboundLink.java:387) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpIC LReadCallback.java:102) at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallba ck.complete(SSLReadServiceContext.java:1818) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(Ai oReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture. java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFu ture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java :751) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497) ERROR TWO: Request cannot be processed org.apache.wicket.protocol.http.PageExpiredException: Request cannot be processed at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequ estCycleProcessor.java:163) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484 ) at org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java: 160) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja va:1146) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap per.java:592) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWr apper.java:525) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3548) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:831 ) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1 478) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:1 33) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminatio n(HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformatio n(HttpInboundLink.java:387) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpIC LReadCallback.java:102) at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallba ck.complete(SSLReadServiceContext.java:1818) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(Ai oReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture. java:217
Re: component rendering order
components are rendered in the same order they are in markup. how does your component know now if the table is empty or not? -igor On Mon, Jun 20, 2011 at 9:37 AM, Nelson Segura wrote: > On Thu, Jun 16, 2011 at 10:23 PM, Igor Vaynberg > wrote: >> give your component the dataprovider that the datatable has and use >> that to calc visibility. >> >> -igor > > This does not work for me because: > > a) my pages might have multiple providers, and each one of them might > change the state of the header component, depending on data on the > list > b) my header does not know what lists are on the page, as it is > shared between different pages. I might be none, one, or multiple. > c) providers are not the only elements that can cause the header > component to change. > > It seems to me that I need to force the component to be rendered last, > after all the providers/tables have had a change to analyze its data. > > I have worked around this by adding the header component after the > page onBeforeRender(), and then calling the components > onBeforeRender(), like this > > BasePage.java > > public void onBeforeRender() { > super.onBeforeRender(); > addOrReplace(new MyComponent()); > component.onBeforeRender() > } > > It is not pretty, but I dont know other way to force a change in the > rendering sequence of the components. > > -Nelson > > >> >> On Thu, Jun 16, 2011 at 9:22 PM, Nelson Segura wrote: >>> I might mention that I am still using a version of wicket where >>> onConfigure is not available,and we are not due to upgrade until after >>> I need to finish this component. >>> -Nelson >>> >>> On Thu, Jun 16, 2011 at 9:21 PM, Nelson Segura wrote: Is there a way to force components to be rendered in different order than in which they were added? I have the following dilemma: I have component on the header of my pages whose behavior (visibility/content) depends on the results displayed in a data table. Since the header of my pages is added in the base page, before the tables are added, and the results are only known during the rendering of the rows, I have no access to the information I need. Is there any pattern solutions you guys can suggest for solving these type of problems? Help is greatly appreciated. -Nelson >>> >>> - >>> 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: Preserving user input on ajax changes
I forgot to reply to this. Your observations are absolutely correct. I realized that I was using the ListView incorrectly, and recreating it on each refresh. No wonder I was losing my values. Now it works like a charm. Thanks. -Nelson On Mon, Jun 6, 2011 at 1:29 PM, Pedro Santos wrote: > Hi Nelson, ListView recreate its items every render, so it looses > their raw input. You can set reuse items flag - ListView.setReuseItems > and prevent this problem. Also notify the list view about changes in > the list to make it recreate its items by invoking ListView#removeAll > > Also you may want to read an article about this problem and another > solution: > http://wicketinaction.com/2008/10/building-a-listeditor-form-component/ > > About the rejected message, try to send the message as plain text > rather than HTML, it gives you a better span score. > > On Mon, Jun 6, 2011 at 5:06 PM, Nelson Segura wrote: >> I think that my problem is that I am not reusing the models/ recreating >> models on refresh. Is that a possible cause? >> >> I have ListView that display the data, and the list itself is dynamic, >> depending on what the users selects (that is the reason I need to refresh >> the whole form) >> I noticed input outside the ListView preserves the input, so It is very >> possible that is my problem. >> >> Should I try another type of repeater? I am looking at the refreshing view >> instead. >> >> (for some reason my previous two responses were rejected by the list server) >> >> -Nelson >> >> On Thu, Jun 2, 2011 at 7:23 PM, Igor Vaynberg >> wrote: >>> >>> default processing = false means do not validate, etc. but, inputs are >>> preserved. make sure your ajaxsubmitlink is inside the correct form. >>> you can specify one in its constructor. >>> >>> -igor >>> >>> On Thu, Jun 2, 2011 at 4:22 PM, Nelson Segura wrote: >>> > On the AjaxSubmitLink, correct? >>> > When I do that, the input of the other fields is lost (which has not been >>> > previously submitted). >>> > How does wicket exactly decides whether to show the model value or the >>> > user >>> > raw input? >>> > My Ajax links is refreshing the whole panel. >>> > -Nelson >>> > >>> > >>> > On Thu, Jun 2, 2011 at 4:14 PM, Igor Vaynberg >>> > wrote: >>> > >>> >> you want setDefaultFormProcessing(false) >>> >> >>> >> -igor >>> >> >>> >> On Thu, Jun 2, 2011 at 3:41 PM, Nelson Segura wrote: >>> >> > I have a form to which I need to add dynamic fields using ajax, >>> >> > whenever >>> >> the >>> >> > user clicks on the "add new input" link. >>> >> > I need to preserve the current user input, without actually updating >>> >> > the >>> >> > backing models (or at least preserve input that is not completely >>> >> > valid, >>> >> or >>> >> > do not show errors if the user as not entered a required field) >>> >> > >>> >> > I am using an AjaxSubmitLink to submit the current user input, but >>> >> > >>> >> > (a) I am not able to preserve the input (if I use >>> >> > setDefaultFormProcessing(true)) >>> >> > (b) I get validation errors, or lose invalid input if I try to mock >>> >> > with >>> >> the >>> >> > onError() method of the AjaxSubmitLink >>> >> > >>> >> > What is the correct way to do this? >>> >> > >>> >> > -Nelson >>> >> > >>> >> >>> >> - >>> >> 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 >> >> > > > > -- > Pedro Henrique Oliveira dos Santos > > - > 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: component rendering order
On Thu, Jun 16, 2011 at 10:23 PM, Igor Vaynberg wrote: > give your component the dataprovider that the datatable has and use > that to calc visibility. > > -igor This does not work for me because: a) my pages might have multiple providers, and each one of them might change the state of the header component, depending on data on the list b) my header does not know what lists are on the page, as it is shared between different pages. I might be none, one, or multiple. c) providers are not the only elements that can cause the header component to change. It seems to me that I need to force the component to be rendered last, after all the providers/tables have had a change to analyze its data. I have worked around this by adding the header component after the page onBeforeRender(), and then calling the components onBeforeRender(), like this BasePage.java public void onBeforeRender() { super.onBeforeRender(); addOrReplace(new MyComponent()); component.onBeforeRender() } It is not pretty, but I dont know other way to force a change in the rendering sequence of the components. -Nelson > > On Thu, Jun 16, 2011 at 9:22 PM, Nelson Segura wrote: >> I might mention that I am still using a version of wicket where >> onConfigure is not available,and we are not due to upgrade until after >> I need to finish this component. >> -Nelson >> >> On Thu, Jun 16, 2011 at 9:21 PM, Nelson Segura wrote: >>> Is there a way to force components to be rendered in different order >>> than in which they were added? >>> I have the following dilemma: >>> >>> I have component on the header of my pages whose behavior >>> (visibility/content) depends on the results displayed in a data table. >>> Since the header of my pages is added in the base page, before the >>> tables are added, and the results are only known during the rendering >>> of the rows, I have no access to the information I need. >>> >>> Is there any pattern solutions you guys can suggest for solving these >>> type of problems? >>> >>> Help is greatly appreciated. >>> >>> -Nelson >>> >> >> - >> 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: Replacement of a markup container with nested components by a panel / fragment
wicket traverses the hierarchy and renders all the tags. if you have a tag with wicket:id in markup you must have it in java. -igor On Mon, Jun 20, 2011 at 8:10 AM, pasto wrote: > Thank you, for your replay. I understand your point, but is it really > necessary to have it rendered? What I was doing, was a component > replace. I just had the feeling, that the important part, is to have a > strict binding between components and markup files and not to restrict > the developer to manipulate which component is displayed where. But I > might be wrong, of course... it might be more important, f.e. to know, > that there is some markup, that hasn't been rendered... > > Peter. > > > On Mon, Jun 20, 2011 at 4:29 PM, Igor Vaynberg-2 [via Apache Wicket] > wrote: >> if you have >> >> and you attach a panel to "foo" who is going to render "bar"? >> >> -igor >> >> >> On Sun, Jun 19, 2011 at 6:42 AM, pasto <[hidden email]> wrote: >>> Hi, >>> >>> I guess, this is the same question as the 'WICKET-1190' issue. >>> >>> Extending AjaxLazyLoadPanel and overriding the xhtml markup file and the >>> getLoadingComponent method causes, as soon as there is a child component >>> in >>> the 'content' component, "Close tag not found for tag" exception. >>> >>> >> "http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";> >>> >>> /static/img/small-ajax-loader.gif >>> >>> >>> >>> The reason is a check in the >>> 'AbstractMarkupSourcingStrategy.onComponentTagBody' method: >>> >>> if (markupStream.getPreviousTag().isOpen()) >>> { >>> markupStream.skipRawMarkup(); >>> if (markupStream.get().closes(openTag) == false) >>> { >>> throw new MarkupException(markupStream, "Close tag not >>> found for tag: " + >>> openTag.toString() + ". Component: " + >>> component.toString()); >>> } >>> } >>> >>> Changing it to: >>> >>> if (markupStream.getPreviousTag().isOpen()) >>> { >>> markupStream.skipToMatchingCloseTag(markupStream.getPreviousTag()); >>> } >>> >>> seems to work fine. >>> >>> Is there a reason to not allow replacement of a markup container with >>> nested >>> components by a panel / fragment? I think, that the definition of >>> alternative panels (e.g. lazy load panels) would be easier. >>> >>> Just being curious... >>> >>> Peter. >>> >>> -- >>> View this message in context: >>> http://apache-wicket.1842946.n4.nabble.com/Replacement-of-a-markup-container-with-nested-components-by-a-panel-fragment-tp3609276p3609276.html >>> Sent from the Users forum mailing list archive at Nabble.com. >>> >>> - >>> To unsubscribe, e-mail: [hidden email] >>> For additional commands, e-mail: [hidden email] >>> >>> >> - >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> >> >> >> >> If you reply to this email, your message will be added to the discussion >> below: >> http://apache-wicket.1842946.n4.nabble.com/Replacement-of-a-markup-container-with-nested-components-by-a-panel-fragment-tp3609276p3611541.html >> To unsubscribe from Replacement of a markup container with nested components >> by a panel / fragment, click here. > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Replacement-of-a-markup-container-with-nested-components-by-a-panel-fragment-tp3609276p3611639.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: Replacement of a markup container with nested components by a panel / fragment
Thank you, for your replay. I understand your point, but is it really necessary to have it rendered? What I was doing, was a component replace. I just had the feeling, that the important part, is to have a strict binding between components and markup files and not to restrict the developer to manipulate which component is displayed where. But I might be wrong, of course... it might be more important, f.e. to know, that there is some markup, that hasn't been rendered... Peter. On Mon, Jun 20, 2011 at 4:29 PM, Igor Vaynberg-2 [via Apache Wicket] wrote: > if you have > > and you attach a panel to "foo" who is going to render "bar"? > > -igor > > > On Sun, Jun 19, 2011 at 6:42 AM, pasto <[hidden email]> wrote: >> Hi, >> >> I guess, this is the same question as the 'WICKET-1190' issue. >> >> Extending AjaxLazyLoadPanel and overriding the xhtml markup file and the >> getLoadingComponent method causes, as soon as there is a child component >> in >> the 'content' component, "Close tag not found for tag" exception. >> >> > "http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";> >> >> /static/img/small-ajax-loader.gif >> >> >> >> The reason is a check in the >> 'AbstractMarkupSourcingStrategy.onComponentTagBody' method: >> >> if (markupStream.getPreviousTag().isOpen()) >> { >> markupStream.skipRawMarkup(); >> if (markupStream.get().closes(openTag) == false) >> { >> throw new MarkupException(markupStream, "Close tag not >> found for tag: " + >> openTag.toString() + ". Component: " + >> component.toString()); >> } >> } >> >> Changing it to: >> >> if (markupStream.getPreviousTag().isOpen()) >> { >> markupStream.skipToMatchingCloseTag(markupStream.getPreviousTag()); >> } >> >> seems to work fine. >> >> Is there a reason to not allow replacement of a markup container with >> nested >> components by a panel / fragment? I think, that the definition of >> alternative panels (e.g. lazy load panels) would be easier. >> >> Just being curious... >> >> Peter. >> >> -- >> View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/Replacement-of-a-markup-container-with-nested-components-by-a-panel-fragment-tp3609276p3609276.html >> Sent from the Users forum mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> >> > - > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > > > > If you reply to this email, your message will be added to the discussion > below: > http://apache-wicket.1842946.n4.nabble.com/Replacement-of-a-markup-container-with-nested-components-by-a-panel-fragment-tp3609276p3611541.html > To unsubscribe from Replacement of a markup container with nested components > by a panel / fragment, click here. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Replacement-of-a-markup-container-with-nested-components-by-a-panel-fragment-tp3609276p3611639.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: Replacement of a markup container with nested components by a panel / fragment
if you have and you attach a panel to "foo" who is going to render "bar"? -igor On Sun, Jun 19, 2011 at 6:42 AM, pasto wrote: > Hi, > > I guess, this is the same question as the 'WICKET-1190' issue. > > Extending AjaxLazyLoadPanel and overriding the xhtml markup file and the > getLoadingComponent method causes, as soon as there is a child component in > the 'content' component, "Close tag not found for tag" exception. > > "http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";> > > /static/img/small-ajax-loader.gif > > > > The reason is a check in the > 'AbstractMarkupSourcingStrategy.onComponentTagBody' method: > > if (markupStream.getPreviousTag().isOpen()) > { > markupStream.skipRawMarkup(); > if (markupStream.get().closes(openTag) == false) > { > throw new MarkupException(markupStream, "Close tag not found > for tag: " + > openTag.toString() + ". Component: " + > component.toString()); > } > } > > Changing it to: > > if (markupStream.getPreviousTag().isOpen()) > { > markupStream.skipToMatchingCloseTag(markupStream.getPreviousTag()); > } > > seems to work fine. > > Is there a reason to not allow replacement of a markup container with nested > components by a panel / fragment? I think, that the definition of > alternative panels (e.g. lazy load panels) would be easier. > > Just being curious... > > Peter. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Replacement-of-a-markup-container-with-nested-components-by-a-panel-fragment-tp3609276p3609276.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: Forms across multiple panels
> How can one perform form field validation if the form fields are inside the > panels contained in the forms? Extend FormComponentPanel instead of Panel. That deals with the nesting. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Forms across multiple panels
I know this thread hasn't been active for a while but I thought I'd ask. How can one perform form field validation if the form fields are inside the panels contained in the forms? The form itself will not now what fields are contained in the panels. Thanks in advance, Lucas -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Forms-across-multiple-panels-tp2067607p3611293.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: Locating StackOverflowErrors
Interesting idea, but I'm pretty sure we get a cyclic reference somewhere. (I'm basing that on the stacktrace below) which has been somewhat edited for brevity: [org.apache.wicket.Session] - Exception when detaching/serializing page java.lang.StackOverflowError ... at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ... org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:121) at java.io.ObjectOutputStream.writeObject(Unknown Source) at org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1124) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageStore.java:203) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.prepareForSerialization(DiskPageStore.java:1190) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.writeObject(SecondLevelCacheSessionStore.java:390) ... at org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:121) ... rince & repeat, until Wicket has had enough. /Robert On 06/20/2011 01:01 PM, Martijn Dashorst wrote: Note that you can increase the max stack size, which sometimes too low for given component structures. We run with the default for 64 bit machines on our production boxes (-Xss1024k), but that is specific to and sufficient for our application. Your application might just push that boundary. You might want to try to double the size and see how that works out. If you still see those errors, then you might have an infinite loop somewhere... From http://www.oracle.com/technetwork/java/hotspotfaq-138619.html#threads_oom: My application has a lot of threads and is running out of memory, why? You may be running into a problem with the default stack size for threads. In Java SE 6, the default on Sparc is 512k in the 32-bit VM, and 1024k in the 64-bit VM. On x86 Solaris/Linux it is 320k in the 32-bit VM and 1024k in the 64-bit VM. On Windows, the default thread stack size is read from the binary (java.exe). As of Java SE 6, this value is 320k in the 32-bit VM and 1024k in the 64-bit VM. You can reduce your stack size by running with the -Xss option. For example: java -server -Xss64k Note that on some versions of Windows, the OS may round up thread stack sizes using very coarse granularity. If the requested size is less than the default size by 1K or more, the stack size is rounded up to the default; otherwise, the stack size is rounded up to a multiple of 1 MB. 64k is the least amount of stack space allowed per thread. Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Locating StackOverflowErrors
Besides me not being able to figure where we have done the wrong thing I don't have a problem with the serialization in Wicket 1.4 :) Regards Robert On 06/20/2011 11:40 AM, Martin Grigorov wrote: Hi, Wicket uses Java Serialization to do this. So the question is: What are the do not's of Java Serialization ? In Wicket 1.5 this is plugable so you can use something else than Java Serialization (still the default impl). Schema-less serialization frameworks like Kryo and XStream is quite easy. Schema ones like Apache Avro, Thrift, Protobuf, etc. are harder but not impossible. At https://github.com/wicketstuff/core/tree/master/jdk-1.5-parent/serializer-kryo you can see such implementation based on http://code.google.com/p/kryo/ . It is a new project so maybe there are bugs and places for improvement. 2011/6/20 Robert Dahlström: Hi, I've been trying for some time now to localize a somewhat random stackoverflow error. I've done an overhaul of the code and am now convinced we no longer have any reference to the session object but we still get StackOverflowErrors during page serialization. This has probably been covered before (I seem to remember a link to some of the most common errors but could not find it again). Any pointers would be greatly appreciated. I guess this could be rephrased to: What are the do not's of Wicket? Regards Robert - 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: Locating StackOverflowErrors
Note that you can increase the max stack size, which sometimes too low for given component structures. We run with the default for 64 bit machines on our production boxes (-Xss1024k), but that is specific to and sufficient for our application. Your application might just push that boundary. You might want to try to double the size and see how that works out. If you still see those errors, then you might have an infinite loop somewhere... >From >http://www.oracle.com/technetwork/java/hotspotfaq-138619.html#threads_oom: My application has a lot of threads and is running out of memory, why? You may be running into a problem with the default stack size for threads. In Java SE 6, the default on Sparc is 512k in the 32-bit VM, and 1024k in the 64-bit VM. On x86 Solaris/Linux it is 320k in the 32-bit VM and 1024k in the 64-bit VM. On Windows, the default thread stack size is read from the binary (java.exe). As of Java SE 6, this value is 320k in the 32-bit VM and 1024k in the 64-bit VM. You can reduce your stack size by running with the -Xss option. For example: java -server -Xss64k Note that on some versions of Windows, the OS may round up thread stack sizes using very coarse granularity. If the requested size is less than the default size by 1K or more, the stack size is rounded up to the default; otherwise, the stack size is rounded up to a multiple of 1 MB. 64k is the least amount of stack space allowed per thread. Martijn -- 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: Locating StackOverflowErrors
No, we should not have any references to the session in models. Thanks Robert On 06/20/2011 11:43 AM, Serban.Balamaci wrote: Hello, Are you perhaps using your WebSession in a PropertyModel? like new PropertyModel(getSession(), "username") for example? This way the web session might get serialized. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Locating-StackOverflowErrors-tp3610868p3610903.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: Locating StackOverflowErrors
Hello, Are you perhaps using your WebSession in a PropertyModel? like new PropertyModel(getSession(), "username") for example? This way the web session might get serialized. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Locating-StackOverflowErrors-tp3610868p3610903.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: Internal error parsing wicket:interface
Hi! 1. Again: without this row or you get double effect: ((org.mortbay.jetty.Request) ((WebRequest) getRequest()).getHttpServletRequest()).setServletPath(contextPath); 2011/6/20 Martin Grigorov : 2. > I'm not YUI user but I think YUILoader has something like baseUrl, so > configuring it will prevent errors like this, i.e. it will not confuse > with indexed params as part of the path. I tried something like that but it seems to have its own magic to deduce the url... basePath is set automatically by DatePicker. I tried setting absolute url there but did not help. 3. > The code below should probably be in HttpServletRequestWrapper. This > way it will work in Tomcat too. Hmm.. you mean javax.servlet.HttpServletRequestWrapper ? ** Martin > > On Mon, Jun 20, 2011 at 12:13 PM, Martin Makundi > wrote: >> Hi! >> >> Actually to make it work (indestad of just suppressing the error on >> serverside) do this: >> >> protected void onBeginRequest() { >> { >> final String interfaceParameter = getRequest().getPath(); >> if ((!Utils.isEmpty(interfaceParameter)) && >> interfaceParameter.contains(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME >> + "/" + WebRequestCodingStrategy.RESOURCES_PATH_PREFIX)) { >> final int resourcePathIndex = >> interfaceParameter.indexOf(WebRequestCodingStrategy.RESOURCES_PATH_PREFIX); >> /* >> * http://web.archiveorange.com/archive/v/yH01cximWIUPZlAGlPPF >> */ >> final String contextPath = interfaceParameter.substring(0, >> resourcePathIndex); >> ((org.mortbay.jetty.Request) ((WebRequest) >> getRequest()).getHttpServletRequest()).setContextPath(contextPath); >> ((org.mortbay.jetty.Request) ((WebRequest) >> getRequest()).getHttpServletRequest()).setServletPath(contextPath); >> } >> } >> ... >> >> >> I saw similar things done in ServletHandler.. I wonder if I should >> have that configured on? My web.xml just configures the WicketServlet >> and nothing more. Is that ok? >> >> ** >> Martin >> >> >> 2011/6/20 Martin Makundi : >>> Hi! >>> >>> This: http://web.archiveorange.com/archive/v/yH01cximWIUPZlAGlPPF >>> >>> It appears to be a YUI bug. YUILoader probably mistakes bookmarkable >>> url slashes /login/wicket:interface/... as real paths. For some reason >>> it tries to fetch resources from same url appending >>> /login/wicket:interface/resources. which causes the error >>> especially after some ajax requests on such a bookmarkable page. >>> >>> >>> 1. Workaround, for example by overriding RequestCycle.onbeginrequest: >>> >>> protected void onBeginRequest() { >>> { >>> final String interfaceParameter = >>> getRequest().getRequestParameters().getPath(); >>> if ((!Utils.isEmpty(interfaceParameter)) && >>> interfaceParameter.contains(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME >>> + "/" + WebRequestCodingStrategy.RESOURCES_PATH_PREFIX)) { >>> /* >>> * http://web.archiveorange.com/archive/v/yH01cximWIUPZlAGlPPF >>> */ >>> >>> getRequest().getRequestParameters().setPath(interfaceParameter.substring(interfaceParameter.indexOf(WebRequestCodingStrategy.RESOURCES_PATH_PREFIX))); >>> } >>> } >>> ... >>> >>> 2. I think this could/should also be fixed/workaroudn in >>> AbstractRequestTargetUrlCodingStrategy.decodeParameters >>> out-of-the-box. (1.4.x) >>> >>> ** >>> Martin >>> >> >> - >> 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 > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Locating StackOverflowErrors
Hi, Wicket uses Java Serialization to do this. So the question is: What are the do not's of Java Serialization ? In Wicket 1.5 this is plugable so you can use something else than Java Serialization (still the default impl). Schema-less serialization frameworks like Kryo and XStream is quite easy. Schema ones like Apache Avro, Thrift, Protobuf, etc. are harder but not impossible. At https://github.com/wicketstuff/core/tree/master/jdk-1.5-parent/serializer-kryo you can see such implementation based on http://code.google.com/p/kryo/ . It is a new project so maybe there are bugs and places for improvement. 2011/6/20 Robert Dahlström : > Hi, I've been trying for some time now to localize a somewhat random > stackoverflow error. I've done an overhaul of the code and am now convinced > we no longer have any reference to the session object but we still get > StackOverflowErrors during page serialization. > > This has probably been covered before (I seem to remember a link to some of > the most common errors but could not find it again). > > Any pointers would be greatly appreciated. > > I guess this could be rephrased to: What are the do not's of Wicket? > > Regards > Robert > > - > 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
Locating StackOverflowErrors
Hi, I've been trying for some time now to localize a somewhat random stackoverflow error. I've done an overhaul of the code and am now convinced we no longer have any reference to the session object but we still get StackOverflowErrors during page serialization. This has probably been covered before (I seem to remember a link to some of the most common errors but could not find it again). Any pointers would be greatly appreciated. I guess this could be rephrased to: What are the do not's of Wicket? Regards Robert - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Internal error parsing wicket:interface
Hi, I'm not YUI user but I think YUILoader has something like baseUrl, so configuring it will prevent errors like this, i.e. it will not confuse with indexed params as part of the path. The code below should probably be in HttpServletRequestWrapper. This way it will work in Tomcat too. On Mon, Jun 20, 2011 at 12:13 PM, Martin Makundi wrote: > Hi! > > Actually to make it work (indestad of just suppressing the error on > serverside) do this: > > protected void onBeginRequest() { > { > final String interfaceParameter = getRequest().getPath(); > if ((!Utils.isEmpty(interfaceParameter)) && > interfaceParameter.contains(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME > + "/" + WebRequestCodingStrategy.RESOURCES_PATH_PREFIX)) { > final int resourcePathIndex = > interfaceParameter.indexOf(WebRequestCodingStrategy.RESOURCES_PATH_PREFIX); > /* > * http://web.archiveorange.com/archive/v/yH01cximWIUPZlAGlPPF > */ > final String contextPath = interfaceParameter.substring(0, > resourcePathIndex); > ((org.mortbay.jetty.Request) ((WebRequest) > getRequest()).getHttpServletRequest()).setContextPath(contextPath); > ((org.mortbay.jetty.Request) ((WebRequest) > getRequest()).getHttpServletRequest()).setServletPath(contextPath); > } > } > ... > > > I saw similar things done in ServletHandler.. I wonder if I should > have that configured on? My web.xml just configures the WicketServlet > and nothing more. Is that ok? > > ** > Martin > > > 2011/6/20 Martin Makundi : >> Hi! >> >> This: http://web.archiveorange.com/archive/v/yH01cximWIUPZlAGlPPF >> >> It appears to be a YUI bug. YUILoader probably mistakes bookmarkable >> url slashes /login/wicket:interface/... as real paths. For some reason >> it tries to fetch resources from same url appending >> /login/wicket:interface/resources. which causes the error >> especially after some ajax requests on such a bookmarkable page. >> >> >> 1. Workaround, for example by overriding RequestCycle.onbeginrequest: >> >> protected void onBeginRequest() { >> { >> final String interfaceParameter = >> getRequest().getRequestParameters().getPath(); >> if ((!Utils.isEmpty(interfaceParameter)) && >> interfaceParameter.contains(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME >> + "/" + WebRequestCodingStrategy.RESOURCES_PATH_PREFIX)) { >> /* >> * http://web.archiveorange.com/archive/v/yH01cximWIUPZlAGlPPF >> */ >> >> getRequest().getRequestParameters().setPath(interfaceParameter.substring(interfaceParameter.indexOf(WebRequestCodingStrategy.RESOURCES_PATH_PREFIX))); >> } >> } >> ... >> >> 2. I think this could/should also be fixed/workaroudn in >> AbstractRequestTargetUrlCodingStrategy.decodeParameters >> out-of-the-box. (1.4.x) >> >> ** >> Martin >> > > - > 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
Re: Internal error parsing wicket:interface
Hi! Actually to make it work (indestad of just suppressing the error on serverside) do this: protected void onBeginRequest() { { final String interfaceParameter = getRequest().getPath(); if ((!Utils.isEmpty(interfaceParameter)) && interfaceParameter.contains(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME + "/" + WebRequestCodingStrategy.RESOURCES_PATH_PREFIX)) { final int resourcePathIndex = interfaceParameter.indexOf(WebRequestCodingStrategy.RESOURCES_PATH_PREFIX); /* * http://web.archiveorange.com/archive/v/yH01cximWIUPZlAGlPPF */ final String contextPath = interfaceParameter.substring(0, resourcePathIndex); ((org.mortbay.jetty.Request) ((WebRequest) getRequest()).getHttpServletRequest()).setContextPath(contextPath); ((org.mortbay.jetty.Request) ((WebRequest) getRequest()).getHttpServletRequest()).setServletPath(contextPath); } } ... I saw similar things done in ServletHandler.. I wonder if I should have that configured on? My web.xml just configures the WicketServlet and nothing more. Is that ok? ** Martin 2011/6/20 Martin Makundi : > Hi! > > This: http://web.archiveorange.com/archive/v/yH01cximWIUPZlAGlPPF > > It appears to be a YUI bug. YUILoader probably mistakes bookmarkable > url slashes /login/wicket:interface/... as real paths. For some reason > it tries to fetch resources from same url appending > /login/wicket:interface/resources. which causes the error > especially after some ajax requests on such a bookmarkable page. > > > 1. Workaround, for example by overriding RequestCycle.onbeginrequest: > > protected void onBeginRequest() { > { > final String interfaceParameter = > getRequest().getRequestParameters().getPath(); > if ((!Utils.isEmpty(interfaceParameter)) && > interfaceParameter.contains(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME > + "/" + WebRequestCodingStrategy.RESOURCES_PATH_PREFIX)) { > /* > * http://web.archiveorange.com/archive/v/yH01cximWIUPZlAGlPPF > */ > > getRequest().getRequestParameters().setPath(interfaceParameter.substring(interfaceParameter.indexOf(WebRequestCodingStrategy.RESOURCES_PATH_PREFIX))); > } > } > ... > > 2. I think this could/should also be fixed/workaroudn in > AbstractRequestTargetUrlCodingStrategy.decodeParameters > out-of-the-box. (1.4.x) > > ** > Martin > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Internal error parsing wicket:interface
Hi! This: http://web.archiveorange.com/archive/v/yH01cximWIUPZlAGlPPF It appears to be a YUI bug. YUILoader probably mistakes bookmarkable url slashes /login/wicket:interface/... as real paths. For some reason it tries to fetch resources from same url appending /login/wicket:interface/resources. which causes the error especially after some ajax requests on such a bookmarkable page. 1. Workaround, for example by overriding RequestCycle.onbeginrequest: protected void onBeginRequest() { { final String interfaceParameter = getRequest().getRequestParameters().getPath(); if ((!Utils.isEmpty(interfaceParameter)) && interfaceParameter.contains(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME + "/" + WebRequestCodingStrategy.RESOURCES_PATH_PREFIX)) { /* * http://web.archiveorange.com/archive/v/yH01cximWIUPZlAGlPPF */ getRequest().getRequestParameters().setPath(interfaceParameter.substring(interfaceParameter.indexOf(WebRequestCodingStrategy.RESOURCES_PATH_PREFIX))); } } ... 2. I think this could/should also be fixed/workaroudn in AbstractRequestTargetUrlCodingStrategy.decodeParameters out-of-the-box. (1.4.x) ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Force modal page to reload on Ajax event
read the javadoc of this method. try it and come back here with further questions using Ajax to reload the whole page is non-sense On Mon, Jun 20, 2011 at 10:25 AM, Alec Swan wrote: > But how do I refresh the page in the modal window by overriding > DropDownChoice.wantOnSelectionChangedNotifications()? Where do I get > the handle to AjaxRequestTarget? > > On Mon, Jun 20, 2011 at 12:25 AM, Martin Grigorov > wrote: >> Don't use AjaxFormComponentUpdatingBehavior but use >> DropDownChoice.wantOnSelectionChangedNotifications() instead. >> >> On Mon, Jun 20, 2011 at 8:28 AM, Alec Swan wrote: >>> Hello, >>> >>> I have a modal window which displays a page (using >>> ModalWindow.PageCreator()) with a DropDownChoice with >>> AjaxFormComponentUpdatingBehavior("onchange") behavior. I need the >>> page in the modal window to reload when the user makes a selection in >>> the DropDownChoice. I tried calling modelChanged() in >>> AjaxFormComponentUpdatingBehavior#onUpdate(), but that didn't force >>> the page in the modal window to reload. >>> >>> How can I accomplish this? >>> >>> Thanks, >>> >>> Alec >>> >>> - >>> 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 >> >> > > - > 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
Re: Force modal page to reload on Ajax event
But how do I refresh the page in the modal window by overriding DropDownChoice.wantOnSelectionChangedNotifications()? Where do I get the handle to AjaxRequestTarget? On Mon, Jun 20, 2011 at 12:25 AM, Martin Grigorov wrote: > Don't use AjaxFormComponentUpdatingBehavior but use > DropDownChoice.wantOnSelectionChangedNotifications() instead. > > On Mon, Jun 20, 2011 at 8:28 AM, Alec Swan wrote: >> Hello, >> >> I have a modal window which displays a page (using >> ModalWindow.PageCreator()) with a DropDownChoice with >> AjaxFormComponentUpdatingBehavior("onchange") behavior. I need the >> page in the modal window to reload when the user makes a selection in >> the DropDownChoice. I tried calling modelChanged() in >> AjaxFormComponentUpdatingBehavior#onUpdate(), but that didn't force >> the page in the modal window to reload. >> >> How can I accomplish this? >> >> Thanks, >> >> Alec >> >> - >> 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 > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org