properties are to maintain internal component state, while parameters are the tying the component to its container. properties are (in the simple case) a "shortcut" for implementing real Pojo properties for your page/component - but they offer some extras, like persistance -

parameters update automatically and you can not set them - if you do call "setXXX" on a parameter, it will either end up in an exception, or will update some object outside your component, but it will *not* "just" change the parameter.

say you have an InsertText component inside a loop -
you bind the value parameter to some property of the container, and the text that will be rendered on each iteration will be different - depending on the "value" parameter -

Hope that helps,
Ron





Alex Kartashev wrote:
Hi guys,

I am a new Tapestry 4 user. I've been researching Tapestry 4 for about a week now, even developed some toy apps. I am already sold on the value proposition.

One thing I am a bit confused about is Component parameters and properties.

1. Is there any difference between a component parameter and property? Or are these words used interchangeably?

2. Whereas lifecycle of page properties is very clear: pages are pooled and their properties are cleared out upon returning to the pool, components are not pooled independently but along with their pages. So, what about they properties/parameters? Will they be cleared out automatically as well?


Thank a lot in advance,

Alex

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to