My bad.  I forgot to show you the hivemodule.xml

<?xml version="1.0"?>
<module id="org.tmit1.survey" version="1.0.0">
        <contribution configuration-id="tapestry.state.ApplicationObjects">
                <state-object name="helloMessage" scope="session">
                        <create-instance class="String" />
                </state-object>
        </contribution>
</module>

Rob

-----Original Message-----
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 13, 2005 11:17 AM
To: Tapestry users
Subject: Re: @InjectState vs. <inject>

@InjectState is for injecting application state objects.  I think you
want @Persist.  I also think that the full error message shown on the
exception page would explain this.

On 9/13/05, Rob Dennett <[EMAIL PROTECTED]> wrote:
> My property is called helloMessage.
> 
> Here is some code:
> 
> From Home.page
> 
> <page-specification>
>         <component id="insert" type="Insert">
>                 <binding name="value" value="helloMessage" />
>         </component>
> </page-specification>
> 
> From Home.java
> 
> public abstract class Home extends BasePage
> {
>         @InjectState("helloMessage")
>         public abstract String getHelloMessage();
>         public abstract void setHelloMessage(String helloMessage);
>         ...
> }
> 
> The error is "Unable to read OGNL expression..." and the <binding> tag in the 
> page spec is highlighted.
> 
> Thanks,
> Rob
> 
> -----Original Message-----
> From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 13, 2005 10:15 AM
> To: Tapestry users
> Subject: Re: @InjectState vs. <inject>
> 
> Use @InjectState when you can (when you have JDK 1.5).
> 
> I suspect your problem is due to an unusual property name; an eariler
> poster had a problem with a method named getJFreeChart(); the name of
> the corresponding property is "JFreeChart" not "jFreeChart" ... this
> is due to JavaBeans framework naming conventions, as specified by Sun.
> Is your property name causing similar problems?
> 
> On 9/13/05, Rob Dennett <[EMAIL PROTECTED]> wrote:
> > When should you use the @InjectState annotation vs. the <inject> tag?  Is 
> > it just a matter of whether you are using Java 1.5 or not?  I have an 
> > Insert component that is being bound to a property that is not declared in 
> > the page spec.  Instead, I have abstract accessors in the Java class with 
> > the getter preceded by @InjectState.  Tapestry pukes when it reaches the 
> > parameter binding for the component, saying that it doesn't know what 
> > property I am talking about.  Adding a property definition to the spec 
> > complains that the property name is being used twice.  What do you need to 
> > do to access an injected property in a specification?
> >
> >
> >
> > Thanks in advance,
> >
> > Rob
> >
> >
> > --
> > No virus found in this outgoing message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.344 / Virus Database: 267.10.21/96 - Release Date: 9/10/2005
> >
> >
> >
> 
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> 
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.10.21/96 - Release Date: 9/10/2005
> 
> 
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.10.21/96 - Release Date: 9/10/2005
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.21/96 - Release Date: 9/10/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.21/96 - Release Date: 9/10/2005
 

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

Reply via email to