@Bean
public abstract Invoice getSearchInvoice();

-----Original Message-----
From: James Carman [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 17, 2006 10:50 AM
To: 'Tapestry users'
Subject: RE: initializing object in page

Try declaring the searchInvoice property as a "bean"

-----Original Message-----
From: Kristian Marinkovic [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 17, 2006 10:46 AM
To: Tapestry users
Subject: initializing object in page

hi,

can someone help me with my newbie problem:

i have two pages: a master and a detail page. The master  page
offers you some possibilities to enter different criterias for a search.
As i want to use Hibernates query-by-example i write something
like that:
...
    <component id="search_id" type="TextField">
        <binding name="value" value="searchInvoice.id" />
    </component>

    <component id="customer_lastname" type="TextField">
        <binding name="value" value="searchInvoice.customer.lastname" />
    </component>
...
the java class provides following method:
...
public abstract Invoice getSearchInvoice();
public abstract void setSearchInvoice(Invoice invoice);
....

Because the Customer within the Invoice is null i get a ognl exception:
Unable to read OGNL expression '<parsed OGNL expression>' of
[EMAIL PROTECTED]: source is null for getProperty(null,
"lastname")

My question is as follows:

- How do I initialize my Invoice object properly ? (initialize method is
deprecated)
- Should I use Hivemind to initialize my obejcts to have it injected like:
@InjectState("searchInvoice")  and how can i do this?
- Should I use a @Bean instead and how can i initialize that?

greetings,
kris


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



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



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

Reply via email to