oncomponenttag is a method you override...tag is the argument that the
method gets passed into it

-igor


On Fri, Mar 28, 2008 at 2:04 PM, Andrew Broderick <[EMAIL PROTECTED]> wrote:
> Thanks, but what does 'tag' in oncomponenttag(tag) refer to? My markup looks 
> like this:
>
>                 <wicket:fragment wicket:id="dayEventsCell">
>                         <td>
>                                 <strong><span wicket:id="event1" /></strong>
>                         </td>
>                 </wicket:fragment>
>
>  And the fragment class looks like this:
>
>         public class DayEventsCell extends Fragment
>         {
>                 private Day day;
>                 public DayEventsCell(String id, String markupId,
>                                 MarkupContainer container, Day day)
>                 {
>                         super(id, markupId, container);
>                         this.day = day;
>                         add(new Label("event1", day.getEvent()));
>                 }
>         }
>
>  The <td> is where I want to set the title. Where would I put your line of 
> code? Before the add(new(Label() .... ?
>
>  Thanks
>
>
>
>  -----Original Message-----
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  Sent: Friday, March 28, 2008 3:42 PM
>  To: [email protected]
>  Subject: Re: newbie title attribute question
>
>  <td wicket:id="td">
>
>  add(new webmarkupcontainer("td") { oncomponenttag(tag) {
>  tag.getattributes().put("title","foo"); }}
>
>  -igor
>
>
>  On Fri, Mar 28, 2008 at 1:14 PM, Andrew Broderick <[EMAIL PROTECTED]> wrote:
>  > Hi,
>  >
>  >  I want to put a title attribute in a td tag. However, my markup would 
> then look like this:
>  >
>  >  <td title="<span wicket:id="title" />" > blah blah  </td>
>  >
>  >  Now, I know I could output the <td> with a label and set escaping to 
> false, thus passing the markup through to the browser. However, that would 
> mean that everything inside it would also have to be in the label, and I want 
> to keep markup out of my code. There must be a more elegant, Wicket-ish way 
> to do this ....
>  >
>  >  Thanks in advance
>  >
>  >  Andrew
>  >
>  >  _______________________________________________________
>  >
>  >  The  information in this email or in any file attached
>  >  hereto is intended only for the personal and confiden-
>  >  tial  use  of  the individual or entity to which it is
>  >  addressed and may contain information that is  propri-
>  >  etary  and  confidential.  If you are not the intended
>  >  recipient of this message you are hereby notified that
>  >  any  review, dissemination, distribution or copying of
>  >  this message is strictly prohibited.  This  communica-
>  >  tion  is  for information purposes only and should not
>  >  be regarded as an offer to sell or as  a  solicitation
>  >  of an offer to buy any financial product. Email trans-
>  >  mission cannot be guaranteed to be  secure  or  error-
>  >  free. P6070214
>  >
>
>  ---------------------------------------------------------------------
>  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]

Reply via email to