<DIV>That worked! Thanks.&nbsp;So, you have to access
persistent properties through their getters and
setters instead of accessing the page class variable?
Is that because of Tapestry making its own subclass,
that presumably has its own instance variable for the
property?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Andrew</DIV>
<DIV><BR><BR><B><I>Dirk Markert
&lt;[EMAIL PROTECTED]&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px;
MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hi
Andrew,<BR><BR>have you tried calling setInvoice() in
pageBeginRender?<BR><BR>2005/11/7, Andrew B
<[EMAIL PROTECTED]>:<BR>&gt; I am trying to
get a simple persistent property to<BR>&gt; work in a
page in Tapestry 4, with no luck at all. The<BR>&gt;
error message is:<BR>&gt;<BR>&gt; Unable to read OGNL
expression '<PARSED OGNL<br>&gt; expression&gt;' of
[EMAIL PROTECTED]: source is null<BR>&gt; for
getProperty(null, "amount")<BR>&gt;<BR>&gt; pointing
to a component binding:<BR>&gt;<BR>&gt; <BINDING
value="ognl:invoice.amount" name="value"
/><BR>&gt;<BR>&gt; So, invoice is coming back null for
some reason<BR>&gt; (amount is just a double in
invoice, with a simple<BR>&gt; getter, so it can't be
that). Property declaration:<BR>&gt;<BR>&gt; <property
name="invoice"
persist="session"></property><BR>&gt;<BR>&gt; In
Home.java, it is initialized in
pageBeginRender:<BR>&gt;<BR>&gt; public void
pageBeginRender(PageEvent pageEvent)<BR>&gt; {<BR>&gt;
invoice = new Invoice();<BR>&gt;
invoice.setLineItems(new HashSet());<BR>&gt;
System.out.println("pageBeginRender called,
invoice<BR>&gt; = " + invoice);<BR>&gt;
}<BR>&gt;<BR>&gt; This is definitely getting called,
as I see the<BR>&gt; debugging output. Invoice is
initialized. But, I also<BR>&gt; put a debugging line
in the getter for invoice:<BR>&gt;<BR>&gt; public
Invoice getInvoice()<BR>&gt; {<BR>&gt;
System.out.println("getInvoice() = " +
invoice);<BR>&gt; return invoice;<BR>&gt;
}<BR>&gt;<BR>&gt; and it never seems to be getting
called.<BR>&gt;<BR>&gt; If I take the property
declaration for invoice out<BR>&gt; entirely, the page
works, but then of course when I go<BR>&gt; to submit
it, the original invoice has been lost when<BR>&gt; I
go to submit the page, because it isn't
persistent.<BR>&gt; Tapestry is making me tear my hair
out. Any help is<BR>&gt; appreciated, thanks in
advance.<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;
__________________________________<BR>&gt; Yahoo!
FareChase: Search multiple travel sites in one
click.<BR>&gt;
http://farechase.yahoo.com<BR>&gt;<BR>&gt;
---------------------------------------------------------------------<BR>&gt;
To unsubscribe, e-mail:
[EMAIL PROTECTED]<BR>&gt;
For additional commands, e-mail:
[EMAIL PROTECTED]<BR>&gt;<BR>&gt;<BR><BR>-POST 
http://us.f348.mail.yahoo.com/ym/Compose?YY=85496


                
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

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

Reply via email to