We are building a large Tapestry application with hundreds of tapestry components. One size and performance concern we've encountered along the way is the fact that tapestry components are statically bound (i.e. all components on a page are always instantiated and bound, even though "@If" will omit the component from rendering).
(NOTE: if relevant, we are using Tapestry 4.02, so perhaps this behavior is different on the 4.1 line?) For example, <div jwcid="@widgets/ListingHeader" item="ognl:curItem"/> <div jwcid="@widgets/InquireHeader" item="ognl:curItem"/> In the above example, all three components ("ListingDetail", "InquireDetail", and "PurchaseDetail") get instantiated and parameters bound, despite only one being necessary. Considering each component may have a hierarchy of components itself, this could quickly pull in lots of extra stuff unnecessarily. First question, is this really a problem or completely necessary due to page pooling (i.e. perhaps tapestry must instantiate all components or else pages can't be pooled and used again with different conditions) ?? Second, is there a way (either in core Tapestry or through extensions) to instantiate and bind only the components that "@If" logic includes? If not, any thoughts on how to build such a dynamically bound component in tapestry? Third, we could reduce this problem and simplify the above example if we could write this one-liner instead of the string of "@If" statements: Clearly, Tapestry doesn't support ognl expressions in jwcid expressions, but why not? Again with the pooling, would making some components late bound like this render their pages un-poolable? Or could this pooling problem be worked around (i.e. lazy-load the component upon first access) ?? Thanks, Dean -- View this message in context: http://www.nabble.com/Tapestry-components-are-statically-bound-tp19621496p19621496.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]