Parameters are not JavaBeans properties; they are read/write and
"lazy" as you have now realized. They also do some caching.
Oh, and by the way, you can simplify your component a lot:
ticket?.ticketNumber
The ?. operator encapsulates the null check you were doing in Java code.
Check out the Tap
I figure out what was happening. I think tapestry is doing a lasy bind for
parameters and only getting them when thay bean access in the component. The
null pointer I've got was related to my internal domain object.
Sorry for the confusion.
Thanks,
Simon
On 3/2/09 9:45 PM, "Simon Raveh" wrot
Yes but this is in the component template and it is being called before
tapestry is binding the parameter to the component. If you look at stack
trace you will see that the call to getTicketNumber() on the component is
coming before tapestry is calling getTicket() on the page object to get the
par
I'm not sure what the confusion is:
${ticketNumber}
That's your call to getTicketNumber().
On Mon, Mar 2, 2009 at 6:04 PM, Alex Kotchnev wrote:
> Simon,
> I still can't figure out your dilemma, but I notice something
> interesting.. In the stacktrace that you provided, it looks like this time
Simon,
I still can't figure out your dilemma, but I notice something
interesting.. In the stacktrace that you provided, it looks like this time
getStatus() is being called before getTicket..
Maybe some of the folks that are more familiar w/ the guts of T5 can look
at this. It doesn't look li
Hi,
Thanks for your help.
I'm still trying to figure out why getTicketNumber() is being called before the
parameter was set. From debugging this it seems that it is being called when
the Index page is being render. Bellow you can find a thread dump:
[INFO] Started Jetty Server
2009-03-02 13:09:
Simon,
I'm not entirely sure why the getTicketNumber() gets called before the
ticket gets set, maybe you can put in a break point in the method and look
at the stack trace and see what's calling it. Just looking at it like this,
I have no explanation why it's being called.
On your question o
Hi,
I'm switching from Tapestry 4 to to Tapestry 5 and I need help with a simple
component.
I have a component ViewTicket that display Ticket information. The tml file
code:
http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
Ticket Information