Adding new Link() to an img tag = weird default behavior

2008-03-27 Thread Dan Kaplan
Hello,

 

Yesterday I tried adding a new Link() to an img tag.  I noticed that when
you hover over the image the cursor doesn't change and the status bar
doesn't say anything.  I bet 9 times out of 10 you wouldn't want this
behavior.  I already fixed the cursor problem with CSS, how do I make the
status bar display the right thing on hover?  

 

BTW, should I file this under a request for improvement?

 

Thanks,

Dan



Re: Adding new Link() to an img tag = weird default behavior

2008-03-27 Thread Gerolf Seitz
that's because Link only adds the onclick event handler for non anchor tags
and browser only do the cursor and status bar thing for anchor tags by
default.

you already fixed the cursor issue and you can write text to the status bar
via
window.status = foo, although this doesn't work in IE7 and only somehow in
opera and konqueror.

i suggest you wrap the image with an anchor tag and attach the Link
component
to that.

  Gerolf


On Thu, Mar 27, 2008 at 7:15 PM, Dan Kaplan [EMAIL PROTECTED] wrote:

 Hello,



 Yesterday I tried adding a new Link() to an img tag.  I noticed that
 when
 you hover over the image the cursor doesn't change and the status bar
 doesn't say anything.  I bet 9 times out of 10 you wouldn't want this
 behavior.  I already fixed the cursor problem with CSS, how do I make the
 status bar display the right thing on hover?



 BTW, should I file this under a request for improvement?



 Thanks,

 Dan




RE: Adding new Link() to an img tag = weird default behavior

2008-03-27 Thread Dan Kaplan
Ah, ok, thanks for that explanation.

BTW, only recently have I started seriously using wicket (as in, every day
for 4+ hours).  Something that comes up time and time again is the need for
a LinkLabelPanel.  I find it very time consuming to add() to this in the
code:

a wicket:id=linkspan wicket:id=labellabel/span/a

If I submitted a patch for a LinkLabelPanel would you guys consider checking
it into core?  Here's how I foresee the constructor:

new LinkLabelPanel(String id, IModel hrefModel, IModel textModel);

And then the html would just look like this:

a wicket:id=linkLabelPanelThis will be replaced/a



-Original Message-
From: Gerolf Seitz [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 27, 2008 11:32 AM
To: users@wicket.apache.org
Subject: Re: Adding new Link() to an img tag = weird default behavior

that's because Link only adds the onclick event handler for non anchor tags
and browser only do the cursor and status bar thing for anchor tags by
default.

you already fixed the cursor issue and you can write text to the status bar
via
window.status = foo, although this doesn't work in IE7 and only somehow in
opera and konqueror.

i suggest you wrap the image with an anchor tag and attach the Link
component
to that.

  Gerolf


On Thu, Mar 27, 2008 at 7:15 PM, Dan Kaplan [EMAIL PROTECTED] wrote:

 Hello,



 Yesterday I tried adding a new Link() to an img tag.  I noticed that
 when
 you hover over the image the cursor doesn't change and the status bar
 doesn't say anything.  I bet 9 times out of 10 you wouldn't want this
 behavior.  I already fixed the cursor problem with CSS, how do I make the
 status bar display the right thing on hover?



 BTW, should I file this under a request for improvement?



 Thanks,

 Dan




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