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 (<ul><li>). 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 );
>      Iterator<Item> 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 509999
> Mobil +49 178 1364488
>
> [EMAIL PROTECTED]
> http://www.johannes-schneider.info
>
>

Reply via email to