Hi,
This works, question now is, where to put this class? I put it under
components, it works until I inject the hibernate service:
@Inject
private Session _session;
public CountrySelectModel() {
}
_session is always null, any idea? thanks.
nirvdrum wrote:
>
> You can just cre
pageLoaded() is only loaded when the page is request FIRST time, after
compile put the class into page pool, next request, pageLoaded() method is
reloaded from page pool directly.I thank pageLoaded() not execute after
FIRST time.
this is my opinon.
2007/12/3, Angelo Chen <[EMAIL PROTECTED]>:
Hi Filip,
I'm just a little confused with persist and default value, I think what we
instantiated/assigned in the padedLoaded are considered default value and it
will be used by T5 to reset private variables in the page, am I right?
This does bring up another topic, what is the best practice to
Hi Filip,
I'm just a little confused with persist and default value, I think what we
instantiated/assigned in the padedLoaded are considered default value and it
will be used by T5 to reset private variables in the page, am I right?
This does bring up another topic, what is the best practice to
Hi Angelo,
pageLoaded is only executed when the page is first instantiated and
configured.
I think you might want to use pageAttached instead, which is executed
every time the page is attached to a new request.
http://tapestry.apache.org/tapestry5/tapestry-core/guide/lifecycle.html
-Filip
Hi,
Sorry for not making it clear, here is a simple sample, my question is, why
the countryList instantiated in the pageLoaded persist without a need to use
@Persist? maybe what assigned in the pageLoaded are considered as default
value like constructor? Thanks,
A.C.
public class Search {
priv
That's a different problem altogether. You're not conditionally calling the
method, so it would have nothing to do with a cached value. It has to do
with the page lifecycle events. It would appear as though you do not want
to be using pageLoaded().
See http://tapestry.apache.org/tapestry5/tapes
please post some more code,
I'm also unable to comprehend what the problem is ?
Davor Hrg
On Dec 2, 2007 5:08 PM, Angelo Chen <[EMAIL PROTECTED]> wrote:
>
> no, the getCountryList is a service that I put a log, the log displays
> that
> the method was called only once.
>
>
> nirvdrum wrote:
> >
no, the getCountryList is a service that I put a log, the log displays that
the method was called only once.
nirvdrum wrote:
>
> Are you sure it's persisted and not just repopulated by the time you check
> it?
>
>
> On 12/2/07 8:34 AM, in article [EMAIL PROTECTED], "Angelo
> Chen"
> <[EMAIL P
Are you sure it's persisted and not just repopulated by the time you check
it?
On 12/2/07 8:34 AM, in article [EMAIL PROTECTED], "Angelo Chen"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> One thing confuses me, here is a sample code:
>
> private Map countryList;
>
> @Inject private DBServices db
You can just create an instance of SelectModelImpl. To simplify things a
bit, I've just implemented the interface and delegated to a SelectModelImpl
instance.
public class ProductTypeSelectModel implements SelectModel
{
private final SelectModel model;
public ProductTypeSelectModel(final
Hi,
One thing confuses me, here is a sample code:
private Map countryList;
@Inject private DBServices dbServices;
void pageLoaded() {
countryList = dbServices.getCountryList();
without any Persist annotation, the countryList is persisted between
requests. if I move the above line
12 matches
Mail list logo