Re: DataView and onComponentTag

2007-08-24 Thread Eelco Hillenius
On 8/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 dataview doesnt have its own markup, it delegates it to its direct children.
 so you want to put that oncomponenttag into the item the dataview creates.
 override dataview.newitem() and override oncomponenttag on the returned
 item.

It would probably be a good idea to make that method final in repeaters, right?

Eelco

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



Re: DataView and onComponentTag

2007-08-24 Thread Igor Vaynberg
or we can forward the call to the repeatermore intuitive for newbies
less intuitive for the rest :)

-igor


On 8/24/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

 On 8/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
  dataview doesnt have its own markup, it delegates it to its direct
 children.
  so you want to put that oncomponenttag into the item the dataview
 creates.
  override dataview.newitem() and override oncomponenttag on the returned
  item.

 It would probably be a good idea to make that method final in repeaters,
 right?

 Eelco

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




Re: DataView and onComponentTag

2007-08-24 Thread Eelco Hillenius
On 8/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 or we can forward the call to the repeatermore intuitive for newbies
 less intuitive for the rest :)

The items would forward the calls? Hmmm. Sounds a bit dangerous/ confusing.

Eelco

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



DataView and onComponentTag

2007-08-24 Thread Johannes Schneider

Hi,


I use a DataView to create a list (ulli). The DataView is used to 
render the li-tags. Now I try to add a custom id value to the li tag 
if some circumstances are fulfilled:


  @Override
  protected void onComponentTag( @NotNull ComponentTag tag ) {
super.onComponentTag( tag );
IteratorItem items = getItems();
while ( items.hasNext() ) {
  Item item = items.next();
  if ( //some magic here with item.getModelObject() ) {
tag.put( id, theIdValue );
  }
}
  }


But the method onComponentTag in DataView is never called... Any 
suggestions?



Thanks,

Johannes Schneider
--
Johannes Schneider
Im Lindenwasen 15
72810 Gomaringen

Fon +49 7072 9229972
Fax +49 7072 50
Mobil +49 178 1364488

[EMAIL PROTECTED]
http://www.johannes-schneider.info


smime.p7s
Description: S/MIME Cryptographic Signature


Re: DataView and onComponentTag

2007-08-24 Thread Johannes Schneider

Thanks,

I will try that. And please make those methods final...


Regardy,

Johannes Schneider

Igor Vaynberg wrote:

dataview doesnt have its own markup, it delegates it to its direct children.
so you want to put that oncomponenttag into the item the dataview creates.
override dataview.newitem() and override oncomponenttag on the returned
item.

-igor


On 8/24/07, Johannes Schneider [EMAIL PROTECTED] wrote:

Hi,


I use a DataView to create a list (ulli). The DataView is used to
render the li-tags. Now I try to add a custom id value to the li tag
if some circumstances are fulfilled:

   @Override
   protected void onComponentTag( @NotNull ComponentTag tag ) {
 super.onComponentTag( tag );
 IteratorItem items = getItems();
 while ( items.hasNext() ) {
   Item item = items.next();
   if ( //some magic here with item.getModelObject() ) {
 tag.put( id, theIdValue );
   }
 }
   }


But the method onComponentTag in DataView is never called... Any
suggestions?


Thanks,

Johannes Schneider
--
Johannes Schneider
Im Lindenwasen 15
72810 Gomaringen

Fon +49 7072 9229972
Fax +49 7072 50
Mobil +49 178 1364488

[EMAIL PROTECTED]
http://www.johannes-schneider.info






--
Johannes Schneider
Im Lindenwasen 15
72810 Gomaringen

Fon +49 7072 9229972
Fax +49 7072 50
Mobil +49 178 1364488

[EMAIL PROTECTED]
http://www.johannes-schneider.info


smime.p7s
Description: S/MIME Cryptographic Signature