On the other hand I have read that "initial-value" is only evaluated once while page loading and never again.
Do not worry about that. setProperty() is invoked at each request. The value is also usually evaluted at each request (e.g. 'new ArrayList()' will give you a new list each time).
The only optimization at the moment is that if the value is invariant, it will be evaluated only once in the beginning, as there is no point to evaluate 'null' each time. But the setters are still invoked each time.
Also, every request loads a different page object, so I do not think there should be multithreading issues of that type.
-mb
Zimmek, Jan wrote:
I have got a question about "<property-specification>" handling.
In my ".page"-specification I declared the following:
-------------------------
<page-specification class="foo.RegisterFormPage">
<property-specification name="customer" persistent="no" type="foo.CustomerDTO" initial-value="new foo.CustomerDTO()"/>
...
</page-specification>
-------------------------
The property accessor/mutator method in "foo.RegisterFormPage" are declared as abstract and no member-variables are defined.
-------------------------
abstract class RegisterFormPage extends BasePage
{
...
public abstract CustomerDTO getCustomer();
public abstract void setCustomer(CustomerDTO customer);
...
}
-------------------------
Currently I am never invoke "setCustomer(null)" anywhere in my source to explicitly reset the property and it seems to work fine.
On the other hand I have read that "initial-value" is only evaluated once while page loading and never again.
Could this lead to multi-threading issues when not invoking "setCustomer(null)" manually or is this automatically prevented by tapestry.
thanks
Jan Zimmek
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.4 - Release Date: 4/27/2005
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
