Brian Doherty wrote:
Hi,
Yes, I understand what you are saying here. I do not understand the
following. If I use instance variables to pass the storeLocation into my
component it works fine. storeLocation is passed through to the
component and getLStore() contains the location I passed in
from the page. If however I use an abstract property to pass the
storeLocation into my component, storeLocation is not passed into the
component ie. getStoreLocation() is null
where do you set your storeLocation property ( or, why shouldn't it be
null ) ?
Cheers,
Ron
Thanks
Brian
Ron Piterman wrote:
>:)
>>
>Tapestry uses a pool to store page instances. While rendering it is
>safe to use instance variables but you have to make sure they are
>reset, preferrably in either pageDetached or pageAttached events.
>If you don't reset them, information can be shared between many users
>of your site, but not by all, since they might get another instance
>from the pool.
>>
>When using abstract properties, tapestry does the initialization work
>for you.
>>
>Hope that helps,
>Ron
>>
>>
>>
>Brian Doherty wrote:
>>
Sorry. What I mean by does not work is that getLStore() in
my component is null after the component renders.
When I use the updated code below the storeLocation is passed through
to the component and getLStore() contains the location I
passed in from the page.
It does not like it when I use abstract getters and setters but I
dont understand why.
Thanks
Brian
Ron Piterman wrote:
Brian Doherty wrote:
Hi,
I am having problems binding a property on my page to a parameter
in my component. The following does not work
can you be more specific. "Does not work" is somehow general
I have a CategoryListComponent as follows
<component id="categoryListComponent" type="CategoryListComponent">
<binding name="Store" value="storeLocation"/>
</component>
my CategoryList.java I have
public abstract void setStoreLocation(Location storeLocation);
public abstract Location getStoreLocation();
If however I change it as follows, it works fine. The storeLocation
is passed into the component.
<component id="categoryListComponent" type="CategoryListComponent">
<binding name="Store" value="Store"/>
</component>
my CategoryList.java this time I have
private Location Store;
public void setLStore(Location Store) {
Store = Store;
}
public Location getLStore() {
return Store;
}
I dont understand why the Location wont be passed through if it
declared as abstract. Any help would be great
Regards
Brian
To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
>>
>>
>
>To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
>For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
>>
To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org