Reading component metadata

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Reading component metadata

mg-13
Metadata can be defined for component using <property> element. Example:

<component...>
        <property name="some-data" value="some-data-value"/>
</component>

Is it possible to read this property later? I can't find corresponding  
method. I've tried digging into SpecificationParser but without results.

--
cheers, mg

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Reading component metadata

Howard Lewis Ship
IContainedComponent extends from IPropertyHolder

getSpecification().getComponent("foo").getProperty("bar")

On 5/27/05, mg <[hidden email]> wrote:

> Metadata can be defined for component using <property> element. Example:
>
> <component...>
>         <property name="some-data" value="some-data-value"/>
> </component>
>
> Is it possible to read this property later? I can't find corresponding
> method. I've tried digging into SpecificationParser but without results.
>
> --
> cheers, mg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Reading component metadata

mg-13
Dnia Fri, 27 May 2005 23:50:23 +0200, Howard Lewis Ship <[hidden email]>  
wrote:

> IContainedComponent extends from IPropertyHolder
>
> getSpecification().getComponent("foo").getProperty("bar")
>

Tricky ;). I need this in writeSuffix() method of my custom  
ValidationDelegate, so it looks like:

component.getPage().getSpecification().getComponent(component.getId()).getProperty("some-data")

But it works ;). Thx

--
cheers, mg

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]