tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship" <hls...@comcast.net>
Subject RE: Component properties
Date Sun, 11 Jan 2004 15:42:52 GMT
specification.getComponent("myComponent").getProperty("...")

The getComponent() returns an IContainedComponent instance; this is where bindings for a component
instance are stored, as well as properties. In other words, how the component is used ...
seperate
from the components own specification, which is how it is implemeneted.  In Java object terms,
IContainedComponent describes the instance, IComponentSpecifiction describes the class.

--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Tapestry: Java Web Components 
http://jakarta.apache.org/tapestry/
http://javatapestry.blogspot.com

> -----Original Message-----
> From: Harish Krishnaswamy [mailto:hkrishnaswamy@comcast.net] 
> Sent: Sunday, January 11, 2004 2:59 AM
> To: Tapestry development
> Subject: Component properties
> 
> 
> Hi,
> 
> I was trying to associate some values with the components I 
> declare in the page to be used later 
> during validation. I saw that *property* can be specified 
> even during the component declaration and 
> tried to use it, but to no avail.
> 
> <!ELEMENT component (_property_*, (...)*)>
> 
> 1. How would I retrieve the property specified in the declaration?
> <component...>
> 	...
> 	<property name="xyz" value="xyzVal" />
> 	...
> </component>
> 
> 2. Wouldn't it be nice to set some arbitrary properties in 
> the component that can be retrieved and 
> used by an external entity? For example, I can set the entity 
> property name in the TextField 
> component and such that I have a mapping of the component 
> with the actual entity property. Something 
> like...
> <component...>
> 	...
> 	<set-property name="..." expression="..." />
> 	...
> </component>
> 
> Like what we now have for beans. This can be worked around 
> when informal parameters are allowed but 
> wouldn't be elegant IMO.
> 
> Thanks,
> Harish
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message