Re: Removing the jsessionid for SEO

2008-04-03 Thread Igor Vaynberg
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@wicket.apache.org
>  >  >  >  > Subject: Re: Removing t

Re: Removing the jsessionid for SEO

2008-04-03 Thread Martijn Dashorst
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.

>  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

-- 
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]



RE: Removing the jsessionid for SEO

2008-04-03 Thread Dan Kaplan
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

Re: Removing the jsessionid for SEO

2008-04-03 Thread Igor Vaynberg
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
>  >  >  >  >
>  >  >  >  >
>  >  >  >  >
>  >  >  >  >
>  >  >  > 

RE: Removing the jsessionid for SEO

2008-04-03 Thread Dan Kaplan
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 complete

RE: Removing the jsessionid for SEO

2008-04-03 Thread Dan Kaplan


-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: Tomcat dying with Wicket 1.3.2 (Windows / JDK 1.5.0_10)

2008-04-03 Thread Matej Knopp
This is really weird. Do you have any inter-page references in your application?

-Matej

On Thu, Apr 3, 2008 at 9:35 PM, Jeremy Thomerson
<[EMAIL PROTECTED]> wrote:
> The oddness is what baffles me: Tomcat has no output anywhere.  I have
>  grepped and tailed the entire Tomcat logs directory, stdout*, stderr*,
>  localhost*, etc.  Nothing in eventvwr.
>
>  It must be memory related, though.  There is a steadily increasing memory
>  footprint - it was increasing so fast yesterday because we were getting
>  pounded by tons of traffic and Google's crawler and Ask's crawler all
>  simultaneously.  Of course, the traffic was still no higher than it has been
>  in the past - this is definitely a new problem.
>
>  I redeployed today with the pending 1.3.3 release built by Frank to see if
>  my leak could be the same as Martijn's below, but the memory continues to
>  increase.  It will die soon.  I have added the parameter to tell it to dump
>  on OOM - hopefully I got the right parameter and it will work.
>
>  Anyone here know how to (or if you can) use jstat / jmap with tomcat5.exe,
>  running as Windows service?  All my development is on Linux machines, and I
>  can easily use those tools, but on the Windows prod environment (ughh), jps
>  doesn't give me a VMID for Tomcat.
>
>  Thank you for your help!
>  Jeremy
>
>
>
>  On Thu, Apr 3, 2008 at 2:27 PM, Al Maw <[EMAIL PROTECTED]> wrote:
>
>  > You can use as many anonymous inner classes as you like. I have them
>  > coming
>  > out of my ears, personally.
>  >
>  > It's very odd for tomcat to die with no output. There will be output
>  > somewhere. Check logs/catalina.out and also logs/localhost*. If the JVM
>  > dies, it will hotspot or even segfault and log that, at least. If you have
>  > gradually increasing memory footprint then this should be pretty easy to
>  > track down with a profiler.
>  >
>  > Make sure you run Tomcat with a sensible amount of permanent generation
>  > space (128M+).
>  >
>  > Regards,
>  >
>  > Alastair
>  >
>  >
>  >
>  > On Thu, Apr 3, 2008 at 6:43 AM, Martijn Dashorst <
>  > [EMAIL PROTECTED]>
>  > wrote:
>  >
>  > > There are commandline options for the jvm to dump on OOM.
>  > >
>  > > Anyway, doesn't the log file give any insight into what is happening
>  > > in your application? Did you (or your sysadmin) disable logging for
>  > > Wicket?
>  > >
>  > > You can also run external tools to see what is happening inside your
>  > > JVM without blocking the app. e.g. use jmap -histo to see how many
>  > > objects are alive at a particular moment. The top 10 is always
>  > > interesting. In my case I found a memory leak in the diskpagestore
>  > > when exceptions occurred during writing to disk. This is solved in
>  > > 1.3.3 (which is just days away from an official release, try it!)
>  > >
>  > > jstat -gc -h50  1000 will log the garbage collector statistics
>  > > every second.
>  > >
>  > > Martijn
>  > >
>  > > On 4/3/08, Jeremy Thomerson <[EMAIL PROTECTED]> wrote:
>  > > > I upgraded my biggest production app from 1.2.6 to 1.3 last week.  I
>  > > have
>  > > >  had several apps running on 1.3 since it was in beta with no problems
>  > -
>  > > >  running for months without restarting.
>  > > >
>  > > >  This app receives more traffic than any of the rest.  We have a
>  > decent
>  > > >  server, and I had always allowed Tomcat 1.5GB of RAM to operate with.
>  > >  It
>  > > >  never had a problem doing so, and I didn't have OutOfMemory errors.
>  > >  Now,
>  > > >  after the upgrade to 1.3.2, I am having all sorts of trouble.  It ran
>  > > for
>  > > >  several days without a problem, but then started dying a couple times
>  > a
>  > > >  day.  Today it has died four times.  Here are a couple odd things
>  > about
>  > > >  this:
>  > > >
>  > > >- On 1.2.6, I never had a problem with stability - the app would
>  > run
>  > > >weeks between restarts (I restart once per deployment, anywhere
>  > from
>  > > once a
>  > > >week to at the longest about two months between deploy / restart).
>  > > >- Tomcat DIES instead of hanging when there is a problem.  Always
>  > > >before, if I had an issue, Tomcat would hang, and there would be
>  > OOM
>  > > in the
>  > > >logs.  Now, when it crashes, and I sign in to the server, Tomcat is
>  > > not
>  > > >running at all.  There is nothing in the Tomcat logs that says
>  > > anything, or
>  > > >in eventvwr.
>  > > >- I do not get OutOfMemory error in any logs, whereas I have always
>  > > >seen it in the logs before when I had an issue with other apps.  I
>  > am
>  > > >running Tomcat as a service on Windows, but it writes stdout /
>  > stderr
>  > > to
>  > > >logs, and I write my logging out to logs, and none of these logs
>  > > include ANY
>  > > >errors - they all just suddenly stop at the time of the crash.
>  > > >
>  > > >  My money is that it is an OOM error caused by somewhere that I am
>  > doing
>  > > >  something 

RE: Removing the jsessionid for SEO

2008-04-03 Thread Dan Kaplan
Sorry, I'm going to reply again.  It differentiate between my comments and
yours:

> -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.

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: java.io.StreamCorruptedException: invalid type code: 29

2008-04-03 Thread Daniel Wu
I debugged my application and it really doesn't have a
ClassNotFoundException eaten by ObjectInputStream. I compared the flow of
two screens of my application, one that works and another that doesn't:

1) The line 298 of SecondLevelCacheSessionStore =>
getLastPage().getVersion(versionNumber) is returning the correct page,
because inside the getVersion() method, the versionManager object is null.
In this case, the screen that I'm testing works perfectly.

2) For the screen that throws the StackOverFlow and
StreamCorruptedException, for some reason the versionManager object is not
null, and it returns a null page object.

Another strange thing is that after the line 393 of Objects.java => return
ois.readObject(); => while debugging it using Eclipse, after this method
call the flow goes straight to the line 363 of AbstractPageStore.java,
without entering the finally block. So, an infinite loop starts, causing the
StackOverflow.

During the tab switch of the screen that works, the line 393 of Objects.java
is never reached, meaning that this screen was not serialized, right? This
code is only reached during a tab switch of the screen that throws
StackOverFlow exception.

What defines if a page should be serialized/deserialized? Does anyone know
what could be causing these problems?

On Wed, Apr 2, 2008 at 7:28 PM, Daniel Stoch <[EMAIL PROTECTED]> wrote:

> Hi,
>
> It seems that this could be an OSGi related issue. We have the similar
> problem in our applications.
> You can look at the thread: Wicket + OSGI + Session (november 2007). Then
> Sebastiaan gave me a tip that this can be ClassNotFoundException:
>
> "It's probably a ClassNotFoundException on deserialization which gets
> eaten by ObjectInputStream (there's a bug report at Sun for this). To be
> sure you can debug trapping on ClassNotFoundException (caught and uncaught)
> when this problem occurs.
>
> However, since it's in a page you can easily fix this one: either upgrade
> to trunk and implement your own IClassResolver and register it with the
> application, or write your own IObjectStreamFactory implementation and
> register it with the Objects class.
>
> In either case, have a look at the DefaultObjectStreamFactory to see how
> to write a hook to look up classes in an ObjectInputStream implementation
> (resolveClass method)."
>
>
> Inside OSGI environment each bundle has its own class loader, so this
> could leeds to problem when you try to use in your app a class defined in
> another bundle.
> I've solved this problem by implementing my own IClassResolver. The
> default Wicket DefaultClassResolver is a final class, so we must make a copy
> of it and make a little change at the end of resolveClass method.
>
> The default implementation (DefaultClassResolver):
>
>synchronized (classes)
>{
>ClassLoader loader =
> Thread.currentThread().getContextClassLoader();
>if (loader == null)
>{
>loader =
> DefaultClassResolver.class.getClassLoader();
>}
>clazz = loader.loadClass(classname);
>}
>
> When there is a ClassLoader attached to the current thread as context
> class loader, then Wicket uses it. The problem is under OSGi, that the
> related class (with classname) can be located inside another bundle and can
> be loaded by another class loader, not this from current thread. So
> DefaultClassResolver fails to find this class. The solution is to try in
> such situation use the class loader which loads DefaultClassResolver class
> (= which loads all Wicket classes). In our CustomClassResolver this block
> was changed to something like this:
>
>synchronized (classes) {
>ClassLoader loader =
> Thread.currentThread().getContextClassLoader();
>if (loader == null) {
>loader =
> DefaultClassResolver.class.getClassLoader();
>clazz = loader.loadClass(classname);
>} else {
>try {
>clazz = loader.loadClass(classname);
>} catch (ClassNotFoundException e) {
>loader =
> DefaultClassResolver.class.getClassLoader();
>clazz = loader.loadClass(classname);
>}
>}
>}
>
> Then in your Application class init() method add the following line:
> getApplicationSettings().setClassResolver(new CustomClassResolver());
>
> But there is a one assumption, that bundle with Wicket classes (you
> probably have a Wicket bundled somehow in your app, don't you? :)), should
> have a dynamic import for all classes which can be located in many different
> bundles:
> DynamicImport-Package: *
>
> Maybe such change could be done in Wicket core (in DefaultClassResolver
> class)?
>
> --
> Daniel Stoch
>
>
> On 2008-03-29, at 22:22, Daniel Wu wrote:
>
> >
> > I've updated my wicket applic

Re: Removing the jsessionid for SEO

2008-04-03 Thread Martijn Dashorst
On 4/4/08, Dan Kaplan <[EMAIL PROTECTED]> wrote:
> My URL ends with ;jsessionid=an7goabg0az (my actual situation).  I
> personally think that looks weirder than .php or .asp.

Nah, it shows that you are using Java. Much more sophisticated!

>  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.

I made the 0.5% statistic up. Developers are notoriously anal about
URL's where John and Jane Doe typically just use the google search box
as their URL bar. Did you ever look at the URLs of Amazon? they are
not pretty, and you'd need to have a very weird jsessionid to
overthrow Amazon's URL scheme on the ugly scale.

Where's the proof that Google punishes you for having a jsessionid in the URL?

>>  I think you need to give the google engineers *some* credit. I
>>  seriously doubt they are *THAT* stupid.
> 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

These links are from 2002 (over 5 years ago). Wicket wasn't even born
then. I surely hope that technology has evolved since then.

Anyway, I'm glad I don't have to build apps that require SEO or public
bots that navigate our sites. In fact if that ever happened, I think
our company would instantly be very famous (we deal with privacy
sensitive information that should stay out of Google/Yahoo/LiveSeach's
indexes)

Martijn

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: should DataView.setItemsPerPage(int items) be in IDataProvider?

2008-04-03 Thread i ii

i need update method to know how many items updated out of how many items shown 
on page

> Date: Thu, 3 Apr 2008 10:02:18 -0700
> From: [EMAIL PROTECTED]
> To: users@wicket.apache.org
> Subject: Re: should DataView.setItemsPerPage(int items) be in IDataProvider?
> 
> whats the usecase there?
> 
> -igor
> 
> On Thu, Apr 3, 2008 at 6:29 AM, i ii <[EMAIL PROTECTED]> wrote:
> >
> >  but what if items per page is needed not in iterator?
> >
> >  > Date: Thu, 3 Apr 2008 15:08:27 +0200
> >  > From: [EMAIL PROTECTED]
> >  > To: users@wicket.apache.org
> >  > Subject: Re: should DataView.setItemsPerPage(int items) be in 
> > IDataProvider?
> >
> >
> > >
> >  > iterator(int start, int count)
> >  >
> >  > the count parameter is the items per page.
> >  >
> >  > Martijn
> >  >
> >  > On 4/3/08, i ii <[EMAIL PROTECTED]> wrote:
> >  > >
> >  > >  when i need to get items per page in data provider i cannot unless i 
> > have data view. should this method be in data provider and not data view? 
> > the data provider is providing data and items per page is data, no?
> >  > >
> >  >
> >  >
> >  > --
> >  > 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: should DataView.setItemsPerPage(int items) be in IDataProvider?

2008-04-03 Thread Igor Vaynberg
what is that have to do with dataprovider? i think you are doing
something very strange. maybe you should subclass the dataview instead
of dataprovider

-igor


On Thu, Apr 3, 2008 at 5:22 PM, i ii <[EMAIL PROTECTED]> wrote:
>
>  i need update method to know how many items updated out of how many items 
> shown on page
>
>  > Date: Thu, 3 Apr 2008 10:02:18 -0700
>  > From: [EMAIL PROTECTED]
>
>
> > To: users@wicket.apache.org
>  > Subject: Re: should DataView.setItemsPerPage(int items) be in 
> IDataProvider?
>  >
>  > whats the usecase there?
>  >
>  > -igor
>  >
>  > On Thu, Apr 3, 2008 at 6:29 AM, i ii <[EMAIL PROTECTED]> wrote:
>  > >
>  > >  but what if items per page is needed not in iterator?
>  > >
>  > >  > Date: Thu, 3 Apr 2008 15:08:27 +0200
>  > >  > From: [EMAIL PROTECTED]
>  > >  > To: users@wicket.apache.org
>  > >  > Subject: Re: should DataView.setItemsPerPage(int items) be in 
> IDataProvider?
>  > >
>  > >
>  > > >
>  > >  > iterator(int start, int count)
>  > >  >
>  > >  > the count parameter is the items per page.
>  > >  >
>  > >  > Martijn
>  > >  >
>  > >  > On 4/3/08, i ii <[EMAIL PROTECTED]> wrote:
>  > >  > >
>  > >  > >  when i need to get items per page in data provider i cannot unless 
> i have data view. should this method be in data provider and not data view? 
> the data provider is providing data and items per page is data, no?
>  > >  > >
>  > >  >
>  > >  >
>  > >  > --
>  > >  > 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]
>  >
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Removing the jsessionid for SEO

2008-04-03 Thread Igor Vaynberg
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 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
>  > >  >

Default selection in radio group?

2008-04-03 Thread Michael Mehrle
I created a RadioGroup with three radios attached. For some reason the form is 
being drawn with the last radio pre-selected, which I don't want. How can I 
pre-select a default radio and also how can I set the group to nothing selected?

Thanks,

Michael



RE: Removing the jsessionid for SEO

2008-04-03 Thread Dan Kaplan
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

RE: Removing the jsessionid for SEO

2008-04-03 Thread Dan Kaplan
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 f

Re: Removing the jsessionid for SEO

2008-04-03 Thread Jeremy Levy
We have a similar issue, and are trying the following out right now..

http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=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]>
> > >  > >  wrote:
> > >  > >  >  > Regardless, at the v

Re: Removing the jsessionid for SEO

2008-04-03 Thread Igor Vaynberg
On Thu, Apr 3, 2008 at 6: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:

well, perhaps the differentiator here is that wicket is made for web
applications not web sites.

>  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.

yep, you need to make sure that all stateful links are behind a login
or something similar that the bot cant get passed.

>  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 ...?

no there isnt a way, you have to use wildmasks

on the other hand it is not that difficult to develop the stateless
paging navigator, it will take a bit of work though.

-igor




>
>
>
>  > -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
>  > >  > > 

Re: Removing the jsessionid for SEO

2008-04-03 Thread Jeremy Levy
To clarify my message below:  With a CryptedUrlWebRequestCodingStrategy and
alot of BookmarkablePages.

On Thu, Apr 3, 2008 at 9:16 PM, Jeremy Levy <[EMAIL PROTECTED]> wrote:

> We have a similar issue, and are trying the following out right now..
>
> http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=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]
> > > >  > >  >  Sen

Strange behaviour with autocomplete

2008-04-03 Thread David Leangen

Hi,

Using the standard wicket autocomplete widget, I just noticed that I am
getting some strange behaviour.

When I mouseover or scroll the list via the keyboard, the entire screen
jumps to the bottom. I never noticed before because there wasn't enough
content to cause the page to scroll and therefore for this bug to
manifest itself.


Has anybody else ever dealt with this problem?


Thanks!
David




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Removing the jsessionid for SEO

2008-04-03 Thread Jeremy Thomerson
I've been building a community-driven hunting and fishing site in Texas for
the past year and a half.  Since I have converted it to Wicket from
ColdFusion, our search engine rankings have gone WAY UP.  That's right,
we're on the first page for tons of searches.  Search for "texas hunting" -
we're second under only the Texas Parks and Wildlife Association.

How?  With Wicket?  Yes - it requires a little more work.  What I do is that
for any link that I want Google to be able to follow, I have a subclass of
Link specific to that.  For instance, ViewThreadLink, which takes the ID for
the link and a model (detachable) of the thread.  Then I mount an
IRequestTargetUrlCodingStrategy for each big category of things in my
webapp.  I've made several strategies that I use over and over, just giving
them a different mount path and a different parameter to tell it what kind
of article, etc, that it will match to.  This is made easier because over
75% of the objects in our site are all similar enough that the extend from a
base class that provides the basic functionality for an article / thread /
etc that has a title, text, pictures, comments, the standard stuff.

So, yes, it takes work.  But that's okay - SEO always takes work.  I also
have given a lot of care to use good page titles, good semantic HTML and
stuff things into the URL that don't have anything to do with locating the
resource, but give the search engines a clue as to what the content is.

Yes, some pages end up with a jsessionid - and I don't like it (example:
http://www.google.com/search?hl=en&client=firefox-a&rls=com.ubuntu%3Aen-US%3Aofficial&q=%22south+texas+management+buck%22&btnG=Search).
But, most don't because almost all of my links are bookmarkable.  When the
user clicks something that they can only do as a signed-in user, then it
redirects them to the sign in page, they sign in, and are taken back to the
page they were on.  Then they can pick up, and I don't worry about
bookmarkable URLs for anything that requires user-authentication (wizards to
post a new listing, story, admin links, etc).

Jeremy Thomerson
TexasHuntFish.com

On Thu, Apr 3, 2008 at 8: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: R

Re: Tomcat dying with Wicket 1.3.2 (Windows / JDK 1.5.0_10)

2008-04-03 Thread Jeremy Thomerson
Nope - one page never holds on to another.  I never even pass pages into
another page or link or something as a reference.

Interestingly, I DECREASED the memory the JVM could have from 1.5 GB to 1.0
GB today, and it has been stable all day (after also releasing a version
using Wicket 1.3.3).  That's not a definite sign - it was stable for several
days after upgrading to 1.3.2 from 1.2.6 before freaking out.  But I'll
watch it closely.  The memory creeped slowly up to the max, and has stayed
there, but without the site crashing, and without any degradation of
performance.  Does that give anyone any ideas?  I'm so exhausted, I think
that I'm starting to lose my ability to think freshly about it.

Thank you,
Jeremy

On Thu, Apr 3, 2008 at 5:44 PM, Matej Knopp <[EMAIL PROTECTED]> wrote:

> This is really weird. Do you have any inter-page references in your
> application?
>
> -Matej
>
> On Thu, Apr 3, 2008 at 9:35 PM, Jeremy Thomerson
> <[EMAIL PROTECTED]> wrote:
> > The oddness is what baffles me: Tomcat has no output anywhere.  I have
> >  grepped and tailed the entire Tomcat logs directory, stdout*, stderr*,
> >  localhost*, etc.  Nothing in eventvwr.
> >
> >  It must be memory related, though.  There is a steadily increasing
> memory
> >  footprint - it was increasing so fast yesterday because we were getting
> >  pounded by tons of traffic and Google's crawler and Ask's crawler all
> >  simultaneously.  Of course, the traffic was still no higher than it has
> been
> >  in the past - this is definitely a new problem.
> >
> >  I redeployed today with the pending 1.3.3 release built by Frank to see
> if
> >  my leak could be the same as Martijn's below, but the memory continues
> to
> >  increase.  It will die soon.  I have added the parameter to tell it to
> dump
> >  on OOM - hopefully I got the right parameter and it will work.
> >
> >  Anyone here know how to (or if you can) use jstat / jmap with
> tomcat5.exe,
> >  running as Windows service?  All my development is on Linux machines,
> and I
> >  can easily use those tools, but on the Windows prod environment (ughh),
> jps
> >  doesn't give me a VMID for Tomcat.
> >
> >  Thank you for your help!
> >  Jeremy
> >
> >
> >
> >  On Thu, Apr 3, 2008 at 2:27 PM, Al Maw <[EMAIL PROTECTED]> wrote:
> >
> >  > You can use as many anonymous inner classes as you like. I have them
> >  > coming
> >  > out of my ears, personally.
> >  >
> >  > It's very odd for tomcat to die with no output. There will be output
> >  > somewhere. Check logs/catalina.out and also logs/localhost*. If the
> JVM
> >  > dies, it will hotspot or even segfault and log that, at least. If you
> have
> >  > gradually increasing memory footprint then this should be pretty easy
> to
> >  > track down with a profiler.
> >  >
> >  > Make sure you run Tomcat with a sensible amount of permanent
> generation
> >  > space (128M+).
> >  >
> >  > Regards,
> >  >
> >  > Alastair
> >  >
> >  >
> >  >
> >  > On Thu, Apr 3, 2008 at 6:43 AM, Martijn Dashorst <
> >  > [EMAIL PROTECTED]>
> >  > wrote:
> >  >
> >  > > There are commandline options for the jvm to dump on OOM.
> >  > >
> >  > > Anyway, doesn't the log file give any insight into what is
> happening
> >  > > in your application? Did you (or your sysadmin) disable logging for
> >  > > Wicket?
> >  > >
> >  > > You can also run external tools to see what is happening inside
> your
> >  > > JVM without blocking the app. e.g. use jmap -histo to see how many
> >  > > objects are alive at a particular moment. The top 10 is always
> >  > > interesting. In my case I found a memory leak in the diskpagestore
> >  > > when exceptions occurred during writing to disk. This is solved in
> >  > > 1.3.3 (which is just days away from an official release, try it!)
> >  > >
> >  > > jstat -gc -h50  1000 will log the garbage collector statistics
> >  > > every second.
> >  > >
> >  > > Martijn
> >  > >
> >  > > On 4/3/08, Jeremy Thomerson <[EMAIL PROTECTED]> wrote:
> >  > > > I upgraded my biggest production app from 1.2.6 to 1.3 last week.
>  I
> >  > > have
> >  > > >  had several apps running on 1.3 since it was in beta with no
> problems
> >  > -
> >  > > >  running for months without restarting.
> >  > > >
> >  > > >  This app receives more traffic than any of the rest.  We have a
> >  > decent
> >  > > >  server, and I had always allowed Tomcat 1.5GB of RAM to operate
> with.
> >  > >  It
> >  > > >  never had a problem doing so, and I didn't have OutOfMemory
> errors.
> >  > >  Now,
> >  > > >  after the upgrade to 1.3.2, I am having all sorts of trouble.
>  It ran
> >  > > for
> >  > > >  several days without a problem, but then started dying a couple
> times
> >  > a
> >  > > >  day.  Today it has died four times.  Here are a couple odd
> things
> >  > about
> >  > > >  this:
> >  > > >
> >  > > >- On 1.2.6, I never had a problem with stability - the app
> would
> >  > run
> >  > > >weeks between restarts (I restart once per deployment,
> anywhere
> >  

Re: Writing to .properties files and make changes happen?

2008-04-03 Thread unka_hahrry

I call this method from inside a WebPage:

public static void setNewText(String path, String textId, String neuerText)
throws IOException {

... getting old text as StringBuffer "alt" ...

//create new String from content of .properties file
String neu = alt.replace(start, ende, neuTextTeil).toString();
  
  File output = new File(path);
  BufferedWriter out = new BufferedWriter(new
FileWriter(output));

try {
out.write(neu);
}
finally {
out.close();
}

}
That's all. The .properties file will be changed correctly, but the new
content will only take effect if I open the .properties file with an editor
and save it, but the overwriting process won't be recognized.


Johan Compagner wrote:
> 
> thats very strange
> writing  a file in an editor or save it through java that shouldn't matter
> But are you constantly writing properties file from inside the webapp?
> 
> johan
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Writing-to-.properties-files-and-make-changes-happen--tp16447118p16484561.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]



Re: Mount causes strange effects on my web application

2008-04-03 Thread SteamR

My project structure is as follows:

root
  --> WEB-INF
  --> classes
  --> libs
  --> css
 -->css-files
  --> js
 -->javascript files.
  --> images
 -->image files.
  --> 
html files.


I have changed the default location of the resources, to reflect the
directory structure (by following the information on wiki:
(http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html). 



igor.vaynberg wrote:
> 
> where does your javascript live? context folder? package folder?
> 
> -igor
> 
> 
> On Thu, Apr 3, 2008 at 2:22 AM, SteamR <[EMAIL PROTECTED]> wrote:
>>
>>  OK, it seems that image paths are filtered with correct path, and thus
>> leaves
>>  my javascript reference as is, since I add it myself. Is there somehow I
>> can
>>  find out what path is correct, since I am adding javascript reference in
>> my
>>  java code???
>>
>>
>>
>>
>>  SteamR wrote:
>>  >
>>  > I found out that it was a js sourcefile reference which were added in
>> code
>>  > (in a onRendered method), that when app was mounted, caused the
>> lookups to
>>  > be sent to the page instead... So that seems that relative paths are
>> nogos
>>  > when mounted???
>>  >
>>  > But strange is that images seems to work ok, they also use relative
>>  > path...
>>  >
>>  >
>>  > SteamR wrote:
>>  >>
>>  >> I have now searched the html files, and can't find any empty src
>>  >> attributes. And it only happens when I add the
>>  >>
>>  >> mount("/pwa", PackageName.forClass(CategoryPage.class));
>>  >>
>>  >> in my WebApplication class' init method.
>>  >>
>>  >> (I also have relocated the html files to the "src/main/webapp"
>> folder, if
>>  >> that has something to do with it.)
>>  >>
>>  >> Well, I will try to strip down the code, to bare minimum and maybe
>> post
>>  >> the full code here thereafter.
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>
>>  >> SteamR wrote:
>>  >>>
>>  >>> Hi,  I hope someone could help me with this...
>>  >>>
>>  >>> I have 5 pages which are pretty standalone but stateful, and they
>> have
>>  >>> nothing to do with each other.
>>  >>>
>>  >>> Now I thought of having bookmarks for each of these pages, and added
>> a
>>  >>> mount point to /pwa.
>>  >>>
>>  >>> Now the problems started; my page's constructor was invoked three
>> times
>>  >>> before actual output occured (it has an empty constructor), and a
>> form
>>  >>> object loses its transient fields during a request-response cycle.
>>  >>>
>>  >>> The transient field getting lost, is something I can fix, but
>> invoking
>>  >>> the constructor three times and why wicket does so, is very
>> strange...?
>>  >>>
>>  >>> Anyone know any answer to this...
>>  >>>
>>  >>> Btw, I am running wicket 1.3.1
>>  >>>
>>  >>
>>  >>
>>  >
>>  >
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16467343.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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16485866.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]



Re: Mount causes strange effects on my web application

2008-04-03 Thread Igor Vaynberg
see ContextImage and how it generates the necessary ../../ prefix, do
the same for your javascript inside iheadercontributor.

-igor


On Thu, Apr 3, 2008 at 11:22 PM, SteamR <[EMAIL PROTECTED]> wrote:
>
>  My project structure is as follows:
>
>  root
>   --> WEB-INF
>   --> classes
>   --> libs
>   --> css
>  -->css-files
>   --> js
>  -->javascript files.
>   --> images
>  -->image files.
>   -->
> html files.
>
>
>  I have changed the default location of the resources, to reflect the
>  directory structure (by following the information on wiki:
>  
> (http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html).
>
>
>
>
>
>  igor.vaynberg wrote:
>  >
>  > where does your javascript live? context folder? package folder?
>  >
>  > -igor
>  >
>  >
>  > On Thu, Apr 3, 2008 at 2:22 AM, SteamR <[EMAIL PROTECTED]> wrote:
>  >>
>  >>  OK, it seems that image paths are filtered with correct path, and thus
>  >> leaves
>  >>  my javascript reference as is, since I add it myself. Is there somehow I
>  >> can
>  >>  find out what path is correct, since I am adding javascript reference in
>  >> my
>  >>  java code???
>  >>
>  >>
>  >>
>  >>
>  >>  SteamR wrote:
>  >>  >
>  >>  > I found out that it was a js sourcefile reference which were added in
>  >> code
>  >>  > (in a onRendered method), that when app was mounted, caused the
>  >> lookups to
>  >>  > be sent to the page instead... So that seems that relative paths are
>  >> nogos
>  >>  > when mounted???
>  >>  >
>  >>  > But strange is that images seems to work ok, they also use relative
>  >>  > path...
>  >>  >
>  >>  >
>  >>  > SteamR wrote:
>  >>  >>
>  >>  >> I have now searched the html files, and can't find any empty src
>  >>  >> attributes. And it only happens when I add the
>  >>  >>
>  >>  >> mount("/pwa", PackageName.forClass(CategoryPage.class));
>  >>  >>
>  >>  >> in my WebApplication class' init method.
>  >>  >>
>  >>  >> (I also have relocated the html files to the "src/main/webapp"
>  >> folder, if
>  >>  >> that has something to do with it.)
>  >>  >>
>  >>  >> Well, I will try to strip down the code, to bare minimum and maybe
>  >> post
>  >>  >> the full code here thereafter.
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >> SteamR wrote:
>  >>  >>>
>  >>  >>> Hi,  I hope someone could help me with this...
>  >>  >>>
>  >>  >>> I have 5 pages which are pretty standalone but stateful, and they
>  >> have
>  >>  >>> nothing to do with each other.
>  >>  >>>
>  >>  >>> Now I thought of having bookmarks for each of these pages, and added
>  >> a
>  >>  >>> mount point to /pwa.
>  >>  >>>
>  >>  >>> Now the problems started; my page's constructor was invoked three
>  >> times
>  >>  >>> before actual output occured (it has an empty constructor), and a
>  >> form
>  >>  >>> object loses its transient fields during a request-response cycle.
>  >>  >>>
>  >>  >>> The transient field getting lost, is something I can fix, but
>  >> invoking
>  >>  >>> the constructor three times and why wicket does so, is very
>  >> strange...?
>  >>  >>>
>  >>  >>> Anyone know any answer to this...
>  >>  >>>
>  >>  >>> Btw, I am running wicket 1.3.1
>  >>  >>>
>  >>  >>
>  >>  >>
>  >>  >
>  >>  >
>  >>
>  >>  --
>  >>  View this message in context:
>  >> 
> http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16467343.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]
>  >
>  >
>  >
>
>  --
>  View this message in context: 
> http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16485866.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: Changing Wickets default styles

2008-04-03 Thread Nino Saturnino Martinez Vazquez Wael

Strange, but that is the way with browsers:)

Steen Larsen wrote:

More or less. Rearranging the order of the styles, seems to have an
influence. No idea why but it looks ok now. Firebug only showed the first
style (background-image), but changing the order made more show up (not
all). Go figure. But thanks for the input all.

/Steen

2008/4/2, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]>:
  

so you got this sorted out right?

Steen Larsen wrote:



I'm also developing mainly on firefox, and have tried clearing the cache
an
all, but no luck. My colleague tried it out with the same result and he
had
never downloaded the new stylesheet before.

The html is the standard feedback panel:


 
   
 Feltet
postnummer skal udfyldes.
   
 


and the css reference adds the following line to head, which should be
ok:



/Steen

2008/4/1, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]
  

:

  

Eeek TDC(yousee), which robs me of a montly fee for television!

This might not be the rigth forum to ask CSS questions and is sort of
offtopic. But usually when something works in IE and doesnt in firefox
it means that IE breaks standard compability, and due to some bug in
IE
works anyway. My prefered way of working are using firefox to develop,
checking in IE and then fix so it works in IE too..

Could you show the corresponding html?

regards Nino


Steen Larsen wrote:




Hi,

I have made a stylesheet to change the default look of the


  

FeedbackPanel,




and loaded it with response.renderCSSReference(new
ResourceReference(
Style.class,"yousee.css"), "screen"), where the class Style and the
css


  

is




in the same package. The css looks like this:

li.feedbackPanelERROR {
   background-image: none;
   color: red;
   padding-left: 0px;
   background-repeat: no-repeat;
   background-position: 0px;
   list-style-type: none;
}

li.feedbackPanelINFO {
   background-image: none;
   color: red;
   padding-left: 0px;
   background-repeat: no-repeat;
   background-position: 0px;
   list-style-type: none;
}

This works fine in IE7, but for some reason only works partly in


  

Firefox.




The green background-image is removed but the text is not red, and
is
indented as in the original. Looking at the styles with Firefoxs
WebDeveloper shows the correct styles. Anybody experienced this and


  

found a




solution ?.

/Steen




  

--
-Wicket for love

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]







  

--
-Wicket for love

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]





  


--
-Wicket for love

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]



IE 6 & 7 Ajax Refresh Issue

2008-04-03 Thread Cristi Manole
Hello,

I have on a page 3 radio buttons in a group and for each radio a drop down:

xDropDown1 V
oDropDown2 V
oDropDown3 V

When the user selects a radio, the corresponding dropdown will be enabled
and the other two disabled.

In Firefox, this works as I need it to, but in IE, the dropdowns are not
enabled/disabled as needed (either not at all - in IE6 or oddly in IE7). The
funny thing is the functionality is there - i mean, although graphically
they are wrong, I can change the values only for the dropdown which is
enabled. And when I try to do that, all the dropdowns will be updated
correctly.

Any ideas what's wrong with IE and how i could update the dropdowns
correctly? I use just setEnabled(true/false) and target.addComponent(...).

Thanks,
Cristi Manole


Re: Writing to .properties files and make changes happen?

2008-04-03 Thread Azzeddine Daddah
Why don't you try to use the Apache Commons Configuration?
Take a look http://commons.apache.org/configuration

Azzeddine

On Fri, Apr 4, 2008 at 8:35 AM, unka_hahrry <[EMAIL PROTECTED]> wrote:

>
> I call this method from inside a WebPage:
>
> public static void setNewText(String path, String textId, String
> neuerText)
> throws IOException {
>
>... getting old text as StringBuffer "alt" ...
>
>//create new String from content of .properties file
>String neu = alt.replace(start, ende,
> neuTextTeil).toString();
>
>  File output = new File(path);
>  BufferedWriter out = new BufferedWriter(new
> FileWriter(output));
>
>try {
>out.write(neu);
>}
>finally {
>out.close();
>}
>
>}
> That's all. The .properties file will be changed correctly, but the new
> content will only take effect if I open the .properties file with an
> editor
> and save it, but the overwriting process won't be recognized.
>
>
> Johan Compagner wrote:
> >
> > thats very strange
> > writing  a file in an editor or save it through java that shouldn't
> matter
> > But are you constantly writing properties file from inside the webapp?
> >
> > johan
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Writing-to-.properties-files-and-make-changes-happen--tp16447118p16484561.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]
>
>


-- 
Azzeddine Daddah
www.hbiloo.com


Re: Writing to .properties files and make changes happen?

2008-04-03 Thread Johan Compagner
What  is the path you write it in? Where sits the property file?

On 4/4/08, unka_hahrry <[EMAIL PROTECTED]> wrote:
>
> I call this method from inside a WebPage:
>
> public static void setNewText(String path, String textId, String neuerText)
> throws IOException {
>   
>   ... getting old text as StringBuffer "alt" ...
>   
>   //create new String from content of .properties file
>   String neu = alt.replace(start, ende, neuTextTeil).toString();
>
>   File output = new File(path);
>   BufferedWriter out = new BufferedWriter(new
> FileWriter(output));
>   
>   try {
>   out.write(neu);
>   }
>   finally {
>   out.close();
>   }
>
>   }
> That's all. The .properties file will be changed correctly, but the new
> content will only take effect if I open the .properties file with an editor
> and save it, but the overwriting process won't be recognized.
>
>
> Johan Compagner wrote:
> >
> > thats very strange
> > writing  a file in an editor or save it through java that shouldn't matter
> > But are you constantly writing properties file from inside the webapp?
> >
> > johan
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Writing-to-.properties-files-and-make-changes-happen--tp16447118p16484561.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: Writing to .properties files and make changes happen?

2008-04-03 Thread unka_hahrry

Yes, but only if I edit the .properties file with an editor and save, then it
will be recognized, if overwriting the .properties file with BufferedWriter
it will not be recognized.
 
Is there a better way to provide the future admin the possiblity of
adaptable content, without putting all the text into the database?
 

igor.vaynberg wrote:
> 
> do they reload properly if wicket is running in development mode?
> 
> -igor
> 
> 
> On Wed, Apr 2, 2008 at 7:51 AM, unka_hahrry <[EMAIL PROTECTED]>
> wrote:
>>
>>  I'm using a BufferedWriter to change my .properties files dynamically,
>> the
>>  .properties files are updated well but the changes don't appear in my
>>   tag. Is there a possiblity to reload a .properties
>> file?
>>  --
>>  View this message in context:
>> http://www.nabble.com/Writing-to-.properties-files-and-make-changes-happen--tp16447118p16447118.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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Writing-to-.properties-files-and-make-changes-happen--tp16447118p16466443.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]



RE: Multiple TreeTables: wrong table expanded

2008-04-03 Thread Jaap Bos
Just created an issue with a simplified quickstart example:
https://issues.apache.org/jira/browse/WICKET-1475.

In this case the problem is slightly different though: expanding the
child of the root of the first tree just doesn't work.

Jaap

-Original Message-
From: Matej Knopp [mailto:[EMAIL PROTECTED] 
Sent: dinsdag 1 april 2008 17:20
To: users@wicket.apache.org
Subject: Re: Multiple TreeTables: wrong table expanded

That's really weird. Can you create a JIRA issue for it and maybe
attach a quickstart that demonstrates the behavior?

-Matej

On Tue, Apr 1, 2008 at 10:54 AM, Jaap Bos <[EMAIL PROTECTED]> wrote:
> On my ModalWindow I have a number of (about 6) TreeTables, all using
>  Ajax, generated in a ListView.
>
>  These trees have some equal nodes, but are not exact the same.
>
>  When I expand the roots of one of these, everything is fine.
>
>  However, if I want to Expand one of the subnodes of the root,
>  onClick(AjaxRequestTarget target) is called not on the owing
TreeTable
>  but always on the last TreeTable.
>
>  One TreeTable works fine, what can be the cause wicket always wants
to
>  expand nodes of the last one in case I have multiple TreeTables?
>
>
>
>  Jaap
>
>
>
>



-- 
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: Get informed about invalidation of a session

2008-04-03 Thread Johan Compagner
thats impossible
If a session is invalidated you can't access the attributes anymore (or call
getId() at least that is or will be solved in the coming servlet spec)

johan


On Thu, Apr 3, 2008 at 8:51 AM, BatiB80 <[EMAIL PROTECTED]>
wrote:

>
> Hi Warren,
>
> thanks for your answer. But I'm not sure how I could use this. The
> information that I need to access are stored in the session. How can I
> access a single instance of this session from the session store?
>
> Thanks,
> Sebastian
> --
> View this message in context:
> http://www.nabble.com/Get-informed-about-invalidation-of-a-session-tp16447452p16466115.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]
>
>


Re: ReCaptcha Panel

2008-04-03 Thread Michael Sparer

Hi Dan, 

I'd be interested in that panel. I'm not sure but I think the proper place
to share it is to put it into the wicketstuff-minis project 

Michael

Dan Kaplan-3 wrote:
> 
> 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?  
> 
> 
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/ReCaptcha-Panel-tp16461207p16467157.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]



Re: Problems and Questions about MultiFileUploadField, UploadProgressBar

2008-04-03 Thread Fabien D.

Yes, it was just a problem of Model to get back data

this.form_importerarticle = new Form("form_importerarticle") {
protected void onSubmit() {
List list = (List)model_upload.getObject();
Iterator it = list.iterator();
 .
}};
this.form_importerarticle.add(new 
MultiFileUploadField("fileInput",
this.model_upload, 10));

Moreover, I don't think that is possible to use MultiFileUploadField,
UploadProgressBar together, because  UploadProgressBar is linked with the
simple Upload field.


Peter Ertl wrote:
> 
> Great!
> 
> So could you share your experience?
> 
> 
> Am 02.04.2008 um 11:58 schrieb Fabien D.:
> 
>>
>> My problem is fixed! :)
>>
>> I search response for my  question : is it possible to use
>> MultiFileUploadField, UploadProgressBar together?or  
>> UploadProgressBar is
>> only for simpleUpload?
>> -- 
>> View this message in context:
>> http://www.nabble.com/Problems-and-Questions-about-MultiFileUploadField%2C-UploadProgressBar-tp16445359p16446351.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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problems-and-Questions-about-MultiFileUploadField%2C-UploadProgressBar-tp16445359p16467263.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]



Modifying inline CSS in head of document

2008-04-03 Thread rzechner
I want to resize the height of my pages dynamically, therefore I need to 
set the height of some markup elements dynamically. I don't want to use 
Javascript (although I found a nice solution with jquery).

Is there a way to add a textblock like the following to the page header?



whereas the height of #leftmenu is set like this:

public abstract BasePage extends WebPage() {
...
WebClientInfo w = (WebClientInfo)getWebRequestCycle().getClientInfo();
ClientProperties cp = w.getProperties();
int minHeight = cp.getBrowserHeight();
//some imagination now
addToHeader{
  addStyle("#leftmenu", "height", minHeight);
}


Thanks,

Roman




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [WUG] Copenhagen

2008-04-03 Thread Nino Saturnino Martinez Vazquez Wael
So in order to have this meetin, i'd like to see how many we are (if 
below 5 or something around there it's not gonna happen).


So please fill in if you will come here :  
http://cwiki.apache.org/confluence/display/WICKET/Community+meetups#Communitymeetups-Denmark


Or if youre really lazy, write me a email:)

Nino Saturnino Martinez Vazquez Wael wrote:

I suggest that we hold a meeting the 23. april at 16 hours. At Jayway.

http://www.google.com/calendar/embed?src=7mkimsnp84i09nh48u5ju59pqg%40group.calendar.google.com&ctz=Europe/Copenhagen 



WDYT?



--
-Wicket for love

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]



Re: Mount causes strange effects on my web application

2008-04-03 Thread SteamR

I found out that it was a js sourcefile reference which were added in code
(in a onRendered method), that when app was mounted, caused the lookups to
be sent to the page instead... So that seems that relative paths are nogos
when mounted???

But strange is that images seems to work ok, they also use relative path...


SteamR wrote:
> 
> I have now searched the html files, and can't find any empty src
> attributes. And it only happens when I add the 
> 
> mount("/pwa", PackageName.forClass(CategoryPage.class));
> 
> in my WebApplication class' init method. 
> 
> (I also have relocated the html files to the "src/main/webapp" folder, if
> that has something to do with it.)
> 
> Well, I will try to strip down the code, to bare minimum and maybe post
> the full code here thereafter.
> 
> 
> 
> 
> 
> SteamR wrote:
>> 
>> Hi,  I hope someone could help me with this...
>> 
>> I have 5 pages which are pretty standalone but stateful, and they have
>> nothing to do with each other.
>> 
>> Now I thought of having bookmarks for each of these pages, and added a
>> mount point to /pwa.
>> 
>> Now the problems started; my page's constructor was invoked three times
>> before actual output occured (it has an empty constructor), and a form
>> object loses its transient fields during a request-response cycle.
>> 
>> The transient field getting lost, is something I can fix, but invoking
>> the constructor three times and why wicket does so, is very strange...?
>> 
>> Anyone know any answer to this...
>> 
>> Btw, I am running wicket 1.3.1
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16467340.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]



Re: Mount causes strange effects on my web application

2008-04-03 Thread SteamR

OK, it seems that image paths are filtered with correct path, and thus leaves
my javascript reference as is, since I add it myself. Is there somehow I can
find out what path is correct, since I am adding javascript reference in my
java code???


SteamR wrote:
> 
> I found out that it was a js sourcefile reference which were added in code
> (in a onRendered method), that when app was mounted, caused the lookups to
> be sent to the page instead... So that seems that relative paths are nogos
> when mounted???
> 
> But strange is that images seems to work ok, they also use relative
> path...
> 
> 
> SteamR wrote:
>> 
>> I have now searched the html files, and can't find any empty src
>> attributes. And it only happens when I add the 
>> 
>> mount("/pwa", PackageName.forClass(CategoryPage.class));
>> 
>> in my WebApplication class' init method. 
>> 
>> (I also have relocated the html files to the "src/main/webapp" folder, if
>> that has something to do with it.)
>> 
>> Well, I will try to strip down the code, to bare minimum and maybe post
>> the full code here thereafter.
>> 
>> 
>> 
>> 
>> 
>> SteamR wrote:
>>> 
>>> Hi,  I hope someone could help me with this...
>>> 
>>> I have 5 pages which are pretty standalone but stateful, and they have
>>> nothing to do with each other.
>>> 
>>> Now I thought of having bookmarks for each of these pages, and added a
>>> mount point to /pwa.
>>> 
>>> Now the problems started; my page's constructor was invoked three times
>>> before actual output occured (it has an empty constructor), and a form
>>> object loses its transient fields during a request-response cycle.
>>> 
>>> The transient field getting lost, is something I can fix, but invoking
>>> the constructor three times and why wicket does so, is very strange...?
>>> 
>>> Anyone know any answer to this...
>>> 
>>> Btw, I am running wicket 1.3.1
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16467343.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]



Re: wicket support for page customisation at runtime

2008-04-03 Thread kumark

Thanks Igor.

Here's an example of the usecase I am referring to. Two panels lets say (one
with sports headlines and other with weather headlines) are shown one below
the other by default. I want the user to be able to move their order (lets
say with up and down arrows) provided in each of those panels.

once the user makes the above change, I would like the system to remember
these preferences and render accordingly for that user alone and differently
for other users.

Any thoughts on the above usecase?

Many Thanks.



igor.vaynberg wrote:
> 
> huh? hardly any logic for presenting? wicket is a ui framework, it
> wouldnt be a good one if you couldnt present dynamic things...
> 
> anywho, there is support for all you want. your question is too
> general to be answered, if you have a more specific usecase you want
> to talk about feel free.
> 
> as far as per user theme/colors you can check out session.getstyle()
> and component.getvariation() - there is a wiki page that describes
> skinning you might want to read.
> 
> -igor
> 
> 
> On undefined, kumark <[EMAIL PROTECTED]> wrote:
>>
>>  Hi,
>>
>>  I was wondering if wicket supports page customisation at runtime per
>> user.
>>  For example, Changing the available theme/colors, applying a different
>>  layout and being able to move content blocks (for example 2 panels)
>> up/down
>>  at runtime. (similar to myspace or other popular portals).
>>
>>  As I understand that unlike jsps , in wicket there is hardly any logic
>> for
>>  presenting (for example displaying two divs different based on the
>> current
>>  user preferences etc.,).
>>
>>  Any thoughts or a link to a post/article which discusses these issues
>> would
>>  be great.
>>
>>  Thanks.
>>  --
>>  View this message in context:
>> http://www.nabble.com/wicket-support-for-page-customisation-at-runtime-tp16447326p16447326.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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/wicket-support-for-page-customisation-at-runtime-tp16447326p16467353.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]



Re: Removing the jsessionid for SEO

2008-04-03 Thread Artur W.

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", "robot", "crawl", "spider" }; /* and so 
on... */

public Unbuffered(final HttpServletResponse res) {
super(res);
}

@Override
public CharSequence encodeURL(final CharSequence url) {
return isAgent() ? url : super.encodeURL(url);
}

private static boolean isAgent() {

String agent =
((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getHeader("User-Agent");

for(String bot : botAgents) {
if (agent.toLowerCase().indexOf(bot) != -1) {
return true;
}
}

return false;
}
}


I didn't test this code but I do similar thing in my old application in
Spring and it works.

Take care,
Artur


-- 
View this message in context: 
http://www.nabble.com/Removing-the-jsessionid-for-SEO-tp16464534p16467396.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]



RE: Get informed about invalidation of a session

2008-04-03 Thread Robert Novotny

This has been discussed multiple times and the only reasonable solution that
I found (and just implemented) is to have a concurrent hashmap of session
ids into session objects in the custom Application class. The reason is that
on the unBind() / onDestroy the actual session object does not exist anymore
- the only thing you have is the destroyed session ID.

I needed to persist some user info on the logout.

My solution goes like  this:
public class DavanoApplication extends
org.apache.wicket.protocol.http.WebApplication {
  private Map activeUsersMap = new ConcurrentHashMap();
  ...
@Override
public void sessionDestroyed(String sessionId) {
User user = activeUsersMap.get(sessionId);
if(user != null) {
userDao.saveOrUpdate(user);
userDao.updateLastLogin(user);
  activeUsersMap.remove(sessionId);
}


super.sessionDestroyed(sessionId);
}
}
I am not sure whether this is correct solution, but it did help me.

Robert

BatiB80 wrote:
> 
> Hi Warren,
> 
> thanks for your answer. But I'm not sure how I could use this. The
> information that I need to access are stored in the session. How can I
> access a single instance of this session from the session store?
> 
> Thanks,
> Sebastian
> 

-- 
View this message in context: 
http://www.nabble.com/Get-informed-about-invalidation-of-a-session-tp16447452p16467385.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]



Re: wicket support for page customisation at runtime

2008-04-03 Thread wicket user
Check the wicket stuff jquery project, you will get the idea

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery-examples

regards
-dipu

On Thu, Apr 3, 2008 at 10:34 AM, kumark <[EMAIL PROTECTED]> wrote:

>
> Thanks Igor.
>
> Here's an example of the usecase I am referring to. Two panels lets say
> (one
> with sports headlines and other with weather headlines) are shown one
> below
> the other by default. I want the user to be able to move their order (lets
> say with up and down arrows) provided in each of those panels.
>
> once the user makes the above change, I would like the system to remember
> these preferences and render accordingly for that user alone and
> differently
> for other users.
>
> Any thoughts on the above usecase?
>
> Many Thanks.
>
>
>
> igor.vaynberg wrote:
> >
> > huh? hardly any logic for presenting? wicket is a ui framework, it
> > wouldnt be a good one if you couldnt present dynamic things...
> >
> > anywho, there is support for all you want. your question is too
> > general to be answered, if you have a more specific usecase you want
> > to talk about feel free.
> >
> > as far as per user theme/colors you can check out session.getstyle()
> > and component.getvariation() - there is a wiki page that describes
> > skinning you might want to read.
> >
> > -igor
> >
> >
> > On undefined, kumark <[EMAIL PROTECTED]> wrote:
> >>
> >>  Hi,
> >>
> >>  I was wondering if wicket supports page customisation at runtime per
> >> user.
> >>  For example, Changing the available theme/colors, applying a different
> >>  layout and being able to move content blocks (for example 2 panels)
> >> up/down
> >>  at runtime. (similar to myspace or other popular portals).
> >>
> >>  As I understand that unlike jsps , in wicket there is hardly any logic
> >> for
> >>  presenting (for example displaying two divs different based on the
> >> current
> >>  user preferences etc.,).
> >>
> >>  Any thoughts or a link to a post/article which discusses these issues
> >> would
> >>  be great.
> >>
> >>  Thanks.
> >>  --
> >>  View this message in context:
> >>
> http://www.nabble.com/wicket-support-for-page-customisation-at-runtime-tp16447326p16447326.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]
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/wicket-support-for-page-customisation-at-runtime-tp16447326p16467353.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]
>
>


Re: Removing the jsessionid for SEO

2008-04-03 Thread Johan Compagner
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", "robot", "crawl", "spider" }; /* and
> so on... */
>
>public Unbuffered(final HttpServletResponse res) {
>super(res);
> }
>
>@Override
>public CharSequence encodeURL(final CharSequence url) {
> return isAgent() ? url : super.encodeURL(url);
>}
>
>private static boolean isAgent() {
>
>String agent =
>
> ((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getHeader("User-Agent");
>
>for(String bot : botAgents) {
>if (agent.toLowerCase().indexOf(bot) != -1)
> {
>return true;
>}
>}
>
>return false;
>}
>}
>
>
> I didn't test this code but I do similar thing in my old application in
> Spring and it works.
>
> Take care,
> Artur
>
>
> --
> View this message in context:
> http://www.nabble.com/Removing-the-jsessionid-for-SEO-tp16464534p16467396.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]
>
>


Re: [WUG] Copenhagen

2008-04-03 Thread Frank Bille
Good initiative. I'm glad you are taking lead on this. I think I can
come and have signed up on the wiki page.

Frank


On Thu, Apr 3, 2008 at 10:54 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
> So in order to have this meetin, i'd like to see how many we are (if below 5
> or something around there it's not gonna happen).
>
>  So please fill in if you will come here :
> http://cwiki.apache.org/confluence/display/WICKET/Community+meetups#Communitymeetups-Denmark
>
>  Or if youre really lazy, write me a email:)
>
>
>
>  Nino Saturnino Martinez Vazquez Wael wrote:
>
> > I suggest that we hold a meeting the 23. april at 16 hours. At Jayway.
> >
> >
> http://www.google.com/calendar/embed?src=7mkimsnp84i09nh48u5ju59pqg%40group.calendar.google.com&ctz=Europe/Copenhagen
> >
> > WDYT?
> >
> >
>
>  --
>  -Wicket for love
>
>  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]



Ajax DropDownChoice and null values

2008-04-03 Thread Java Programmer
Hello,
I have problem with DropDownChoice components. I have three DDC
components which loads child component choices when you change parents
value. This work, but one thing not - when I back to "Choose" choice
the Ajax request returns empty and it's because
onUpdate(AjaxRequestTarget target) is not invoked in this case.
When I remove required from parent DDC it works (nulls the chocies of
child), but I need required and show errors when submit form. I have
tried to validate component but it was validated after other
components with setRequired() set up so no show if them aren't filled
with good values.
This validating was done by such code:
_carModelDDC.add(new AbstractValidator(){
@Override
protected void onValidate(IValidatable component) {
if(((DropDownChoice) 
component).getModelObject() == null){
error(component, 
getString(CAR_MODEL_REQUIRED));
}
}
});

Component code which not working with null values is coded like that:
DropDownChoice _carMarkDDC = new DropDownChoice(CAR_MARK,
carMarkDAO.getAllCarMarks());
_carMarkDDC.setRequired(true);
_carMarkDDC.add(new 
AjaxFormComponentUpdatingBehavior(ONCHANGE_BEHAVIOR) {
protected void onUpdate(AjaxRequestTarget target) {
carPartsModel.setCarModel(null);
if(carPartsModel.getCarMark() != null) {
CarMark carMark = 
carPartsModel.getCarMark();
carModelDDC.setChoices(new 
ArrayList
(carMarkDAO.getCarModels(carMark)));
carModelDDC.setEnabled(true);
} else {

carModelDDC.setChoices(Collections.EMPTY_LIST);
carModelDDC.setEnabled(false);
}
target.addComponent(carModelDDC);
}
});

Any possible clues for that?
Best regards,
Adr

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Customerize captcha image

2008-04-03 Thread wenm

Does anybody have an idea how to change the background image and font size
etc of wicket captcha image? 


-- 
View this message in context: 
http://www.nabble.com/Customerize-captcha-image-tp16467447p16467447.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]



Re: Throw AbortWithWebErrorCodeException in onBeforeRender

2008-04-03 Thread lars vonk
Why not implement this in the subclass itself? It sounds really specific for
a certain class right? So I think the subclass itself is the correct place.

On Wed, Apr 2, 2008 at 11:41 AM, Michael Sparer <[EMAIL PROTECTED]>
wrote:

>
> (Using wicket 1.3.2) I have a super class (WebPage) that throws a
> AbortWithWebErrorCodeException(404) depending on some properties of its
> subclasses. Therefore I can't check the subclasses' properties in the
> super
> class' constructor and throw the exception there.
> So I tried to throw it in the onBeforeRender method instead. The Error
> page
> for the 404 gets rendered and displayed without problems however an
> exception gets thrown (see below).
>
> So my question: where's the (right) place to throw the exception? I also
> tried RequestCycle.get().setRequestTarget(new
> WebErrorCodeResponseTarget(404)); with the same result.
>
> thanks in advance
>
> michael
>
> exception trace:
> ERROR - RequestCycle   - there was an error cleaning up target
> [EMAIL PROTECTED] pageClass=].
> org.apache.wicket.WicketRuntimeException: There is no application attached
> to current thread btpool0-2
>at org.apache.wicket.Application.get(Application.java:166)
>at org.apache.wicket.Component.getApplication(Component.java:1229)
>at org.apache.wicket.markup.html.WebPage.onDetach(WebPage.java:404)
>at org.apache.wicket.Component.detach(Component.java:1075)
>at
>
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.detach(BookmarkablePageRequestTarget.java:122)
>at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1046)
>at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1348)
>at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
>at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:358)
>at
>
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
>at
>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
>at
>
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
>at
>
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
>at
>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
>
> -
> Michael Sparer
> http://talk-on-tech.blogspot.com
> --
> View this message in context:
> http://www.nabble.com/Throw-AbortWithWebErrorCodeException-in-onBeforeRender-tp16446341p16446341.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]
>
>


Re: Customerize captcha image

2008-04-03 Thread Vitaly Tsaplin
   Create your own captcha :) The idea of the
RenderedDynamicImageResource is brilliant. You just need to implement
the render (Graphics2D gfx) method. Draw there whatever you want. It's
even better. No one will be able to reuse the algorithm to teach a
neuronet :)

On Thu, Apr 3, 2008 at 2:32 PM, wenm <[EMAIL PROTECTED]> wrote:
>
>  Does anybody have an idea how to change the background image and font size
>  etc of wicket captcha image?
>
>
>  --
>  View this message in context: 
> http://www.nabble.com/Customerize-captcha-image-tp16467447p16467447.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]



should DataView.setItemsPerPage(int items) be in IDataProvider?

2008-04-03 Thread i ii

when i need to get items per page in data provider i cannot unless i have data 
view. should this method be in data provider and not data view? the data 
provider is providing data and items per page is data, no?


Re: Ajax DropDownChoice and null values

2008-04-03 Thread Java Programmer
AbstractValidator should work like this:
_carMarkDDC.add(new AbstractValidator(){
@Override
protected void onValidate(IValidatable validatable) {
if(validatable.getValue() == null){
error(validatable, 
getString(CAR_MODEL_REQUIRED));
}
}

@Override
public boolean validateOnNullValue() {
return true;
}
});
and it works, but still no Ajax response for other components:
Only:
INFO: Initiating Ajax POST request on
../../../../?wicket:interface=:2:59:::0:4&random=0.6576397133017599
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (69 characters)
INFO:


Adr

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: should DataView.setItemsPerPage(int items) be in IDataProvider?

2008-04-03 Thread Martijn Dashorst
iterator(int start, int count)

the count parameter is the items per page.

Martijn

On 4/3/08, i ii <[EMAIL PROTECTED]> wrote:
>
>  when i need to get items per page in data provider i cannot unless i have 
> data view. should this method be in data provider and not data view? the data 
> provider is providing data and items per page is data, no?
>


-- 
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]



Re: Ajax DropDownChoice and null values

2008-04-03 Thread Java Programmer
I added onError when Required failed, now works - closed:
@Override
protected void onError(AjaxRequestTarget target, 
RuntimeException e) {
carPartsModel.setCarModel(null);
carPartsModel.setCarModelType(null);
carModelDDC.setChoices(Collections.EMPTY_LIST);
carModelDDC.setEnabled(false);
carModelTypeDDC.setEnabled(false);
target.addComponent(carModelDDC);
target.addComponent(carModelTypeDDC);
}

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [WUG] Copenhagen

2008-04-03 Thread Nino Saturnino Martinez Vazquez Wael

Thanks:)


Frank Bille wrote:

Good initiative. I'm glad you are taking lead on this. I think I can
come and have signed up on the wiki page.

Frank


On Thu, Apr 3, 2008 at 10:54 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
  

So in order to have this meetin, i'd like to see how many we are (if below 5
or something around there it's not gonna happen).

 So please fill in if you will come here :
http://cwiki.apache.org/confluence/display/WICKET/Community+meetups#Communitymeetups-Denmark

 Or if youre really lazy, write me a email:)



 Nino Saturnino Martinez Vazquez Wael wrote:



I suggest that we hold a meeting the 23. april at 16 hours. At Jayway.


  

http://www.google.com/calendar/embed?src=7mkimsnp84i09nh48u5ju59pqg%40group.calendar.google.com&ctz=Europe/Copenhagen


WDYT?


  

 --
 -Wicket for love

 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]


  


--
-Wicket for love

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]



RE: should DataView.setItemsPerPage(int items) be in IDataProvider?

2008-04-03 Thread i ii

but what if items per page is needed not in iterator?

> Date: Thu, 3 Apr 2008 15:08:27 +0200
> From: [EMAIL PROTECTED]
> To: users@wicket.apache.org
> Subject: Re: should DataView.setItemsPerPage(int items) be in IDataProvider?
> 
> iterator(int start, int count)
> 
> the count parameter is the items per page.
> 
> Martijn
> 
> On 4/3/08, i ii <[EMAIL PROTECTED]> wrote:
> >
> >  when i need to get items per page in data provider i cannot unless i have 
> > data view. should this method be in data provider and not data view? the 
> > data provider is providing data and items per page is data, no?
> >
> 
> 
> -- 
> 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]
> 


CheckBoxMultipleChoice with sections

2008-04-03 Thread Brian Edwards
I am trying to create a CheckBoxMultipleChoice subclass that supports
sections.  The class of items in the list will have a section name and
a description.  The list will guarantee that it is grouped by
sections.  My idea was to override getPrefix(), call a getter to get
the current choice, and if the section has changed print out the new
section name as part of the prefix.  The problem I ran into is that
the current choice is not accessible, because it is local to the
onComponentTagBody method.  My current solution is to copy and paste
all of the code from CheckBoxMultipleChoice into my own class and hack
away, but I'd like to avoid this if possible.

-- 
Brian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: StackOverflowError using 1.3.2

2008-04-03 Thread Gerolf Seitz
i was able to reproduce it in a quickstart.
see WICKET-1476

  Gerolf

On Wed, Apr 2, 2008 at 9:02 PM, Johan Compagner <[EMAIL PROTECTED]>
wrote:

> if we have a quickstart for this we could look for the solution...
>
>
> On Wed, Apr 2, 2008 at 8:26 PM, André Souza <[EMAIL PROTECTED]>
> wrote:
>
> > I have the exactly same problem. Someone found the solution?
> >
> > On Tue, Apr 1, 2008 at 6:09 PM, Johan Compagner <[EMAIL PROTECTED]>
> > wrote:
> >
> > > do you have a unit test or quickstart for this?
> > >
> > > johan
> > >
> > >
> > > On Tue, Apr 1, 2008 at 10:57 PM, Mark Lichtenberg <
> > [EMAIL PROTECTED]
> > > >
> > > wrote:
> > >
> > > > Hi,
> > > > We've been experiencing StackOverflowErrors when our application is
> > > > under a load of around 4 sessions, mostly clicks to load pages
> without
> > > > necessarily waiting for the previous click to finish.  I saw this
> was
> > > > addressed with jira issue 1365, and was part of 1.3.2, which we are
> > > > using. For good measure, we took out all instance variables
> > > > referencing Page objects, which was mentioned in the jira issue, but
> > > > this did not help either. We also tried the wicket nightly today,
> but
> > > > got the same results. Seems to be due to page deserialization - a
> > > > snippet of the exception is below.
> > > >
> > > > Any help would be greatly appreciated.
> > > >
> > > > 11:15:15,497 ERROR [[default]] Servlet.service() for servlet default
> > > > threw exception
> > > > java.lang.StackOverflowError
> > > >at java.io.ObjectInputStream
> > > > $PeekInputStream.read(ObjectInputStream.java:2213)
> > > >at java.io.ObjectInputStream
> > > > $PeekInputStream.readFully(ObjectInputStream.java:2226)
> > > >at java.io.ObjectInputStream
> > > > $BlockDataInputStream.readUTFBody(ObjectInputStream.java:2963)
> > > >at java.io.ObjectInputStream
> > > > $BlockDataInputStream.readUTF(ObjectInputStream.java:2764)
> > > >at
> > java.io.ObjectInputStream.readUTF(ObjectInputStream.java:1032)
> > > >at
> > java.io.ObjectStreamClass.readNonProxy(ObjectStreamClass.java
> > > > :600)
> > > >at
> > > >
> java.io.ObjectInputStream.readClassDescriptor(ObjectInputStream.java:
> > > > 789)
> > > >at java.io.ObjectInputStream.readNonProxyDesc(
> > > > ObjectInputStream.java:
> > > > 1534)
> > > >at
> > java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java
> > > > :1466)
> > > >at
> > > > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
> > > > 1699)
> > > >at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java
> > > > :1305)
> > > >at
> > > java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
> > > >at java.util.HashSet.readObject(HashSet.java:278)
> > > >at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown
> > Source)
> > > >at
> > > > sun
> > > > .reflect
> > > >
> > .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> > > > 25)
> > > >at java.lang.reflect.Method.invoke(Method.java:585)
> > > >at java.io.ObjectStreamClass.invokeReadObject(
> > > > ObjectStreamClass.java:
> > > > 946)
> > > >at
> > > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:
> > > > 1809)
> > > >at
> > > > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
> > > > 1719)
> > > >at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java
> > > > :1305)
> > > >at java.io.ObjectInputStream.defaultReadFields(
> > > > ObjectInputStream.java:
> > > > 1908)
> > > >at
> > > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:
> > > > 1832)
> > > >at
> > > > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
> > > > 1719)
> > > >at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java
> > > > :1305)
> > > >at
> > > java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
> > > >at java.util.HashMap.readObject(HashMap.java:1067)
> > > >at sun.reflect.GeneratedMethodAccessor122.invoke(Unknown
> > Source)
> > > >at
> > > > sun
> > > > .reflect
> > > >
> > .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> > > > 25)
> > > >at java.lang.reflect.Method.invoke(Method.java:585)
> > > >at java.io.ObjectStreamClass.invokeReadObject(
> > > > ObjectStreamClass.java:
> > > > 946)
> > > >at
> > > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:
> > > > 1809)
> > > >at
> > > > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
> > > > 1719)
> > > > 
> > > >at
> > > > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
> > > > 1719)
> > > >at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java
> > > > :1305)
> > > >at
> > > java.io.ObjectInputStream.readObject(ObjectInputS

Is there an AJAX Panel in Wicket

2008-04-03 Thread kumark

I was wondering if there is a AJAXPanel available in wicket. If a page has 10
panels with in it, I want all of them to load in an asynchronous fashion,
which ever is available first and so on, Instead of waiting for all the 10
panels to load before the page is displayed?

Many Thanks.
-- 
View this message in context: 
http://www.nabble.com/Is-there-an-AJAX-Panel-in-Wicket-tp16467492p16467492.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]



Re: Is there an AJAX Panel in Wicket

2008-04-03 Thread Erik van Oosten
I think AjaxLazyLoadPanel does the job exactly as you desribe it.

Regards,
Erik.


kumark schreef:
> I was wondering if there is a AJAXPanel available in wicket. If a page has 10
> panels with in it, I want all of them to load in an asynchronous fashion,
> which ever is available first and so on, Instead of waiting for all the 10
> panels to load before the page is displayed?
>
> Many Thanks.
>   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is there an AJAX Panel in Wicket

2008-04-03 Thread Erik van Oosten
Oops, AjaxLazyLoadPanel is not asychronous. Wicket does not have the
ability to do more then one request concurrently within the same
session. They are pipelined.

(Sorry for previous message, pressed send too soon.)

Regards,
Erik.


kumark schreef:
> I was wondering if there is a AJAXPanel available in wicket. If a page has 10
> panels with in it, I want all of them to load in an asynchronous fashion,
> which ever is available first and so on, Instead of waiting for all the 10
> panels to load before the page is displayed?
>
> Many Thanks.
>   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



I cannot understand why would a panel have the getparent null

2008-04-03 Thread Cristi Manole
Hello,

I have a HomePage where, in constructor, i add a Panel :

public HomePage(final PageParameters parameters) {
Date clientDate = getClientCalendar().getTime();
Label label = new Label("today", "Today's Status [" +
DateFormat.getDateInstance(DateFormat.SHORT).format(clientDate) + "]");
add(label);
add(reportModalWindow = createReportModalWindow());
add(countButtonsPanel = new CountButtonsPanel("countButtonsDiv",
((WebSession)getSession()).isSignedIn(), this));
add(iSmokedModalWindow = createISmokedModalWindow());
*add(todayPanel = new TodayPanel("todayPanel", new
java.sql.Date(clientDate.getTime(;
*}

in TodayPanel's constructor, i check if the user is logged, and if he is,
update an ajax table (current page)

if(user != null) {

ajaxTable.setCurrentPage(ajaxTable.getUserRow(user.getUsername(), new
Date(((HomePage)getParent()).getClientCalendar().getTimeInMillis())) /
ROWS_PER_PAGE);
}


When first running the application (no user logged in), today panel is cool.
I log in and today panel is correctly updated.

Now, when i start *another* browser page and point to the application's url,
i get a org.apache.wicket.WicketRuntimeException
 because TodayPanel's getParent() returns null.

Question is: why?... i could understand it if it were consistent... meaning
it will get me null on the first login too.

I tested in Firefox tabs.

Tks in advance,
Cristi Manole


Render body only

2008-04-03 Thread Scott Sauyet
Hi, I'm looking to do exactly what was discussed in a thread a few years 
ago (http://tinyurl.com/3yo43s), namely to dynamically include or 
exclude a group of  tags.


I can wrap them in a  with a WebMarkupContainer, but I like to 
have valid HTML and really don't want the  tag in the final 
output.  The thread mentioned seems to imply that this was already 
committed in 2005, but I can't find it in the API.  Component has


public final boolean getRenderBodyOnly()

which looks perfect except that it's final.  Am I missing something else 
that allows for this?


Thanks,

  -- Scott

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Render body only

2008-04-03 Thread Jeremy Levy
Did you try setRenderBodyOnly(true) ?

On Thu, Apr 3, 2008 at 10:28 AM, Scott Sauyet <[EMAIL PROTECTED]> wrote:

> Hi, I'm looking to do exactly what was discussed in a thread a few years
> ago (http://tinyurl.com/3yo43s), namely to dynamically include or exclude
> a group of  tags.
>
> I can wrap them in a  with a WebMarkupContainer, but I like to have
> valid HTML and really don't want the  tag in the final output.  The
> thread mentioned seems to imply that this was already committed in 2005, but
> I can't find it in the API.  Component has
>
>public final boolean getRenderBodyOnly()
>
> which looks perfect except that it's final.  Am I missing something else
> that allows for this?
>
> Thanks,
>
>  -- Scott
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Render body only

2008-04-03 Thread Ryan Gravener
You can try wicket:container

...


http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%2527sXHTMLtags-WicketTags

On Thu, Apr 3, 2008 at 10:28 AM, Scott Sauyet <[EMAIL PROTECTED]> wrote:
> Hi, I'm looking to do exactly what was discussed in a thread a few years ago
> (http://tinyurl.com/3yo43s), namely to dynamically include or exclude a
> group of  tags.
>
>  I can wrap them in a  with a WebMarkupContainer, but I like to have
> valid HTML and really don't want the  tag in the final output.  The
> thread mentioned seems to imply that this was already committed in 2005, but
> I can't find it in the API.  Component has
>
> public final boolean getRenderBodyOnly()
>
>  which looks perfect except that it's final.  Am I missing something else
> that allows for this?
>
>  Thanks,
>
>   -- Scott
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Ryan Gravener
http://ryangravener.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ModalWindow and Ajax?

2008-04-03 Thread Nino Saturnino Martinez Vazquez Wael

Hi

I have a modalwindow which contains a dropdown. I've attached an 
ajaxbehavior to the dropdown but when it fires I get a confirmation box 
"are you sure you want to navigate away from this page"...


Is it supposed to work this way?

--
-Wicket for love

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]



Re: Render body only

2008-04-03 Thread Scott Sauyet

Jeremy Levy wrote:

Did you try setRenderBodyOnly(true) ?


D'Oh!  No, I was looking to subclass and override getRenderBodyOnly(). 
Sheer brilliance!


  -- Scott

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Render body only

2008-04-03 Thread Scott Sauyet

Ryan Gravener wrote:

You can try wicket:container

...


http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%2527sXHTMLtags-WicketTags


And that's even better.  No ugly  tags in the markup either.

Thanks Jeremy and Ryan for your quick responses.

  -- Scott

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ModalWindow and Ajax?

2008-04-03 Thread Ryan Gravener
Yes,

append this javascript in your ajax call:
Wicket.Window.unloadConfirmation = false;

On Thu, Apr 3, 2008 at 10:33 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
> Hi
>
>  I have a modalwindow which contains a dropdown. I've attached an
> ajaxbehavior to the dropdown but when it fires I get a confirmation box "are
> you sure you want to navigate away from this page"...
>
>  Is it supposed to work this way?
>
>  --
>  -Wicket for love
>
>  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]
>
>



-- 
Ryan Gravener
http://ryangravener.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Removing the jsessionid for SEO

2008-04-03 Thread Zappaterrini, Larry
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", "robot", "crawl", "spider" }; /*
and
> so on... */
>
>public Unbuffered(final HttpServletResponse res) {
>super(res);
> }
>
>@Override
>public CharSequence encodeURL(final CharSequence url) {
> return isAgent() ? url : super.encodeURL(url);
>}
>
>private static boolean isAgent() {
>
>String agent =
>
>
((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().ge
tHeader("User-Agent");
>
>for(String bot : botAgents) {
>if (agent.toLowerCase().indexOf(bot) !=
-1)
> {
>return true;
>}
>}
>
>return false;
>}
>}
>
>
> I didn't test this code but I do similar thing in my old application
in
> Spring and it works.
>
> Take care,
> Artur
>
>
> --
> View this message in context:
>
http://www.nabble.com/Removing-the-jsessionid-for-SEO-tp16464534p1646739
6.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]
>
>

__

The information contained in this message is proprietary and/or confidential. 
If you are not the 
intended recipient, please: (i) delete the message and all copies; (ii) do not 
disclose, 
distribute or use the message in any manner; and (iii) notify the sender 
immediately. In addition, 
please be aware that any message addressed to our domain is subject to 
archiving and review by 
persons other than the intended recipient. Thank you.
_

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ModalWindow and Ajax?

2008-04-03 Thread Nino Saturnino Martinez Vazquez Wael

this did not do the trick in my onchange:

   
target.appendJavascript("Wicket.Window.unloadConfirmation = false;");
should it be prepended or when should it be append before the onchange 
event in my dropdown? As a kind of setup, I guess?


Ryan Gravener wrote:

Yes,

append this javascript in your ajax call:
Wicket.Window.unloadConfirmation = false;

On Thu, Apr 3, 2008 at 10:33 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
  

Hi

 I have a modalwindow which contains a dropdown. I've attached an
ajaxbehavior to the dropdown but when it fires I get a confirmation box "are
you sure you want to navigate away from this page"...

 Is it supposed to work this way?

 --
 -Wicket for love

 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]







  


--
-Wicket for love

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]



Re: Render body only

2008-04-03 Thread Charlie Dobbie
Off Topic, but does anyone else apart from Scott and me get confused by this
duality?

Should I setProperty, or override getProperty?  And the equally annoying
Does getComponentX give me a reference to an already-created ComponentX, or
do I override it to supply my own ComponentX?

Charlie.



On Thu, Apr 3, 2008 at 3:37 PM, Scott Sauyet <[EMAIL PROTECTED]> wrote:

> Jeremy Levy wrote:
>
> > Did you try setRenderBodyOnly(true) ?
> >
>
> D'Oh!  No, I was looking to subclass and override getRenderBodyOnly().
> Sheer brilliance!
>
>
>  -- Scott
>


Re: Unit testing wizards

2008-04-03 Thread romand


cruiserdude wrote:
> 
> Hi,
> 
> Bit of a noob question but I was hoping somebody might be able to give an
> example of unit testing a Wizard, I'm not entirely sure how to test the
> individual pages. 
> 
> So far I've got to the point that I can check that my child of
> Wizard.class has rendered but every time I try and check that a particular
> component has been rendered I get "Path xx.xx.xx does not exist for page :
> WizardPage
> 
> I have googled and searched the forum but I haven't been able to come up
> with much. Any suggestions or examples would be most appreciated.
> 
> Thanks
> cruiserdude
> 

If you are asking for org.apache.wicket.extensions.wizard.Wizard

it may be caused because your components are nested inside other containers
in the Wizard class so you have to go through the whole hierarchy. For
example:

"YourWizard:form:view:yourComponent"

try this code:

WicketTester wt = new WicketTester();
wt.startPage(YourPage.class);
WebMarkupContainer container = (WebMarkupContainer)
wt.getComponentFromLastRenderedPage("YourWizardStringId:form:view");

Iterator it = container.iterator();
while (it.hasNext()) {
System.out.println(it.next());
}


-- 
View this message in context: 
http://www.nabble.com/Unit-testing-wizards-tp12123025p16467532.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]



Displaying date as Label.

2008-04-03 Thread nanotech

Hi All,

I need some help displaying date correctly in Label. I am using a text
field(and DatePicker) to take date input and storing it in mySQL database.
But while displying it as a "Label" I am only seeing time (i.e it always
shows 12:00 am).The date in database is correct.

Here is how I am doing it.

# For uploading
TextField uploadDate = new TextField("uploadDate",Date.class);
uploadDate.add(new DatePicker());

#For displaying(in a ListView)

item.add(new Label("uploadDate ",new
PropertyModel(item.getModel(),"uploadDate ")));


#Environment:
Wicket 1.3.2 (also includes joda time)
MySQL(5.5x)


Can someone please help.
Thanks,
RG
-- 
View this message in context: 
http://www.nabble.com/Displaying-date-as-Label.-tp16467546p16467546.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]



Re: ModalWindow and Ajax?

2008-04-03 Thread Ryan Gravener
You can set it as soon as the Wicket js object has been created.  You
need to be using wicket 1.3.x for this to work and yes, you will need
to have it set before the onchange.


On Thu, Apr 3, 2008 at 11:00 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
> this did not do the trick in my onchange:
>
>target.appendJavascript("Wicket.Window.unloadConfirmation =
> false;");
>  should it be prepended or when should it be append before the onchange
> event in my dropdown? As a kind of setup, I guess?
>
>
>
>  Ryan Gravener wrote:
>
> > Yes,
> >
> > append this javascript in your ajax call:
> > Wicket.Window.unloadConfirmation = false;
> >
> > On Thu, Apr 3, 2008 at 10:33 AM, Nino Saturnino Martinez Vazquez Wael
> > <[EMAIL PROTECTED]> wrote:
> >
> >
> > > Hi
> > >
> > >  I have a modalwindow which contains a dropdown. I've attached an
> > > ajaxbehavior to the dropdown but when it fires I get a confirmation box
> "are
> > > you sure you want to navigate away from this page"...
> > >
> > >  Is it supposed to work this way?
> > >
> > >  --
> > >  -Wicket for love
> > >
> > >  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]
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
>
>  --
>  -Wicket for love
>
>  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]
>
>



-- 
Ryan Gravener
http://ryangravener.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Render body only

2008-04-03 Thread John Krasnay
On Thu, Apr 03, 2008 at 03:50:42PM +0100, Charlie Dobbie wrote:
> Off Topic, but does anyone else apart from Scott and me get confused by this
> duality?
> 
> Should I setProperty, or override getProperty?  And the equally annoying
> Does getComponentX give me a reference to an already-created ComponentX, or
> do I override it to supply my own ComponentX?
> 
> Charlie.
> 

Overriding the getter has the advantage that it allows the property
value to be lazily evaluated. This is good when the value of the
property can change over the lifetime of the component, or when the
value of the property is not known until the component is attached to
its parent. Calling the setter is simpler, but you must know the value
of the property ahead of time.

jk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Get informed about invalidation of a session

2008-04-03 Thread Warren
I am extending HttpSessionStore and keeping track of my sessions there. I am
able to get a hold of members of my Session while it is being invalidated. I
am not quite sure what you mean by " on the unBind() / onDestroy the actual
session object does not exist anymore", the session seems to be available
and I am able to access members of it as long as I store the Session in
onBind(...). This is what I am doing:


public class ScanManSessionStore extends HttpSessionStore
{
...

private Map sessions = new ConcurrentHashMap();
private Map devices = new ConcurrentHashMap();

protected void onBind(Request request, Session newSession)
{
sessions.put(newSession.getId(), newSession);
}

protected void onUnbind(String sessionId)
{
if(sessions.containsKey(sessionId))
{
Device device = 
((ScanManSession)sessions.get(sessionId)).getDevice();
if(device != null)
{
devices.remove(device.getDeviceId());
}
sessions.remove(sessionId);
}
}
...
}

Please let me know if there is a problem doing it this way.

Warren

> -Original Message-
> From: Robert Novotny [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 03, 2008 3:37 AM
> To: users@wicket.apache.org
> Subject: RE: Get informed about invalidation of a session
>
>
>
> This has been discussed multiple times and the only reasonable
> solution that
> I found (and just implemented) is to have a concurrent hashmap of session
> ids into session objects in the custom Application class. The
> reason is that
> on the unBind() / onDestroy the actual session object does not
> exist anymore
> - the only thing you have is the destroyed session ID.
>
> I needed to persist some user info on the logout.
>
> My solution goes like  this:
> public class DavanoApplication extends
> org.apache.wicket.protocol.http.WebApplication {
>   private Map activeUsersMap = new ConcurrentHashMap User>();
>   ...
>   @Override
>   public void sessionDestroyed(String sessionId) {
>   User user = activeUsersMap.get(sessionId);
>   if(user != null) {
>   userDao.saveOrUpdate(user);
>   userDao.updateLastLogin(user);
>   activeUsersMap.remove(sessionId);
>   }
>
>
>   super.sessionDestroyed(sessionId);
>   }
> }
> I am not sure whether this is correct solution, but it did help me.
>
> Robert
>
> BatiB80 wrote:
> >
> > Hi Warren,
> >
> > thanks for your answer. But I'm not sure how I could use this. The
> > information that I need to access are stored in the session. How can I
> > access a single instance of this session from the session store?
> >
> > Thanks,
> > Sebastian
> >
>
> --
> View this message in context:
> http://www.nabble.com/Get-informed-about-invalidation-of-a-session
> -tp16447452p16467385.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: Modifying inline CSS in head of document

2008-04-03 Thread Igor Vaynberg
see IHeaderContributor

-igor

On Thu, Apr 3, 2008 at 12:43 AM, rzechner <[EMAIL PROTECTED]> wrote:
> I want to resize the height of my pages dynamically, therefore I need to set
> the height of some markup elements dynamically. I don't want to use
> Javascript (although I found a nice solution with jquery).
>  Is there a way to add a textblock like the following to the page header?
>
>  
>
>  whereas the height of #leftmenu is set like this:
>
>  public abstract BasePage extends WebPage() {
>  ...
>  WebClientInfo w = (WebClientInfo)getWebRequestCycle().getClientInfo();
>  ClientProperties cp = w.getProperties();
>  int minHeight = cp.getBrowserHeight();
>  //some imagination now
>  addToHeader{
>   addStyle("#leftmenu", "height", minHeight);
>  }
>
>
>  Thanks,
>
>  Roman
>
>
>
>
>  -
>  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

2008-04-03 Thread Johan Compagner
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", "robot", "crawl", "spider" }; /*
> and
> > so on... */
> >
> >public Unbuffered(final HttpServletResponse res) {
> >super(res);
> > }
> >
> >@Override
> >public CharSequence encodeURL(final CharSequence url) {
> > return isAgent() ? url : super.encodeURL(url);
> >}
> >
> >private static boolean isAgent() {
> >
> >String agent =
> >
> >
> ((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().ge
> tHeader("User-Agent");
> >
> >for(String bot : botAgents) {
> >if (agent.toLowerCase().indexOf(bot) !=
> -1)
> > {
> >return true;
> >}
> >}
> >
> >return false;
> >}
> >}
> >
> >
> > I didn't test this code but I do similar thing in my old application
> in
> > Spring and it works.
> >
> > Take care,
> > Artur
> >
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/Removing-the-jsessionid-for-SEO-tp16464534p1646739
> 6.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]
> >
> >
>
> __
>
> The information contained in this message is proprietary and/or
> confidential. If you are not the
> intended recipient, please: (i) delete the message and all copies; (ii) do
> not disclose,
> distribute or use the message in any manner; and (iii) notify the sender
> immediately. In addition,
> please be aware that any message addressed to our domain is subject to
> archiving and review by
> persons other than the intended recipient. Thank you.
> _
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Changing Wickets default styles

2008-04-03 Thread Steen Larsen
More or less. Rearranging the order of the styles, seems to have an
influence. No idea why but it looks ok now. Firebug only showed the first
style (background-image), but changing the order made more show up (not
all). Go figure. But thanks for the input all.

/Steen

2008/4/2, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]>:
>
> so you got this sorted out right?
>
> Steen Larsen wrote:
>
> > I'm also developing mainly on firefox, and have tried clearing the cache
> > an
> > all, but no luck. My colleague tried it out with the same result and he
> > had
> > never downloaded the new stylesheet before.
> >
> > The html is the standard feedback panel:
> >
> > 
> >  
> >
> >  Feltet
> > postnummer skal udfyldes.
> >
> >  
> > 
> >
> > and the css reference adds the following line to head, which should be
> > ok:
> >
> >  > href="resources/dk.yousee.order.css.Style/yousee.css" media="screen"
> > />
> >
> > /Steen
> >
> > 2008/4/1, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]
> > >:
> >
> >
> > > Eeek TDC(yousee), which robs me of a montly fee for television!
> > >
> > > This might not be the rigth forum to ask CSS questions and is sort of
> > > offtopic. But usually when something works in IE and doesnt in firefox
> > > it means that IE breaks standard compability, and due to some bug in
> > > IE
> > > works anyway. My prefered way of working are using firefox to develop,
> > > checking in IE and then fix so it works in IE too..
> > >
> > > Could you show the corresponding html?
> > >
> > > regards Nino
> > >
> > >
> > > Steen Larsen wrote:
> > >
> > >
> > > > Hi,
> > > >
> > > > I have made a stylesheet to change the default look of the
> > > >
> > > >
> > > FeedbackPanel,
> > >
> > >
> > > > and loaded it with response.renderCSSReference(new
> > > > ResourceReference(
> > > > Style.class,"yousee.css"), "screen"), where the class Style and the
> > > > css
> > > >
> > > >
> > > is
> > >
> > >
> > > > in the same package. The css looks like this:
> > > >
> > > > li.feedbackPanelERROR {
> > > >background-image: none;
> > > >color: red;
> > > >padding-left: 0px;
> > > >background-repeat: no-repeat;
> > > >background-position: 0px;
> > > >list-style-type: none;
> > > > }
> > > >
> > > > li.feedbackPanelINFO {
> > > >background-image: none;
> > > >color: red;
> > > >padding-left: 0px;
> > > >background-repeat: no-repeat;
> > > >background-position: 0px;
> > > >list-style-type: none;
> > > > }
> > > >
> > > > This works fine in IE7, but for some reason only works partly in
> > > >
> > > >
> > > Firefox.
> > >
> > >
> > > > The green background-image is removed but the text is not red, and
> > > > is
> > > > indented as in the original. Looking at the styles with Firefoxs
> > > > WebDeveloper shows the correct styles. Anybody experienced this and
> > > >
> > > >
> > > found a
> > >
> > >
> > > > solution ?.
> > > >
> > > > /Steen
> > > >
> > > >
> > > >
> > > >
> > > --
> > > -Wicket for love
> > >
> > > 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]
> > >
> > >
> > >
> > >
> >
> >
> >
>
> --
> -Wicket for love
>
> 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]
>
>


Re: Is there an AJAX Panel in Wicket

2008-04-03 Thread Michael Sparer

wicket has plenty of ajax components out of the box. i think what you're
looking for is the lazyloading panel which is from wicket-extensions (i
think)

have a look at the example(s) on wicketstuff.org:
http://www.wicketstuff.org/wicket13/ajax/lazy-loading.1

kumark wrote:
> 
> I was wondering if there is a AJAXPanel available in wicket. If a page has
> 10 panels with in it, I want all of them to load in an asynchronous
> fashion, which ever is available first and so on, Instead of waiting for
> all the 10 panels to load before the page is displayed?
> 
> Many Thanks.
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Is-there-an-AJAX-Panel-in-Wicket-tp16467492p16467801.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]



Tabbed Panel

2008-04-03 Thread Milan Křápek
Hi,
  I want to use tabbed panel in my web application, because this type of 
navigation seem good for me. I looked the examples and I have this question. Is 
it posible to use tabbed panel as some page navigator?

The situation:
  My application is composed from few user models and one base model. The base 
module contains autentication and users management. Each user in system has 
list of modules he can use. At first the user must sign in to base module and 
through this he can access the other modules. Each module runs on seperate 
wicket application and is allowed to get information about logged user from 
base module.  

What I want:
  All I know about other modules are their URLs. So I want to have TabbedPanel 
and if I click on the tab I want to be redirected to that url.

Question:
  Is there any onClickAction that I can use for redirecting. Or can I give to 
the Panel model some url and somehow say wicket to go to this URL?

Thanks for your advice
Milan 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: I cannot understand why would a panel have the getparent null

2008-04-03 Thread Matthew Young
During construction of TodayPanel, it hasn't been added to the page yet so
getParent() is null.  Maybe you should do the 'if(user != null) {...' stuff
in @Override ...onBeforeRender() {...}.  The first time you're okay because
if (user!=null) fails and getParent() is not executed.  The second time it
gets executes.

On Thu, Apr 3, 2008 at 7:19 AM, Cristi Manole <[EMAIL PROTECTED]>
wrote:

> Hello,
>
> I have a HomePage where, in constructor, i add a Panel :
>
>public HomePage(final PageParameters parameters) {
>Date clientDate = getClientCalendar().getTime();
>Label label = new Label("today", "Today's Status [" +
> DateFormat.getDateInstance(DateFormat.SHORT).format(clientDate) + "]");
>add(label);
>add(reportModalWindow = createReportModalWindow());
>add(countButtonsPanel = new CountButtonsPanel("countButtonsDiv",
> ((WebSession)getSession()).isSignedIn(), this));
>add(iSmokedModalWindow = createISmokedModalWindow());
> *add(todayPanel = new TodayPanel("todayPanel", new
> java.sql.Date(clientDate.getTime(;
> *}
>
> in TodayPanel's constructor, i check if the user is logged, and if he is,
> update an ajax table (current page)
>
>if(user != null) {
>
> ajaxTable.setCurrentPage(ajaxTable.getUserRow(user.getUsername(), new
> Date(((HomePage)getParent()).getClientCalendar().getTimeInMillis())) /
> ROWS_PER_PAGE);
>}
>
>
> When first running the application (no user logged in), today panel is
> cool.
> I log in and today panel is correctly updated.
>
> Now, when i start *another* browser page and point to the application's
> url,
> i get a org.apache.wicket.WicketRuntimeException
>  because TodayPanel's getParent() returns null.
>
> Question is: why?... i could understand it if it were consistent...
> meaning
> it will get me null on the first login too.
>
> I tested in Firefox tabs.
>
> Tks in advance,
> Cristi Manole
>


Re: Mount causes strange effects on my web application

2008-04-03 Thread Igor Vaynberg
where does your javascript live? context folder? package folder?

-igor


On Thu, Apr 3, 2008 at 2:22 AM, SteamR <[EMAIL PROTECTED]> wrote:
>
>  OK, it seems that image paths are filtered with correct path, and thus leaves
>  my javascript reference as is, since I add it myself. Is there somehow I can
>  find out what path is correct, since I am adding javascript reference in my
>  java code???
>
>
>
>
>  SteamR wrote:
>  >
>  > I found out that it was a js sourcefile reference which were added in code
>  > (in a onRendered method), that when app was mounted, caused the lookups to
>  > be sent to the page instead... So that seems that relative paths are nogos
>  > when mounted???
>  >
>  > But strange is that images seems to work ok, they also use relative
>  > path...
>  >
>  >
>  > SteamR wrote:
>  >>
>  >> I have now searched the html files, and can't find any empty src
>  >> attributes. And it only happens when I add the
>  >>
>  >> mount("/pwa", PackageName.forClass(CategoryPage.class));
>  >>
>  >> in my WebApplication class' init method.
>  >>
>  >> (I also have relocated the html files to the "src/main/webapp" folder, if
>  >> that has something to do with it.)
>  >>
>  >> Well, I will try to strip down the code, to bare minimum and maybe post
>  >> the full code here thereafter.
>  >>
>  >>
>  >>
>  >>
>  >>
>  >> SteamR wrote:
>  >>>
>  >>> Hi,  I hope someone could help me with this...
>  >>>
>  >>> I have 5 pages which are pretty standalone but stateful, and they have
>  >>> nothing to do with each other.
>  >>>
>  >>> Now I thought of having bookmarks for each of these pages, and added a
>  >>> mount point to /pwa.
>  >>>
>  >>> Now the problems started; my page's constructor was invoked three times
>  >>> before actual output occured (it has an empty constructor), and a form
>  >>> object loses its transient fields during a request-response cycle.
>  >>>
>  >>> The transient field getting lost, is something I can fix, but invoking
>  >>> the constructor three times and why wicket does so, is very strange...?
>  >>>
>  >>> Anyone know any answer to this...
>  >>>
>  >>> Btw, I am running wicket 1.3.1
>  >>>
>  >>
>  >>
>  >
>  >
>
>  --
>  View this message in context: 
> http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16467343.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 support for page customisation at runtime

2008-04-03 Thread Igor Vaynberg
they click the up link, you update the db with the correct order, and
repaint the page. where is the problem?

-igor

On Thu, Apr 3, 2008 at 2:34 AM, kumark <[EMAIL PROTECTED]> wrote:
>
>  Thanks Igor.
>
>  Here's an example of the usecase I am referring to. Two panels lets say (one
>  with sports headlines and other with weather headlines) are shown one below
>  the other by default. I want the user to be able to move their order (lets
>  say with up and down arrows) provided in each of those panels.
>
>  once the user makes the above change, I would like the system to remember
>  these preferences and render accordingly for that user alone and differently
>  for other users.
>
>  Any thoughts on the above usecase?
>
>  Many Thanks.
>
>
>
>
>
>  igor.vaynberg wrote:
>  >
>  > huh? hardly any logic for presenting? wicket is a ui framework, it
>  > wouldnt be a good one if you couldnt present dynamic things...
>  >
>  > anywho, there is support for all you want. your question is too
>  > general to be answered, if you have a more specific usecase you want
>  > to talk about feel free.
>  >
>  > as far as per user theme/colors you can check out session.getstyle()
>  > and component.getvariation() - there is a wiki page that describes
>  > skinning you might want to read.
>  >
>  > -igor
>  >
>  >
>  > On undefined, kumark <[EMAIL PROTECTED]> wrote:
>  >>
>  >>  Hi,
>  >>
>  >>  I was wondering if wicket supports page customisation at runtime per
>  >> user.
>  >>  For example, Changing the available theme/colors, applying a different
>  >>  layout and being able to move content blocks (for example 2 panels)
>  >> up/down
>  >>  at runtime. (similar to myspace or other popular portals).
>  >>
>  >>  As I understand that unlike jsps , in wicket there is hardly any logic
>  >> for
>  >>  presenting (for example displaying two divs different based on the
>  >> current
>  >>  user preferences etc.,).
>  >>
>  >>  Any thoughts or a link to a post/article which discusses these issues
>  >> would
>  >>  be great.
>  >>
>  >>  Thanks.
>  >>  --
>  >>  View this message in context:
>  >> 
> http://www.nabble.com/wicket-support-for-page-customisation-at-runtime-tp16447326p16447326.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]
>  >
>  >
>  >
>
>  --
>  View this message in context: 
> http://www.nabble.com/wicket-support-for-page-customisation-at-runtime-tp16447326p16467353.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: Tabbed Panel

2008-04-03 Thread Igor Vaynberg
tabbedpanel is meant for swapping inner panels not urls. you will need
to roll your own variant that only has tabs and no body. see the
source of tabbedpanel for inspiration.

-igor


On Thu, Apr 3, 2008 at 9:34 AM, Milan Křápek <[EMAIL PROTECTED]> wrote:
> Hi,
>   I want to use tabbed panel in my web application, because this type of 
> navigation seem good for me. I looked the examples and I have this question. 
> Is it posible to use tabbed panel as some page navigator?
>
>  The situation:
>   My application is composed from few user models and one base model. The 
> base module contains autentication and users management. Each user in system 
> has list of modules he can use. At first the user must sign in to base module 
> and through this he can access the other modules. Each module runs on 
> seperate wicket application and is allowed to get information about logged 
> user from base module.
>
>  What I want:
>   All I know about other modules are their URLs. So I want to have 
> TabbedPanel and if I click on the tab I want to be redirected to that url.
>
>  Question:
>   Is there any onClickAction that I can use for redirecting. Or can I give to 
> the Panel model some url and somehow say wicket to go to this URL?
>
>  Thanks for your advice
>  Milan
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Removing the jsessionid for SEO

2008-04-03 Thread Igor Vaynberg
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", "robot", "crawl", "spider" }; /*
>  > and
>  > > so on... */
>  > >
>  > >public Unbuffered(final HttpServletResponse res) {
>  > >super(res);
>  > > }
>  > >
>  > >@Override
>  > >public CharSequence encodeURL(final CharSequence url) {
>  > > return isAgent() ? url : super.encodeURL(url);
>  > >}
>  > >
>  > >private static boolean isAgent() {
>  > >
>  > >String agent =
>  > >
>  > >
>  > ((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().ge
>  > tHeader("User-Agent");
>  > >
>  > >for(String bot : botAgents) {
>  > >if (agent.toLowerCase().indexOf(bot) !=
>  > -1)
>  > > {
>  > >return true;
>  > >}
>  > >}
>  > >
>  > >return false;
>  > >}
>  > >}
>  > >
>  > >
>  > > I didn't test this code but I do similar thing in my old application
>  > in
>  > > Spring and it works.
>  > >
>  > > Take care,
>  > > Artur
>  > >
>  > >
>  > > --
>  > > View this message in context:
>  > >
>  > http://www.nabble.com/Removing-the-jsessionid-for-SEO-tp16464534p1646739
>  > 
> 6.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]
>  > >
>  > >
>  >
>  > __
>  >
>  > The information contained in this message is proprietary and/or
>  > confidential. If you are not the
>  > intended recipient, please: (i) delete the message and all copies; (ii) do
>  > not disclose,
>  > distribute or use the message in any manner; and (iii) notify the sender
>  > immediately. In addition,
>  > please be aware that any message addressed to our domain is subject to
>  > archiving and review by
>  > persons other than the intended recipient. Thank you.
>  > _
>  >
>  > -

Re: Throw AbortWithWebErrorCodeException in onBeforeRender

2008-04-03 Thread Igor Vaynberg
jira...

-igor

On Wed, Apr 2, 2008 at 2:41 AM, Michael Sparer <[EMAIL PROTECTED]> wrote:
>
>  (Using wicket 1.3.2) I have a super class (WebPage) that throws a
>  AbortWithWebErrorCodeException(404) depending on some properties of its
>  subclasses. Therefore I can't check the subclasses' properties in the super
>  class' constructor and throw the exception there.
>  So I tried to throw it in the onBeforeRender method instead. The Error page
>  for the 404 gets rendered and displayed without problems however an
>  exception gets thrown (see below).
>
>  So my question: where's the (right) place to throw the exception? I also
>  tried RequestCycle.get().setRequestTarget(new
>  WebErrorCodeResponseTarget(404)); with the same result.
>
>  thanks in advance
>
>  michael
>
>  exception trace:
>  ERROR - RequestCycle   - there was an error cleaning up target
>  [EMAIL PROTECTED] pageClass=].
>  org.apache.wicket.WicketRuntimeException: There is no application attached
>  to current thread btpool0-2
> at org.apache.wicket.Application.get(Application.java:166)
> at org.apache.wicket.Component.getApplication(Component.java:1229)
> at org.apache.wicket.markup.html.WebPage.onDetach(WebPage.java:404)
> at org.apache.wicket.Component.detach(Component.java:1075)
> at
>  
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.detach(BookmarkablePageRequestTarget.java:122)
> at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1046)
> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1348)
> at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
> at
>  org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:358)
> at
>  org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
> at
>  
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
> at
>  
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> at
>  
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
> at
>  
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
>
>  -
>  Michael Sparer
>  http://talk-on-tech.blogspot.com
>  --
>  View this message in context: 
> http://www.nabble.com/Throw-AbortWithWebErrorCodeException-in-onBeforeRender-tp16446341p16446341.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: CheckBoxMultipleChoice with sections

2008-04-03 Thread Igor Vaynberg
you could use CheckGroup/Check components 

-igor


On Thu, Apr 3, 2008 at 6:37 AM, Brian Edwards
<[EMAIL PROTECTED]> wrote:
> I am trying to create a CheckBoxMultipleChoice subclass that supports
>  sections.  The class of items in the list will have a section name and
>  a description.  The list will guarantee that it is grouped by
>  sections.  My idea was to override getPrefix(), call a getter to get
>  the current choice, and if the section has changed print out the new
>  section name as part of the prefix.  The problem I ran into is that
>  the current choice is not accessible, because it is local to the
>  onComponentTagBody method.  My current solution is to copy and paste
>  all of the code from CheckBoxMultipleChoice into my own class and hack
>  away, but I'd like to avoid this if possible.
>
>  --
>  Brian
>
>  -
>  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: should DataView.setItemsPerPage(int items) be in IDataProvider?

2008-04-03 Thread Igor Vaynberg
whats the usecase there?

-igor

On Thu, Apr 3, 2008 at 6:29 AM, i ii <[EMAIL PROTECTED]> wrote:
>
>  but what if items per page is needed not in iterator?
>
>  > Date: Thu, 3 Apr 2008 15:08:27 +0200
>  > From: [EMAIL PROTECTED]
>  > To: users@wicket.apache.org
>  > Subject: Re: should DataView.setItemsPerPage(int items) be in 
> IDataProvider?
>
>
> >
>  > iterator(int start, int count)
>  >
>  > the count parameter is the items per page.
>  >
>  > Martijn
>  >
>  > On 4/3/08, i ii <[EMAIL PROTECTED]> wrote:
>  > >
>  > >  when i need to get items per page in data provider i cannot unless i 
> have data view. should this method be in data provider and not data view? the 
> data provider is providing data and items per page is data, no?
>  > >
>  >
>  >
>  > --
>  > 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]



Wicket fail-over with Terracotta - sticky or non-sticky sessions?

2008-04-03 Thread Stefan Fußenegger

Hi all,

I am currently evaluating a Wicket fail-over solution (two equal nodes with
a floating IP, probably using Linux Heartbeat) with Terracotta. Of course,
it would be desirable to switch between nodes without any impact on a user's
session. In order to provide this, the cluster must be able to handle
non-sticky sessions. Session clustering works like a breeze with Wicket and
Terracotta

I already spotted a problem with buffered redirects, that could be avoided
with a different rendering strategy
(IRequestCycleSettings.REDIRECT_TO_RENDER). However, this problem would only
occur if a node goes down just when the client is redirecting - not very
likely and probably acceptable as switching over might take a few seconds
anyway.

Now my question: What other problems could appear when I only use session
clustering for fail-over purposes? Can I stay with the default rendering
strategy (IRequestCycleSettings.REDIRECT_TO_BUFFER) without clustering the
buffer if I accept missing feedback messages in the above scenario?

Any further comments on my setup will be appreciated as well!

(If answers are woth it, I'll create a wiki page out of this thread)

Best Regards, Stefan


-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/Wicket-fail-over-with-Terracotta---sticky-or-non-sticky-sessions--tp16467830p16467830.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]



Re: Removing the jsessionid for SEO

2008-04-03 Thread Matej Knopp
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", "robot", "crawl", "spider" }; /*
>  >  > and
>  >  > > so on... */
>  >  > >
>  >  > >public Unbuffered(final HttpServletResponse res) {
>  >  > >super(res);
>  >  > > }
>  >  > >
>  >  > >@Override
>  >  > >public CharSequence encodeURL(final CharSequence url) {
>  >  > > return isAgent() ? url : super.encodeURL(url);
>  >  > >}
>  >  > >
>  >  > >private static boolean isAgent() {
>  >  > >
>  >  > >String agent =
>  >  > >
>  >  > >
>  >  > ((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().ge
>  >  > tHeader("User-Agent");
>  >  > >
>  >  > >for(String bot : botAgents) {
>  >  > >if (agent.toLowerCase().indexOf(bot) !=
>  >  > -1)
>  >  > > {
>  >  > >return true;
>  >  > >}
>  >  > >}
>  >  > >
>  >  > >return false;
>  >  > >}
>  >  > >}
>  >  > >
>  >  > >
>  >  > > I didn't test this code but I do similar thing in my old application
>  >  > in
>  >  > > Spring and it works.
>  >  > >
>  >  > > Take care,
>  >  > > Artur
>  >  > >
>  >  > >
>  >  > > --
>  >  > > View this message in context:
>  >  > >
>  >  > http://www.nabble.com/Removing-the-jsessionid-for-SEO-tp16464534p1646739
>  >

[Wicket 1.3.3] Possible wicket:enclosure regression.

2008-04-03 Thread Fabio Fioretti
Hi All,

I'm experiencing a possible regression for wicket:enclosure in Wicket
1.3.3 (maybe related to the couple of patches that involved enclosures
for 1.3.3). It thought of a regression because the following code
works just fine in 1.3.1, even if I haven't tested it in 1.3.2.

Basically, I have a RadioGroup with a couple of options. When the user
selects the second option, a text field and link (wrapped in an
enclosure) should appear next to the option. If she/he selects the
first option, they should disappear again. Their visibility management
is based on the enclosure.






Set OPTION ONE



   
   Set OPTION TWO
   
   
   link
   
   








On the Java side, the relevant code looks like this (feel free to ask
for further details):

radioGroup.add(new AjaxFormRadioUpdatingBehavior("onclick"){
@Override
protected void onUpdate(AjaxRequestTarget target) {
if (OPTION_ONE.equals(getSelectedOption())) {
textField.setVisible(true);
} else {
textField.setVisible(false);
}
   target.addComponent(radioGroup);
}
});

As you can see, I set the visibility of the textField depending on the
selected option and then update the container (the radioGroup). Again,
it worked fine in 1.3.1.

Is anybody aware of this or has anyone else experienced the same
change in enclosure functioning from Wicket 1.3.1 to 1.3.3?


Thank you very much and keep up the good work!

Fabio Fioretti - WindoM

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Writing to .properties files and make changes happen?

2008-04-03 Thread Johan Compagner
thats very strange
writing  a file in an editor or save it through java that shouldn't matter
But are you constantly writing properties file from inside the webapp?

johan

On Thu, Apr 3, 2008 at 7:31 PM, unka_hahrry <[EMAIL PROTECTED]> wrote:

>
> Yes, but only if I edit the .properties file with an editor and save, then
> it
> will be recognized, if overwriting the .properties file with
> BufferedWriter
> it will not be recognized.
>
> Is there a better way to provide the future admin the possiblity of
> adaptable content, without putting all the text into the database?
>
>
> igor.vaynberg wrote:
> >
> > do they reload properly if wicket is running in development mode?
> >
> > -igor
> >
> >
> > On Wed, Apr 2, 2008 at 7:51 AM, unka_hahrry <[EMAIL PROTECTED]>
> > wrote:
> >>
> >>  I'm using a BufferedWriter to change my .properties files dynamically,
> >> the
> >>  .properties files are updated well but the changes don't appear in my
> >>   tag. Is there a possiblity to reload a .properties
> >> file?
> >>  --
> >>  View this message in context:
> >>
> http://www.nabble.com/Writing-to-.properties-files-and-make-changes-happen--tp16447118p16447118.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]
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Writing-to-.properties-files-and-make-changes-happen--tp16447118p16466443.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]
>
>


Re: Validate HTML generated from getMarkupResourceStream()

2008-04-03 Thread hjuturu

Hi Igor,All
I tried to use MarkupParser as u suggested
This is how my code looks
public IResourceStream getMarkupResourceStream(MarkupContainer container,
Class containerClass){
   IResourceStream rStream = new StringResourceStream(HTMLString);
MarkupResourceStream resource = new 
MarkupResourceStream(rStream);
MarkupParser parser = new MarkupParser(resource);
try {

parser.parse();
} catch (Exception e) {
 setRedirect(true);
setResponsePage(ParseError.class);
}

return rStream;
}

What is really weird is that though the the exception is caught in the catch
block, the program flow continues to "return rStream;"  statement and throws
the error on the console again. It doesnt go to the response page that i set
in the catch block.

I am not sure why this happens ?
Thanks
Haritha


igor.vaynberg wrote:
> 
> you can probably user our markupparser...
> 
> -igor
> 
> 
> On Tue, Apr 1, 2008 at 1:26 PM, hjuturu <[EMAIL PROTECTED]> wrote:
>>
>>  Hi All
>>  I use a class which implements IMarkupResourceStreamProvider,
>>  IMarkupCacheKeyProvider to
>>  generated HTML dynamically and sent it to wicket as a IResourceStream.
>>  //code snippet
>>  public IResourceStream getMarkupResourceStream(MarkupContainer
>> container,
>>  Class containerClass){ return new
>> StringResourceStream(HTMLString);
>> }
>>
>>  If the HTMLString is not properly formed , wicket throws
>>  "java.text.ParseException" and org.apache.wicket.markup.MarkupException.
>>  after i set the responsepage.
>>
>>  I would like to validate whether this string is correct before it goes
>> to
>>  wicket code and a exception is thrown.Is there anyway to validate this
>>  HTMLString and catch the exception.
>>
>>  If not in wicket are there any third party packages available to
>> validate
>>  dynamically generated HTML strings .
>>
>>  Thanks All
>>  Haritha
>>
>>
>>
>>
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/Validate-HTML-generated-from-getMarkupResourceStream%28%29-tp16423755p16423755.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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Validate-HTML-generated-from-getMarkupResourceStream%28%29-tp16423755p16468359.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]



Re: I cannot understand why would a panel have the getparent null

2008-04-03 Thread Al Maw
 ajaxTable.setCurrentPage(ajaxTable.getUserRow(user.getUsername(), new
Date(((HomePage)getParent()).getClientCalendar().getTimeInMillis())) /
ROWS_PER_PAGE);

Eeek. Not to be rude, but I really can't read that at all.
Some well-named intermediate variables and a comment might not go amiss.

Your panel is relying on being added to the home page.
This is bad and wrong.

Why don't you pass the calendar into the constructor of the panel?
That would be an awful lot simpler and result in nice readable, correct
code.

I dunno. Give a man a hammer, and everything looks like a thumb...

Regards,

Alastair



On Thu, Apr 3, 2008 at 5:44 PM, Matthew Young <[EMAIL PROTECTED]> wrote:

> During construction of TodayPanel, it hasn't been added to the page yet so
> getParent() is null.  Maybe you should do the 'if(user != null) {...'
> stuff
> in @Override ...onBeforeRender() {...}.  The first time you're okay
> because
> if (user!=null) fails and getParent() is not executed.  The second time it
> gets executes.
>
> On Thu, Apr 3, 2008 at 7:19 AM, Cristi Manole <[EMAIL PROTECTED]>
> wrote:
>
> > Hello,
> >
> > I have a HomePage where, in constructor, i add a Panel :
> >
> >public HomePage(final PageParameters parameters) {
> >Date clientDate = getClientCalendar().getTime();
> >Label label = new Label("today", "Today's Status [" +
> > DateFormat.getDateInstance(DateFormat.SHORT).format(clientDate) + "]");
> >add(label);
> >add(reportModalWindow = createReportModalWindow());
> >add(countButtonsPanel = new CountButtonsPanel("countButtonsDiv",
> > ((WebSession)getSession()).isSignedIn(), this));
> >add(iSmokedModalWindow = createISmokedModalWindow());
> > *add(todayPanel = new TodayPanel("todayPanel", new
> > java.sql.Date(clientDate.getTime(;
> > *}
> >
> > in TodayPanel's constructor, i check if the user is logged, and if he
> is,
> > update an ajax table (current page)
> >
> >if(user != null) {
> >
> > ajaxTable.setCurrentPage(ajaxTable.getUserRow(user.getUsername(), new
> > Date(((HomePage)getParent()).getClientCalendar().getTimeInMillis())) /
> > ROWS_PER_PAGE);
> >}
> >
> >
> > When first running the application (no user logged in), today panel is
> > cool.
> > I log in and today panel is correctly updated.
> >
> > Now, when i start *another* browser page and point to the application's
> > url,
> > i get a org.apache.wicket.WicketRuntimeException
> >  because TodayPanel's getParent() returns null.
> >
> > Question is: why?... i could understand it if it were consistent...
> > meaning
> > it will get me null on the first login too.
> >
> > I tested in Firefox tabs.
> >
> > Tks in advance,
> > Cristi Manole
> >
>


Re: Validate HTML generated from getMarkupResourceStream()

2008-04-03 Thread hjuturu

I got a solution for this and would like to share it with those interested
I replaced the catch block with this code'

catch (Exception e) {
getSession().error("Parse Exception Occured");
throw new 
RestartResponseException(ParseError.class); 

}

Thanks
Haritha

hjuturu wrote:
> 
> Hi Igor,All
> I tried to use MarkupParser as u suggested
> This is how my code looks
> public IResourceStream getMarkupResourceStream(MarkupContainer container,
> Class containerClass){
>  IResourceStream rStream = new StringResourceStream(HTMLString);
>   MarkupResourceStream resource = new 
> MarkupResourceStream(rStream);
>   MarkupParser parser = new MarkupParser(resource);
>   try {
>   
>   parser.parse();
>   } catch (Exception e) {
>  setRedirect(true);
>   setResponsePage(ParseError.class);
>   }
> 
>   return rStream;
> }
> 
> What is really weird is that though the the exception is caught in the
> catch block, the program flow continues to "return rStream;"  statement
> and throws the error on the console again. It doesnt go to the response
> page that i set in the catch block.
> 
> I am not sure why this happens ?
> Thanks
> Haritha
> 
> 
> igor.vaynberg wrote:
>> 
>> you can probably user our markupparser...
>> 
>> -igor
>> 
>> 
>> On Tue, Apr 1, 2008 at 1:26 PM, hjuturu <[EMAIL PROTECTED]> wrote:
>>>
>>>  Hi All
>>>  I use a class which implements IMarkupResourceStreamProvider,
>>>  IMarkupCacheKeyProvider to
>>>  generated HTML dynamically and sent it to wicket as a IResourceStream.
>>>  //code snippet
>>>  public IResourceStream getMarkupResourceStream(MarkupContainer
>>> container,
>>>  Class containerClass){ return new
>>> StringResourceStream(HTMLString);
>>> }
>>>
>>>  If the HTMLString is not properly formed , wicket throws
>>>  "java.text.ParseException" and
>>> org.apache.wicket.markup.MarkupException.
>>>  after i set the responsepage.
>>>
>>>  I would like to validate whether this string is correct before it goes
>>> to
>>>  wicket code and a exception is thrown.Is there anyway to validate this
>>>  HTMLString and catch the exception.
>>>
>>>  If not in wicket are there any third party packages available to
>>> validate
>>>  dynamically generated HTML strings .
>>>
>>>  Thanks All
>>>  Haritha
>>>
>>>
>>>
>>>
>>>
>>>  --
>>>  View this message in context:
>>> http://www.nabble.com/Validate-HTML-generated-from-getMarkupResourceStream%28%29-tp16423755p16423755.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]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Validate-HTML-generated-from-getMarkupResourceStream%28%29-tp16423755p16469586.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]



Re: Render body only

2008-04-03 Thread Al Maw
Yeah. It's a bit nasty, but there's not really any other way to have both
the flexibility and the convenience, unless you have some brilliant other
idea?

It's like jk says, normally you would use the setter, unless you need
on-demand evaluation per page-view.

Regards,

Alastair

On Thu, Apr 3, 2008 at 4:49 PM, John Krasnay <[EMAIL PROTECTED]> wrote:

> On Thu, Apr 03, 2008 at 03:50:42PM +0100, Charlie Dobbie wrote:
> > Off Topic, but does anyone else apart from Scott and me get confused by
> this
> > duality?
> >
> > Should I setProperty, or override getProperty?  And the equally annoying
> > Does getComponentX give me a reference to an already-created ComponentX,
> or
> > do I override it to supply my own ComponentX?
> >
> > Charlie.
> >
>
> Overriding the getter has the advantage that it allows the property
> value to be lazily evaluated. This is good when the value of the
> property can change over the lifetime of the component, or when the
> value of the property is not known until the component is attached to
> its parent. Calling the setter is simpler, but you must know the value
> of the property ahead of time.
>
> jk
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Tomcat dying with Wicket 1.3.2 (Windows / JDK 1.5.0_10)

2008-04-03 Thread Al Maw
You can use as many anonymous inner classes as you like. I have them coming
out of my ears, personally.

It's very odd for tomcat to die with no output. There will be output
somewhere. Check logs/catalina.out and also logs/localhost*. If the JVM
dies, it will hotspot or even segfault and log that, at least. If you have
gradually increasing memory footprint then this should be pretty easy to
track down with a profiler.

Make sure you run Tomcat with a sensible amount of permanent generation
space (128M+).

Regards,

Alastair



On Thu, Apr 3, 2008 at 6:43 AM, Martijn Dashorst <[EMAIL PROTECTED]>
wrote:

> There are commandline options for the jvm to dump on OOM.
>
> Anyway, doesn't the log file give any insight into what is happening
> in your application? Did you (or your sysadmin) disable logging for
> Wicket?
>
> You can also run external tools to see what is happening inside your
> JVM without blocking the app. e.g. use jmap -histo to see how many
> objects are alive at a particular moment. The top 10 is always
> interesting. In my case I found a memory leak in the diskpagestore
> when exceptions occurred during writing to disk. This is solved in
> 1.3.3 (which is just days away from an official release, try it!)
>
> jstat -gc -h50  1000 will log the garbage collector statistics
> every second.
>
> Martijn
>
> On 4/3/08, Jeremy Thomerson <[EMAIL PROTECTED]> wrote:
> > I upgraded my biggest production app from 1.2.6 to 1.3 last week.  I
> have
> >  had several apps running on 1.3 since it was in beta with no problems -
> >  running for months without restarting.
> >
> >  This app receives more traffic than any of the rest.  We have a decent
> >  server, and I had always allowed Tomcat 1.5GB of RAM to operate with.
>  It
> >  never had a problem doing so, and I didn't have OutOfMemory errors.
>  Now,
> >  after the upgrade to 1.3.2, I am having all sorts of trouble.  It ran
> for
> >  several days without a problem, but then started dying a couple times a
> >  day.  Today it has died four times.  Here are a couple odd things about
> >  this:
> >
> >- On 1.2.6, I never had a problem with stability - the app would run
> >weeks between restarts (I restart once per deployment, anywhere from
> once a
> >week to at the longest about two months between deploy / restart).
> >- Tomcat DIES instead of hanging when there is a problem.  Always
> >before, if I had an issue, Tomcat would hang, and there would be OOM
> in the
> >logs.  Now, when it crashes, and I sign in to the server, Tomcat is
> not
> >running at all.  There is nothing in the Tomcat logs that says
> anything, or
> >in eventvwr.
> >- I do not get OutOfMemory error in any logs, whereas I have always
> >seen it in the logs before when I had an issue with other apps.  I am
> >running Tomcat as a service on Windows, but it writes stdout / stderr
> to
> >logs, and I write my logging out to logs, and none of these logs
> include ANY
> >errors - they all just suddenly stop at the time of the crash.
> >
> >  My money is that it is an OOM error caused by somewhere that I am doing
> >  something I shouldn't be with Wicket.  There's no logs that even say it
> is
> >  an OOM, but the memory continues to increase linearly over time as the
> app
> >  runs now (it didn't do that before).  My first guess is my previous
> >  proliferate use of anonymous inner classes.  I have seen in the email
> >  threads that this shouldn't be done in 1.3.
> >
> >  Of course, the real answer is that I'm going to be digging through
> profilers
> >  and lines of code until I get this fixed.
> >
> >  My question, though, is from the Wicket devs / experienced users -
> where
> >  should I look first?  Is there something that changed between 1.2.6 and
> 1.3
> >  that might have caused me problems where 1.2.6 was more forgiving?
> >
> >  I'm running the app with JProbe right now so that I can get a snapshot
> of
> >  memory when it gets really high.
> >
> >  Thank you,
> >
> > Jeremy Thomerson
> >
>
>
> --
> 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]
>
>


Re: Displaying date as Label.

2008-04-03 Thread Roman Zechner | Liland
use this
DateLabel.forDatePattern(java.lang.String id, IModel model, java.lang.String
datePattern) 

cheers, roman

users@wicket.apache.org wrote: 
> 
> Hi All,
> 
> I need some help displaying date correctly in Label. I am using a text
> field(and DatePicker) to take date input and storing it in mySQL database.
> But while displying it as a "Label" I am only seeing time (i.e it always
> shows 12:00 am).The date in database is correct.
> 
> Here is how I am doing it.
> 
> # For uploading
> TextField uploadDate = new TextField("uploadDate",Date.class);
> uploadDate.add(new DatePicker());
> 
> #For displaying(in a ListView)
> 
> item.add(new Label("uploadDate ",new
> PropertyModel(item.getModel(),"uploadDate ")));
> 
> 
> #Environment:
> Wicket 1.3.2 (also includes joda time)
> MySQL(5.5x)
> 
> 
> Can someone please help.
> Thanks,
> RG
> -- 
> View this message in context:
http://www.nabble.com/Displaying-date-as-Label.-tp16467546p16467546.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]
> 
> 

-- 
-- 
Liland ...does IT better

Liland IT GmbH
Creative Master
email: [EMAIL PROTECTED]

office: +43 (0)463 220-111  | fax: +43 (0)463 220-288 
http://www.Liland.at


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat dying with Wicket 1.3.2 (Windows / JDK 1.5.0_10)

2008-04-03 Thread Jeremy Thomerson
The oddness is what baffles me: Tomcat has no output anywhere.  I have
grepped and tailed the entire Tomcat logs directory, stdout*, stderr*,
localhost*, etc.  Nothing in eventvwr.

It must be memory related, though.  There is a steadily increasing memory
footprint - it was increasing so fast yesterday because we were getting
pounded by tons of traffic and Google's crawler and Ask's crawler all
simultaneously.  Of course, the traffic was still no higher than it has been
in the past - this is definitely a new problem.

I redeployed today with the pending 1.3.3 release built by Frank to see if
my leak could be the same as Martijn's below, but the memory continues to
increase.  It will die soon.  I have added the parameter to tell it to dump
on OOM - hopefully I got the right parameter and it will work.

Anyone here know how to (or if you can) use jstat / jmap with tomcat5.exe,
running as Windows service?  All my development is on Linux machines, and I
can easily use those tools, but on the Windows prod environment (ughh), jps
doesn't give me a VMID for Tomcat.

Thank you for your help!
Jeremy

On Thu, Apr 3, 2008 at 2:27 PM, Al Maw <[EMAIL PROTECTED]> wrote:

> You can use as many anonymous inner classes as you like. I have them
> coming
> out of my ears, personally.
>
> It's very odd for tomcat to die with no output. There will be output
> somewhere. Check logs/catalina.out and also logs/localhost*. If the JVM
> dies, it will hotspot or even segfault and log that, at least. If you have
> gradually increasing memory footprint then this should be pretty easy to
> track down with a profiler.
>
> Make sure you run Tomcat with a sensible amount of permanent generation
> space (128M+).
>
> Regards,
>
> Alastair
>
>
>
> On Thu, Apr 3, 2008 at 6:43 AM, Martijn Dashorst <
> [EMAIL PROTECTED]>
> wrote:
>
> > There are commandline options for the jvm to dump on OOM.
> >
> > Anyway, doesn't the log file give any insight into what is happening
> > in your application? Did you (or your sysadmin) disable logging for
> > Wicket?
> >
> > You can also run external tools to see what is happening inside your
> > JVM without blocking the app. e.g. use jmap -histo to see how many
> > objects are alive at a particular moment. The top 10 is always
> > interesting. In my case I found a memory leak in the diskpagestore
> > when exceptions occurred during writing to disk. This is solved in
> > 1.3.3 (which is just days away from an official release, try it!)
> >
> > jstat -gc -h50  1000 will log the garbage collector statistics
> > every second.
> >
> > Martijn
> >
> > On 4/3/08, Jeremy Thomerson <[EMAIL PROTECTED]> wrote:
> > > I upgraded my biggest production app from 1.2.6 to 1.3 last week.  I
> > have
> > >  had several apps running on 1.3 since it was in beta with no problems
> -
> > >  running for months without restarting.
> > >
> > >  This app receives more traffic than any of the rest.  We have a
> decent
> > >  server, and I had always allowed Tomcat 1.5GB of RAM to operate with.
> >  It
> > >  never had a problem doing so, and I didn't have OutOfMemory errors.
> >  Now,
> > >  after the upgrade to 1.3.2, I am having all sorts of trouble.  It ran
> > for
> > >  several days without a problem, but then started dying a couple times
> a
> > >  day.  Today it has died four times.  Here are a couple odd things
> about
> > >  this:
> > >
> > >- On 1.2.6, I never had a problem with stability - the app would
> run
> > >weeks between restarts (I restart once per deployment, anywhere
> from
> > once a
> > >week to at the longest about two months between deploy / restart).
> > >- Tomcat DIES instead of hanging when there is a problem.  Always
> > >before, if I had an issue, Tomcat would hang, and there would be
> OOM
> > in the
> > >logs.  Now, when it crashes, and I sign in to the server, Tomcat is
> > not
> > >running at all.  There is nothing in the Tomcat logs that says
> > anything, or
> > >in eventvwr.
> > >- I do not get OutOfMemory error in any logs, whereas I have always
> > >seen it in the logs before when I had an issue with other apps.  I
> am
> > >running Tomcat as a service on Windows, but it writes stdout /
> stderr
> > to
> > >logs, and I write my logging out to logs, and none of these logs
> > include ANY
> > >errors - they all just suddenly stop at the time of the crash.
> > >
> > >  My money is that it is an OOM error caused by somewhere that I am
> doing
> > >  something I shouldn't be with Wicket.  There's no logs that even say
> it
> > is
> > >  an OOM, but the memory continues to increase linearly over time as
> the
> > app
> > >  runs now (it didn't do that before).  My first guess is my previous
> > >  proliferate use of anonymous inner classes.  I have seen in the email
> > >  threads that this shouldn't be done in 1.3.
> > >
> > >  Of course, the real answer is that I'm going to be digging through
> > profilers
> > >  and lines of code until I get this fixe

Re: ModalWindow and Ajax?

2008-04-03 Thread Nino Saturnino Martinez Vazquez Wael

Ok.. Thanks, thought it was some setup thingy. And works fine now.

regards Nino

Ryan Gravener wrote:

You can set it as soon as the Wicket js object has been created.  You
need to be using wicket 1.3.x for this to work and yes, you will need
to have it set before the onchange.
  


On Thu, Apr 3, 2008 at 11:00 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
  

this did not do the trick in my onchange:

   target.appendJavascript("Wicket.Window.unloadConfirmation =
false;");
 should it be prepended or when should it be append before the onchange
event in my dropdown? As a kind of setup, I guess?



 Ryan Gravener wrote:



Yes,

append this javascript in your ajax call:
Wicket.Window.unloadConfirmation = false;

On Thu, Apr 3, 2008 at 10:33 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:


  

Hi

 I have a modalwindow which contains a dropdown. I've attached an
ajaxbehavior to the dropdown but when it fires I get a confirmation box


"are


you sure you want to navigate away from this page"...

 Is it supposed to work this way?

 --
 -Wicket for love

 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]









  

 --
 -Wicket for love

 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]







  


--
-Wicket for love

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]



  1   2   >