OK, but how to get to the markupstream? It is internal for MarkupContainer, and there is no way to get at the stream of another component while in  IBehaviour#onComponentTag(Component component, ComponentTag tag).

Should we open up the API to get at the markup attributes in a read-only manner?

Martijn



On 12/28/05, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
On 12/28/05, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> All,
>
>  Is it possible to retrieve the value of an attribute of a markup tag which
> is used in combination with a component?
>

CompentTag.getAttributes().get("myAttr")

and if tag is not given
        // Get the current markup element
        final MarkupElement element = markupStream.get();

        if (element instanceof ComponentTag)
        {
                // Get element as tag
                final ComponentTag tag = (ComponentTag)element;

Juergen

>  Say I want to get the contents of the 'id' attibute of a tag, but not
> overwrite it...
>
>  This is very useful when working with prototype.js or other _javascript_
> libraries that can automatically update markup based on the return answer,
> and when one doesn't want the 'id' attribute to be generated by wicket (CSS,
> etc).
>
>  Martijn
>
> --
> Living a wicket life...
>
> Martijn Dashorst - http://www.jroller.com/page/dashorst
>
> Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop



--
Living a wicket life...

Martijn Dashorst - http://www.jroller.com/page/dashorst

Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1

Reply via email to