Re: Availability of RequestParameters in WebSession
Hi, This should work. I don't remember any changes in the related code that could have broke it. Please create a quickstart and attach it to a ticket in Jira. Thanks! Martin Grigorov Wicket Training and Consulting On Thu, Apr 3, 2014 at 5:57 AM, Maxim Solodovnik solomax...@gmail.comwrote: Hello All, I'm trying to get RequestParameters in getRoles() method of WebSession extends AbstractAuthenticatedWebSession [1] the code is like this: IRequestParameters params = RequestCycle.get().getRequest().getRequestParameters(); StringValue secureHash = params.getParameterValue(secureHash); I can see URL requested in debugger (UrlRequestParametersAdapter class inside CombinedRequestParametersAdapter) but none of the parameters available. getParameterNames return empty list This code works as expected in 6.13.0 and seems to be broken in 6.14.0 Do I need to change anything or this is bug? Thanks in advance [1] https://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/app/WebSession.java?view=markup -- WBR Maxim aka solomax
Re: Redirecting users to my new pages with a message.
Hi, RedirectPage won't be removed in Wicket 7. IRedirectListener has been removed and RedirectPage now uses the more idiomatic #urlFor() method. Martin Grigorov Wicket Training and Consulting On Thu, Apr 3, 2014 at 6:49 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: There is a RedirectPage that maybe you can use as example (because it will no longer be present at Wicket 7). On Thu, Apr 3, 2014 at 6:32 AM, chathuraka.waas chathuraka.w...@gmail.comwrote: Hi, As a customer request my application domain is changing. and i need to show a popup message box saying that you are being redirected to the new site since some users can bookmark the older url. The application support team has configured both old and new urls to be pointed to the same application instance. Whats the best way to show users a splash screen when a users comes from the old urls and redirect him to the new page. Best Regards, -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirecting-users-to-my-new-pages-with-a-message-tp4665239.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 -- Regards - Ernesto Reinaldo Barreiro
Re: Redirecting users to my new pages with a message.
Hi, On Thu, Apr 3, 2014 at 7:05 AM, chathuraka.waas chathuraka.w...@gmail.comwrote: Hi, Thanks for the reply. I read the api documentation on RedirectPage. my question is how can i intercept the request which was sent from the old url. as an example my old url for login is : http://abc.com/login my new url is: http://def.com/login if both abc.com and def.com are pointed to the same application how can i intercept request coming through abc.com/login and show a message and redirect to def.com/login For this you can create a custom IRequestMapper, set it as root mapper and intercept all requests. When the current request url is old then show a special page that redirects to the new url after some delay. See http://apache-wicket.1842946.n4.nabble.com/mounting-mapping-subdomain-HomePage-td4664880.html#a4664897for inspiration. Regards, -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirecting-users-to-my-new-pages-with-a-message-tp4665239p4665241.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: Redirecting users to my new pages with a message.
Thanks for pointing out the correct information: I know recall the detail of the discussion of the DEVs list. Maybe I should refrain form answering so early in the morning. On Thu, Apr 3, 2014 at 8:46 AM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, RedirectPage won't be removed in Wicket 7. IRedirectListener has been removed and RedirectPage now uses the more idiomatic #urlFor() method. Martin Grigorov Wicket Training and Consulting On Thu, Apr 3, 2014 at 6:49 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: There is a RedirectPage that maybe you can use as example (because it will no longer be present at Wicket 7). On Thu, Apr 3, 2014 at 6:32 AM, chathuraka.waas chathuraka.w...@gmail.comwrote: Hi, As a customer request my application domain is changing. and i need to show a popup message box saying that you are being redirected to the new site since some users can bookmark the older url. The application support team has configured both old and new urls to be pointed to the same application instance. Whats the best way to show users a splash screen when a users comes from the old urls and redirect him to the new page. Best Regards, -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirecting-users-to-my-new-pages-with-a-message-tp4665239.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 -- Regards - Ernesto Reinaldo Barreiro -- Regards - Ernesto Reinaldo Barreiro
Re: ModalWindow and jQuery mousedown binding
Hi, Thanks for sharing your findings ! On Wed, Apr 2, 2014 at 11:20 PM, neilbennett nbenn...@awaremanager.comwrote: Hello again. Thanks for your help, I've found what occurs. When removing onmousedown=Wicket.Event.stop(event); from the w_content_1 div, the event then propagates. However, the mouseDownHandler function is called in the Drag class in wicket-ajax-jquery.js this returns false which then stops further event propagation. Commenting out the return false then allows my component popup window to close. I am not sure why only commenting out the return statement helps. At https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L2410there is another Wicket.Event.stop(event) call that I think also should mess the things up in your case ... So that's the cause, I'm not sure of the best way to work around this. I can crudely remove the bindings/return value, but I'm sure that will break things. Thought I'd report back anyway - if anyone has any suggestions to work around this or what would break/not break from changing this. I am also not aware why this code needs to stop the propagation of the event. Please file a bug in our Jira with a quickstart and I'll try to find out. Thanks, Neil -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-and-jQuery-mousedown-binding-tp4664859p4665236.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: Error handling in IResource implementations?
Hi Martin, yes, I figured that, and some errors (such as can't find metadata) I handle accordingly. However, I get the actual binary content in my #writeData()-implementation, and this is where I don't know how to handle errors. I guess I could get the content beforehand and treat errors like above, if there is no clean way of reporting errors inside #writeData()... Thanks, Martin. Bye Stefan Martin Grigorov wrote: Hi, It is not mandatory to make the second call to the WS in #writeData(). You can make it earlier, as with the metadata. This way you can use response#setError() if needed. Martin Grigorov Wicket Training and Consulting On Wed, Apr 2, 2014 at 3:25 PM, Stefan Renz s.r...@efonds.com wrote: Hi, I'm currently at loss: what would be the correct way signalling that a IResource implementation encountered an error? Here's the case: I have a custom AbstractResource implementation that grabs an object from a WebService. Getting information about the object (metadata and ID) is one call, actually getting the content stream by ID is another. In org.apache.wicket.request.resource.AbstractResource#newResourceResponse I get the metadata, and set the response properties accordingly (time of last modification, content type, etc.). Then, in the anonymous org.apache.wicket.request.resource.AbstractResource.WriteCallback#writeData() I make the call to retrieve the content. And here's the problem: What can I do at this stage to inform the user a problem occured, i.e. by forwarding to an error page (using IExceptionMapper)? Here, the metadata is still present (database), whereas the file content (filesystem) is gone for whatever reason. Thanks for your help, bye Stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- im Auftrag der eFonds Solutions AG, +49-89-579494-3417 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Error handling in IResource implementations?
Hi, I think moving the second WS call out of #writeData() would be the simpler solution. The other solution that I see is to override org.apache.wicket.request.resource.AbstractResource#flushResponseAfterHeaders() with an empty impl and throw org.apache.wicket.request.http.flow.AbortWithHttpErrorCodeException when there is an error in #writeData(). The same is to use RequestCycle.get().scheduleRequestHandlerAfterCurrent(...) Martin Grigorov Wicket Training and Consulting On Thu, Apr 3, 2014 at 10:41 AM, Stefan Renz s.r...@efonds.com wrote: Hi Martin, yes, I figured that, and some errors (such as can't find metadata) I handle accordingly. However, I get the actual binary content in my #writeData()-implementation, and this is where I don't know how to handle errors. I guess I could get the content beforehand and treat errors like above, if there is no clean way of reporting errors inside #writeData()... Thanks, Martin. Bye Stefan Martin Grigorov wrote: Hi, It is not mandatory to make the second call to the WS in #writeData(). You can make it earlier, as with the metadata. This way you can use response#setError() if needed. Martin Grigorov Wicket Training and Consulting On Wed, Apr 2, 2014 at 3:25 PM, Stefan Renz s.r...@efonds.com wrote: Hi, I'm currently at loss: what would be the correct way signalling that a IResource implementation encountered an error? Here's the case: I have a custom AbstractResource implementation that grabs an object from a WebService. Getting information about the object (metadata and ID) is one call, actually getting the content stream by ID is another. In org.apache.wicket.request.resource.AbstractResource#newResourceResponse I get the metadata, and set the response properties accordingly (time of last modification, content type, etc.). Then, in the anonymous org.apache.wicket.request.resource.AbstractResource.WriteCallback#writeData() I make the call to retrieve the content. And here's the problem: What can I do at this stage to inform the user a problem occured, i.e. by forwarding to an error page (using IExceptionMapper)? Here, the metadata is still present (database), whereas the file content (filesystem) is gone for whatever reason. Thanks for your help, bye Stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- im Auftrag der eFonds Solutions AG, +49-89-579494-3417 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Availability of RequestParameters in WebSession
Not reproducible using quickstart :( Will investigate further, sorry for the noise On Thu, Apr 3, 2014 at 1:43 PM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, This should work. I don't remember any changes in the related code that could have broke it. Please create a quickstart and attach it to a ticket in Jira. Thanks! Martin Grigorov Wicket Training and Consulting On Thu, Apr 3, 2014 at 5:57 AM, Maxim Solodovnik solomax...@gmail.com wrote: Hello All, I'm trying to get RequestParameters in getRoles() method of WebSession extends AbstractAuthenticatedWebSession [1] the code is like this: IRequestParameters params = RequestCycle.get().getRequest().getRequestParameters(); StringValue secureHash = params.getParameterValue(secureHash); I can see URL requested in debugger (UrlRequestParametersAdapter class inside CombinedRequestParametersAdapter) but none of the parameters available. getParameterNames return empty list This code works as expected in 6.13.0 and seems to be broken in 6.14.0 Do I need to change anything or this is bug? Thanks in advance [1] https://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/app/WebSession.java?view=markup -- WBR Maxim aka solomax -- WBR Maxim aka solomax
Re: ModalWindow and jQuery mousedown binding
Hi Martin, You are exactly right. The other Wicket.Event.stop(event) does need to be commented out. I've found that while this does allow pop-up's to be closed, it also stops fields taking focus. I will submit a JIRA issue with a quickstart though. Thanks, Neil -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-and-jQuery-mousedown-binding-tp4664859p4665250.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: DOM element not found issue - Ajax response
Hi, In my case, the DOM element is not part of iframe/modal window, its in the current page itself. And the 'id' attribute used by javascript is also part of the same Ajax response. And I am using JQuery to reference this DOM element. What I am doing is. 1. Go to my page 2. Press F5 to refresh my wicket page [unversioned], and wait for the page to load completely. 3. Click on one AjaxLink which replaces another component in the same page. Step#3 here responds markup and Javascript [JQuery script], I see that the 'id' attribute used by JQuery is part of the same Ajax response. But still JQuery fails to find this DOM element. There is another case where I get similar issue. When my application is deployed over network, and is accessed from a different machine [with some network lag]. On the page I've one AjaxLink and Component with Ajax on click behavior added to it. 1. Click on component with ajax on click behavior. 2. Click on AjaxLink, without waiting for the first request to complete. The AjaxLink in both scenarios is the same link, and replaced another component. Thanks, Rakesh.A -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DOM-element-not-found-issue-Ajax-response-tp4665201p4665258.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