RE: Incorrect double slash when jsessionid included in link URL in 6.x
Did you still want me to raise a JIRA issue for this or will you do that? Regards, Chris -Original Message- From: Sven Meier [mailto:s...@meiers.net] Sent: Tuesday, 11 December 2012 8:04 AM To: users@wicket.apache.org Subject: RE: Incorrect double slash when jsessionid included in link URL in 6.x Seems this problem has shown up in one of our applications too :(. I'll have to investigate where this double slash is coming from. Sven -- View this message in context: http://apache- wicket.1842946.n4.nabble.com/Incorrect-double-slash-when-jsessionid- included-in-link-URL-in-6-x-tp4654623p4654673.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: Incorrect double slash when jsessionid included in link URL in 6.x
Please create a JIRA issue, hopefully with some details on how to reproduce it. I'm still trying to figure out what I've done to trigger the double slash :/. Sven On 12/11/2012 09:12 AM, Chris Colman wrote: Did you still want me to raise a JIRA issue for this or will you do that? Regards, Chris -Original Message- From: Sven Meier [mailto:s...@meiers.net] Sent: Tuesday, 11 December 2012 8:04 AM To: users@wicket.apache.org Subject: RE: Incorrect double slash when jsessionid included in link URL in 6.x Seems this problem has shown up in one of our applications too :(. I'll have to investigate where this double slash is coming from. Sven -- View this message in context: http://apache- wicket.1842946.n4.nabble.com/Incorrect-double-slash-when-jsessionid- included-in-link-URL-in-6-x-tp4654623p4654673.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: hot to set Unicoding to UTF-8
Hi, I think to be able to use UTF-8 you have to encode the properties files as XML properties files (otherwise you have to escape characters that cannot be directly represented on ISO 8859-1). On Tue, Dec 11, 2012 at 8:33 AM, oliver.stef ova...@gmail.com wrote: Hi all, When i'm saving my properties file in 'UTF-8' coding, i can't see the correct chars (image 1). but when i'm saving it as displayed if i'm as 'ISO-8859-1' it looks fine (image 2). how can i set wicket to load the properties file to use UTF-8? Thanks! image 1 http://apache-wicket.1842946.n4.nabble.com/file/n4654681/image_1.png image 2 http://apache-wicket.1842946.n4.nabble.com/file/n4654681/image_2.png -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/hot-to-set-Unicoding-to-UTF-8-tp4654681.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 Antilia Soft http://antiliasoft.com/ http://antiliasoft.com/antilia
Re: hot to set Unicoding to UTF-8
IIRC you have to run on Java 6 for that feature. Sven On 12/11/2012 09:36 AM, Ernesto Reinaldo Barreiro wrote: Hi, I think to be able to use UTF-8 you have to encode the properties files as XML properties files (otherwise you have to escape characters that cannot be directly represented on ISO 8859-1). On Tue, Dec 11, 2012 at 8:33 AM, oliver.stef ova...@gmail.com wrote: Hi all, When i'm saving my properties file in 'UTF-8' coding, i can't see the correct chars (image 1). but when i'm saving it as displayed if i'm as 'ISO-8859-1' it looks fine (image 2). how can i set wicket to load the properties file to use UTF-8? Thanks! image 1 http://apache-wicket.1842946.n4.nabble.com/file/n4654681/image_1.png image 2 http://apache-wicket.1842946.n4.nabble.com/file/n4654681/image_2.png -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/hot-to-set-Unicoding-to-UTF-8-tp4654681.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: hot to set Unicoding to UTF-8
Yep! On Tue, Dec 11, 2012 at 9:37 AM, Sven Meier s...@meiers.net wrote: IIRC you have to run on Java 6 for that feature. Sven On 12/11/2012 09:36 AM, Ernesto Reinaldo Barreiro wrote: Hi, I think to be able to use UTF-8 you have to encode the properties files as XML properties files (otherwise you have to escape characters that cannot be directly represented on ISO 8859-1). On Tue, Dec 11, 2012 at 8:33 AM, oliver.stef ova...@gmail.com wrote: Hi all, When i'm saving my properties file in 'UTF-8' coding, i can't see the correct chars (image 1). but when i'm saving it as displayed if i'm as 'ISO-8859-1' it looks fine (image 2). how can i set wicket to load the properties file to use UTF-8? Thanks! image 1 http://apache-wicket.1842946.**n4.nabble.com/file/n4654681/** image_1.pnghttp://apache-wicket.1842946.n4.nabble.com/file/n4654681/image_1.png image 2 http://apache-wicket.1842946.**n4.nabble.com/file/n4654681/** image_2.pnghttp://apache-wicket.1842946.n4.nabble.com/file/n4654681/image_2.png -- View this message in context: http://apache-wicket.1842946.**n4.nabble.com/hot-to-set-** Unicoding-to-UTF-8-tp4654681.**htmlhttp://apache-wicket.1842946.n4.nabble.com/hot-to-set-Unicoding-to-UTF-8-tp4654681.html Sent from the Users forum mailing list archive at Nabble.com. --**--** - To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Regards - Ernesto Reinaldo Barreiro Antilia Soft http://antiliasoft.com/ http://antiliasoft.com/antilia
Re: hot to set Unicoding to UTF-8
On Tue, Dec 11, 2012 at 8:38 AM, Sven Meier s...@meiers.net wrote: Give your file the suffix .utf8.properties. In Wicket 6 you have to use .properties.xml as file extension when using the XML format. The XML format is supported in Wicket 1.5/JDK 1.5 too just the file extension there was just .xml (com.example.MyApp.xml) Sven On 12/11/2012 08:33 AM, oliver.stef wrote: Hi all, When i'm saving my properties file in 'UTF-8' coding, i can't see the correct chars (image 1). but when i'm saving it as displayed if i'm as 'ISO-8859-1' it looks fine (image 2). how can i set wicket to load the properties file to use UTF-8? Thanks! image 1 http://apache-wicket.1842946.**n4.nabble.com/file/n4654681/**image_1.pnghttp://apache-wicket.1842946.n4.nabble.com/file/n4654681/image_1.png image 2 http://apache-wicket.1842946.**n4.nabble.com/file/n4654681/**image_2.pnghttp://apache-wicket.1842946.n4.nabble.com/file/n4654681/image_2.png -- View this message in context: http://apache-wicket.1842946.** n4.nabble.com/hot-to-set-**Unicoding-to-UTF-8-tp4654681.**htmlhttp://apache-wicket.1842946.n4.nabble.com/hot-to-set-Unicoding-to-UTF-8-tp4654681.html Sent from the Users forum mailing list archive at Nabble.com. --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: understanding ajax response
Did the patch solve the issue for you ? On Mon, Dec 10, 2012 at 7:58 PM, saty satya...@gmail.com wrote: Thanks, do you still need a quick start app to look into this, sorry i was occupied in other pressing needs but i can try one if required. On a different note, the problem seem to be only with Firefox 17 and 18, for some reason there are no issues in older versions ( i tested with 12 and 14) for my particular case. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/understanding-ajax-response-tp4654310p4654658.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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: Expiration page not shown in case of back button usage
On Mon, Dec 10, 2012 at 9:04 AM, Rob Sonke r...@tigrou.nl wrote: Last week we fixed an issue with Wicket 6 where mounted pages were being reconstructed after the session expired. That was due to this (new) setting which we set to false now: getPageSettings().setRecreateMountedPagesAfterExpiry(false); This worked perfectly for clicking on (ajax) links but, this doesn't seem to work when I use the back button of the browser after the session expired. What happens is that Wicket tries to reconstruct the previous (mounted bookmarkable) page. But that's failing in our case because we dont support that as every page needs session information. Am I doing something wrong? As I would expect a PageExpiredException in this case. If you need PEE then this is the correct setting. -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Re: hot to set Unicoding to UTF-8
With UtfPropertiesFilePropertiesLoader you can use properties with UTF-8 encoding, no XML involved there. Sven On 12/11/2012 09:42 AM, Martin Grigorov wrote: On Tue, Dec 11, 2012 at 8:38 AM, Sven Meier s...@meiers.net wrote: Give your file the suffix .utf8.properties. In Wicket 6 you have to use .properties.xml as file extension when using the XML format. The XML format is supported in Wicket 1.5/JDK 1.5 too just the file extension there was just .xml (com.example.MyApp.xml) Sven On 12/11/2012 08:33 AM, oliver.stef wrote: Hi all, When i'm saving my properties file in 'UTF-8' coding, i can't see the correct chars (image 1). but when i'm saving it as displayed if i'm as 'ISO-8859-1' it looks fine (image 2). how can i set wicket to load the properties file to use UTF-8? Thanks! image 1 http://apache-wicket.1842946.**n4.nabble.com/file/n4654681/**image_1.pnghttp://apache-wicket.1842946.n4.nabble.com/file/n4654681/image_1.png image 2 http://apache-wicket.1842946.**n4.nabble.com/file/n4654681/**image_2.pnghttp://apache-wicket.1842946.n4.nabble.com/file/n4654681/image_2.png -- View this message in context: http://apache-wicket.1842946.** n4.nabble.com/hot-to-set-**Unicoding-to-UTF-8-tp4654681.**htmlhttp://apache-wicket.1842946.n4.nabble.com/hot-to-set-Unicoding-to-UTF-8-tp4654681.html Sent from the Users forum mailing list archive at Nabble.com. --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-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: stateless pages
Thank you I understand that Wicket reverts back to statefulness if required. Can I get Wicket to log when and why (the offending component) is reverts to statefulness? Is it correct that the number after an URL (ex. host/path?8) indicates the page is stateful? Statefulness concerns me, as I suppose statefulness creates a server side session. The server side session make scaling difficult/more complex, as the session must be replicated or use sticky sessions. My site have not real use for state, but I really like how Wicket does components and rendering. Thanks, -René On 10 December 2012 22:43, Phillips, David david.phill...@usaa.com wrote: setStatelessHint() tells the page to attempt to be stateless, but if any of the components or the behaviors are not stateless than the page will revert back to statefulness. There are several components which have stateless alternatives (StatelessForm and StatelessLink for example), but the very nature of Ajax and it's callback functionality means that the page cannot be stateless. The server must maintain state about the current page for each Ajax request to have the correct starting point. If I may ask, what is it about statefulness that concerns you? Thanks, -David Phillips - USAA -Original Message- From: René Vangsgaard [mailto:rene.vangsga...@gmail.com] Sent: Monday, December 10, 2012 3:29 PM To: users@wicket.apache.org Subject: EXTERNAL: stateless pages I am looking into stateless wicket. Do the setStatelessHint() work as expected? My links are generated correctly, but when the page is rendered a ?#number is rendered - the #number being the normal wicket counter. I read that the presence of this number indicates my page is not stateless. And it is true that any use of Ajax will make a page stateful. On a more general note, I am looking into creating a stateless application, mainly because of scaling. Do you think Wicket will fit, even though I will be using Ajax? I really think the separation of HTML and code, the approach with components and the use of wicket:id is the best, and I have not found it anywhere else. Basically I like Wicket, but do not need the statefulness. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: stateless pages
On Tue, Dec 11, 2012 at 10:02 AM, René Vangsgaard rene.vangsga...@gmail.com wrote: Thank you I understand that Wicket reverts back to statefulness if required. Can I get Wicket to log when and why (the offending component) is reverts to statefulness? There are two ways: 1) add wicket-devutils dependency and use its StatelessChecker 2) Set logging to DEBUG for o.a.w.Page class Is it correct that the number after an URL (ex. host/path?8) indicates the page is stateful? Yes. Statefulness concerns me, as I suppose statefulness creates a server side session. The server side session make scaling difficult/more complex, as the session must be replicated or use sticky sessions. My site have not real use for state, but I really like how Wicket does components and rendering. You may be interested in https://github.com/jolira/wicket-stateless AFAIK it is not migrated to Wicket 6 .. Thanks, -René On 10 December 2012 22:43, Phillips, David david.phill...@usaa.com wrote: setStatelessHint() tells the page to attempt to be stateless, but if any of the components or the behaviors are not stateless than the page will revert back to statefulness. There are several components which have stateless alternatives (StatelessForm and StatelessLink for example), but the very nature of Ajax and it's callback functionality means that the page cannot be stateless. The server must maintain state about the current page for each Ajax request to have the correct starting point. If I may ask, what is it about statefulness that concerns you? Thanks, -David Phillips - USAA -Original Message- From: René Vangsgaard [mailto:rene.vangsga...@gmail.com] Sent: Monday, December 10, 2012 3:29 PM To: users@wicket.apache.org Subject: EXTERNAL: stateless pages I am looking into stateless wicket. Do the setStatelessHint() work as expected? My links are generated correctly, but when the page is rendered a ?#number is rendered - the #number being the normal wicket counter. I read that the presence of this number indicates my page is not stateless. And it is true that any use of Ajax will make a page stateful. On a more general note, I am looking into creating a stateless application, mainly because of scaling. Do you think Wicket will fit, even though I will be using Ajax? I really think the separation of HTML and code, the approach with components and the use of wicket:id is the best, and I have not found it anywhere else. Basically I like Wicket, but do not need the statefulness. - 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 http://jweekend.com/
MarkupNotFoundException
Hi, I started a new application and I receive the following exception. /org.apache.wicket.markup.MarkupNotFoundException: Can not determine Markup. Component is not yet connected to a parent/ The application is quite simple. I subclassed the application and a home page. Which is usually the cause and how can I find the cause in my application? Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-tp4654698.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: MarkupNotFoundException
Check spelling, upper/lower case and the location of the html file for your home page. Sven On 12/11/2012 12:59 PM, cosmindumy wrote: Hi, I started a new application and I receive the following exception. /org.apache.wicket.markup.MarkupNotFoundException: Can not determine Markup. Component is not yet connected to a parent/ The application is quite simple. I subclassed the application and a home page. Which is usually the cause and how can I find the cause in my application? Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-tp4654698.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: MarkupNotFoundException
Check the first answer here: http://stackoverflow.com/questions/2689198/wicket-war-in-jetty-html-files-not-on-classpath Sven On 12/11/2012 02:10 PM, cosmindumy wrote: I checked that ans is not the cause. I noticed that html files are not in war. I just have a page that subclass WebPage and a customized Application as subclass of wicket application. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-tp4654698p4654701.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: Redirect to login page on UnauthorizedActionException(Page,RENDER)
Maybe this helps you a bit more... I have my own CompoundAuthorizationStrategy that in turn uses a few nested IAuthorizationStrategy and one of them throws RestartResponseAtInterceptPageException depending on the condition inside isInstantiationAuthorized() similar to: public boolean isInstantiationAuthorized(Class componentClass) { MySession session = MySession.session(); ... // Page is the parent of all protected pages if(componentClass.getAnnotation(Authenticate.class) != null) { User user = session.getUser(); if(user == null) { throw new RestartResponseAtInterceptPageException(MyApplication.myApp().getSignInPageC lass()); } } ... } For the above code I have my pages annotated with my own Authenticate but I think you should be able to check the type of the componentClass for what you want and etc. ~ Thank you, Paul Bors -Original Message- From: Jesse Long [mailto:j...@unknown.za.net] Sent: Tuesday, December 11, 2012 2:30 AM To: users@wicket.apache.org Subject: Re: Redirect to login page on UnauthorizedActionException(Page,RENDER) Hi Paul, Thanks for the reply. Yes, I only want to redirect to a login page on UnauthorizedActionException when the component is an instance of Page and the action as RENDER and when the session is not authenticated, so a custom access denied page is not exactly what I'm looking for, but I could probably make it work. Cheers, Jesse On 10/12/2012 19:40, Paul Bors wrote: Do you want to redirect to the Login page for all thrown AccessDenied exceptions? Or just in some situations? If you want to do it for all, then create your own WebPage for AccessDeinedPage such as: public class AccessDeniedPage extends WebPage { private static final long serialVersionUID = 1L; public AccessDeniedPage() { Session.get().warn(ResourceModel(access.denied)); throw new RestartResponseException(Application.get().getLoginPage()); } } And inside your Application class in your init(): @Override protected void init() { ... IApplicationSettings applicationSettings = getApplicationSettings(); applicationSettings.setAccessDeniedPage(AccessDeniedPage.class); ... } There are other such exceptions which you can assign your own page implementation, see the API for IApplicationSettings. As for redirecting the user to your custom AccessDeined page (the LoginPage) only under few circumstances, I haven't run into that need yet so someone else could help you if you really need to do that. ~ Thank you, Paul Bors -Original Message- From: Jesse Long [mailto:j...@unknown.za.net] Sent: Monday, December 10, 2012 11:05 AM To: users@wicket.apache.org Subject: Redirect to login page on UnauthorizedActionException(Page,RENDER) Hi All, I am using the authorization strategy to authorize viewing of pages by checking if instantiation is allowed. If the session is not authenticated, and if instantiation is not allowed, I redirect the user to a login page using an IUnauthorizedComponentInstantiationListener. I also check if the RENDER action is allowed using the authorization strategy. At the moment, if the user tries to view a Page which he is allowed to instantiate, but where the authorization strategy denies RENDER permission (permissions configured for render/enable, but not for instantiation), he gets a AccessDenied page. In these situations, I also want to redirect the user to a login page if the session is not authenticated. Would IExceptionMapper be the correct place to do this? If so, could we make DefaultExceptionMapper a bit easier to extend please? Thanks, Jesse - 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: Form submit with CollectionChild
It works well, but not ideal - making it work with JPA does require some tweaking to prevent the Collection being replaced (and thus Hibernate will complain about the Collection not being the one it was managing) or duplicates being created. On Mon, Dec 10, 2012 at 4:11 PM, Nick Pratt nbpr...@gmail.com wrote: I just found this: http://wicketinaction.com/2008/10/building-a-listeditor-form-component/which works great. N On Mon, Dec 10, 2012 at 3:56 PM, Nick Pratt nbpr...@gmail.com wrote: Here is a quickstart: https://dl.dropbox.com/u/107816727/quickstart.tar.gz Two problems: 1. Hit add more than once causes an exception 2. On form submit doesnt set the ListB up in the A instance. Any pointers would be appreciated. Regards Nick On Mon, Dec 10, 2012 at 2:49 PM, Paul Bors p...@bors.ws wrote: Sounds like it should be working... unless someone else on the list has another quick idea of what could be wrong given the few details you have provided I would advise you to create a quick start and try to see if you can replicate the problem and then upload it somewhere we can get access to it or in a Jira ticket. Hopefully in doing so you'll spot what's wrong and fix it :) ~ Thank you, Paul Bors -Original Message- From: Nick Pratt [mailto:nbpr...@gmail.com] Sent: Monday, December 10, 2012 2:21 PM To: users@wicket.apache.org Subject: Re: Form submit with CollectionChild I have an LDM that I pass in to the Panel containing the Form. I wrap the passed-in LDM IModel with a CompoundPropertyModel which I supply to the Form. All my components then use wicketid--propertyExpressions. I supply the A.b name as the Wicket Id when I construct the LV. N On Mon, Dec 10, 2012 at 2:11 PM, Paul Bors p...@bors.ws wrote: t - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Chrome warning with CSSHeaderItem
Wicket 6.3 Chromium 18.0.1025.168(Developer Build134367)Ubuntu 11.10 browser I get the following warning in my console: Resource interpreted as Image but transferred with MIME type text/css I have a JavaScriptResourceReference that is like the Dependency Management section on www.wicketinaction.com where I have a JavaScriptHeaderItem and a CSSHeaderItem. Here is that example: public class MyResourceReferenceextends JavaScriptResourceReference{ public ResourceReferenceA() { super(ResourceReferenceA.class,my.js); } public Iterable? extends HeaderItem getDependencies() { ListHeaderItem dependencies= new ArrayListHeaderItem(); Url dojoGoogleCdn= Url.parse(https://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo/dojo.js;); ExternalUrlResourceReference externalUrlResourceReference= new ExternalUrlResourceReference(dojoGoogleCdn); dependencies.add(JavaScriptHeaderItem.forReference(externalUrlResourceReference)); dependencies.add(CssHeaderItem.forReference(new CssResourceReference(ResourceReferenceA.class,a.css))); return dependencies; } } My behavior loads my ResourceReference like so: @Override public void renderHead(Component component, IHeaderResponse response) { response.render(JavaScriptHeaderItem.forReference(MyResourceReference.getInstance())); } What can I do to get rid of this warning? -- Jered Myers
Re: Redirect to login page on UnauthorizedActionException(Page,RENDER)
Hi Paul, Thanks for the reply. I think you are misunderstanding me. I have the my instantiation authorization working perfectly the way I want it. I now want my action (RENDER or ENABLE) authorization to work the same way. IAuthorizationStrategy says yes or no to instantiations and actions. If the question was instantiation and the answer was no, then IUnauthorizedComponentInstantiationListener can make a decision to possibly redirect to a login page. If the question was action and the answer was no, then an UnauthorizedActionException is thrown. The IExceptionMapper is asked about what to do with the exception, and an access denied page is shown. I dont think the IAuthorizationStrategy is the right place to be throwing redirect exception. If it was, the return type would be void and and it would either work or throw an exception. Also, it seems a shame to limit the use of IAuthorizationStrategy to components involved in the current request cycle, as would be the case if IAuthorizationStrategy threw redirect exceptions. You would not be able to get a target page/page class, check permissions, and enable/disable a link based on the answer. Seems to me IExceptionMapper should make decisions about what to do, but the default implementation is very unfriendly towards being extended. Either that, or we need something like a IUnauthorizedActionListener. For now I'm just going ahead with IExceptionMapper, copy and paste DefaultExceptionMapper... Cheers, Jesse On 11/12/2012 18:28, Paul Bors wrote: Maybe this helps you a bit more... I have my own CompoundAuthorizationStrategy that in turn uses a few nested IAuthorizationStrategy and one of them throws RestartResponseAtInterceptPageException depending on the condition inside isInstantiationAuthorized() similar to: public boolean isInstantiationAuthorized(Class componentClass) { MySession session = MySession.session(); ... // Page is the parent of all protected pages if(componentClass.getAnnotation(Authenticate.class) != null) { User user = session.getUser(); if(user == null) { throw new RestartResponseAtInterceptPageException(MyApplication.myApp().getSignInPageC lass()); } } ... } For the above code I have my pages annotated with my own Authenticate but I think you should be able to check the type of the componentClass for what you want and etc. ~ Thank you, Paul Bors -Original Message- From: Jesse Long [mailto:j...@unknown.za.net] Sent: Tuesday, December 11, 2012 2:30 AM To: users@wicket.apache.org Subject: Re: Redirect to login page on UnauthorizedActionException(Page,RENDER) Hi Paul, Thanks for the reply. Yes, I only want to redirect to a login page on UnauthorizedActionException when the component is an instance of Page and the action as RENDER and when the session is not authenticated, so a custom access denied page is not exactly what I'm looking for, but I could probably make it work. Cheers, Jesse On 10/12/2012 19:40, Paul Bors wrote: Do you want to redirect to the Login page for all thrown AccessDenied exceptions? Or just in some situations? If you want to do it for all, then create your own WebPage for AccessDeinedPage such as: public class AccessDeniedPage extends WebPage { private static final long serialVersionUID = 1L; public AccessDeniedPage() { Session.get().warn(ResourceModel(access.denied)); throw new RestartResponseException(Application.get().getLoginPage()); } } And inside your Application class in your init(): @Override protected void init() { ... IApplicationSettings applicationSettings = getApplicationSettings(); applicationSettings.setAccessDeniedPage(AccessDeniedPage.class); ... } There are other such exceptions which you can assign your own page implementation, see the API for IApplicationSettings. As for redirecting the user to your custom AccessDeined page (the LoginPage) only under few circumstances, I haven't run into that need yet so someone else could help you if you really need to do that. ~ Thank you, Paul Bors -Original Message- From: Jesse Long [mailto:j...@unknown.za.net] Sent: Monday, December 10, 2012 11:05 AM To: users@wicket.apache.org Subject: Redirect to login page on UnauthorizedActionException(Page,RENDER) Hi All, I am using the authorization strategy to authorize viewing of pages by checking if instantiation is allowed. If the session is not authenticated, and if instantiation is not allowed, I redirect the user to a login page using an IUnauthorizedComponentInstantiationListener. I also check if the RENDER action is allowed using the authorization strategy. At the moment, if the user tries to view a Page which he is allowed to instantiate, but where the authorization strategy denies RENDER permission (permissions configured for render/enable, but not for instantiation), he gets a AccessDenied page. In
Re: Expiration page not shown in case of back button usage
Yes I know but by using the back button it seems to be ignored. Like it tries to serve the same page no matter we have a session or not. On Tue, Dec 11, 2012 at 9:59 AM, Martin Grigorov mgrigo...@apache.orgwrote: On Mon, Dec 10, 2012 at 9:04 AM, Rob Sonke r...@tigrou.nl wrote: Last week we fixed an issue with Wicket 6 where mounted pages were being reconstructed after the session expired. That was due to this (new) setting which we set to false now: getPageSettings().setRecreateMountedPagesAfterExpiry(false); This worked perfectly for clicking on (ajax) links but, this doesn't seem to work when I use the back button of the browser after the session expired. What happens is that Wicket tries to reconstruct the previous (mounted bookmarkable) page. But that's failing in our case because we dont support that as every page needs session information. Am I doing something wrong? As I would expect a PageExpiredException in this case. If you need PEE then this is the correct setting. -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
RE: Redirect to login page on UnauthorizedActionException(Page,RENDER)
Cool, so if I understand your use-case correctly you want to redirect the user to the log-in page when a component on a page should be protected. And you're running this logic at the RENDER or ENABLE stages for each of your components. I opted not to do so because of performance reasons. I rather protect the entire page/tab. For individual components I used Behaviors that either hide/disable a panel/form field since I didn't have that many of them. I would advise you against copying and pasting the current implementation of a Wicket class as down the road it'll be harder for you to upgrade Wicket. I went through that pain once when I had to re-implement some specific application logic because former developers on of the product resorted to the a similar solution. Perhaps you should consider looking at how other Wicket authentication/authorization frameworks achieve a similar feature and steal their ideas. Try taking a look at Wicket Shiro or Wicket Security, do they not offer a similar solution? (I'm not sure as I had to maintain our own legacy implementation). http://wicket.apache.org/learn/projects/authroles.html ~ Thank you, Paul Bors -Original Message- From: Jesse Long [mailto:j...@unknown.za.net] Sent: Tuesday, December 11, 2012 12:53 PM To: users@wicket.apache.org Subject: Re: Redirect to login page on UnauthorizedActionException(Page,RENDER) Hi Paul, Thanks for the reply. I think you are misunderstanding me. I have the my instantiation authorization working perfectly the way I want it. I now want my action (RENDER or ENABLE) authorization to work the same way. IAuthorizationStrategy says yes or no to instantiations and actions. If the question was instantiation and the answer was no, then IUnauthorizedComponentInstantiationListener can make a decision to possibly redirect to a login page. If the question was action and the answer was no, then an UnauthorizedActionException is thrown. The IExceptionMapper is asked about what to do with the exception, and an access denied page is shown. I dont think the IAuthorizationStrategy is the right place to be throwing redirect exception. If it was, the return type would be void and and it would either work or throw an exception. Also, it seems a shame to limit the use of IAuthorizationStrategy to components involved in the current request cycle, as would be the case if IAuthorizationStrategy threw redirect exceptions. You would not be able to get a target page/page class, check permissions, and enable/disable a link based on the answer. Seems to me IExceptionMapper should make decisions about what to do, but the default implementation is very unfriendly towards being extended. Either that, or we need something like a IUnauthorizedActionListener. For now I'm just going ahead with IExceptionMapper, copy and paste DefaultExceptionMapper... Cheers, Jesse On 11/12/2012 18:28, Paul Bors wrote: Maybe this helps you a bit more... I have my own CompoundAuthorizationStrategy that in turn uses a few nested IAuthorizationStrategy and one of them throws RestartResponseAtInterceptPageException depending on the condition inside isInstantiationAuthorized() similar to: public boolean isInstantiationAuthorized(Class componentClass) { MySession session = MySession.session(); ... // Page is the parent of all protected pages if(componentClass.getAnnotation(Authenticate.class) != null) { User user = session.getUser(); if(user == null) { throw new RestartResponseAtInterceptPageException(MyApplication.myApp().getSignI nPageC lass()); } } ... } For the above code I have my pages annotated with my own Authenticate but I think you should be able to check the type of the componentClass for what you want and etc. ~ Thank you, Paul Bors -Original Message- From: Jesse Long [mailto:j...@unknown.za.net] Sent: Tuesday, December 11, 2012 2:30 AM To: users@wicket.apache.org Subject: Re: Redirect to login page on UnauthorizedActionException(Page,RENDER) Hi Paul, Thanks for the reply. Yes, I only want to redirect to a login page on UnauthorizedActionException when the component is an instance of Page and the action as RENDER and when the session is not authenticated, so a custom access denied page is not exactly what I'm looking for, but I could probably make it work. Cheers, Jesse On 10/12/2012 19:40, Paul Bors wrote: Do you want to redirect to the Login page for all thrown AccessDenied exceptions? Or just in some situations? If you want to do it for all, then create your own WebPage for AccessDeinedPage such as: public class AccessDeniedPage extends WebPage { private static final long serialVersionUID = 1L; public AccessDeniedPage() { Session.get().warn(ResourceModel(access.denied)); throw new RestartResponseException(Application.get().getLoginPage()); } } And
Re: what is Wicket 2.x?
Martijn Dashorst wrote: On Mon, Dec 10, 2012 at 4:39 PM, Joachim Schrod jsch...@acm.org wrote: I'd like to add my voice to Martijn's comment that there are still people out there who have no choice but to use 1.4. Typically guys who have to support Wicket apps on app servers with no servlet-2.5-api. I'm not 100% sure, but did you try running a newer wicket (1.5) on ye old container? Actually, no. The relase notes said you need to have servlet api 2.5 and I believed them. Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jsch...@acm.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: what is Wicket 2.x?
We are using Wicket 6 .0 on OC4j 10.1.3.5. This is a Servlet 2.4 container with support of some Servlet api 2.5 features. Work well here. The quickstart application works on OC4J ( http://wicket.apache.org/start/quickstart.html). (some slight modification is needed when using Wicket via a web.xml Filter). If you are familiar with Maven, using the quickstart archetype it is quite easy to give it a try :). 2012/12/11 Joachim Schrod jsch...@acm.org Martijn Dashorst wrote: On Mon, Dec 10, 2012 at 4:39 PM, Joachim Schrod jsch...@acm.org wrote: I'd like to add my voice to Martijn's comment that there are still people out there who have no choice but to use 1.4. Typically guys who have to support Wicket apps on app servers with no servlet-2.5-api. I'm not 100% sure, but did you try running a newer wicket (1.5) on ye old container? Actually, no. The relase notes said you need to have servlet api 2.5 and I believed them. Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod, Roedermark, Germany Email: jsch...@acm.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards / Met vriendelijke groet, Kees van Dieren Squins | IT, Honestly Oranjestraat 23 2983 HL Ridderkerk The Netherlands Mobile: +31 (0)6 30413841 www.squins.com http://twitter.com/keesvandieren Chamber of commerce Rotterdam: 24435130 Boeken voor school en werk bestel je op studieboekencenter.nl
Re: TinyMCE ImageUploadPlugin problem
If I would have some time I would upgrade wicket to 6.x series and test it with 6.0. Until I appreciate any comments :). thnx, Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TinyMCE-ImageUploadPlugin-problem-tp4654616p4654713.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: Incorrect double slash when jsessionid included in link URL in 6.x [Fixed]
Just confirming that this is fixed for our scenario. Please create a JIRA issue, hopefully with some details on how to reproduce it. I'm still trying to figure out what I've done to trigger the double slash :/. Sven On 12/11/2012 09:12 AM, Chris Colman wrote: Did you still want me to raise a JIRA issue for this or will you do that? Regards, Chris -Original Message- From: Sven Meier [mailto:s...@meiers.net] Sent: Tuesday, 11 December 2012 8:04 AM To: users@wicket.apache.org Subject: RE: Incorrect double slash when jsessionid included in link URL in 6.x Seems this problem has shown up in one of our applications too :(. I'll have to investigate where this double slash is coming from. Sven -- View this message in context: http://apache- wicket.1842946.n4.nabble.com/Incorrect-double-slash-when-jsessionid- included-in-link-URL-in-6-x-tp4654623p4654673.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 - 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: WebSockets questions
Hello Martin, just have added the patch for this issue. can you please take a look it and probably accept? :) I would really appreciate it since this issue blocks me Thanks in advance On Sat, Dec 8, 2012 at 10:23 PM, Maxim Solodovnik solomax...@gmail.comwrote: Hello Martin, Thanks for the quick reply The issue is created with quickstart attached: https://issues.apache.org/jira/browse/WICKET-4917 On Fri, Dec 7, 2012 at 3:26 PM, Martin Grigorov mgrigo...@apache.orgwrote: Hi Maxim, Please create a quickstart and attach it to a ticket in Jira. Try to expose as many problems as you can with it. On Thu, Dec 6, 2012 at 6:14 PM, Maxim Solodovnik solomax...@gmail.com wrote: Hello, I'm trying to add WebSocketBehavior to our project (Apache Openmeetings Incubating) Unfortunately my first attempts were unsuccessful :( Configuration: 1) custom Tomcat7 (Red5 server on the top of Servlet Engine: Apache Tomcat/7.0.32 embedded) 2) Sun JDK 1.7.09 3) Ubuntu 12.10 4) Wicket 6.3.0 5) Google Chrome 24.0.1312.32 beta 6) One page architecture with custom HomePageMapper https://svn.apache.org/repos/asf/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java What I did: 1) set org.apache.wicket.protocol.http.Tomcat7WebSocketFilter 2) add new WebSocketBehavior() to the page Errors: 1) if the page is accessed via http://localhost:5080/openmeetings/html/#admin/configs URL I get URL has fragment component ws://localhost:5080/openmeetings/html/#admin/configspageId=8 error 2) if the page is accessed via http://localhost:5080/openmeetings/html/I get java.lang.IllegalStateException: Request parameter 'pageId' is required! in the error log I believe error 1) above is bug, I'm I right? Maybe anybody can suggest how to handle error 2) ? I would really appreciate any help :) -- WBR Maxim aka solomax -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- WBR Maxim aka solomax -- WBR Maxim aka solomax
Wicket widget for deployment to third party site
Hi, I have a need to create some javascript based widgets that will be deployed to a variety of websites that are out of my control. I was planning on using one of the existing javascript UI frameworks with json for callbacks to my servers (which are running Wicket for normal consumer facing stuff). It occurred to me that what I will be implementing is very similar to how Wicket deals with Ajax, pushing markup out to the browser to be rendered by a javascript layer with support for javascript callbacks to the server for interactivity. I'm wondering if there is any way I can leverage that existing functionality so that I can code my widgets as wicket components and not reinvent the wheel? Has anybody used wicket for creating components that aren't used from within wicket pages (and are deployed purely from javascript, I'd like to avoid iframes)? Any tips or links to examples would be appreciated. Thanks, -Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org