RE: Javascript adding input
Ok, that's the only way I know how too. I was hoping there is another way -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Gravener Sent: Friday, May 09, 2008 12:52 PM To: users@wicket.apache.org Subject: Re: Javascript adding input Get the hidden data from the request: getRequest().getParameter(hidden_token); On Fri, May 9, 2008 at 2:13 PM, Dan Kaplan [EMAIL PROTECTED] wrote: That's not the point, but if you need a good reason how about this: I'm using recaptcha (it generates a captcha on the page). It works by putting a script tag where you want it to show up. When the page loads, it puts a text input field and a bunch of hidden fields there. You need these hidden fields to tell the recaptcha server what it gave you so it can compare it to what the user typed in. Without them, it can't tell you if the user entered things in correctly or not. -Original Message- From: Maurice Marrink [mailto:[EMAIL PROTECTED] Sent: Friday, May 09, 2008 12:24 AM To: users@wicket.apache.org Subject: Re: Javascript adding input Why would you want to do that? If it happens at form load you must know about this inputfield when you create the page so why not add a wicket component for it too? Maurice On Fri, May 9, 2008 at 1:02 AM, Dan Kaplan [EMAIL PROTECTED] wrote: Let's say that hypothetically I used javascript to add an input to a form in its onload method. How can I get wicket to become aware of that input so I can do things like validate it, etc.? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ryan Gravener http://twitter.com/ryangravener - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Javascript adding input
That's not the point, but if you need a good reason how about this: I'm using recaptcha (it generates a captcha on the page). It works by putting a script tag where you want it to show up. When the page loads, it puts a text input field and a bunch of hidden fields there. You need these hidden fields to tell the recaptcha server what it gave you so it can compare it to what the user typed in. Without them, it can't tell you if the user entered things in correctly or not. -Original Message- From: Maurice Marrink [mailto:[EMAIL PROTECTED] Sent: Friday, May 09, 2008 12:24 AM To: users@wicket.apache.org Subject: Re: Javascript adding input Why would you want to do that? If it happens at form load you must know about this inputfield when you create the page so why not add a wicket component for it too? Maurice On Fri, May 9, 2008 at 1:02 AM, Dan Kaplan [EMAIL PROTECTED] wrote: Let's say that hypothetically I used javascript to add an input to a form in its onload method. How can I get wicket to become aware of that input so I can do things like validate it, etc.? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Javascript adding input
Let's say that hypothetically I used javascript to add an input to a form in its onload method. How can I get wicket to become aware of that input so I can do things like validate it, etc.?
ReCaptcha Panel
Here is the code for the recaptcha panel. I don't feel like creating a project for this but others have expressed interest in it. Panel: http://pastebin.org/29726 SRC: http://pastebin.org/29725 NOTE: this library has a dependency lib. You can download it here: http://code.google.com/p/recaptcha/downloads/list Obviously, you just need the lib for java.
RE: ReCaptcha Panel
Probably, IMO it's way easier to use this than following the captcha example. This example has a problem though: it displays a warning every time you visit the page with the panel (can't remember what the warning says, something about not being able to bind a text field). But it still works exactly how it should. -Original Message- From: Michael Laccetti [mailto:[EMAIL PROTECTED] Sent: Monday, April 14, 2008 12:08 PM To: users@wicket.apache.org Subject: Re: ReCaptcha Panel Perhaps this would do well as an addition to wicketstuff contribs? Dan Kaplan-3 wrote: Here is the code for the recaptcha panel. I don't feel like creating a project for this but others have expressed interest in it. Panel: http://pastebin.org/29726 SRC: http://pastebin.org/29725 NOTE: this library has a dependency lib. You can download it here: http://code.google.com/p/recaptcha/downloads/list Obviously, you just need the lib for java. - -- Michael Laccetti (416)558-9718 S2G Limited http://www.s2g.ca/ -- View this message in context: http://www.nabble.com/ReCaptcha-Panel- tp16685718p16687650.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Removing the jsessionid for SEO
That is helpful, but: This is an extension of the standard, so not all bots may follow it. I wonder if the major ones do... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Levy Sent: Thursday, April 03, 2008 6:16 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO We have a similar issue, and are trying the following out right now.. http://www.google.com/support/webmasters/bin/answer.py?hl=enanswer=40367 User-agent: * Disallow: /*? On Thu, Apr 3, 2008 at 9:09 PM, Dan Kaplan [EMAIL PROTECTED] wrote: Ok, at least I'm not missing anything. I understand the benefits it's providing with its stateful framework. Developing a site with Wicket is easier than with any other framework I've used. But this statefulness, which makes websites so easy to develop, seems to be counter productive to SEO: GoogleBot will follow and index stateful links. Worst case scenario, these actually become visible to google users and when they click the link it takes them to an invalid session page. They think, This site is broken and move on to the next link of their search result. Another approach to solving this is to block all the stateful pages in my robots.txt file. But how can I block these links in robots.txt since they change per session? Is there any way to know what the url will resolve to when googlebot tries to visit my site so I can tell it to disallow: /?wicket:interface=:10:1::: and ?wicket:interface=:0:1::: and ...? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 5:45 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO On Thu, Apr 3, 2008 at 5:31 PM, Dan Kaplan [EMAIL PROTECTED] wrote: Ok I did a little preliminary research on this. Right now PagingNavigator uses PagingNavigationLink's to represent its page. This extends Link. I'm supposed to override PagingNavigator's newPagingNavigationLink() method to accomplish this (I think) but past that, this isn't very straightforward to me. Do I need to create my own BookmarkablePagingNavigationLink? When I do... what next? I really don't know enough about bookmarkablePageLinks to do this. Right now, all the magic happens inside PagingNavigationLink. Won't I have to move all that logic into the WebPage that I'm passing into BookmarkablePagingNavigationLink? This seems like a lot of work. Am I missing something critical? no, you are not missing anything. you see, when you go stateless, like what you want, then you have to recreate all the magic stuff that makes stateful links Just Work. Without state you are back to the servlet/mvc programming model: you have to encode the state that you want into the link, then on the trip back decode it, recreate something from it, and then apply that something onto the components. This is the crapwork that wicket does for you usually. -igor -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:40 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO you subclass the pagenavigator and make it use bookmarkable links also. it has factory methods for all the links it uses. -igor On Thu, Apr 3, 2008 at 3:36 PM, Dan Kaplan [EMAIL PROTECTED] wrote: I wasn't talking about the links that are on the list (I already make those bookmarkable). I'm talking about the links that the Navigator generates. How do I make it so page 2 is bookmarkable? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:30 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO instead of item.add(new link(foo) { onclick() }); do item.add(new bookmarkablepagelink(foo, page.class)); -igor On Thu, Apr 3, 2008 at 3:28 PM, Dan Kaplan [EMAIL PROTECTED] wrote: How? I asked how to do it before and nobody suggested this as a possibility. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:26 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO dataview can work in a stateless mode, just use bookmarkable links inside it -igor On Thu, Apr 3, 2008 at 3:22 PM, Dan Kaplan [EMAIL PROTECTED
RE: Removing the jsessionid for SEO
Regardless, at the very least this makes your site look weird and unprofessional when google puts a jsessionid on your url. There has got to be some negative effect when google visits it the second time and the jsessionid has changed but it sees the same exact content. Worst case, it'll think you're trying to trick it. About those 404s, I'm finding that with the fix I provided I don't get a 404, but the links refresh the page I'm already on. IE: If I'm on A, and a link to B is non-bookmarkable, clicking B refreshes A. This issue is very disconcerting to me. It's one of the reasons I wish that DataView had an option to work in stateless mode. Cause if I ban cookies and Googlebot visits my home page (with a navigator on it), it'll try to follow all these page links and from its perspective, they all lead back to the first page. So it's kinda a catch-22: Include the jsessionid in the urls and get bad SEO or remove the jsessionid and get bad SEO :( Perhaps the answer to my prayers is a combination of the noindex/nofollow meta tag with a sitemap.xml. I'm thinking I can put a nofollow on the home page (so googlebot doesn't try to follow the navigator links) and use the sitemap.xml to point out the individual pages I want it to index. Matej: can you go into more detail about your hybrid URL statement? Won't google index, for example, /home and /home.1 if I use it? When it follows the next page, won't the url become /home.1.2 or something? That .2 is a page version: If google indexes that and tries to visit it again, won't it report about an invalid session? -Original Message- From: Matej Knopp [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 11:10 AM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO On the other hand, crawling non-bookmarkable pages is not very useful anyway, since ?wicket:interface url will always get page expired when you click on the result. However, preserving session makes lot of sense with hybrid url. Google remembers the original url (without page instance) while indexing the real page (after redirect). I think though that the crawler is quite advanced. I'm would think it supports cookies (at least JSESSIONID) as well as it evaluates some of the javascript on page. -Matej On Thu, Apr 3, 2008 at 6:56 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: right. if you strip sessionid then all your nonbookmarkable urls will resolve to a 404. that will probably drop your rank a lot faster -igor On Thu, Apr 3, 2008 at 9:16 AM, Johan Compagner [EMAIL PROTECTED] wrote: the problem is that then you have to have all stateless pages. Else google can't crawl your website. And if that is the case then you could be completely stateless so you dont have a session (id) to worry about at all. johan On Thu, Apr 3, 2008 at 4:54 PM, Zappaterrini, Larry [EMAIL PROTECTED] wrote: When Google asks to not have special treatment for their bot, they are referring to content more than anything. Regarding the session id being coded in the URL, see the Technical guidelines section of Google's Webmaster Guidelines - http://www.google.com/support/webmasters/bin/answer.py?answer=35769#desi gn It specifically recommends allow(ing) search bots to crawl your sites without session IDs or arguments that track their path through the site. -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 7:35 AM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO isnt google always saying that you shouldn't alter behavior of your site depending of it is there bot or not? On Thu, Apr 3, 2008 at 1:00 PM, Artur W. [EMAIL PROTECTED] wrote: Hi! igor.vaynberg wrote: also by doing what you have done users with cookies disabled wont be able to use your site... In my opinion session id is a problem. Google index the same page again and again. About the users without cookies we can do like this: static class Unbuffered extends WebResponse { private static final String[] botAgents = { onetszukaj, googlebot, appie, architext, jeeves, bjaaland, ferret, gulliver, harvest, htdig, linkwalker, lycos_, moget, muscatferret, myweb, nomad, scooter, yahoo!\\sslurp\\schina, slurp, weblayers, antibot, bruinbot, digout4u, echo!, ia_archiver, jennybot, mercator, netcraft, msnbot, petersnews, unlost_web_crawler, voila, webbase, webcollage, cfetch, zyborg, wisenutbot,
RE: Removing the jsessionid for SEO
Clarifications: When I said About those 404s, I was talking about if you use the fix I provided and turn off cookies on your browser. When I said, If I ban cookies I mean to say, If I require cookies -Original Message- From: Dan Kaplan [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:22 PM To: users@wicket.apache.org Subject: RE: Removing the jsessionid for SEO Regardless, at the very least this makes your site look weird and unprofessional when google puts a jsessionid on your url. There has got to be some negative effect when google visits it the second time and the jsessionid has changed but it sees the same exact content. Worst case, it'll think you're trying to trick it. About those 404s, I'm finding that with the fix I provided I don't get a 404, but the links refresh the page I'm already on. IE: If I'm on A, and a link to B is non-bookmarkable, clicking B refreshes A. This issue is very disconcerting to me. It's one of the reasons I wish that DataView had an option to work in stateless mode. Cause if I ban cookies and Googlebot visits my home page (with a navigator on it), it'll try to follow all these page links and from its perspective, they all lead back to the first page. So it's kinda a catch-22: Include the jsessionid in the urls and get bad SEO or remove the jsessionid and get bad SEO :( Perhaps the answer to my prayers is a combination of the noindex/nofollow meta tag with a sitemap.xml. I'm thinking I can put a nofollow on the home page (so googlebot doesn't try to follow the navigator links) and use the sitemap.xml to point out the individual pages I want it to index. Matej: can you go into more detail about your hybrid URL statement? Won't google index, for example, /home and /home.1 if I use it? When it follows the next page, won't the url become /home.1.2 or something? That .2 is a page version: If google indexes that and tries to visit it again, won't it report about an invalid session? -Original Message- From: Matej Knopp [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 11:10 AM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO On the other hand, crawling non-bookmarkable pages is not very useful anyway, since ?wicket:interface url will always get page expired when you click on the result. However, preserving session makes lot of sense with hybrid url. Google remembers the original url (without page instance) while indexing the real page (after redirect). I think though that the crawler is quite advanced. I'm would think it supports cookies (at least JSESSIONID) as well as it evaluates some of the javascript on page. -Matej On Thu, Apr 3, 2008 at 6:56 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: right. if you strip sessionid then all your nonbookmarkable urls will resolve to a 404. that will probably drop your rank a lot faster -igor On Thu, Apr 3, 2008 at 9:16 AM, Johan Compagner [EMAIL PROTECTED] wrote: the problem is that then you have to have all stateless pages. Else google can't crawl your website. And if that is the case then you could be completely stateless so you dont have a session (id) to worry about at all. johan On Thu, Apr 3, 2008 at 4:54 PM, Zappaterrini, Larry [EMAIL PROTECTED] wrote: When Google asks to not have special treatment for their bot, they are referring to content more than anything. Regarding the session id being coded in the URL, see the Technical guidelines section of Google's Webmaster Guidelines - http://www.google.com/support/webmasters/bin/answer.py?answer=35769#desi gn It specifically recommends allow(ing) search bots to crawl your sites without session IDs or arguments that track their path through the site. -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 7:35 AM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO isnt google always saying that you shouldn't alter behavior of your site depending of it is there bot or not? On Thu, Apr 3, 2008 at 1:00 PM, Artur W. [EMAIL PROTECTED] wrote: Hi! igor.vaynberg wrote: also by doing what you have done users with cookies disabled wont be able to use your site... In my opinion session id is a problem. Google index the same page again and again. About the users without cookies we can do like this: static class Unbuffered extends WebResponse { private static final String[] botAgents = { onetszukaj, googlebot, appie, architext, jeeves, bjaaland, ferret, gulliver, harvest, htdig, linkwalker, lycos_, moget, muscatferret, myweb
RE: Removing the jsessionid for SEO
How? I asked how to do it before and nobody suggested this as a possibility. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:26 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO dataview can work in a stateless mode, just use bookmarkable links inside it -igor On Thu, Apr 3, 2008 at 3:22 PM, Dan Kaplan [EMAIL PROTECTED] wrote: Regardless, at the very least this makes your site look weird and unprofessional when google puts a jsessionid on your url. There has got to be some negative effect when google visits it the second time and the jsessionid has changed but it sees the same exact content. Worst case, it'll think you're trying to trick it. About those 404s, I'm finding that with the fix I provided I don't get a 404, but the links refresh the page I'm already on. IE: If I'm on A, and a link to B is non-bookmarkable, clicking B refreshes A. This issue is very disconcerting to me. It's one of the reasons I wish that DataView had an option to work in stateless mode. Cause if I ban cookies and Googlebot visits my home page (with a navigator on it), it'll try to follow all these page links and from its perspective, they all lead back to the first page. So it's kinda a catch-22: Include the jsessionid in the urls and get bad SEO or remove the jsessionid and get bad SEO :( Perhaps the answer to my prayers is a combination of the noindex/nofollow meta tag with a sitemap.xml. I'm thinking I can put a nofollow on the home page (so googlebot doesn't try to follow the navigator links) and use the sitemap.xml to point out the individual pages I want it to index. Matej: can you go into more detail about your hybrid URL statement? Won't google index, for example, /home and /home.1 if I use it? When it follows the next page, won't the url become /home.1.2 or something? That .2 is a page version: If google indexes that and tries to visit it again, won't it report about an invalid session? -Original Message- From: Matej Knopp [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 11:10 AM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO On the other hand, crawling non-bookmarkable pages is not very useful anyway, since ?wicket:interface url will always get page expired when you click on the result. However, preserving session makes lot of sense with hybrid url. Google remembers the original url (without page instance) while indexing the real page (after redirect). I think though that the crawler is quite advanced. I'm would think it supports cookies (at least JSESSIONID) as well as it evaluates some of the javascript on page. -Matej On Thu, Apr 3, 2008 at 6:56 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: right. if you strip sessionid then all your nonbookmarkable urls will resolve to a 404. that will probably drop your rank a lot faster -igor On Thu, Apr 3, 2008 at 9:16 AM, Johan Compagner [EMAIL PROTECTED] wrote: the problem is that then you have to have all stateless pages. Else google can't crawl your website. And if that is the case then you could be completely stateless so you dont have a session (id) to worry about at all. johan On Thu, Apr 3, 2008 at 4:54 PM, Zappaterrini, Larry [EMAIL PROTECTED] wrote: When Google asks to not have special treatment for their bot, they are referring to content more than anything. Regarding the session id being coded in the URL, see the Technical guidelines section of Google's Webmaster Guidelines - http://www.google.com/support/webmasters/bin/answer.py?answer=35769#desi gn It specifically recommends allow(ing) search bots to crawl your sites without session IDs or arguments that track their path through the site. -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 7:35 AM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO isnt google always saying that you shouldn't alter behavior of your site depending of it is there bot or not? On Thu, Apr 3, 2008 at 1:00 PM, Artur W. [EMAIL PROTECTED] wrote: Hi! igor.vaynberg wrote: also by doing what you have done users with cookies disabled wont be able to use your site... In my opinion session id is a problem. Google index the same page again and again. About the users without cookies we can do like this: static class Unbuffered extends WebResponse { private static final
RE: Removing the jsessionid for SEO
I wasn't talking about the links that are on the list (I already make those bookmarkable). I'm talking about the links that the Navigator generates. How do I make it so page 2 is bookmarkable? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:30 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO instead of item.add(new link(foo) { onclick() }); do item.add(new bookmarkablepagelink(foo, page.class)); -igor On Thu, Apr 3, 2008 at 3:28 PM, Dan Kaplan [EMAIL PROTECTED] wrote: How? I asked how to do it before and nobody suggested this as a possibility. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:26 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO dataview can work in a stateless mode, just use bookmarkable links inside it -igor On Thu, Apr 3, 2008 at 3:22 PM, Dan Kaplan [EMAIL PROTECTED] wrote: Regardless, at the very least this makes your site look weird and unprofessional when google puts a jsessionid on your url. There has got to be some negative effect when google visits it the second time and the jsessionid has changed but it sees the same exact content. Worst case, it'll think you're trying to trick it. About those 404s, I'm finding that with the fix I provided I don't get a 404, but the links refresh the page I'm already on. IE: If I'm on A, and a link to B is non-bookmarkable, clicking B refreshes A. This issue is very disconcerting to me. It's one of the reasons I wish that DataView had an option to work in stateless mode. Cause if I ban cookies and Googlebot visits my home page (with a navigator on it), it'll try to follow all these page links and from its perspective, they all lead back to the first page. So it's kinda a catch-22: Include the jsessionid in the urls and get bad SEO or remove the jsessionid and get bad SEO :( Perhaps the answer to my prayers is a combination of the noindex/nofollow meta tag with a sitemap.xml. I'm thinking I can put a nofollow on the home page (so googlebot doesn't try to follow the navigator links) and use the sitemap.xml to point out the individual pages I want it to index. Matej: can you go into more detail about your hybrid URL statement? Won't google index, for example, /home and /home.1 if I use it? When it follows the next page, won't the url become /home.1.2 or something? That .2 is a page version: If google indexes that and tries to visit it again, won't it report about an invalid session? -Original Message- From: Matej Knopp [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 11:10 AM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO On the other hand, crawling non-bookmarkable pages is not very useful anyway, since ?wicket:interface url will always get page expired when you click on the result. However, preserving session makes lot of sense with hybrid url. Google remembers the original url (without page instance) while indexing the real page (after redirect). I think though that the crawler is quite advanced. I'm would think it supports cookies (at least JSESSIONID) as well as it evaluates some of the javascript on page. -Matej On Thu, Apr 3, 2008 at 6:56 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: right. if you strip sessionid then all your nonbookmarkable urls will resolve to a 404. that will probably drop your rank a lot faster -igor On Thu, Apr 3, 2008 at 9:16 AM, Johan Compagner [EMAIL PROTECTED] wrote: the problem is that then you have to have all stateless pages. Else google can't crawl your website. And if that is the case then you could be completely stateless so you dont have a session (id) to worry about at all. johan On Thu, Apr 3, 2008 at 4:54 PM, Zappaterrini, Larry [EMAIL PROTECTED] wrote: When Google asks to not have special treatment for their bot, they are referring to content more than anything. Regarding the session id being coded in the URL, see the Technical guidelines section of Google's Webmaster Guidelines - http://www.google.com/support/webmasters/bin/answer.py?answer=35769#desi gn It specifically recommends allow(ing) search bots to crawl your sites without session IDs or arguments that track their path through the site. -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 7:35 AM To: users
RE: Removing the jsessionid for SEO
Awesome, thanks -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:40 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO you subclass the pagenavigator and make it use bookmarkable links also. it has factory methods for all the links it uses. -igor On Thu, Apr 3, 2008 at 3:36 PM, Dan Kaplan [EMAIL PROTECTED] wrote: I wasn't talking about the links that are on the list (I already make those bookmarkable). I'm talking about the links that the Navigator generates. How do I make it so page 2 is bookmarkable? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:30 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO instead of item.add(new link(foo) { onclick() }); do item.add(new bookmarkablepagelink(foo, page.class)); -igor On Thu, Apr 3, 2008 at 3:28 PM, Dan Kaplan [EMAIL PROTECTED] wrote: How? I asked how to do it before and nobody suggested this as a possibility. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:26 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO dataview can work in a stateless mode, just use bookmarkable links inside it -igor On Thu, Apr 3, 2008 at 3:22 PM, Dan Kaplan [EMAIL PROTECTED] wrote: Regardless, at the very least this makes your site look weird and unprofessional when google puts a jsessionid on your url. There has got to be some negative effect when google visits it the second time and the jsessionid has changed but it sees the same exact content. Worst case, it'll think you're trying to trick it. About those 404s, I'm finding that with the fix I provided I don't get a 404, but the links refresh the page I'm already on. IE: If I'm on A, and a link to B is non-bookmarkable, clicking B refreshes A. This issue is very disconcerting to me. It's one of the reasons I wish that DataView had an option to work in stateless mode. Cause if I ban cookies and Googlebot visits my home page (with a navigator on it), it'll try to follow all these page links and from its perspective, they all lead back to the first page. So it's kinda a catch-22: Include the jsessionid in the urls and get bad SEO or remove the jsessionid and get bad SEO :( Perhaps the answer to my prayers is a combination of the noindex/nofollow meta tag with a sitemap.xml. I'm thinking I can put a nofollow on the home page (so googlebot doesn't try to follow the navigator links) and use the sitemap.xml to point out the individual pages I want it to index. Matej: can you go into more detail about your hybrid URL statement? Won't google index, for example, /home and /home.1 if I use it? When it follows the next page, won't the url become /home.1.2 or something? That .2 is a page version: If google indexes that and tries to visit it again, won't it report about an invalid session? -Original Message- From: Matej Knopp [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 11:10 AM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO On the other hand, crawling non-bookmarkable pages is not very useful anyway, since ?wicket:interface url will always get page expired when you click on the result. However, preserving session makes lot of sense with hybrid url. Google remembers the original url (without page instance) while indexing the real page (after redirect). I think though that the crawler is quite advanced. I'm would think it supports cookies (at least JSESSIONID) as well as it evaluates some of the javascript on page. -Matej On Thu, Apr 3, 2008 at 6:56 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: right. if you strip sessionid then all your nonbookmarkable urls will resolve to a 404. that will probably drop your rank a lot faster -igor On Thu, Apr 3, 2008 at 9:16 AM, Johan Compagner [EMAIL PROTECTED] wrote: the problem is that then you have to have all stateless pages. Else google can't crawl your website. And if that is the case then you could be completely stateless so you dont have a session (id) to worry about at all. johan On Thu, Apr 3, 2008 at 4:54 PM, Zappaterrini, Larry [EMAIL PROTECTED] wrote: When Google asks to not have special
RE: Removing the jsessionid for SEO
-Original Message- From: Martijn Dashorst [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:36 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO On 4/4/08, Dan Kaplan [EMAIL PROTECTED] wrote: Regardless, at the very least this makes your site look weird and unprofessional when google puts a jsessionid on your url. 0.5% of your users care about the URL that is displayed in a google search result. It doesn't look weird or unprofessional. It is not like your URL ends in .php or *gawk* .asp is it? It brings the sophistication of Java to your users. My URL ends with ;jsessionid=an7goabg0az (my actual situation). I personally think that looks weirder than .php or .asp. Where did you get that 0.5% statistic? Regardless, my users won't see ANY url if my site is on the 50th page of the search. That's the important issue here. There has got to be some negative effect when google visits it the second time and the jsessionid has changed but it sees the same exact content. Worst case, it'll think you're trying to trick it. I think you need to give the google engineers *some* credit. I seriously doubt they are *THAT* stupid. Martijn These links suggest otherwise: http://www.webmasterworld.com/google/3238326.htm http://www.webmasterworld.com/forum3/5624.htm http://www.webmasterworld.com/forum3/5479.htm http://randomcoder.com/articles/jsessionid-considered-harmful Google jsessionid SEO for more. Most of the results tell you to get rid of the jsessionid. Granted, it doesn't seem google has specifically mentioned this either way so all these comments are rumors. But the fact of the matter is Google *DOES* index your urls with the jessionid still in it. You'd think they'd be smart enough to remove that, right? If they can't get that much right, I wouldn't want to make any other assumptions about their abilities on similar matters. -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.2 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Removing the jsessionid for SEO
Ok I did a little preliminary research on this. Right now PagingNavigator uses PagingNavigationLink's to represent its page. This extends Link. I'm supposed to override PagingNavigator's newPagingNavigationLink() method to accomplish this (I think) but past that, this isn't very straightforward to me. Do I need to create my own BookmarkablePagingNavigationLink? When I do... what next? I really don't know enough about bookmarkablePageLinks to do this. Right now, all the magic happens inside PagingNavigationLink. Won't I have to move all that logic into the WebPage that I'm passing into BookmarkablePagingNavigationLink? This seems like a lot of work. Am I missing something critical? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:40 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO you subclass the pagenavigator and make it use bookmarkable links also. it has factory methods for all the links it uses. -igor On Thu, Apr 3, 2008 at 3:36 PM, Dan Kaplan [EMAIL PROTECTED] wrote: I wasn't talking about the links that are on the list (I already make those bookmarkable). I'm talking about the links that the Navigator generates. How do I make it so page 2 is bookmarkable? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:30 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO instead of item.add(new link(foo) { onclick() }); do item.add(new bookmarkablepagelink(foo, page.class)); -igor On Thu, Apr 3, 2008 at 3:28 PM, Dan Kaplan [EMAIL PROTECTED] wrote: How? I asked how to do it before and nobody suggested this as a possibility. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:26 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO dataview can work in a stateless mode, just use bookmarkable links inside it -igor On Thu, Apr 3, 2008 at 3:22 PM, Dan Kaplan [EMAIL PROTECTED] wrote: Regardless, at the very least this makes your site look weird and unprofessional when google puts a jsessionid on your url. There has got to be some negative effect when google visits it the second time and the jsessionid has changed but it sees the same exact content. Worst case, it'll think you're trying to trick it. About those 404s, I'm finding that with the fix I provided I don't get a 404, but the links refresh the page I'm already on. IE: If I'm on A, and a link to B is non-bookmarkable, clicking B refreshes A. This issue is very disconcerting to me. It's one of the reasons I wish that DataView had an option to work in stateless mode. Cause if I ban cookies and Googlebot visits my home page (with a navigator on it), it'll try to follow all these page links and from its perspective, they all lead back to the first page. So it's kinda a catch-22: Include the jsessionid in the urls and get bad SEO or remove the jsessionid and get bad SEO :( Perhaps the answer to my prayers is a combination of the noindex/nofollow meta tag with a sitemap.xml. I'm thinking I can put a nofollow on the home page (so googlebot doesn't try to follow the navigator links) and use the sitemap.xml to point out the individual pages I want it to index. Matej: can you go into more detail about your hybrid URL statement? Won't google index, for example, /home and /home.1 if I use it? When it follows the next page, won't the url become /home.1.2 or something? That .2 is a page version: If google indexes that and tries to visit it again, won't it report about an invalid session? -Original Message- From: Matej Knopp [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 11:10 AM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO On the other hand, crawling non-bookmarkable pages is not very useful anyway, since ?wicket:interface url will always get page expired when you click on the result. However, preserving session makes lot of sense with hybrid url. Google remembers the original url (without page instance) while indexing the real page (after redirect). I think though that the crawler is quite advanced. I'm would think it supports cookies (at least JSESSIONID) as well as it evaluates some of the javascript on page. -Matej On Thu, Apr 3, 2008 at 6:56 PM, Igor Vaynberg
RE: Removing the jsessionid for SEO
Ok, at least I'm not missing anything. I understand the benefits it's providing with its stateful framework. Developing a site with Wicket is easier than with any other framework I've used. But this statefulness, which makes websites so easy to develop, seems to be counter productive to SEO: GoogleBot will follow and index stateful links. Worst case scenario, these actually become visible to google users and when they click the link it takes them to an invalid session page. They think, This site is broken and move on to the next link of their search result. Another approach to solving this is to block all the stateful pages in my robots.txt file. But how can I block these links in robots.txt since they change per session? Is there any way to know what the url will resolve to when googlebot tries to visit my site so I can tell it to disallow: /?wicket:interface=:10:1::: and ?wicket:interface=:0:1::: and ...? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 5:45 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO On Thu, Apr 3, 2008 at 5:31 PM, Dan Kaplan [EMAIL PROTECTED] wrote: Ok I did a little preliminary research on this. Right now PagingNavigator uses PagingNavigationLink's to represent its page. This extends Link. I'm supposed to override PagingNavigator's newPagingNavigationLink() method to accomplish this (I think) but past that, this isn't very straightforward to me. Do I need to create my own BookmarkablePagingNavigationLink? When I do... what next? I really don't know enough about bookmarkablePageLinks to do this. Right now, all the magic happens inside PagingNavigationLink. Won't I have to move all that logic into the WebPage that I'm passing into BookmarkablePagingNavigationLink? This seems like a lot of work. Am I missing something critical? no, you are not missing anything. you see, when you go stateless, like what you want, then you have to recreate all the magic stuff that makes stateful links Just Work. Without state you are back to the servlet/mvc programming model: you have to encode the state that you want into the link, then on the trip back decode it, recreate something from it, and then apply that something onto the components. This is the crapwork that wicket does for you usually. -igor -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:40 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO you subclass the pagenavigator and make it use bookmarkable links also. it has factory methods for all the links it uses. -igor On Thu, Apr 3, 2008 at 3:36 PM, Dan Kaplan [EMAIL PROTECTED] wrote: I wasn't talking about the links that are on the list (I already make those bookmarkable). I'm talking about the links that the Navigator generates. How do I make it so page 2 is bookmarkable? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:30 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO instead of item.add(new link(foo) { onclick() }); do item.add(new bookmarkablepagelink(foo, page.class)); -igor On Thu, Apr 3, 2008 at 3:28 PM, Dan Kaplan [EMAIL PROTECTED] wrote: How? I asked how to do it before and nobody suggested this as a possibility. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2008 3:26 PM To: users@wicket.apache.org Subject: Re: Removing the jsessionid for SEO dataview can work in a stateless mode, just use bookmarkable links inside it -igor On Thu, Apr 3, 2008 at 3:22 PM, Dan Kaplan [EMAIL PROTECTED] wrote: Regardless, at the very least this makes your site look weird and unprofessional when google puts a jsessionid on your url. There has got to be some negative effect when google visits it the second time and the jsessionid has changed but it sees the same exact content. Worst case, it'll think you're trying to trick it. About those 404s, I'm finding that with the fix I provided I don't get a 404, but the links refresh the page I'm already on. IE: If I'm on A, and a link to B is non-bookmarkable, clicking B refreshes A. This issue is very disconcerting to me. It's one of the reasons I wish that DataView had an option to work in stateless mode. Cause if I
ReCaptcha Panel
Hello, I made a recaptcha panel for my site and I was wondering if I should share it back with the community. It's just a Panel, its template and a dependent jar. Should I just post the code here?
Removing the jsessionid for SEO
victori_ provided this information on IRC and I just wanted to share it with everyone else. Googlebot and others dont use cookies. This means when they visit your site it adds ;jsessionid=code to the end of all your urls they visit. When they re-visit it, they get a different code, consider that a different url with the same content and punish you. So, for the web crawling bots, its very important to get rid of this (Perhaps its worthwhile to check this code in to the code base). Heres what you do in your Application: @Override protected WebResponse newWebResponse(final HttpServletResponse servletRe sponse) { return CleanWebResponse.getNew(this, servletResponse); } Here's the CleanWebResponse class: public class CleanWebResponse { public static WebResponse getNew(final Application app, final HttpServletResponse servletResponse) { return app.getRequestCycleSettings().getBufferResponse() ? new Buffered(servletResponse) : new Unbuffered( servletResponse); } static class Buffered extends BufferedWebResponse { public Buffered(final HttpServletResponse httpServletResponse) { super(httpServletResponse); } @Override public CharSequence encodeURL(final CharSequence url) { return url; } } static class Unbuffered extends WebResponse { public Unbuffered(final HttpServletResponse httpServletResponse) { super(httpServletResponse); } @Override public CharSequence encodeURL(final CharSequence url) { return url; } } } Note, I haven't tested this myself yet but I plan to tonight. Hope this was helpful. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wizard seems to cache pages even on model change
Hello, Here is my scenario. I have a 2 page Wizard. The first page asks you to type in the primary key of a table. If that row already exists in the table, the second page gets loaded with the rest of that row's data. So, in summary, the first page of the wizard should be able to populate the second page. But here's my problem: The first page only populates the 2nd page if I haven't visited the second page yet. If, on the second page, I click the previous button and then pick a new primary key, when I visit the 2nd page again, the input fields are not updated. I've used the debugger to see that the Model Object *is* being updated. I can't figure out why this is happening. I only use PropertyModels (those are dynamic models, right?). I can only guess that the Wizard serializes the steps you've visited and doesn't check if the model has changed when you go back to them. One last thing that may be revealing: One of the things that second page displays is a listview of fields. If the second primary key I pick has more items in the list than the first one, the extra items do get populated on the page. IE: First pk has 3 items. Second pk has 4 items. The second page will have the correct 4th item in the list but the first 3 will be of the first pk. Here is my code in a pastebin: http://pastebin.org/26606 Here is my code inlined into the email: package com.haverlocke.tellah.web.component; import com.haverlocke.tellah.model.dao.WebsiteDao; import com.haverlocke.tellah.model.dao.WebsiteHistoryDao; import com.haverlocke.tellah.model.dto.LinkDto; import com.haverlocke.tellah.model.dto.WebsiteDto; import com.haverlocke.tellah.web.model.TellahUrlValidator; import com.haverlocke.tellah.web.page.HomePage; import com.haverlocke.tellah.web.util.SimilarWebsiteUtil; import com.haverlocke.tellah.web.component.recaptcha.ReCaptchaPanel; import net.databinder.components.AjaxOnKeyPausedUpdater; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.form.AjaxButton; import org.apache.wicket.behavior.HeaderContributor; import org.apache.wicket.extensions.wizard.Wizard; import org.apache.wicket.extensions.wizard.WizardModel; import org.apache.wicket.extensions.wizard.WizardStep; import org.apache.wicket.feedback.FeedbackMessage; import org.apache.wicket.feedback.IFeedbackMessageFilter; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.TextArea; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.markup.html.panel.FeedbackPanel; import org.apache.wicket.model.PropertyModel; import org.apache.wicket.model.IModel; import org.apache.wicket.spring.injection.annot.SpringBean; import org.apache.wicket.PageParameters; import org.apache.wicket.Component; import java.util.List; /** * @author Daniel Kaplan * @since 7.10.5 */ public class SubmitWizard extends Wizard { private static final String PUBLIC_DEV = fake; private static final String PRIVATE_DEV = fake; @SpringBean private WebsiteDao websiteDao; @SpringBean private WebsiteHistoryDao websiteHistoryDao; private WebsiteDto websiteDto = new WebsiteDto(); private Label note; private String noteString; private boolean insert; public SubmitWizard(String id, PageParameters pp) { super(id, false); insert = pp.getString(websiteName) == null || .equals(pp.getString(websiteName)); WizardModel model = new WizardModel(); model.add(new WebsiteName()); WebsiteDetails websiteDetails = new WebsiteDetails(); model.add(websiteDetails); init(model); websiteDetails.addReCaptchaPanel(); initPage(pp.getString(websiteName)); } @Override public void onFinish() { new WizardFinishedAction(new PropertyModel(this, websiteDto), getPage()).onSubmit(); } @Override public void onCancel() { setRedirect(true); setResponsePage(HomePage.class); } @Override protected FeedbackPanel newFeedbackPanel(String id) { return new FeedbackPanel(id, new IFeedbackMessageFilter() { public boolean accept(FeedbackMessage message) { //never show anything. We show all messages in a different panel defined in the WizardPage.java return false; } }); } private class WebsiteName extends WizardStep { public WebsiteName() { add(HeaderContributor.forCss(images/submit.css)); if (insert) { add(new Label(formHeader, Set the name)); } else { add(new Label(formHeader, Edit the name)); } TextField name = new TextField(name, new PropertyModel(websiteDto, name)); add(name.setRequired(true).add(new WebsiteLoadBehavior())); note = new Label(note, new PropertyModel(SubmitWizard.this,
RE: Wizard seems to cache pages even on model change
The most important part of this is probably HOW I update the model. I am using AJAX. -Original Message- From: Dan Kaplan [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 01, 2008 11:07 AM To: users@wicket.apache.org Subject: Wizard seems to cache pages even on model change Hello, Here is my scenario. I have a 2 page Wizard. The first page asks you to type in the primary key of a table. If that row already exists in the table, the second page gets loaded with the rest of that row's data. So, in summary, the first page of the wizard should be able to populate the second page. But here's my problem: The first page only populates the 2nd page if I haven't visited the second page yet. If, on the second page, I click the previous button and then pick a new primary key, when I visit the 2nd page again, the input fields are not updated. I've used the debugger to see that the Model Object *is* being updated. I can't figure out why this is happening. I only use PropertyModels (those are dynamic models, right?). I can only guess that the Wizard serializes the steps you've visited and doesn't check if the model has changed when you go back to them. One last thing that may be revealing: One of the things that second page displays is a listview of fields. If the second primary key I pick has more items in the list than the first one, the extra items do get populated on the page. IE: First pk has 3 items. Second pk has 4 items. The second page will have the correct 4th item in the list but the first 3 will be of the first pk. Here is my code in a pastebin: http://pastebin.org/26606 Here is my code inlined into the email: package com.haverlocke.tellah.web.component; import com.haverlocke.tellah.model.dao.WebsiteDao; import com.haverlocke.tellah.model.dao.WebsiteHistoryDao; import com.haverlocke.tellah.model.dto.LinkDto; import com.haverlocke.tellah.model.dto.WebsiteDto; import com.haverlocke.tellah.web.model.TellahUrlValidator; import com.haverlocke.tellah.web.page.HomePage; import com.haverlocke.tellah.web.util.SimilarWebsiteUtil; import com.haverlocke.tellah.web.component.recaptcha.ReCaptchaPanel; import net.databinder.components.AjaxOnKeyPausedUpdater; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.form.AjaxButton; import org.apache.wicket.behavior.HeaderContributor; import org.apache.wicket.extensions.wizard.Wizard; import org.apache.wicket.extensions.wizard.WizardModel; import org.apache.wicket.extensions.wizard.WizardStep; import org.apache.wicket.feedback.FeedbackMessage; import org.apache.wicket.feedback.IFeedbackMessageFilter; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.TextArea; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.markup.html.panel.FeedbackPanel; import org.apache.wicket.model.PropertyModel; import org.apache.wicket.model.IModel; import org.apache.wicket.spring.injection.annot.SpringBean; import org.apache.wicket.PageParameters; import org.apache.wicket.Component; import java.util.List; /** * @author Daniel Kaplan * @since 7.10.5 */ public class SubmitWizard extends Wizard { private static final String PUBLIC_DEV = fake; private static final String PRIVATE_DEV = fake; @SpringBean private WebsiteDao websiteDao; @SpringBean private WebsiteHistoryDao websiteHistoryDao; private WebsiteDto websiteDto = new WebsiteDto(); private Label note; private String noteString; private boolean insert; public SubmitWizard(String id, PageParameters pp) { super(id, false); insert = pp.getString(websiteName) == null || .equals(pp.getString(websiteName)); WizardModel model = new WizardModel(); model.add(new WebsiteName()); WebsiteDetails websiteDetails = new WebsiteDetails(); model.add(websiteDetails); init(model); websiteDetails.addReCaptchaPanel(); initPage(pp.getString(websiteName)); } @Override public void onFinish() { new WizardFinishedAction(new PropertyModel(this, websiteDto), getPage()).onSubmit(); } @Override public void onCancel() { setRedirect(true); setResponsePage(HomePage.class); } @Override protected FeedbackPanel newFeedbackPanel(String id) { return new FeedbackPanel(id, new IFeedbackMessageFilter() { public boolean accept(FeedbackMessage message) { //never show anything. We show all messages in a different panel defined in the WizardPage.java return false; } }); } private class WebsiteName extends WizardStep { public WebsiteName() { add(HeaderContributor.forCss(images/submit.css)); if (insert) { add(new Label(formHeader, Set the name)); } else { add(new
UrlValidator: optional schema or default schema?
Hello, I was using the UrlValidator yesterday and I wished that there was a way for the schema to be optional. I think this would be useful most of the time as you normally expect someone to paste the URL of a website in certain situations. In that case, http:// can be assumed, if it's not presented. How can I accomplish that? Thanks, Dan
Adding new Link() to an img tag = weird default behavior
Hello, Yesterday I tried adding a new Link() to an img tag. I noticed that when you hover over the image the cursor doesn't change and the status bar doesn't say anything. I bet 9 times out of 10 you wouldn't want this behavior. I already fixed the cursor problem with CSS, how do I make the status bar display the right thing on hover? BTW, should I file this under a request for improvement? Thanks, Dan
RE: Adding new Link() to an img tag = weird default behavior
Ah, ok, thanks for that explanation. BTW, only recently have I started seriously using wicket (as in, every day for 4+ hours). Something that comes up time and time again is the need for a LinkLabelPanel. I find it very time consuming to add() to this in the code: a wicket:id=linkspan wicket:id=labellabel/span/a If I submitted a patch for a LinkLabelPanel would you guys consider checking it into core? Here's how I foresee the constructor: new LinkLabelPanel(String id, IModel hrefModel, IModel textModel); And then the html would just look like this: a wicket:id=linkLabelPanelThis will be replaced/a -Original Message- From: Gerolf Seitz [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 11:32 AM To: users@wicket.apache.org Subject: Re: Adding new Link() to an img tag = weird default behavior that's because Link only adds the onclick event handler for non anchor tags and browser only do the cursor and status bar thing for anchor tags by default. you already fixed the cursor issue and you can write text to the status bar via window.status = foo, although this doesn't work in IE7 and only somehow in opera and konqueror. i suggest you wrap the image with an anchor tag and attach the Link component to that. Gerolf On Thu, Mar 27, 2008 at 7:15 PM, Dan Kaplan [EMAIL PROTECTED] wrote: Hello, Yesterday I tried adding a new Link() to an img tag. I noticed that when you hover over the image the cursor doesn't change and the status bar doesn't say anything. I bet 9 times out of 10 you wouldn't want this behavior. I already fixed the cursor problem with CSS, how do I make the status bar display the right thing on hover? BTW, should I file this under a request for improvement? Thanks, Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DataView with special info on the first page
I'd like to put some special info on the first page of my data view: Some info that explains what the site is about. I don't want this info to take up real estate on all the other pages because once you've read it once, it'll be annoying to have to scroll past each time. So how do I put something on the first page of a dataview and make it not visible on the other pages? Thanks
RE: DataView size() iterator() call order issue
FYI, in oracle you can use Analytical Functions to do this in one query. In other db's you can do this: select username, x.* from customlist, (select count(*) from customlist) as x; -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2008 11:44 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue knowing the size and the window together seems like a ui requirement, it is a bit strange to me that you have it inside a dao which should cater to business logic. eg, as far as i know there is no single db operation that will produce both, so you are still doing two calls inside the dao. also transaction management should be handled outside the dao, daos are too fine an object to implement transaction management for. anywho, just nitpicking :) size() is called first for a lot of reasons, namely even knowing if there are any rows to retrieve before a much heavier iterator() is called. some clients want to hide a repeater if there are no items visible, and so size() might get called from inside isvisible() as well. idataprovider is quiet old and we havent had many complaints about its design so far. if all you are using is the dataview it should be pretty simple for you to roll your own dataview, if you look at dataview all it does is implement idataprovider handling to feed the pageable view. however, if you do you will also lose datatable as well :| if you got suggestions on how to improve it im all ears. -igor On Fri, Mar 21, 2008 at 11:24 AM, Hoover, William [EMAIL PROTECTED] wrote: When using DataView/IDataProvider size() is called before iterator(int first, int count) causing calls to DAOs to be duplicated. Our current framework that is internally using Hibernate allows one call to be made to a DAO that returns both the total result size and the actual records (based off first/count). The problem is that the first and count are unknown until the iterator method is called- forcing multiple calls to the DAO to retrieve the data (also forcing multiple transactions). What are the reasons behind calling size before iterator? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DataView size() iterator() call order issue
Well, there could be savings in the amount of code. You also could save by reducing the transactions to 1. I'm not saying DataView should work with this, I'm just saying that's a way to get the count and the list simultaneously. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2008 1:27 PM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue yes you can technically mangle it into a single query and get a single result set back, but where is your savings? the database is still doing two operations... not to mention once you include any sort of filtering you have to repeat your where clause in both the main select and the subselect... -igor On Fri, Mar 21, 2008 at 1:23 PM, Dan Kaplan [EMAIL PROTECTED] wrote: FYI, in oracle you can use Analytical Functions to do this in one query. In other db's you can do this: select username, x.* from customlist, (select count(*) from customlist) as x; -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2008 11:44 AM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue knowing the size and the window together seems like a ui requirement, it is a bit strange to me that you have it inside a dao which should cater to business logic. eg, as far as i know there is no single db operation that will produce both, so you are still doing two calls inside the dao. also transaction management should be handled outside the dao, daos are too fine an object to implement transaction management for. anywho, just nitpicking :) size() is called first for a lot of reasons, namely even knowing if there are any rows to retrieve before a much heavier iterator() is called. some clients want to hide a repeater if there are no items visible, and so size() might get called from inside isvisible() as well. idataprovider is quiet old and we havent had many complaints about its design so far. if all you are using is the dataview it should be pretty simple for you to roll your own dataview, if you look at dataview all it does is implement idataprovider handling to feed the pageable view. however, if you do you will also lose datatable as well :| if you got suggestions on how to improve it im all ears. -igor On Fri, Mar 21, 2008 at 11:24 AM, Hoover, William [EMAIL PROTECTED] wrote: When using DataView/IDataProvider size() is called before iterator(int first, int count) causing calls to DAOs to be duplicated. Our current framework that is internally using Hibernate allows one call to be made to a DAO that returns both the total result size and the actual records (based off first/count). The problem is that the first and count are unknown until the iterator method is called- forcing multiple calls to the DAO to retrieve the data (also forcing multiple transactions). What are the reasons behind calling size before iterator? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
StartFound: You can now submit/edit your own content
Hi, This is the second time I've mentioned StartFound. I hope it's not considered spam at this point. If so, this'll be my last update about it but this update is very important. You can now submit/edit your own content to http://www.startfound.com http://www.startfound.com/ So if anyone here has a startup or a side project they're working on and they want to let others know about it, I encourage you to enter its profile at my new site. Thanks, Dan
RE: Pretty DataView urls
I'd prefer not to because I like the advantage being able to bookmark page 5 gives you. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Carman Sent: Monday, March 17, 2008 11:13 AM To: users@wicket.apache.org Subject: Re: Pretty DataView urls Can you use the Ajax version? On 3/17/08, Dan Kaplan [EMAIL PROTECTED] wrote: Hello, Is it possible to have pretty dataview urls when someone clicks on different pages of the navigator? Right now it says stuff like ::interface.7.1 or something. I'd prefer it to say something like /home?page=7 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Pretty DataView urls
I'm already mounting the page that the DataView is on. Everything but the first page still gets that interface listener url. Why would HybridUrlCodingStrategy make it any different? -Original Message- From: Matej Knopp [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2008 11:12 AM To: users@wicket.apache.org Subject: Re: Pretty DataView urls You can mount your page using HybridUrlCodingStrateg. The resulting url won't carry the currently selected page information, but it will be much nicer than a interface listener url you are having now. -Matej On Mon, Mar 17, 2008 at 7:07 PM, Dan Kaplan [EMAIL PROTECTED] wrote: Hello, Is it possible to have pretty dataview urls when someone clicks on different pages of the navigator? Right now it says stuff like ::interface.7.1 or something. I'd prefer it to say something like /home?page=7 -- Resizable and reorderable grid components. http://www.inmethod.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Digg / Technorati / del.icio.us Component?
You might want to look at sharethis.com I'm not affiliated with them and it's not wicket related but it may be just what you're looking for. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Saturday, March 15, 2008 12:05 AM To: users@wicket.apache.org; [EMAIL PROTECTED] Subject: Re: Digg / Technorati / del.icio.us Component? attachments dont come through. and probably, no. you might have to roll your own and possibly share with the rest of us :) -igor On Fri, Mar 14, 2008 at 11:02 PM, Jeremy Thomerson [EMAIL PROTECTED] wrote: Does anyone know of a component out there that creates a nice share panel with all the common links (Digg / Technorati / del.icio.us)? Not sure if attachments come through the list, but attached an example. Jeremy Thomerson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Pretty DataView urls
Hello, Is it possible to have pretty dataview urls when someone clicks on different pages of the navigator? Right now it says stuff like ::interface.7.1 or something. I'd prefer it to say something like /home?page=7
Ajax + ListView without losing focus
I have a listview. This listview displays a panel that contains trtd*textbox*/tdtd*label*/td/tr Is there a way i can update the label without making the user lose focus on the textbox they're typing in?
My New Wicket Website
Hello, I wanted to let you guys know about my new wicket website: http://www.startfound.com http://www.startfound.com/ I've only been working on this for about 1.5 weeks, so there's not much functionality and it's not very interactive, but I have a lot of big plans in the future. Forgive my spam :-) Thanks, Dan
RE: My New Wicket Website
Thanks for your suggestions, I appreciate your feedback. I was thinking of adding tagging to the site, would that solve the same problem that the dropdown would? Bigger font has been suggested to me before too. Do you have any specific areas for that advice, or is it just too small in general? More navigator margin: totally agree. I'll do that soon. I think I'll change the way it looks too. I prefer the word Next to a symbol Thanks again -Original Message- From: Jonathan Locke [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2008 5:16 PM To: users@wicket.apache.org Subject: Re: My New Wicket Website neato. couple ideas... dropdown to select startups by category (for example, all startups with a way to make money ;-)) bigger font and a bit more margin in the footer page navigator get the startups themselves into presenting their pitch Dan Kaplan-3 wrote: Hello, I wanted to let you guys know about my new wicket website: http://www.startfound.com http://www.startfound.com/ I've only been working on this for about 1.5 weeks, so there's not much functionality and it's not very interactive, but I have a lot of big plans in the future. Forgive my spam :-) Thanks, Dan -- View this message in context: http://www.nabble.com/My-New-Wicket-Website-tp16062257p16062626.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Ajax + ListView without losing focus
I'm using 1.3.1 and focus gets lost when ajax replaces the component I'm typing in. I suspect that ajaxrequesttarget.focus(component) will put the focus on the front or the end of the component rather than where it was anyway, right? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2008 5:47 PM To: users@wicket.apache.org Subject: Re: Ajax + ListView without losing focus wicket should remember focus as of 1.3 and restore it...you can always set it manually via ajaxrequesttarget.focus(component) -igor On Fri, Mar 14, 2008 at 4:21 PM, Dan Kaplan [EMAIL PROTECTED] wrote: I have a listview. This listview displays a panel that contains trtd*textbox*/tdtd*label*/td/tr Is there a way i can update the label without making the user lose focus on the textbox they're typing in? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: A link-o-label needed
Couldn't you just do this as a panel: wicket:panel a wicket:id=linkspan wicket:id=labellabel/span/a /wicket:panel And it has this constructor: public LabelLink(String id, IModel urlModel, IModel labelModel); I'd certainly vote for that to be added to the repo -Original Message- From: Jonathan Locke [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2008 5:26 PM To: users@wicket.apache.org Subject: Re: A link-o-label needed you could do it that way. another way to do it would be to create a link panel. you could then subclass and decorate the panel in various ways. i do it this way so i can leverage my application with panel factories. this can be quite powerful: i simply override a factory method or install a new factory and all of a sudden every link on the site can have a new look or even new behavior. Vitaly Tsaplin wrote: Thanks James, I wrote a subclass of a wicket link to archive this, but simple adding a label as a child to a link seams to be a really good idea :) Vitaly On Fri, Mar 14, 2008 at 3:17 PM, James Carman [EMAIL PROTECTED] wrote: Have you tried adding a label to your link? I do this with images. I don't see why you wouldn't be able to do it with labels. On 3/14/08, Vitaly Tsaplin [EMAIL PROTECTED] wrote: Hi experts, Does anyone know how to create a label link in wicket? In other words I need a clickable label or a link which acts as a label taking its text from a model exactly like a wicket's label. Vitaly - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/A-link-o-label-needed-tp16052333p16062870.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dynamic Forms
I have a form with a text field on it. Somewhere on the form there is also a + symbol. When you click on it, a new text field appears. I know that this has been asked a bunch of times, but I can only find emails where people say, This has been asked a bunch of times when I search the mailing list. Also, most say that a ListView and panels are involved but they don't go into detail. Can anyone elaborate on how to do this? Thanks
RE: Wicket-FBML Released
There is no maven repo (I don't know how to use maven [yet]). This library is probably like step 3 of process to making a facebook app. To really get started, you should start here: http://wiki.developers.facebook.com/index.php/Creating_your_first_applicatio n From there, you may want to read the T-Machine articles from this link: http://wiki.developers.facebook.com/index.php/Java After you read those, I'd be happy to answer any specific questions you have. -Original Message- From: Nino Saturnino Martinez Vazquez Wael [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 26, 2008 2:03 AM To: users@wicket.apache.org Cc: 'Eelco Hillenius' Subject: Re: Wicket-FBML Released Hi Dan Could you provide some information about the project, im thinking of howto use it is there a maven repo etc? Dan Kaplan wrote: Wicket-FBML (facebook markup language) 0.1 has been released on sourceforge. It doesn't have much, but I'd like to think it'll help. -- Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AjaxFormValidatingBehavior on a form with a fileuploadfield crashes
Hello, If I use: AjaxFormValidatingBehavior.addToAllFormComponents(form, onblur); On a form that has a fileuploadfield, it throws an exception when I blur another field. Is there a work around/solution to this (for now, I'd be happy to only validate the one field I want)? Here is the stack trace: java.lang.IllegalStateException: ServletRequest does not contain multipart content at org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(Mu ltipartServletWebRequest.java:90) at org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadWebRequest$M ultipartRequest.init(UploadWebRequest.java:97) at org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadWebRequest.n ewMultipartWebRequest(UploadWebRequest.java:74) at org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1414) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:740) at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBeh avior.java:127) at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:161) at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefault AjaxBehavior.java:288) at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.pr ocessEvents(BehaviorRequestTarget.java:100) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(Abstra ctRequestCycleProcessor.java:90) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:116 6) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket-FBML Released
Wicket-FBML (facebook markup language) 0.1 has been released on sourceforge. It doesn't have much, but I'd like to think it'll help.
fileUploadField uploads even when it shouldn't
Hello, I've made an upload form and wanted to add a cancel button to it. The cancel button is clicked if the user decides he doesn't want to upload (before he uploads) and should redirect back to another page. This works pretty well except I noticed that if the user chooses a file then clicks the cancel button, the file starts uploading anyway! Here's the code that does this. I can't see why it's happening: import org.apache.wicket.authorization.strategies.role.Roles; import org.apache.wicket.authorization.strategies.role.annotations.AuthorizeInstant iation; import org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar; import org.apache.wicket.extensions.wizard.CancelButton; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.markup.html.form.Button; import org.apache.wicket.markup.html.form.upload.FileUpload; import org.apache.wicket.markup.html.form.upload.FileUploadField; import org.apache.wicket.markup.html.panel.FeedbackPanel; import org.apache.wicket.model.PropertyModel; import org.apache.wicket.util.file.Files; import org.apache.wicket.util.file.Folder; import java.io.File; @AuthorizeInstantiation(Roles.USER) public class CreateAReport extends WebPage { private String reportName; public CreateAReport() { final FileUploadForm form = new FileUploadForm(form); final UploadProgressBar progressBar = new UploadProgressBar(progress, form); form.add(progressBar); form.add(new TextField(name, new PropertyModel(this, reportName)).setRequired(true)); Button submit = new Button(submitbutton) { public void onSubmit() { form.upload(); setResponsePage(CustomReport.class); } }; form.add(submit); Button cancel = new Button(cancelbutton) { public void onSubmit() { setResponsePage(ReportList.class); } }; cancel.setDefaultFormProcessing(false); form.add(cancel); add(form); add(new FeedbackPanel(feedback)); } public String getReportName() { return reportName; } public void setReportName(String reportName) { this.reportName = reportName; } private class FileUploadForm extends Form { protected FileUploadField fileUploadField; protected File newFile; /** * Construct. * * @param name Component name */ public FileUploadForm(String name) { super(name); // set this form to multipart mode (allways needed for uploads!) setMultiPart(true); // Add one file input field add(fileUploadField = new FileUploadField(fileInput)); fileUploadField.setRequired(true); // Set maximum size to 100K for demo purposes //setMaxSize(Bytes.kilobytes(100)); } public void upload() { final FileUpload upload = fileUploadField.getFileUpload(); if (upload != null) { // Create a new file newFile = new File(getUploadFolder(), upload.getClientFileName()); // Check new file, delete if it allready existed checkFileExists(newFile); try { // Save to new file newFile.createNewFile(); upload.writeTo(newFile); } catch (Exception e) { throw new IllegalStateException(Unable to write file: + newFile.getAbsolutePath()); } } } public File getFile() { return newFile; } } private void checkFileExists(File newFile) { if (newFile.exists()) { // Try to delete the file if (!Files.remove(newFile)) { throw new IllegalStateException(Unable to overwrite + newFile.getAbsolutePath()); } } } private Folder getUploadFolder() { Folder uploadFolder = new Folder(System.getProperty(java.io.tmpdir), wicket-uploads); // Ensure folder exists uploadFolder.mkdirs(); return uploadFolder; } }
RE: ComponentTag#setNamespace()
Opened a bug report for this: https://issues.apache.org/jira/browse/WICKET-1330 -Original Message- From: Dan Kaplan [mailto:[EMAIL PROTECTED] Sent: Thursday, February 07, 2008 11:07 AM To: users@wicket.apache.org Subject: ComponentTag#setNamespace() I noticed yesterday that the ComponentTag#setNamespace() method only sets the namespace on the opening tag. The close tag is left unchanged. Is that intended functionality? If I call ComponentTag#setName(foo) it changes both the opening and closing tag so it seems inconsistent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ComponentTag#setNamespace()
I noticed yesterday that the ComponentTag#setNamespace() method only sets the namespace on the opening tag. The close tag is left unchanged. Is that intended functionality? If I call ComponentTag#setName(foo) it changes both the opening and closing tag so it seems inconsistent.
RE: mounted url bug or request for enhancement
I didn't see any response to this so I'm going to bump it once. -Original Message- From: Dan Kaplan [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 05, 2008 11:36 AM To: users@wicket.apache.org Subject: RE: mounted url bug or request for enhancement I made a very big typo in that last paragraph. It should have said: But my complaint is that even though it does that, you can still type /home/foo/bar into the url and it'll render *home* for you. -Original Message- From: Dan Kaplan [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 05, 2008 11:33 AM To: users@wicket.apache.org Subject: mounted url bug or request for enhancement Hello, I'm testing this sandbox webapp I made that looks like this: package web; import org.apache.wicket.protocol.http.WebApplication; public class SandboxApplication extends WebApplication { protected void init() { mountBookmarkablePage(/home, Home.class); } public Class getHomePage() { return Home.class; } } I notice that you can visit /home/foo/bar and it will render /home for you. I learned yesterday that Wicket is considering foo to be a parameter variable and bar to be a parameter value. I think that's a very unusual and error prone default, but that's not the main thing I want to talk about. If I replace my init method with this: mount(new QueryStringUrlCodingStrategy(/home, Home.class)); That should make parameters look like this: ?foo=bar But my complaint is that even though it does that, you can still type /home/foo/bar into the url and it'll render [home] for you. IMO, it should give a 404 in that situation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mounted url bug or request for enhancement
I made a very big typo in that last paragraph. It should have said: But my complaint is that even though it does that, you can still type /home/foo/bar into the url and it'll render *home* for you. -Original Message- From: Dan Kaplan [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 05, 2008 11:33 AM To: users@wicket.apache.org Subject: mounted url bug or request for enhancement Hello, I'm testing this sandbox webapp I made that looks like this: package web; import org.apache.wicket.protocol.http.WebApplication; public class SandboxApplication extends WebApplication { protected void init() { mountBookmarkablePage(/home, Home.class); } public Class getHomePage() { return Home.class; } } I notice that you can visit /home/foo/bar and it will render /home for you. I learned yesterday that Wicket is considering foo to be a parameter variable and bar to be a parameter value. I think that's a very unusual and error prone default, but that's not the main thing I want to talk about. If I replace my init method with this: mount(new QueryStringUrlCodingStrategy(/home, Home.class)); That should make parameters look like this: ?foo=bar But my complaint is that even though it does that, you can still type /home/foo/bar into the url and it'll render foo for you. IMO, it should give a 404 in that situation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mounted url bug or request for enhancement
Hello, I'm testing this sandbox webapp I made that looks like this: package web; import org.apache.wicket.protocol.http.WebApplication; public class SandboxApplication extends WebApplication { protected void init() { mountBookmarkablePage(/home, Home.class); } public Class getHomePage() { return Home.class; } } I notice that you can visit /home/foo/bar and it will render /home for you. I learned yesterday that Wicket is considering foo to be a parameter variable and bar to be a parameter value. I think that's a very unusual and error prone default, but that's not the main thing I want to talk about. If I replace my init method with this: mount(new QueryStringUrlCodingStrategy(/home, Home.class)); That should make parameters look like this: ?foo=bar But my complaint is that even though it does that, you can still type /home/foo/bar into the url and it'll render foo for you. IMO, it should give a 404 in that situation.
RE: Challenge: write something really sleek for Facebook?
As I understand facebook apps more, I see that this separation is distinct. That being said, I don't understand your last paragraph. I think I already accomplished that with the wiki post. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Levy Sent: Monday, February 04, 2008 11:19 AM To: users@wicket.apache.org Subject: Re: Challenge: write something really sleek for Facebook? We have been thinking about this a little bit as well... It broke down into two parts: Making FaceBook Wicket components that represent and render the corresponding FBML. Integrating the wicket session with facebooks session. It seemed like to us that the calls from facebook across multiple users would break / not maintain a wicket session as well as include an easy mechanism to retrieve data from facebook. j On Feb 2, 2008 5:27 AM, tieTYT [EMAIL PROTECTED] wrote: Hi Eelco, I wanted to give you an update of what i learned about facebook apps: there's 2 types: FBML and IFRAME fbml apps are actually translated from your webapp and facebook renders it with their server (me thinks). the IFRAME app is just literally your app rendered from your server but displayed on theirs if you want to do it as IFRAME, that wiki post i made is pretty much all you need... that and you need to understand how to use the FaceBookRestClient that you put in the session. As I prefer the IFRAME approach, that's what i'm going to use. Eelco Hillenius wrote: Hi, Daniel Kaplan wrote a WIKI page[1] that describes how to set up Wicket for Facebook. Someone posted a link to that on DZone[2], and that in turn prompted Dave from Alfresco to write an alternative to it that shows it can be done much shorter[3]. I know that several people posted the idea before of writing a simple integration framework for Facebook/ Wicket, but so far no-one actually contributed code (besides this WIKI). How about it? Is that blog posting a challenge enough to come up with a simple framework that makes writing Facebook apps with Wicket short and elegant? I can imagine we'd need a component (set) and/ or specialized models for parsing external REST requests. But maybe I'm just talking crap here. Any takers? :-) Eelco [1] http://cwiki.apache.org/confluence/display/WICKET/Facebook+Integration [2] http://www.dzone.com/links/rss/apache_wicket_facebook_integration.html [3] http://blogs.alfresco.com/davidc/?p=12 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Challenge%3A-write-something-really-sleek-for-Facebook --tp15220672p15241533.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Challenge: write something really sleek for Facebook?
I'd do it, but I don't know enough about making a facebook app yet :) I don't even know how much more integration would be necessary. I suspect taking that wiki code and putting it in a jar wouldn't be sufficient. -Original Message- From: Eelco Hillenius [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 8:44 PM To: wicket user list Cc: Dan Kaplan Subject: Challenge: write something really sleek for Facebook? Hi, Daniel Kaplan wrote a WIKI page[1] that describes how to set up Wicket for Facebook. Someone posted a link to that on DZone[2], and that in turn prompted Dave from Alfresco to write an alternative to it that shows it can be done much shorter[3]. I know that several people posted the idea before of writing a simple integration framework for Facebook/ Wicket, but so far no-one actually contributed code (besides this WIKI). How about it? Is that blog posting a challenge enough to come up with a simple framework that makes writing Facebook apps with Wicket short and elegant? I can imagine we'd need a component (set) and/ or specialized models for parsing external REST requests. But maybe I'm just talking crap here. Any takers? :-) Eelco [1] http://cwiki.apache.org/confluence/display/WICKET/Facebook+Integration [2] http://www.dzone.com/links/rss/apache_wicket_facebook_integration.html [3] http://blogs.alfresco.com/davidc/?p=12 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Making your webapp thread safe
Ok, I’ve asked this at least twice already but I’m still incredibly unsure of how to make my webapp thread safe. So this time I thought I’d take a different approach. I wrote on the wiki a short, unrelated example: http://cwiki.apache.org/confluence/display/WICKET/Facebook+Integration Is this example thread safe? If it isn’t, please EDIT THE EXAMPLE TO MAKE IT SO. That way I can finally see a *complete* example of a thread safe webapp. Thanks a lot for any help ☺ Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Making your webapp thread safe
I've been told by many people that the Session object is not thread safe. If that's true, I don't think the example can be thread safe. RestartResponseException does not allow you to redirect to an external URL (that's what that method does). That's why I can't use it. -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 12:18 PM To: users@wicket.apache.org Subject: Re: Making your webapp thread safe that looks fine i would throw a RestartResponseException in youre forcelogin method On Jan 31, 2008 8:48 PM, Dan Kaplan [EMAIL PROTECTED] wrote: Ok, I've asked this at least twice already but I'm still incredibly unsure of how to make my webapp thread safe. So this time I thought I'd take a different approach. I wrote on the wiki a short, unrelated example: http://cwiki.apache.org/confluence/display/WICKET/Facebook+Integration Is this example thread safe? If it isn't, please EDIT THE EXAMPLE TO MAKE IT SO. That way I can finally see a *complete* example of a thread safe webapp. Thanks a lot for any help ☺ Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: the flow of wicket
I agree with this. When I seconded earlier, it was because I thought this was an exposed part of the API that hadn't been documented. I didn't realize it was internal. -Original Message- From: Martijn Dashorst [mailto:[EMAIL PROTECTED] Sent: Saturday, January 12, 2008 7:57 AM To: users@wicket.apache.org Subject: Re: the flow of wicket I *strongly* disagree with your answer. The fact is that this information is only beneficial for a really very small portion of our user base. The documentation effort on the other hand is HUGE! And subject to change easily. From 1.1 to 1.2 we changed it quite considerably. And I have no doubt this will change again. I posit that 99% of all developers working on Wicket applications don't need to know this. In my company we have about 30 people working on wicket applications and I think 29 of them don't even know the different request targets. Why would they? There is no benefit in learning what the request cycle processor does in its 30 odd steps when your customer asks for a link that adds an item to a shopping cart. In fact it makes it more difficult to achieve your business goals. Asking the remaining 1% to do some homework themselves gives us the possibility to work on actual code, improving the framework and making things simpler, better, easier, faster, completer. Martijn On Jan 12, 2008 4:16 PM, Paolo Di Tommaso [EMAIL PROTECTED] wrote: I disagree with this answer. The fact that request handling stuff is not a public api, is A GOOD REASON because it should be documented better, not viceversa. And I really don't understand in which way this could prevent you to change - eventually - in future wicket versions. I not a newbie user and I'm really a Wicket enthusiastic user and pleased to be involved in its great community, but I have to admit that some topics are still obscure. The request flow handling is one of the most important topic to know in a web application framework, being so I think it would be very interesting to have only a brief description, for example a sequence diagram showing the components interaction starting from the WicketFilter (and/or the WicketServlet) involved in a web request handling. Hiding this stuff or, even worse, asking the users to debug the framework to understand what it should important to know I don't think is a good approach because it is precisely this that leads to wrong assumptions, that could break in future. Thank you, - Paolo On Jan 11, 2008 2:09 AM, Igor Vaynberg [EMAIL PROTECTED] wrote: you guys want to know about internal implementation details. it has no publically exposed api, so why should you care? why should we document something that can change without affecting our users? does the jee spec detail how the request gets to the servlet? no, that is left up to the implementor of the servlet container. you want to know about it? set a break point in wicketfilter.dofilter() and walk the code. -igor On Jan 10, 2008 5:06 PM, Dan Kaplan [EMAIL PROTECTED] wrote: seconded -Original Message- From: Beyonder Unknown [mailto:[EMAIL PROTECTED] Sent: Thursday, January 10, 2008 5:05 PM To: WICKET USER Subject: the flow of wicket Hi All, I am studying wicket from the WicketFilter to the WebApplication, but I don't understand the concept of RequestCycleProcessor and how does it get invoked. I read the Wicket In Action and Pro Wicket but the explanation is not that detailed. Does anybody know of a primer with regards to how Wicket process really works? I want to know the flow, from startup of the servlet container, like what is being instantiated, and when request is made. I can't seem to trace how RequestTarget being consumed by RequestCycleProcessor, from the page. Thank you very much! Best, Wen Tong -- The only constant in life is change. Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e
RE: Type safe roles for AUTH-ROLES?
What? Really? Fuck. Can you please elaborate? Did I waste every second of the time I spent looking at the examples on wicketstuff? I applied these examples to my webapp. Did I implement some type of pretend authorization strategy? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Saturday, January 12, 2008 10:31 AM To: users@wicket.apache.org; [EMAIL PROTECTED] Subject: Re: Type safe roles for AUTH-ROLES? wicket-auth-roles is just an example. its not really meant to be something you drop into your application, for that there is wicketstuff-wasp and wicketstuff-swarm -igor On Jan 12, 2008 9:14 AM, Jeremy Thomerson [EMAIL PROTECTED] wrote: I have several successful Wicket projects going, and in all have used my own authorization strategy based on annotations. I'm just trying wicket-auth-roles for my next project, but seem confused by the apparent String-only roles. I already have a domain model where a User has a Role or Role(s), where Role is a class. This promotes type-safety, etc, etc. But, I can't go: @AuthorizeInstantiation({ Role.ADMIN, Role.SUPER_USER, Role.MEMBER_SERVICE_REP, Role.MEMBER }) I also can't do: @AuthorizeInstantiation({ Role.ADMIN.name(), Role.SUPER_USER.name (), Role.MEMBER_SERVICE_REP.name(), Role.MEMBER.name() }) So, do I *have* to use Strings? Or is there another way? If I have to use Strings, then I either have to redefine all my roles and change how the DB stores them, or just use the names of my own roles (i.e . SUPER_USER which later my UserAuthorizer does a Role.valueOf(String) on), and risk typoes messing me up, or have Role.SUPER_USER and Role.SUPER_USER_NAME as a public static final String. It's been a long week - I could be missing something. Thanks in advance. Jeremy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Type safe roles for AUTH-ROLES?
Sure, and although not an included option, can't I just make a new one named moderator and use that where I want? I haven't tried this but I assume the library won't care. -Original Message- From: Martijn Dashorst [mailto:[EMAIL PROTECTED] Sent: Monday, January 14, 2008 2:22 PM To: users@wicket.apache.org Subject: Re: Type safe roles for AUTH-ROLES? In my opinion there is nothing 'wrong' with auth-roles. but they are limited in scope. Fortunately the code base is really small so it wouldn't take that much effort to roll your own based on that code. That said, I think that a lot of applications can live with the 3 levels of authorization: none, user and admin provided by auth-roles. Martijn (who likes using auth-roles) On 1/14/08, Dan Kaplan [EMAIL PROTECTED] wrote: I guess I'll have to read about swarm/wasp to read about what fancy features I'm missing out on. But, ATM, I'm content to stay with it because auth-roles are simple and allow me to move on to the actual content of my webapp. Am I going to be kicking myself later for that choice? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, January 14, 2008 1:55 PM To: users@wicket.apache.org Subject: Re: Type safe roles for AUTH-ROLES? heh. it is a functional example of a fully implemented authorization strategy. but it doesnt have any fancy features, nor will they be added to it in the future. it is meant to serve as an example, so users can see how to implement their own authorization strategies. what more do you want me to say exactly? -igor On Jan 14, 2008 1:51 PM, Dan Kaplan [EMAIL PROTECTED] wrote: What? Really? Fuck. Can you please elaborate? Did I waste every second of the time I spent looking at the examples on wicketstuff? I applied these examples to my webapp. Did I implement some type of pretend authorization strategy? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Saturday, January 12, 2008 10:31 AM To: users@wicket.apache.org; [EMAIL PROTECTED] Subject: Re: Type safe roles for AUTH-ROLES? wicket-auth-roles is just an example. its not really meant to be something you drop into your application, for that there is wicketstuff-wasp and wicketstuff-swarm -igor On Jan 12, 2008 9:14 AM, Jeremy Thomerson [EMAIL PROTECTED] wrote: I have several successful Wicket projects going, and in all have used my own authorization strategy based on annotations. I'm just trying wicket-auth-roles for my next project, but seem confused by the apparent String-only roles. I already have a domain model where a User has a Role or Role(s), where Role is a class. This promotes type-safety, etc, etc. But, I can't go: @AuthorizeInstantiation({ Role.ADMIN, Role.SUPER_USER, Role.MEMBER_SERVICE_REP, Role.MEMBER }) I also can't do: @AuthorizeInstantiation({ Role.ADMIN.name(), Role.SUPER_USER.name (), Role.MEMBER_SERVICE_REP.name(), Role.MEMBER.name() }) So, do I *have* to use Strings? Or is there another way? If I have to use Strings, then I either have to redefine all my roles and change how the DB stores them, or just use the names of my own roles (i.e . SUPER_USER which later my UserAuthorizer does a Role.valueOf(String) on), and risk typoes messing me up, or have Role.SUPER_USER and Role.SUPER_USER_NAME as a public static final String. It's been a long week - I could be missing something. Thanks in advance. Jeremy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Type safe roles for AUTH-ROLES?
I guess I'll have to read about swarm/wasp to read about what fancy features I'm missing out on. But, ATM, I'm content to stay with it because auth-roles are simple and allow me to move on to the actual content of my webapp. Am I going to be kicking myself later for that choice? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, January 14, 2008 1:55 PM To: users@wicket.apache.org Subject: Re: Type safe roles for AUTH-ROLES? heh. it is a functional example of a fully implemented authorization strategy. but it doesnt have any fancy features, nor will they be added to it in the future. it is meant to serve as an example, so users can see how to implement their own authorization strategies. what more do you want me to say exactly? -igor On Jan 14, 2008 1:51 PM, Dan Kaplan [EMAIL PROTECTED] wrote: What? Really? Fuck. Can you please elaborate? Did I waste every second of the time I spent looking at the examples on wicketstuff? I applied these examples to my webapp. Did I implement some type of pretend authorization strategy? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Saturday, January 12, 2008 10:31 AM To: users@wicket.apache.org; [EMAIL PROTECTED] Subject: Re: Type safe roles for AUTH-ROLES? wicket-auth-roles is just an example. its not really meant to be something you drop into your application, for that there is wicketstuff-wasp and wicketstuff-swarm -igor On Jan 12, 2008 9:14 AM, Jeremy Thomerson [EMAIL PROTECTED] wrote: I have several successful Wicket projects going, and in all have used my own authorization strategy based on annotations. I'm just trying wicket-auth-roles for my next project, but seem confused by the apparent String-only roles. I already have a domain model where a User has a Role or Role(s), where Role is a class. This promotes type-safety, etc, etc. But, I can't go: @AuthorizeInstantiation({ Role.ADMIN, Role.SUPER_USER, Role.MEMBER_SERVICE_REP, Role.MEMBER }) I also can't do: @AuthorizeInstantiation({ Role.ADMIN.name(), Role.SUPER_USER.name (), Role.MEMBER_SERVICE_REP.name(), Role.MEMBER.name() }) So, do I *have* to use Strings? Or is there another way? If I have to use Strings, then I either have to redefine all my roles and change how the DB stores them, or just use the names of my own roles (i.e . SUPER_USER which later my UserAuthorizer does a Role.valueOf(String) on), and risk typoes messing me up, or have Role.SUPER_USER and Role.SUPER_USER_NAME as a public static final String. It's been a long week - I could be missing something. Thanks in advance. Jeremy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Type safe roles for AUTH-ROLES?
No, I'm perfectly happy with the functionality provided by the examples on wicketstuff. I just want to make sure they are secure. I don't want to use them if they're giving me a false sense of security. -Original Message- From: C. Bergström [mailto:[EMAIL PROTECTED] Sent: Monday, January 14, 2008 2:15 PM To: users@wicket.apache.org Subject: RE: Type safe roles for AUTH-ROLES? On Mon, 2008-01-14 at 13:51 -0800, Dan Kaplan wrote: What? Really? F***. Can you please elaborate? Did I waste every second of the time I spent looking at the examples on wicketstuff? I applied these examples to my webapp. Did I implement some type of pretend authorization strategy? http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security +Examples Sources are available here.. https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-s ecurity-examples maybe this is more in the ballpark of what you were expecting? ./C - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: the flow of wicket
seconded -Original Message- From: Beyonder Unknown [mailto:[EMAIL PROTECTED] Sent: Thursday, January 10, 2008 5:05 PM To: WICKET USER Subject: the flow of wicket Hi All, I am studying wicket from the WicketFilter to the WebApplication, but I don't understand the concept of RequestCycleProcessor and how does it get invoked. I read the Wicket In Action and Pro Wicket but the explanation is not that detailed. Does anybody know of a primer with regards to how Wicket process really works? I want to know the flow, from startup of the servlet container, like what is being instantiated, and when request is made. I can't seem to trace how RequestTarget being consumed by RequestCycleProcessor, from the page. Thank you very much! Best, Wen Tong -- The only constant in life is change. Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DropDownChoice always on the top
Cool. Would it be the wicket way to automatically do this in the dropdown choice so that wicket developers don't have understand this bug themselves? -Original Message- From: dariusz.holda [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 08, 2008 5:25 AM To: users@wicket.apache.org Subject: Re: DropDownChoice always on the top I've found a css solution to this nasty IE bug. If anyone is interested, here is the link: http://www.hedgerwow.com/360/bugs/css-select-free.html dariusz.holda wrote: I'm trying to hide it with javascript. But I'll check the css solutions as well Thx, Dariusz igor.vaynberg wrote: you should probably try a css mailing list... -igor On Jan 7, 2008 12:48 AM, dariusz.holda [EMAIL PROTECTED] wrote: With Modal window it's actualy ok. sorry for confusion. I've noticed that if you show modal window the dropdowns disappear. With the list from the AutoCompleteTextField it's not but only if the last row in the list overlaps the dropdownchoice. I discovered that if I detach a column from a table (freeze it, so it always stays on the left even if you scroll) and scroll with the column over the dropdown it's going under the dropdownchoice. Is there some way to change this behavior so my detached column will always be on top? I've tried with z-index and it doesn't work. Regards, Dariusz dariusz.holda wrote: Hi, I've noticed that no matter what z-index I set for dropdownchoice component it stays on the top. I needed it hidden under ModalWindow and under list displayed by AutoCompleteTextField. Did someone have similar problem? Regards, Dariusz -- View this message in context: http://www.nabble.com/DropDownChoice-always-on-the-top-tp14600922p14660395.h tml Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/DropDownChoice-always-on-the-top-tp14600922p14689348.h tml Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Wicket Session and threading
Is there an example somewhere that shows how to do this? Or can someone paste a snippet here of how to do this? I assume a lot of webapps have the concept of a User object. -Original Message- From: Martijn Dashorst [mailto:[EMAIL PROTECTED] Sent: Saturday, January 05, 2008 5:17 AM To: users@wicket.apache.org Subject: Re: Wicket Session and threading If you use hibernate, this is not recommended... An entity can only be part of one Hibernate Session, and storing the instance in the wicket session will share it across threads, and hence you'll get hibernate exceptions. Note that this may not be only a problem in Hibernate, but can also be a problem in other db frameworks. So do what Johan described and you will be safe... Martijn On Jan 5, 2008 3:54 AM, Eelco Hillenius [EMAIL PROTECTED] wrote: On Jan 5, 2008 5:15 AM, Dan Kaplan [EMAIL PROTECTED] wrote: Yeah that makes sense. Since we're sorta on the topic, I thought I would ask this question. As the User object goes from being initially registered to its profile being edited, how does one update the User in the session and the db simultaneously? Here's a scenario: A user registers with your website and later adds a signature that is to show up on every post he makes. Do you add an instance of a UserService to your WebSession and then have this in it: private User user; public synchronized void setUser(User updatedUser) { userService.updateUser(updatedUser); this.user = updatedUser; } public synchronized User getUser() { return this.user; } ? Cause I've been doing something like that. Is there a better way to go about this? Looks fine to me. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: required for Checkbox
But another way to look at it is this: When a checkbox is unchecked, it has a value of unchecked. Therefore, if you setRequired=true on a checkbox, it's always satisfied. In otherwords, a checkbox always has a value so setRequired=true has no effect on a checkbox. -Original Message- From: Kent Tong [mailto:[EMAIL PROTECTED] Sent: Monday, January 07, 2008 2:07 AM To: users@wicket.apache.org Subject: required for Checkbox Hi, I observed that if required is set to true for a Checkbox, Wicket will ensure that the Checkbox is checked. If it is cleared by the user, it will be treated as an error. See https://issues.apache.org/jira/browse/WICKET-1221 and https://issues.apache.org/jira/browse/WICKET-1260 for some background. For me, required means that a value must be provided. For a check box, if it is checked, it has a value of true. if it is unchecked, it has a value of false. So it always satisfy required. Treating required as having a value of true doesn't sound correct to me. If we consider the error message that should be used, for the case of forcing the user to check the box (eg, [x] I have read the agreement), it should say you must check xxx, which is quite different from the error message for required: you must provide xxx. For the use case of forcing a checked check box, I think an CheckedValidator should be used, which can provide a much better default error message. Not that it's an important, but just to see what others think. - -- Kent Tong Wicket tutorials freely available at http://www.agileskills2.org/EWDW Axis2 tutorials freely available at http://www.agileskills2.org/DWSAA -- View this message in context: http://www.nabble.com/%22required%22-for-Checkbox-tp14662131p14662131.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Wicket Session and threading
Ok, thanks -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, January 07, 2008 11:32 AM To: users@wicket.apache.org Subject: Re: Wicket Session and threading class MySession extends WebSession { private Long userId; private transient User user; public SYNCHRONIZED void setUser(User user) { user=user; userId=(user==null)?null:user.getId(); } public SYNCHRONIZED void getUser() { if (user==null) { if (userId!=null) { user=getHibernateSession().load(User.class, userId); } } return user; } protected void onDetach() { user=null; } } -igor On Jan 7, 2008 11:11 AM, Dan Kaplan [EMAIL PROTECTED] wrote: Is there an example somewhere that shows how to do this? Or can someone paste a snippet here of how to do this? I assume a lot of webapps have the concept of a User object. -Original Message- From: Martijn Dashorst [mailto:[EMAIL PROTECTED] Sent: Saturday, January 05, 2008 5:17 AM To: users@wicket.apache.org Subject: Re: Wicket Session and threading If you use hibernate, this is not recommended... An entity can only be part of one Hibernate Session, and storing the instance in the wicket session will share it across threads, and hence you'll get hibernate exceptions. Note that this may not be only a problem in Hibernate, but can also be a problem in other db frameworks. So do what Johan described and you will be safe... Martijn On Jan 5, 2008 3:54 AM, Eelco Hillenius [EMAIL PROTECTED] wrote: On Jan 5, 2008 5:15 AM, Dan Kaplan [EMAIL PROTECTED] wrote: Yeah that makes sense. Since we're sorta on the topic, I thought I would ask this question. As the User object goes from being initially registered to its profile being edited, how does one update the User in the session and the db simultaneously? Here's a scenario: A user registers with your website and later adds a signature that is to show up on every post he makes. Do you add an instance of a UserService to your WebSession and then have this in it: private User user; public synchronized void setUser(User updatedUser) { userService.updateUser(updatedUser); this.user = updatedUser; } public synchronized User getUser() { return this.user; } ? Cause I've been doing something like that. Is there a better way to go about this? Looks fine to me. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Wicket Session and threading
Ok, so you're saying make getUser return the object from the DAO (directly or indirectly), synchronize the getters and setters and I don't have to worry about any of this stuff? IMO, threading is never a simple issue. I just want a brain-dead solution to this issue so I don't run into problems 1/100 times caused by code in my websession implementation. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, January 07, 2008 1:54 PM To: users@wicket.apache.org Subject: Re: Wicket Session and threading and anyways, who cares, dont even need to cache it. let getuser() always load it. hibernate caches for-id lookups anywho... -igor On Jan 7, 2008 1:53 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: gah, i meant to put it into a threadlocal but forgot, oh well, use your imagination :) -igor On Jan 7, 2008 1:30 PM, Johan Compagner [EMAIL PROTECTED] wrote: Igor! Thats a bad example. The user object should be in the websession but the user object should be in the requestcycle. Because the websession object can be hit by multiple request (threads) On 1/7/08, Igor Vaynberg [EMAIL PROTECTED] wrote: class MySession extends WebSession { private Long userId; private transient User user; public SYNCHRONIZED void setUser(User user) { user=user; userId=(user==null)?null:user.getId(); } public SYNCHRONIZED void getUser() { if (user==null) { if (userId!=null) { user=getHibernateSession().load(User.class, userId); } } return user; } protected void onDetach() { user=null; } } -igor On Jan 7, 2008 11:11 AM, Dan Kaplan [EMAIL PROTECTED] wrote: Is there an example somewhere that shows how to do this? Or can someone paste a snippet here of how to do this? I assume a lot of webapps have the concept of a User object. -Original Message- From: Martijn Dashorst [mailto:[EMAIL PROTECTED] Sent: Saturday, January 05, 2008 5:17 AM To: users@wicket.apache.org Subject: Re: Wicket Session and threading If you use hibernate, this is not recommended... An entity can only be part of one Hibernate Session, and storing the instance in the wicket session will share it across threads, and hence you'll get hibernate exceptions. Note that this may not be only a problem in Hibernate, but can also be a problem in other db frameworks. So do what Johan described and you will be safe... Martijn On Jan 5, 2008 3:54 AM, Eelco Hillenius [EMAIL PROTECTED] wrote: On Jan 5, 2008 5:15 AM, Dan Kaplan [EMAIL PROTECTED] wrote: Yeah that makes sense. Since we're sorta on the topic, I thought I would ask this question. As the User object goes from being initially registered to its profile being edited, how does one update the User in the session and the db simultaneously? Here's a scenario: A user registers with your website and later adds a signature that is to show up on every post he makes. Do you add an instance of a UserService to your WebSession and then have this in it: private User user; public synchronized void setUser(User updatedUser) { userService.updateUser(updatedUser); this.user = updatedUser; } public synchronized User getUser() { return this.user; } ? Cause I've been doing something like that. Is there a better way to go about this? Looks fine to me. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
RE: Is it possible to use wicket without having any html page?
Am I having déjà vu? Didn't someone already post this? -Original Message- From: Jon Laidler [mailto:[EMAIL PROTECTED] Sent: Monday, January 07, 2008 3:54 PM To: users@wicket.apache.org Subject: Re: Is it possible to use wicket without having any html page? +1. If Echo (never used myself) fits use it. You could also use Java servlets to create dynamic HTML from the server. Personally, this is a backward trend and a pain to manage - all HTML modifications made in the servlet, harder for web designers to do their creative stuff etc. The beauty of Wicket is it separates the process from the presentation layer. Just my 2cents Martijn Dashorst wrote: then just use Echo2. Why make Wicket into Echo2 when you can use that? Wicket has a particular niche and Echo2 has its niche. There is no sense into turning one into the other. Martijn On Jan 4, 2008 12:32 PM, legolas [EMAIL PROTECTED] wrote: I am simple looking to know whether we can get rid of any markup files and just use java files to define and design our pages, something like echo2? Thanks. Nino.Martinez wrote: Hi legolas im not sure how familiar you are with wicket. But i'd go for having the html and just using the approach specified here: http://www.nabble.com/Ways-of-making-components-in-a-page-optional--tp143993 90p14399390.html It's possible that I've misunderstood you, do you want to redirect to some old legacy jsp page or? legolas wrote: A web page, but it is completely dynamic and all components will be created based on user request content. Thanks igor.vaynberg wrote: what would you like it to display? a web page or contents of some file/dynamic content? -igor On Jan 3, 2008 3:01 PM, legolas [EMAIL PROTECTED] wrote: Hi Is it possible to use wicket without having any html page? Just writing java code and pointing the browser to some url and it goes forward? Thanks -- View this message in context: http://www.nabble.com/Is-it-possible-to-use-wicket-without-having-any-html-p age--tp14607438p14607438.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Is-it-possible-to-use-wicket-without-having-any-html-p age--tp14607438p14614650.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Is-it-possible-to-use-wicket-without-having-any-html-p age--tp14607438p14679175.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Wicket Session and threading
To me it seems like it would be an unusual situation for two threads to access the session at the same time. Under what circumstances does this happen? -Original Message- From: Eelco Hillenius [mailto:[EMAIL PROTECTED] Sent: Thursday, January 03, 2008 10:15 PM To: users@wicket.apache.org Subject: Re: Wicket Session and threading You're right, we should mention this in WIA. Would you mind leaving a comment on the author forum? http://www.manning-sandbox.com/forum.jspa?forumID=328 Cheers, Eelco On Jan 3, 2008 11:10 PM, Sebastiaan van Erk [EMAIL PROTECTED] wrote: Eelco Hillenius wrote: Am I right in concluding that I must make my wicket session thread-safe? That is, if I want to store an int value in the session, I should use a volatile or AtomicInteger? Yes. We try our best to make pages/ components as thread safe as possible, but making the session thread safe would impose a too large performance penalty. Is there anywhere a small piece on how to deal with threading within Wicket (i.e., what is/is not synchronized in a request/response roundtrip?). I did some quick searching in the mailing list archives and google, but could not find anything related to version 1.3. Pages are synced on pagemaps, which basically relates to browser windows. RequestCycles are separate instances which are not reused, so no sync needed there. Sessions are not synced so you need to sync manually. Though in practice this wouldn't give much trouble to start with. Applications are shared an not synced. Eelco Thanks for the answer. :-) Before really thinking about it I kind of implicitly assumed that session access was synced. It hasn't really gone wrong yet either, but that's probably because of the use of ThreadLocal which acts as a memory barrier (for session/application) and the fact that it's very hard to get two threads to interleave within one session unless you start having a fit on the mouse (or use lots of autoupdating ajaxy stuff). It could be (very) useful to have this info in the Wicket in Action book though. For example in listing 2.1 there is a Session object with a get/setUser, but it is completely unsynchronized; similarly, there is no synchronization at all on the Cheesr session. Again the visibility seems to be ensured by the fact that the session is set in a thread local, but the code somehow seems to suggest (to me anyway) that no synchronization is necessary... There are some comments on multithreadedness and threads (2.3; but in the context of detaching, not thread-safety, and 4.1.1 in the context of the Application object). However it also says (in 4.1.1) that all is safe if the Application only has read-only properties, however, in the CheesrApplication the list of cheeses is not final. This must mean that Wicket does ensure visibility (or else it's a bug ;-)), but that is not trivial and should probably be mentioned. Regards, Sebastiaan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Wicket Session and threading
Yeah that makes sense. Since we're sorta on the topic, I thought I would ask this question. As the User object goes from being initially registered to its profile being edited, how does one update the User in the session and the db simultaneously? Here's a scenario: A user registers with your website and later adds a signature that is to show up on every post he makes. Do you add an instance of a UserService to your WebSession and then have this in it: private User user; public synchronized void setUser(User updatedUser) { userService.updateUser(updatedUser); this.user = updatedUser; } public synchronized User getUser() { return this.user; } ? Cause I've been doing something like that. Is there a better way to go about this? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Frank Bille Sent: Friday, January 04, 2008 2:02 PM To: users@wicket.apache.org Subject: Re: Wicket Session and threading What about (i)frames with pages being loaded in every one of them at the same time? Frank On Jan 4, 2008 7:57 PM, Dan Kaplan [EMAIL PROTECTED] wrote: To me it seems like it would be an unusual situation for two threads to access the session at the same time. Under what circumstances does this happen? -Original Message- From: Eelco Hillenius [mailto:[EMAIL PROTECTED] Sent: Thursday, January 03, 2008 10:15 PM To: users@wicket.apache.org Subject: Re: Wicket Session and threading You're right, we should mention this in WIA. Would you mind leaving a comment on the author forum? http://www.manning-sandbox.com/forum.jspa?forumID=328 Cheers, Eelco On Jan 3, 2008 11:10 PM, Sebastiaan van Erk [EMAIL PROTECTED] wrote: Eelco Hillenius wrote: Am I right in concluding that I must make my wicket session thread-safe? That is, if I want to store an int value in the session, I should use a volatile or AtomicInteger? Yes. We try our best to make pages/ components as thread safe as possible, but making the session thread safe would impose a too large performance penalty. Is there anywhere a small piece on how to deal with threading within Wicket (i.e., what is/is not synchronized in a request/response roundtrip?). I did some quick searching in the mailing list archives and google, but could not find anything related to version 1.3. Pages are synced on pagemaps, which basically relates to browser windows. RequestCycles are separate instances which are not reused, so no sync needed there. Sessions are not synced so you need to sync manually. Though in practice this wouldn't give much trouble to start with. Applications are shared an not synced. Eelco Thanks for the answer. :-) Before really thinking about it I kind of implicitly assumed that session access was synced. It hasn't really gone wrong yet either, but that's probably because of the use of ThreadLocal which acts as a memory barrier (for session/application) and the fact that it's very hard to get two threads to interleave within one session unless you start having a fit on the mouse (or use lots of autoupdating ajaxy stuff). It could be (very) useful to have this info in the Wicket in Action book though. For example in listing 2.1 there is a Session object with a get/setUser, but it is completely unsynchronized; similarly, there is no synchronization at all on the Cheesr session. Again the visibility seems to be ensured by the fact that the session is set in a thread local, but the code somehow seems to suggest (to me anyway) that no synchronization is necessary... There are some comments on multithreadedness and threads (2.3; but in the context of detaching, not thread-safety, and 4.1.1 in the context of the Application object). However it also says (in 4.1.1) that all is safe if the Application only has read-only properties, however, in the CheesrApplication the list of cheeses is not final. This must mean that Wicket does ensure visibility (or else it's a bug ;-)), but that is not trivial and should probably be mentioned. Regards, Sebastiaan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: MyWebApplication, SpringWebApplication + AuthenticatedWebApplication
The wiki has a section on spring integration. You put a line in your app's init() method to accomplish this. It should be easy to find. -Original Message- From: Korbinian Bachl [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 02, 2008 1:44 PM To: users@wicket.apache.org Subject: MyWebApplication, SpringWebApplication + AuthenticatedWebApplication Hi, usually my WebApp is based on Wicket-Auth-Roles, so I do: MyWebApp extends AuthenticatedWebApplication { Lately I played around with spring 2.5 a bit and so used MyWebApp extends SpringWebApplication { but how can I now integrate a SpringWebApplication to use Wicket-Auth-Roles? The only way I currently see is to copy'n paste the content of the SpringWebApplication into MyWebApp and let it extend AuthenticatedWebApplication - but copy'n paste is not my preferable way however... Any ideas? Best, Korbinian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Minor Announcement: wicket-googlecharts
Wow that looks pretty cool. I'm thinking about making a website that may be able to use that. I bookmarked the article -Original Message- From: Daniel Spiewak [mailto:[EMAIL PROTECTED] Sent: Thursday, December 20, 2007 10:17 AM To: users@wicket.apache.org Subject: Minor Announcement: wicket-googlecharts Just a minor sidebar, at Johan's suggestion I've released wicket-googlecharts into the wicket-stuff project. I played with the build system a bit to make it work with maven and I think I did it right, but my maven experience is limited. License is currently discretionary, though if I really had to pick one I'd probably go with either ASL2 or BSD. Warning: anything that isn't tested by the test page in the project is completely theoretical and untested. This means things like scatter plots, color fills, etc are all up in the air. I'll probably get around to stabilizing functionality eventually, but for now it can just float. Hopefully someone will find this useful! Daniel (original article: http://www.codecommit.com/blog/java/a-wicket-api-for-google-charts) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [AuthenticatedWebSession] Constructor called twice
I see you're using eclipse. I'm using IDEA. I noticed with IDEA that when it opened the home page for me, it always hit the home page twice. Maybe Eclipse uses the same call and that's why you're seeing what you're seeing. If your IDE is the one that's starting up the homepage, you should try doing it by hand and see if 2 sessions are created. -Original Message- From: Pills [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 1:45 PM To: users@wicket.apache.org Subject: Re: [AuthenticatedWebSession] Constructor called twice igor.vaynberg wrote: can you show us the two stack traces? -igor There is no really stack trace. I have this output in my console when I launch it from eclipse. code 19 déc. 2007 22:22:57 org.apache.catalina.core.AprLifecycleListener init INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\MyEclipse 6.0\bin;C:\Program Files\MyEclipse 6.0\myeclipse\eclipse\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_6. 0.1.zmyeclipse601200710\tomcat\bin 19 déc. 2007 22:22:57 org.apache.coyote.http11.Http11Protocol init INFO: Initialisation de Coyote HTTP/1.1 sur http-8080 19 déc. 2007 22:22:57 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1315 ms 19 déc. 2007 22:22:57 org.apache.catalina.core.StandardService start INFO: Démarrage du service Catalina 19 déc. 2007 22:22:57 org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.13 *** WARNING: Wicket is running in DEVELOPMENT mode. *** *** ^^^*** *** Do NOT deploy to your live server(s) without changing this. *** *** See Application#getConfigurationType() for more information. *** 19 déc. 2007 22:23:07 org.apache.coyote.http11.Http11Protocol start INFO: Démarrage de Coyote HTTP/1.1 sur http-8080 19 déc. 2007 22:23:07 org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 19 déc. 2007 22:23:07 org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/140 config=null 19 déc. 2007 22:23:07 org.apache.catalina.startup.Catalina start INFO: Server startup in 10228 ms session constructor session constructor /code The two last lines are writed by the session's constructor, and both from by the connection of one user. Basically, my code is very simple (my authenticated web application returns my authenticated web session's class in its getWebSessionClass() method, and there is nothing speical in the constructor) After that, each connection calls this constructor only one time -- View this message in context: http://www.nabble.com/-AuthenticatedWebSession--Constructor-called-twice-tp1 4420125p14425981.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WicketTester trouble resubmitting a form
Hi, I'm having asserts fail when I resubmit a form with WicketTester. Here's the scenario: I go to a page with a form that has a requiredtextfield. First, I set the field to and submit it. It fails like it should. Then, in the same test, I set it to a value like blah and submit it. It fails with the same error: The field is required. It should not be complaining about this since I did set it to a value. I've found the workaround to this is to submit the form only once. I have written up a testcase for this: //the html html body span wicket:id=feedbackFeedback/span form wicket:id=form table trtdName:/tdtdinput type=text wicket:id=name//td/tr /table input type=submit value=Submit Test/ /form /body /html //the webpage public class Test extends WebPage { private String name; public Test() { IModel model = new Model() { public void setObject(Object obj) { name = obj.toString(); } }; Form form = new Form(form) { @Override public void onSubmit() { info(submitted + name); } }; form.add(new RequiredTextField(name, model)); add(form); add(new FeedbackPanel(feedback)); } } //the test public class MyTest extends BaseWebTest { public void testResubmit() { //note: tester initialized in parent tester.startPage(new Test()); FormTester ft1 = tester.newFormTester(form); ft1.setValue(name, ); ft1.submit(); tester.assertRenderedPage(Test.class); FormTester ft2 = tester.newFormTester(form); ft2.setValue(name, testcity); ft2.submit(); tester.assertNoErrorMessage(); //it fails here tester.assertRenderedPage(Test.class); } } //the exception junit.framework.AssertionFailedError: expect no error message, but contains Field 'name' is required. at org.apache.wicket.util.tester.WicketTester.assertNoErrorMessage(WicketTester .java:476) at com.haverlocke.web.page.pub.MyTest.testResubmit(MyTest.java:25) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) //the BaseWebTest (I really hope this doesn't matter) protected WicketTester tester; public void setUp() throws Exception { super.setUp(); MyApplication ha = new MyApplication() { public void init() { addComponentInstantiationListener(new SpringComponentInjector(this, applicationContext)); } }; tester = new WicketTester(ha); } Can anyone explain this? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ListChoice gets updated BEFORE onSubmit is called
Hello, I'm very new to wicket so this may be a duh situation, but here's what I'm trying to do: I have a form that shows you a ChoiceList of things. You can select one and then hit the submit button to delete that item. I've written this functionality but found that it doesn't work the way I want. For some reason, Wicket asks the ChoiceList for its list BEFORE the form's onSumbit is called. As a result, the page gets the list before the item is deleted. And as a result of that, the item is still in the list even though it's been removed from the database. If I refresh my browser, the item disappears. So, my question is, how do I get the ChoiceList to ask for its list AFTER the form's onSubmit is called? Here's my code (note that I'm extending ChoiceList, but I don't think I'm overriding any related functionality): //the choicelist public class WorldChoiceList extends ListChoice { @SpringBean private WorldService worldService; public WorldChoiceList(String id, IModel model) { super(id); setChoices(new LoadableDetachableModel() { protected Object load() { return worldService.allByName(); } }); setChoiceRenderer(new IChoiceRenderer() { public Object getDisplayValue(Object object) { World w = ((World) object); return w.getName() + , + w.getMaxX() + , + w.getMaxY(); } public String getIdValue(Object object, int index) { if (object.equals()) { return ; } return String.valueOf(((World) object).getWorldId()); } }); setModel(model); setNullValid(false); } /** * This override makes it so that the List does not start with a blank or a Choose One * label. * @param selected The selected object * @return */ protected CharSequence getDefaultChoice(final Object selected) { return ; } } //the web page public class AdminHome extends AdminPage { @SpringBean private WorldService worldService; private World selected; public AdminHome() { add(new FeedbackPanel(feedback)); Form form = new Form(form) { public void onSubmit() { if (selected != null) worldService.deleteWorld(selected); } }; form.add(new WorldChoiceList(worldList, new Model() { public void setObject(final Object object) { selected = (World) object; } })); add(form); add(new BookmarkablePageLink(createWorld, CreateWorld.class)); } } Thanks for any help :-)
RE: ListChoice gets updated BEFORE onSubmit is called
Oh ok. I didn't think about solving the problem with that approach. Thanks -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Sunday, December 16, 2007 2:10 AM To: users@wicket.apache.org Subject: Re: ListChoice gets updated BEFORE onSubmit is called It has to get the list, because thats where the selected object comes from. What you need to do is remove the object through that list or call detach on the choice in the submit. That should also result in the list being detached/cleared. On 12/16/07, Dan Kaplan [EMAIL PROTECTED] wrote: Hello, I'm very new to wicket so this may be a duh situation, but here's what I'm trying to do: I have a form that shows you a ChoiceList of things. You can select one and then hit the submit button to delete that item. I've written this functionality but found that it doesn't work the way I want. For some reason, Wicket asks the ChoiceList for its list BEFORE the form's onSumbit is called. As a result, the page gets the list before the item is deleted. And as a result of that, the item is still in the list even though it's been removed from the database. If I refresh my browser, the item disappears. So, my question is, how do I get the ChoiceList to ask for its list AFTER the form's onSubmit is called? Here's my code (note that I'm extending ChoiceList, but I don't think I'm overriding any related functionality): //the choicelist public class WorldChoiceList extends ListChoice { @SpringBean private WorldService worldService; public WorldChoiceList(String id, IModel model) { super(id); setChoices(new LoadableDetachableModel() { protected Object load() { return worldService.allByName(); } }); setChoiceRenderer(new IChoiceRenderer() { public Object getDisplayValue(Object object) { World w = ((World) object); return w.getName() + , + w.getMaxX() + , + w.getMaxY(); } public String getIdValue(Object object, int index) { if (object.equals()) { return ; } return String.valueOf(((World) object).getWorldId()); } }); setModel(model); setNullValid(false); } /** * This override makes it so that the List does not start with a blank or a Choose One * label. * @param selected The selected object * @return */ protected CharSequence getDefaultChoice(final Object selected) { return ; } } //the web page public class AdminHome extends AdminPage { @SpringBean private WorldService worldService; private World selected; public AdminHome() { add(new FeedbackPanel(feedback)); Form form = new Form(form) { public void onSubmit() { if (selected != null) worldService.deleteWorld(selected); } }; form.add(new WorldChoiceList(worldList, new Model() { public void setObject(final Object object) { selected = (World) object; } })); add(form); add(new BookmarkablePageLink(createWorld, CreateWorld.class)); } } Thanks for any help :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]