You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Rui Pacheco <ru...@gmail.com> on 2006/06/02 02:01:32 UTC

Unable to read OGNL expression ''

Hi all

I have a couple of webpages on my web application where this error occurrs
and I cant find out whats causing. Apparently these pages are no different
from the other pages that work correctly.

When I call my page, it complains of the getter method of one of my form
elements. I checked the class I use as a model and both the variable and the
getter and setter are there. I checked the HTML tag and it seems to be ok.
The bean that corresponds the template also has a getter and setter for that
field, both public and abstract.

This is the offending line. Could you give me a hand, please?

<td><textarea jwcid="word@TextArea" value="ognl:model.word"
validators="validators:required,maxLength=150" cols="50" rows="15"
class="itemsarea"></textarea></td>

-- 
Cumprimentos,
Rui Pacheco

Re: Unable to read OGNL expression ''

Posted by Howard Lewis Ship <hl...@gmail.com>.
It's always important to take a deep breath and carefully read to the
bottom of the exception stack. You'll see a NPE there, inside your
code.

On 6/2/06, Rui Pacheco <ru...@gmail.com> wrote:
> Hi again
>
> Yes, exactly what Jesse said. After hitting my head against the wall for two
> hours I realized I was not initializing my model inside that listener.
>
> On 6/2/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> >
> > Perhaps a message sort of like "source is null" for expression blah blah?
> >
> > On 6/1/06, Bryan Lewis <br...@maine.rr.com> wrote:
> > >
> > > Hard to say without seeing the java code and page spec.  It looks like
> > > the page class should have a property "model" that's returned by a
> > > getModel() method.  (That's the object you're calling the bean?)  I'm
> > > guessing you should have something like:
> > >
> > >     public abstract class MyPage ...  {
> > >         public abstract MyBean getModel();
> > >     }
> > >
> > > and
> > >
> > >     public class MyBean ... {
> > >         public String getWord() {     // this getter shouldn't be
> > abstract
> > >             return word;
> > >         }
> > >     }
> > >
> > > Is there more to the error message?
> > >
> > > You  could put some log messages in the various getter methods to see if
> > > they're being called, or whether there's some other problem after
> > > they're called like a NPE.
> > >
> > >
> > >
> > > Rui Pacheco wrote:
> > >
> > > > Hi all
> > > >
> > > > I have a couple of webpages on my web application where this error
> > > > occurrs
> > > > and I cant find out whats causing. Apparently these pages are no
> > > > different
> > > > from the other pages that work correctly.
> > > >
> > > > When I call my page, it complains of the getter method of one of my
> > form
> > > > elements. I checked the class I use as a model and both the variable
> > > > and the
> > > > getter and setter are there. I checked the HTML tag and it seems to be
> > > > ok.
> > > > The bean that corresponds the template also has a getter and setter
> > > > for that
> > > > field, both public and abstract.
> > > >
> > > > This is the offending line. Could you give me a hand, please?
> > > >
> > > > <td><textarea jwcid="word@TextArea" value="ognl:model.word"
> > > > validators="validators:required,maxLength=150" cols="50" rows="15"
> > > > class="itemsarea"></textarea></td>
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tacos/Tapestry, team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind.
> >
> >
>
>
> --
> Cumprimentos,
> Rui Pacheco
>
>


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

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Unable to read OGNL expression ''

Posted by Rui Pacheco <ru...@gmail.com>.
Hi again

Yes, exactly what Jesse said. After hitting my head against the wall for two
hours I realized I was not initializing my model inside that listener.

On 6/2/06, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> Perhaps a message sort of like "source is null" for expression blah blah?
>
> On 6/1/06, Bryan Lewis <br...@maine.rr.com> wrote:
> >
> > Hard to say without seeing the java code and page spec.  It looks like
> > the page class should have a property "model" that's returned by a
> > getModel() method.  (That's the object you're calling the bean?)  I'm
> > guessing you should have something like:
> >
> >     public abstract class MyPage ...  {
> >         public abstract MyBean getModel();
> >     }
> >
> > and
> >
> >     public class MyBean ... {
> >         public String getWord() {     // this getter shouldn't be
> abstract
> >             return word;
> >         }
> >     }
> >
> > Is there more to the error message?
> >
> > You  could put some log messages in the various getter methods to see if
> > they're being called, or whether there's some other problem after
> > they're called like a NPE.
> >
> >
> >
> > Rui Pacheco wrote:
> >
> > > Hi all
> > >
> > > I have a couple of webpages on my web application where this error
> > > occurrs
> > > and I cant find out whats causing. Apparently these pages are no
> > > different
> > > from the other pages that work correctly.
> > >
> > > When I call my page, it complains of the getter method of one of my
> form
> > > elements. I checked the class I use as a model and both the variable
> > > and the
> > > getter and setter are there. I checked the HTML tag and it seems to be
> > > ok.
> > > The bean that corresponds the template also has a getter and setter
> > > for that
> > > field, both public and abstract.
> > >
> > > This is the offending line. Could you give me a hand, please?
> > >
> > > <td><textarea jwcid="word@TextArea" value="ognl:model.word"
> > > validators="validators:required,maxLength=150" cols="50" rows="15"
> > > class="itemsarea"></textarea></td>
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>
>


-- 
Cumprimentos,
Rui Pacheco

Re: Unable to read OGNL expression ''

Posted by Jesse Kuhnert <jk...@gmail.com>.
Perhaps a message sort of like "source is null" for expression blah blah?

On 6/1/06, Bryan Lewis <br...@maine.rr.com> wrote:
>
> Hard to say without seeing the java code and page spec.  It looks like
> the page class should have a property "model" that's returned by a
> getModel() method.  (That's the object you're calling the bean?)  I'm
> guessing you should have something like:
>
>     public abstract class MyPage ...  {
>         public abstract MyBean getModel();
>     }
>
> and
>
>     public class MyBean ... {
>         public String getWord() {     // this getter shouldn't be abstract
>             return word;
>         }
>     }
>
> Is there more to the error message?
>
> You  could put some log messages in the various getter methods to see if
> they're being called, or whether there's some other problem after
> they're called like a NPE.
>
>
>
> Rui Pacheco wrote:
>
> > Hi all
> >
> > I have a couple of webpages on my web application where this error
> > occurrs
> > and I cant find out whats causing. Apparently these pages are no
> > different
> > from the other pages that work correctly.
> >
> > When I call my page, it complains of the getter method of one of my form
> > elements. I checked the class I use as a model and both the variable
> > and the
> > getter and setter are there. I checked the HTML tag and it seems to be
> > ok.
> > The bean that corresponds the template also has a getter and setter
> > for that
> > field, both public and abstract.
> >
> > This is the offending line. Could you give me a hand, please?
> >
> > <td><textarea jwcid="word@TextArea" value="ognl:model.word"
> > validators="validators:required,maxLength=150" cols="50" rows="15"
> > class="itemsarea"></textarea></td>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Re: Unable to read OGNL expression ''

Posted by Bryan Lewis <br...@maine.rr.com>.
Hard to say without seeing the java code and page spec.  It looks like
the page class should have a property "model" that's returned by a
getModel() method.  (That's the object you're calling the bean?)  I'm
guessing you should have something like:

    public abstract class MyPage ...  {
        public abstract MyBean getModel();
    }

and

    public class MyBean ... {
        public String getWord() {     // this getter shouldn't be abstract
            return word;
        }
    }

Is there more to the error message?

You  could put some log messages in the various getter methods to see if
they're being called, or whether there's some other problem after
they're called like a NPE.



Rui Pacheco wrote:

> Hi all
>
> I have a couple of webpages on my web application where this error
> occurrs
> and I cant find out whats causing. Apparently these pages are no
> different
> from the other pages that work correctly.
>
> When I call my page, it complains of the getter method of one of my form
> elements. I checked the class I use as a model and both the variable
> and the
> getter and setter are there. I checked the HTML tag and it seems to be
> ok.
> The bean that corresponds the template also has a getter and setter
> for that
> field, both public and abstract.
>
> This is the offending line. Could you give me a hand, please?
>
> <td><textarea jwcid="word@TextArea" value="ognl:model.word"
> validators="validators:required,maxLength=150" cols="50" rows="15"
> class="itemsarea"></textarea></td>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org