You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Vishy <vi...@yahoo.com> on 2005/02/08 17:28:33 UTC
Binding Exception -- please help!
Hi All,
Could you please help me with the following BindingException problem?
When I initially bring up the page, everything works well...but, upon
submitting a form within this page, I get a BindingException (part of which
looks as follows)...I do make sure that the orderList is SET in the
pageBeginRender method of Home.java, infact I print it out to sysout, to make
sure...also, can anyone help me understand as to what are the sequence of
events that take place when one submits a form in Tapestry? would
highly appreciate that...
Thanks much,
Vishy
------------------------------------------------
Unable to resolve expression 'order.itemList' for
com.xyz.page.Home$Enhance_45@136b688[Home]
binding: ExpressionBinding[Home order.itemList]
ognl.OgnlException
source is null for getProperty(null, "itemList")
------------------------------------------------
Snippet of HTML (Home.html)
------------------------------------------------
<html>
....
<span jwcid="@Foreach" source="ognl:orderList" value="ognl:order">
.......
<span jwcid="@Foreach" source="ognl:order.itemList" value="ognl:item">
.......
</span>
</span>
....
</html>
As you can see, I have a list within a list...I get the BindingException,
when the second list is about to be rendered...
------------------------------------------------
Snippet from Home.page
------------------------------------------------
<page-specification class="com.xyz.page.Home">
<property-specification name="orderList" type="java.util.List" />
<property-specification name="order" type="com.xyz.Order" />
<property-specification name="itemList" type="java.util.List" />
<property-specification name="item" type="com.xyz.Item" />
.......
</page-specification>
-----------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Binding Exception -- please help!
Posted by Howard Lewis Ship <hl...@gmail.com>.
Actually, it looks like the loops are outside the form, and that's the problem.
During the form submission, it's as if only the <form> tag and its
contents exist.
So when you have data from outside the Form that's necessary to handle
the form submission, you need to do a little more work. Primarily,
using the Hidden and/or ListEdit components.
On Tue, 8 Feb 2005 12:05:31 -0500, Jamie Orchard-Hays <ja...@dang.com> wrote:
> When you submit the form, the page "rewinds". Usually you don't want to
> refetch data, so you put this at the start of pageBeginRender():
>
> if(event.getRequestCycle().isRewinding()) return;
>
> Without more code, it's hard to see what you're trying to accomplish with
> your list in a list inside a form.
>
> Jamie
>
> ----- Original Message -----
> From: "Vishy" <vi...@yahoo.com>
> To: <ta...@jakarta.apache.org>
> Sent: Tuesday, February 08, 2005 11:28 AM
> Subject: Binding Exception -- please help!
>
> >
> > Hi All,
> >
> > Could you please help me with the following BindingException problem?
> >
> > When I initially bring up the page, everything works well...but, upon
> > submitting a form within this page, I get a BindingException (part of
> > which
> > looks as follows)...I do make sure that the orderList is SET in the
> > pageBeginRender method of Home.java, infact I print it out to sysout, to
> > make
> > sure...also, can anyone help me understand as to what are the sequence of
> > events that take place when one submits a form in Tapestry? would
> > highly appreciate that...
> >
> > Thanks much,
> > Vishy
> >
> > ------------------------------------------------
> > Unable to resolve expression 'order.itemList' for
> > com.xyz.page.Home$Enhance_45@136b688[Home]
> > binding: ExpressionBinding[Home order.itemList]
> >
> > ognl.OgnlException
> > source is null for getProperty(null, "itemList")
> > ------------------------------------------------
> >
> > Snippet of HTML (Home.html)
> > ------------------------------------------------
> > <html>
> > ....
> > <span jwcid="@Foreach" source="ognl:orderList" value="ognl:order">
> > .......
> > <span jwcid="@Foreach" source="ognl:order.itemList" value="ognl:item">
> > .......
> > </span>
> > </span>
> > ....
> > </html>
> > As you can see, I have a list within a list...I get the BindingException,
> > when the second list is about to be rendered...
> > ------------------------------------------------
> >
> > Snippet from Home.page
> > ------------------------------------------------
> > <page-specification class="com.xyz.page.Home">
> > <property-specification name="orderList" type="java.util.List" />
> > <property-specification name="order" type="com.xyz.Order" />
> > <property-specification name="itemList" type="java.util.List" />
> > <property-specification name="item" type="com.xyz.Item" />
> >
> > .......
> > </page-specification>
> > -----------------------------------------------
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
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: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Binding Exception -- please help!
Posted by Jamie Orchard-Hays <ja...@dang.com>.
When you submit the form, the page "rewinds". Usually you don't want to
refetch data, so you put this at the start of pageBeginRender():
if(event.getRequestCycle().isRewinding()) return;
Without more code, it's hard to see what you're trying to accomplish with
your list in a list inside a form.
Jamie
----- Original Message -----
From: "Vishy" <vi...@yahoo.com>
To: <ta...@jakarta.apache.org>
Sent: Tuesday, February 08, 2005 11:28 AM
Subject: Binding Exception -- please help!
>
> Hi All,
>
> Could you please help me with the following BindingException problem?
>
> When I initially bring up the page, everything works well...but, upon
> submitting a form within this page, I get a BindingException (part of
> which
> looks as follows)...I do make sure that the orderList is SET in the
> pageBeginRender method of Home.java, infact I print it out to sysout, to
> make
> sure...also, can anyone help me understand as to what are the sequence of
> events that take place when one submits a form in Tapestry? would
> highly appreciate that...
>
> Thanks much,
> Vishy
>
> ------------------------------------------------
> Unable to resolve expression 'order.itemList' for
> com.xyz.page.Home$Enhance_45@136b688[Home]
> binding: ExpressionBinding[Home order.itemList]
>
> ognl.OgnlException
> source is null for getProperty(null, "itemList")
> ------------------------------------------------
>
> Snippet of HTML (Home.html)
> ------------------------------------------------
> <html>
> ....
> <span jwcid="@Foreach" source="ognl:orderList" value="ognl:order">
> .......
> <span jwcid="@Foreach" source="ognl:order.itemList" value="ognl:item">
> .......
> </span>
> </span>
> ....
> </html>
> As you can see, I have a list within a list...I get the BindingException,
> when the second list is about to be rendered...
> ------------------------------------------------
>
> Snippet from Home.page
> ------------------------------------------------
> <page-specification class="com.xyz.page.Home">
> <property-specification name="orderList" type="java.util.List" />
> <property-specification name="order" type="com.xyz.Order" />
> <property-specification name="itemList" type="java.util.List" />
> <property-specification name="item" type="com.xyz.Item" />
>
> .......
> </page-specification>
> -----------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org