Re: Development / Deployment mode problem
Hi, The wicket component which I have created extends WebMarkupContainer and in this way it encapsulates and interacts with the jquery calendar. I have not used wicket:container tag explicitly. On Mon, Mar 28, 2011 at 7:09 PM, MattyDE ufer.mar...@gmail.com wrote: My first clue: Are you using wicket:container Tags in your markup? In Deployment Mode this tags could not be rendered to the markup by Application Settings. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Development-Deployment-mode-problem-tp3411737p3411751.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
1.5 visitParents problem?
why is this not valid? message.getReporter().visitParents(Form.class, new IVisitorForm, Void() { @Override public void component(Form object, IVisitVoid visit) { // TODO Auto-generated method stub } }); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Set all form fields to output markup id automatically
I personally would suggest *not* having that second line component.setMarkupId(component.getId()) there. Let Wicket generate the IDs for you so that they're all unique on a page. Your approach above breaks using two EmailAddressTextField (fake example class) components on the same page. Designers should use css class to style. An occasional ID that isn't attached to a Wicket component can also help (div surrounding content section, etc). The only problem with this argument is that ID fields are a part of the HTML syntax, via the for attribute of a html label... I've only recently started using wicket and I think it's *fantastic* but the only thing I don't like is the way it changes the ID value of elements. I'm sure it's necessary for the way Wicket works and I'm sure it's an issue that's been discussed by wicket people before, but it came as a pretty nasty surprise to me when I discovered it half way through writing my first application (it doesn't seem to me to be very well flagged up for such a major issue). Obviously I'm a newb, but the the only solution I am aware of to the problem is to rewrite every label on every form as a wicket component. That seems to run against the wicket philosophy of keeping the html and the code separate. I realize nothing in life is perfect, but so far it's the *only* thing about wicket that *isn't* perfect... :) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [OT] Apache Wicket Merchandise, nominees Spring roundup
I nominate Martin and Pedro for the same reasons. They answered all my nubie's questions despite my bad English :-) I nominate Martin Grigorov a and Pedro Santos. Thanks to them, none of my questions has gone un answered in this forum. josh. On Mon, Mar 28, 2011 at 8:45 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Why does wicket use Serializable contracts in generics?
For example in Session there is the method: public final M extends Serializable M getMetaData(final MetaDataKeyM key) This makes it seriously difficult to use this methods for retrieving vales that have e.g. a MetaDataKeyCollectionString, since Collection does not extend Serializable (although most implementations do). Afaik, you can only cast your way out of this if you know the actual implementation type, which is impossible when for instance the collection was created with Collections.synchronized... I understand that session-data should be serializable, but I don't think that it should be enforced like this, because Serializable is just a marker interface. It doesn't offer an interface/contract. In fact, having an object that implements Serializable still does not guarantee that it can be serialized. Cheers, Gerrit - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Apache Wicket Cookbook Published!
I have this book on order; I look forward to studying it. My Wicket in Action and Coding: On Software Design Process books are eager to welcome a new member to their high quality book area. Ian Marshall -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-Cookbook-Published-tp3406012p3414357.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: Apache Wicket Cookbook Published!
I have this book on order; I look forward to studying it. Order, is that what you have when you do not just buy the PDF edition and open it in iBooks on your iPad - like I did? :) (Just for completeness I also clicked the I want this for Kindle link at Amazon to give a suggestion to aid those that prefer that channel for their e-books.) - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
WicketRuntimeException
Can somebody help me with this exception? What can be wrong am desperate. What to look for? ERROR [org.apache.wicket.RequestCycle] [, http-8080-1, /jumbo/, 101.11.149.90:-33771be0:12f 0171a0c1:-8000, , ] Exception in rendering component: [MarkupContainer [Component id = html]] org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = html]] at org.apache.wicket.Component.renderComponent(Component.java:2725)
RE: WicketRuntimeException
Can somebody help me with this exception? What can be wrong am desperate. What to look for? Typically, the real error is further down in the text that what you included. Common causes are: * Having a wicket:id the the HTML with no corresponding component * Adding a component without adding the wicket:id (inverse of the above) * Having both a component and a wicket:id but the nesting is wrong - Tor Iver
Wicket 1.5 and Tomcat 7 encoding issues?
Hi Guys Im not sure if this is a wicket issue (I don't think so). But we are experiencing encoding(æøå) issues with Tomcat 7.0.11 after using Apache Wicket 1.5-rc2. However this issue does not occur when running Jetty.. Anyone has an idea on howto fix this? regards Nino - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
@RequireHttps start session before redirect to secure page
I'm running into this problem as described in the javadocs for HttpsRequestCycleProcessor: Notes: According to servlet spec a cookie created on an https request is marked as secure, such cookies are not available for http requests. What this means is that a session started over https will not be propagated to further http calls because JSESSIONID cookie will be marked as secure and not available to http requests. This entails that unless a session is created and bound on http prior to using an https request any wicket pages or session values stored in the https session will not be available to further http requests. If your application requires a http-https-http interactions (such as the case where only a login page and my account pages are secure) you must make sure a session is created and stored in the http request prior to the first http-https redirect. When my users start a session via the sign-in page protected by @RequireHttps they are then redirected to a non-ssl but authorisation-protected page, but as there is no insecure session at that point they are bounced back to the sign-in page again. I would really appreciate some suggestions as to how others users deal with this issue i.e. how could I ensure that a session is created and stored in the http request prior to the first http-https redirect? I thought about having a non-ssl protected sign-in page which has an immediate javascript redirect to the ssl version but it doesn't seem very elegant. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5 and Tomcat 7 encoding issues?
If this encoding issue is in url: did you configure Tomcat to use UTF-8 for uri encoding (URIEncoding attribute on the HTTP connector)? The default encoding for URI is ISO-8859-1 in Tomcat and UTF-8 in Jetty. Attila 2011/3/29 nino martinez wael nino.martinez.w...@gmail.com Hi Guys Im not sure if this is a wicket issue (I don't think so). But we are experiencing encoding(æøå) issues with Tomcat 7.0.11 after using Apache Wicket 1.5-rc2. However this issue does not occur when running Jetty.. Anyone has an idea on howto fix this? regards Nino - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Choice of Resource for my Image component
3. All I need to do now is find out why my use of a NonCachingImage together with my descended LoadableDetachableModel in the form of my web page still results in huge session size (1MB), which is forbidden in Google App Engine. I have fixed my problem of a WebPage's NonCachingImage holding onto an image's data and thus causing a user's session size to get very large indeed. The model passed to the NonCachingImage was descended from LoadableDetachableModel. Instead, I now descend my model from LoadableDetachableModel. ItemImageResource is a class I descend from DynamicImageResource by implementing its abstract method protected byte[] getImageData(). This method: · constructs a ByteArrayResource instance · using this instance to yield a IResourceStream · uses the resource stream to yield an InputStream · reads from this input stream into the byte array, which is returned by the method. This shrinks the session size to much closer to where I want it, with no image data being included in it. If anyone wants any sample code, then I shall post it here. Alternatively, if anyone shouts No: this is not the way to do it! then I shall be listening Ian Marshall -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Choice-of-Resource-for-my-Image-component-tp3342289p3414698.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: WicketRuntimeException
The problem is even stranger There is no problem with IE no problem with Opera the only problem is with Firefox 4.0 strange On 29 March 2011 14:19, Wilhelmsen Tor Iver toriv...@arrive.no wrote: Can somebody help me with this exception? What can be wrong am desperate. What to look for? Typically, the real error is further down in the text that what you included. Common causes are: * Having a wicket:id the the HTML with no corresponding component * Adding a component without adding the wicket:id (inverse of the above) * Having both a component and a wicket:id but the nesting is wrong - Tor Iver
Re: WicketRuntimeException
Could you provide us a quickstart to reproduce de error ? Bruno Borges www.brunoborges.com.br +55 21 76727099 The glory of great men should always be measured by the means they have used to acquire it. - Francois de La Rochefoucauld On Tue, Mar 29, 2011 at 10:08 AM, Jan Juno janko...@gmail.com wrote: The problem is even stranger There is no problem with IE no problem with Opera the only problem is with Firefox 4.0 strange On 29 March 2011 14:19, Wilhelmsen Tor Iver toriv...@arrive.no wrote: Can somebody help me with this exception? What can be wrong am desperate. What to look for? Typically, the real error is further down in the text that what you included. Common causes are: * Having a wicket:id the the HTML with no corresponding component * Adding a component without adding the wicket:id (inverse of the above) * Having both a component and a wicket:id but the nesting is wrong - Tor Iver
Re: WicketRuntimeException
How to Get Help Whenever you are reporting a problem, please be sure to include as much information as possible; the more we know, the better the chance of a quicker resolution. which version of the software what platform and JDK any particular JEE container being used - if so what version stack traces generally really help! If in doubt include the whole thing; often exceptions get wrapped in other exceptions and the exception right near the bottom explains the actual error, not the first few lines at the top. Its very easy for us to skim-read past unnecessary parts of a stack trace. log output can be useful too; sometimes enabling DEBUG logging can help your code configuration files are often useful How to get help faster We can help you much quicker if you try the following provide us with a JUnit test case that demonstrates your issue. e.g. if you think you’ve found a bug, can you create a test case to demonstrate the bug? submit a patch fixing the bug! (We also buy you beer when we meet you if you submit bug fixes for memory leaks or performance related issues, if you can run a profiler on your test case and attach the output as a file (or zipped file if its huge) to the JIRA we can normally fix things much faster. e.g. run JProfiler or YourKit on your code and send us the output. To find memory leaks its quicker to resolve if you can tell us what classes are taking up all of the RAM; we can normally figure out whats wrong from that. On Tue, Mar 29, 2011 at 2:15 PM, Jan Juno janko...@gmail.com wrote: Can somebody help me with this exception? What can be wrong am desperate. What to look for? ERROR [org.apache.wicket.RequestCycle] [, http-8080-1, /jumbo/, 101.11.149.90:-33771be0:12f 0171a0c1:-8000, , ] Exception in rendering component: [MarkupContainer [Component id = html]] org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = html]] at org.apache.wicket.Component.renderComponent(Component.java:2725) -- 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: Wicket 1.5 and Tomcat 7 encoding issues?
you mean like this: Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 URIEncoding=UTF-8 / Already done so.. Or? Thanks for helping.. 2011/3/29 Attila Király kiralyattila...@gmail.com: If this encoding issue is in url: did you configure Tomcat to use UTF-8 for uri encoding (URIEncoding attribute on the HTTP connector)? The default encoding for URI is ISO-8859-1 in Tomcat and UTF-8 in Jetty. Attila 2011/3/29 nino martinez wael nino.martinez.w...@gmail.com Hi Guys Im not sure if this is a wicket issue (I don't think so). But we are experiencing encoding(æøå) issues with Tomcat 7.0.11 after using Apache Wicket 1.5-rc2. However this issue does not occur when running Jetty.. Anyone has an idea on howto fix this? regards Nino - 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: Wicket 1.5 and Tomcat 7 encoding issues?
Yep I ment that and it looks ok. Is your html page in UTF-8 as well? Attila 2011/3/29 nino martinez wael nino.martinez.w...@gmail.com you mean like this: Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 URIEncoding=UTF-8 / Already done so.. Or? Thanks for helping.. 2011/3/29 Attila Király kiralyattila...@gmail.com: If this encoding issue is in url: did you configure Tomcat to use UTF-8 for uri encoding (URIEncoding attribute on the HTTP connector)? The default encoding for URI is ISO-8859-1 in Tomcat and UTF-8 in Jetty. Attila 2011/3/29 nino martinez wael nino.martinez.w...@gmail.com Hi Guys Im not sure if this is a wicket issue (I don't think so). But we are experiencing encoding(æøå) issues with Tomcat 7.0.11 after using Apache Wicket 1.5-rc2. However this issue does not occur when running Jetty.. Anyone has an idea on howto fix this? regards Nino - 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
dynamic child in container
hi, I ve googled a bit but all I ve found are links about panels. my problem is that I would like to create components (with corresponding html markup) and then add those components dynamically on request to target container, where child component could be other container that might be dynamically modified. what I read about panels is that you need always mark a placeholder for a child component so there is no way to add more or less child when my logic decides to do so. is this possible in wicket? could someone point me to some materials about it? pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __
Re: dynamic child in container
This is definitely possible. The easy way is to do ajaxRequestTarget.addComponent(theParentComponent); the drawback being that tho whole parent component will be redrawn, including childs that were already on the page. If that is not acceptable, you could use javascript to first create a child component of your parent with the markupId of your new child (using ajaxRequestTarget.prependJavascript(your javascript code that adds an empty div with correct id to the parent), and let wicket render the child component by doing ajaxRequestTarget.addComponent(theChildComponent). On Tue, 29 Mar 2011 16:49 +0200, kamiseq kami...@gmail.com wrote: hi, I ve googled a bit but all I ve found are links about panels. my problem is that I would like to create components (with corresponding html markup) and then add those components dynamically on request to target container, where child component could be other container that might be dynamically modified. what I read about panels is that you need always mark a placeholder for a child component so there is no way to add more or less child when my logic decides to do so. is this possible in wicket? could someone point me to some materials about it? pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: dynamic child in container
thanks, so I understand that it is only possible with AJAX calls. could I make a link callback that will add random number of components on each request? there will be no wicket:id for dynamic child and I could generate as many components as I want, right? I will try this anyway;] pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __
Re: dynamic child in container
That's what I thought you meant (ajax). If you want to add a dynamic number of components during normal page construction, you should have a look at wicket repeaters, e.g. RepeatingView. There are plenty examples for how to use those. On Tue, 29 Mar 2011 17:28 +0200, kamiseq kami...@gmail.com wrote: thanks, so I understand that it is only possible with AJAX calls. could I make a link callback that will add random number of components on each request? there will be no wicket:id for dynamic child and I could generate as many components as I want, right? I will try this anyway;] pozdrawiam Paweł Kamiński [1]kami...@gmail.com [2]pkaminski@gmail.com __ References 1. mailto:kami...@gmail.com 2. mailto:pkaminski@gmail.com
Re: Why does wicket use Serializable contracts in generics?
thats there to give developers a better hint. i am not too opposed to removing it. feel free to file an rfe. -igor On Tue, Mar 29, 2011 at 3:08 AM, Pointbreak pointbreak+wicketst...@ml1.net wrote: For example in Session there is the method: public final M extends Serializable M getMetaData(final MetaDataKeyM key) This makes it seriously difficult to use this methods for retrieving vales that have e.g. a MetaDataKeyCollectionString, since Collection does not extend Serializable (although most implementations do). Afaik, you can only cast your way out of this if you know the actual implementation type, which is impossible when for instance the collection was created with Collections.synchronized... I understand that session-data should be serializable, but I don't think that it should be enforced like this, because Serializable is just a marker interface. It doesn't offer an interface/contract. In fact, having an object that implements Serializable still does not guarantee that it can be serialized. Cheers, Gerrit - 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: @RequireHttps start session before redirect to secure page
simply call session.bind() in requestcycle.onendrequest() which will make sure the session is bound on every request. you can still have a problem if the login page is the first page hit by the user. can that be the case in your application? -igor On Tue, Mar 29, 2011 at 5:38 AM, Phill ph...@bicispace.com wrote: I'm running into this problem as described in the javadocs for HttpsRequestCycleProcessor: Notes: According to servlet spec a cookie created on an https request is marked as secure, such cookies are not available for http requests. What this means is that a session started over https will not be propagated to further http calls because JSESSIONID cookie will be marked as secure and not available to http requests. This entails that unless a session is created and bound on http prior to using an https request any wicket pages or session values stored in the https session will not be available to further http requests. If your application requires a http-https-http interactions (such as the case where only a login page and my account pages are secure) you must make sure a session is created and stored in the http request prior to the first http-https redirect. When my users start a session via the sign-in page protected by @RequireHttps they are then redirected to a non-ssl but authorisation-protected page, but as there is no insecure session at that point they are bounced back to the sign-in page again. I would really appreciate some suggestions as to how others users deal with this issue i.e. how could I ensure that a session is created and stored in the http request prior to the first http-https redirect? I thought about having a non-ssl protected sign-in page which has an immediate javascript redirect to the ssl version but it doesn't seem very elegant. - 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
flexible authentication
Hi all, my web application is using the wicket authentication approach (AuthenticatedWebSession) and all my secure java files are marked with @AuthorizeInstantiation(ADMIN) So once I added this annotation there is no chance to bypass the authentication. But what if there is the need to be flixible? What if for some users the page A should be secure and for others don't? Let's assume there is is page with e.g. contact informations and a user can decide for his own if the page should be accessible with or without authentication. How can I achieve that without using the wicket approach? At the moment it don't think that the wicket approach is the right one?! Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/flexible-authentication-tp3415413p3415413.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: flexible authentication
the wicket approach is 2 or 3 classes that implement the infrastructure. the use well defined public interfaces to implement it. if it doesnt work for you, then simply roll your own implementation. -igor On Tue, Mar 29, 2011 at 9:37 AM, hrbaer herber.m...@gmail.com wrote: Hi all, my web application is using the wicket authentication approach (AuthenticatedWebSession) and all my secure java files are marked with @AuthorizeInstantiation(ADMIN) So once I added this annotation there is no chance to bypass the authentication. But what if there is the need to be flixible? What if for some users the page A should be secure and for others don't? Let's assume there is is page with e.g. contact informations and a user can decide for his own if the page should be accessible with or without authentication. How can I achieve that without using the wicket approach? At the moment it don't think that the wicket approach is the right one?! Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/flexible-authentication-tp3415413p3415413.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: Apache Wicket Cookbook Published!
Cool! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-Cookbook-Published-tp3406012p3415429.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: StatelessForm redirect
Actually I handled the exception (in the catch block) and that's how I knew that the current page wanted to redirect to the intended page. I was getting the above posted exception and then the following exception: 2011-03-28 22:55:49.0783 ERROR http-8080-1 org.apache.wicket.protocol.http.WebResponse - Unable to redirect to: searchresults?value=year=AllmoviesIncluded=falseimagesIncluded=falseimageType=AllmovieType=AllmovieSize=Any, HTTP Response has already been committed. 2011-03-28 22:55:49.0783 ERROR http-8080-1 org.apache.wicket.protocol.http.WicketFilter - closing the buffer error java.lang.IllegalStateException at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435) at org.apache.wicket.protocol.http.WebResponse.sendRedirect(WebResponse.java:299) at org.apache.wicket.protocol.http.WebResponse.redirect(WebResponse.java:250) at org.apache.wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:67) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:502) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) How would you pass in pageparameters through component tag? Thank you -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/StatelessForm-redirect-tp3406282p3415450.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: flexible authentication
it's not about to bash the framework. Because I'm still a beginner I just want to make sure that this approach is not working for me. It seems like the demo implementation just allows two options: - need authentication - don't need authentication but there is no option to make it more flexible. What I'm interested in is if there is any chance to use out of the box functionality of wicket to solve this issue. Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/flexible-authentication-tp3415413p3415452.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: Wicket 1.5 and Tomcat 7 encoding issues?
Yeah I think so, the file encoding are utf-8 Although this are in the header : !-- DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; -- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd; We had the meta tag aswell for utf-8 but it made no difference.. Is there something else that I am missing? 2011/3/29 Attila Király kiralyattila...@gmail.com: Yep I ment that and it looks ok. Is your html page in UTF-8 as well? Attila 2011/3/29 nino martinez wael nino.martinez.w...@gmail.com you mean like this: Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 URIEncoding=UTF-8 / Already done so.. Or? Thanks for helping.. 2011/3/29 Attila Király kiralyattila...@gmail.com: If this encoding issue is in url: did you configure Tomcat to use UTF-8 for uri encoding (URIEncoding attribute on the HTTP connector)? The default encoding for URI is ISO-8859-1 in Tomcat and UTF-8 in Jetty. Attila 2011/3/29 nino martinez wael nino.martinez.w...@gmail.com Hi Guys Im not sure if this is a wicket issue (I don't think so). But we are experiencing encoding(æøå) issues with Tomcat 7.0.11 after using Apache Wicket 1.5-rc2. However this issue does not occur when running Jetty.. Anyone has an idea on howto fix this? regards Nino - 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
model help
1. first I'd like to ask if there is any good reading material out there regarding models. In particular I want to figure out all the nifty things you can do with them via nesting/chaining etc. I've read Wicket in Action .. but it seemed to gloss over the advanced stuff you can do with them .. and I've read the docs.. and just from reading those, well it's not obvious what you can do with them and why... 2. I have a specific problem and I'm looking for some hints. I have a foo bean that I get from a DAO layer. The foo bean has the usual name, description String properties. It also has an array of 'widget' beans called 'widgets'. The widget beans also have a name and description properties ans well as various others. So I have a form and I map the foo.name, foo.description properties to TextField components using a compundpropertymodel. The 3rd component is a ListView, which I want to use to display the widgets. First problem I run into is that the ListView model needs to be a List, not an array of Widget. So the compoundpropertymodel barfs at this point. I don't have any control over the beans and I'd rather not wrap them .. I want to bind the components directly to the bean properties. I'm wondering if there is a neat trick I can use involving model nesting or something like that to solve this problem? Or maybe there is a way to tell the CPM that for property 'widgets' .. do something different.. like array-to-List conversion .. I'm a wicket newbie and the model-penny hasn't quite dropped yet.. so any help would be most appreciated. TIA -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/model-help-tp3415833p3415833.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: model help
This is a good reference. https://cwiki.apache.org/WICKET/working-with-wicket-models.html Scott On Tue, Mar 29, 2011 at 11:50 AM, mlabs mlabs@gmail.com wrote: 1. first I'd like to ask if there is any good reading material out there regarding models. In particular I want to figure out all the nifty things you can do with them via nesting/chaining etc. I've read Wicket in Action .. but it seemed to gloss over the advanced stuff you can do with them .. and I've read the docs.. and just from reading those, well it's not obvious what you can do with them and why... 2. I have a specific problem and I'm looking for some hints. I have a foo bean that I get from a DAO layer. The foo bean has the usual name, description String properties. It also has an array of 'widget' beans called 'widgets'. The widget beans also have a name and description properties ans well as various others. So I have a form and I map the foo.name, foo.description properties to TextField components using a compundpropertymodel. The 3rd component is a ListView, which I want to use to display the widgets. First problem I run into is that the ListView model needs to be a List, not an array of Widget. So the compoundpropertymodel barfs at this point. I don't have any control over the beans and I'd rather not wrap them .. I want to bind the components directly to the bean properties. I'm wondering if there is a neat trick I can use involving model nesting or something like that to solve this problem? Or maybe there is a way to tell the CPM that for property 'widgets' .. do something different.. like array-to-List conversion .. I'm a wicket newbie and the model-penny hasn't quite dropped yet.. so any help would be most appreciated. TIA -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/model-help-tp3415833p3415833.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: Wicket 1.5 and Tomcat 7 encoding issues?
Could you provide a small example showing the problem? Attila 2011/3/29 nino martinez wael nino.martinez.w...@gmail.com Yeah I think so, the file encoding are utf-8 Although this are in the header : !-- DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; -- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en xmlns:wicket= http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd; We had the meta tag aswell for utf-8 but it made no difference.. Is there something else that I am missing? 2011/3/29 Attila Király kiralyattila...@gmail.com: Yep I ment that and it looks ok. Is your html page in UTF-8 as well? Attila 2011/3/29 nino martinez wael nino.martinez.w...@gmail.com you mean like this: Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 URIEncoding=UTF-8 / Already done so.. Or? Thanks for helping.. 2011/3/29 Attila Király kiralyattila...@gmail.com: If this encoding issue is in url: did you configure Tomcat to use UTF-8 for uri encoding (URIEncoding attribute on the HTTP connector)? The default encoding for URI is ISO-8859-1 in Tomcat and UTF-8 in Jetty. Attila 2011/3/29 nino martinez wael nino.martinez.w...@gmail.com Hi Guys Im not sure if this is a wicket issue (I don't think so). But we are experiencing encoding(æøå) issues with Tomcat 7.0.11 after using Apache Wicket 1.5-rc2. However this issue does not occur when running Jetty.. Anyone has an idea on howto fix this? regards Nino - 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: @RequireHttps start session before redirect to secure page
thanks I'll try that, it is possible that they go straight to the login page but unlikely so I should be ok. On 29/mar/2011, at 18.31, Igor Vaynberg wrote: simply call session.bind() in requestcycle.onendrequest() which will make sure the session is bound on every request. you can still have a problem if the login page is the first page hit by the user. can that be the case in your application? -igor On Tue, Mar 29, 2011 at 5:38 AM, Phill ph...@bicispace.com wrote: I'm running into this problem as described in the javadocs for HttpsRequestCycleProcessor: Notes: According to servlet spec a cookie created on an https request is marked as secure, such cookies are not available for http requests. What this means is that a session started over https will not be propagated to further http calls because JSESSIONID cookie will be marked as secure and not available to http requests. This entails that unless a session is created and bound on http prior to using an https request any wicket pages or session values stored in the https session will not be available to further http requests. If your application requires a http-https-http interactions (such as the case where only a login page and my account pages are secure) you must make sure a session is created and stored in the http request prior to the first http-https redirect. When my users start a session via the sign-in page protected by @RequireHttps they are then redirected to a non-ssl but authorisation-protected page, but as there is no insecure session at that point they are bounced back to the sign-in page again. I would really appreciate some suggestions as to how others users deal with this issue i.e. how could I ensure that a session is created and stored in the http request prior to the first http-https redirect? I thought about having a non-ssl protected sign-in page which has an immediate javascript redirect to the ssl version but it doesn't seem very elegant. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: model help
Not sure what your objects look like but I will try to answer question 2... Not sure if this will work for you...sometimes I find myself using PropertyModels mixed with CPMs... new ListView(myId, new PropertyModel(foo, widgets)) And it may not be entirely obvious you can use dot notation to access nested objects...new PropertyModel(foo, bar.name) for the following; class Foo() { private Bar bar; } class Bar() { private String name; } From: mlabs mlabs@gmail.com To: users@wicket.apache.org Date: 03/29/2011 02:50 PM Subject:model help 1. first I'd like to ask if there is any good reading material out there regarding models. In particular I want to figure out all the nifty things you can do with them via nesting/chaining etc. I've read Wicket in Action .. but it seemed to gloss over the advanced stuff you can do with them .. and I've read the docs.. and just from reading those, well it's not obvious what you can do with them and why... 2. I have a specific problem and I'm looking for some hints. I have a foo bean that I get from a DAO layer. The foo bean has the usual name, description String properties. It also has an array of 'widget' beans called 'widgets'. The widget beans also have a name and description properties ans well as various others. So I have a form and I map the foo.name, foo.description properties to TextField components using a compundpropertymodel. The 3rd component is a ListView, which I want to use to display the widgets. First problem I run into is that the ListView model needs to be a List, not an array of Widget. So the compoundpropertymodel barfs at this point. I don't have any control over the beans and I'd rather not wrap them .. I want to bind the components directly to the bean properties. I'm wondering if there is a neat trick I can use involving model nesting or something like that to solve this problem? Or maybe there is a way to tell the CPM that for property 'widgets' .. do something different.. like array-to-List conversion .. I'm a wicket newbie and the model-penny hasn't quite dropped yet.. so any help would be most appreciated. TIA -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/model-help-tp3415833p3415833.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 Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information.
Re: flexible authentication
Take a look at IAuthorizationStrategy and ist implementations. It is extremely easy to create your own implementation and make it more dynamic. The existing implementations can be used as starting point. Cheers Hans Am 29.03.11 17:51 schrieb hrbaer unter herber.m...@gmail.com: it's not about to bash the framework. Because I'm still a beginner I just want to make sure that this approach is not working for me. It seems like the demo implementation just allows two options: - need authentication - don't need authentication but there is no option to make it more flexible. What I'm interested in is if there is any chance to use out of the box functionality of wicket to solve this issue. Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/flexible-authentication-tp3415413p3 415452.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: flexible authentication
I think you could do it by using a base role that all users receive, then add additional roles to tighten it down. You would then need to fake authentication of the base users by calling session.authenticate(user, pass) and assigning the BASE role, even though the user won't explicitly log in. Users who do log in will receive the correct role such as ADMIN Some users secure (ADMIN), some users wide-open (BASE) @AuthorizeInstantiation({ADMIN, BASE}) All users secure @AuthorizeInstantiation(ADMIN) You might also consider subclassing the page and marking that with the annotation, then handle the response to the secured or unsecured version by checking if the user is signed in. I'm not sure where you are going with this because I'm not sure why you have the requirement of being secure for some users but not secure for others. From: hrbaer herber.m...@gmail.com To: users@wicket.apache.org Date: 03/29/2011 12:37 PM Subject:flexible authentication Hi all, my web application is using the wicket authentication approach (AuthenticatedWebSession) and all my secure java files are marked with @AuthorizeInstantiation(ADMIN) So once I added this annotation there is no chance to bypass the authentication. But what if there is the need to be flixible? What if for some users the page A should be secure and for others don't? Let's assume there is is page with e.g. contact informations and a user can decide for his own if the page should be accessible with or without authentication. How can I achieve that without using the wicket approach? At the moment it don't think that the wicket approach is the right one?! Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/flexible-authentication-tp3415413p3415413.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 Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information.
problems with spring integration
Hi all, I did some research within the forum but I didn't find the answer yet :( I tried to integrate Spring (using https://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach Spring + WICKET ) but I still have an error. I added the following lines to my web.xml: wicket org.apache.wicket.protocol.http.WicketServlet applicationFactoryClassName org.apache.wicket.spring.SpringWebApplicationFactory 1 contextConfigLocation /WEB-INF/applicationContext.xml org.springframework.web.context.ContextLoaderListener Within my xxxApplication file I added: public class HomeApplication extends AuthenticatedWebApplication { private UserService userService; public void setUserService( UserService userService ) { this.userService = userService; } public UserService getUserService() { return this.userService; } (...) And within my java file there is: public class Test extends WebPage { private UserService getUserService() { return ( (xxxApplication) getApplication()).getUserService(); } (...) } So if I start the server I invoke the setter of the method setUserService of my xxxApplication class. But once I call getUserService() of my java file the return value is null!? Any ideas? Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/problems-with-spring-integration-tp3416484p3416484.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: flexible authentication
Thanks for all the good hints ... let me check the links/advices. Hopefully there is no need to ask any further questions :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/flexible-authentication-tp3415413p3416489.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: problems with spring integration
When you use spring there needs to be a wicket application bean defined in your applicationContext.xml, I believe the default name is wicketApplication. So you can instruct it to be autowired by type and then use the @Autowired annotation to get services injected into the application. However for most cases this is not what you want. You need to consider the serialization aspects of wicket. The primary danger is that your service gets serialized with a Page or Panel and that the serialization cascades and serializes the entire spring container and all other beans. The page is serialized after each request including ajax requests. The normal approach is to use the @SpringBean annotation within Component inheriting classes (like Page and Panel) as this will wrap your service class in a light weight proxy that can be serialized quickly and still allow the bean lookup from the application context to occur on deserialization. The only trick is that the assignment occurs in the parent class so you need to not initialize your services to anything (otherwise you initialize the variable in the base class and it is then cleared in the current class). Do: @SpringBean (name=service) private Service service; Don't do this: @SpringBean (name=service) private Service service = null; Regards, Mike Hi all, I did some research within the forum but I didn't find the answer yet :( I tried to integrate Spring (using https://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach Spring + WICKET ) but I still have an error. I added the following lines to my web.xml: wicket org.apache.wicket.protocol.http.WicketServlet applicationFactoryClassName org.apache.wicket.spring.SpringWebApplicationFactory 1 contextConfigLocation /WEB-INF/applicationContext.xml org.springframework.web.context.ContextLoaderListener Within my xxxApplication file I added: public class HomeApplication extends AuthenticatedWebApplication { private UserService userService; public void setUserService( UserService userService ) { this.userService = userService; } public UserService getUserService() { return this.userService; } (...) And within my java file there is: public class Test extends WebPage { private UserService getUserService() { return ( (xxxApplication) getApplication()).getUserService(); } (...) } So if I start the server I invoke the setter of the method setUserService of my xxxApplication class. But once I call getUserService() of my java file the return value is null!? Any ideas? Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/problems-with-spring-integration-tp3416484p3416484.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: WICKET-2056 broke DatePicker in ModalWindow in 1.4.16
Got the same issue. Please, file jira. - -- http://www.linkedin.com/in/amorozov -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WICKET-2056-broke-DatePicker-in-ModalWindow-in-1-4-16-tp3416225p3416830.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: StatelessForm redirect
The remaining stack trace seems strange. But ignoring that and focusing on setting the 'action' attribute, in the webmarkup container that you use (in stead of a form component) Do something like: @Override onComponentTag(...){ tag.put(action,RequestCycle.get().urlFor(SearchResultspage.class)) } Its hacky but would work. Probably want to make sure you've using method=get on the form too. -Clint On Tue, Mar 29, 2011 at 11:50 AM, lovewicket pey...@hotmail.com wrote: Actually I handled the exception (in the catch block) and that's how I knew that the current page wanted to redirect to the intended page. I was getting the above posted exception and then the following exception: 2011-03-28 22:55:49.0783 ERROR http-8080-1 org.apache.wicket.protocol.http.WebResponse - Unable to redirect to: searchresults?value=year=AllmoviesIncluded=falseimagesIncluded=falseimageType=AllmovieType=AllmovieSize=Any, HTTP Response has already been committed. 2011-03-28 22:55:49.0783 ERROR http-8080-1 org.apache.wicket.protocol.http.WicketFilter - closing the buffer error java.lang.IllegalStateException at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435) at org.apache.wicket.protocol.http.WebResponse.sendRedirect(WebResponse.java:299) at org.apache.wicket.protocol.http.WebResponse.redirect(WebResponse.java:250) at org.apache.wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:67) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:502) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) How would you pass in pageparameters through component tag? Thank you -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/StatelessForm-redirect-tp3406282p3415450.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