You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by matt wear <ma...@smartblast.com> on 2006/03/02 21:30:41 UTC
newbie binding problem
Hi all. I'm new to tapestry and have been having problems creating a
simple listing page. The page lists our companies clients and I keep
getting a Binding Exception. If someone could please look at the code
snippets below and point me in the right direction on this I would very
much appreciate it. Thanks.
- Matt
This is the error I get:
org.apache.tapestry.BindingException
Unable to update OGNL expression '<parsed OGNL expression>' of
$ClientList_3@15fea73[ClientList] to
net.smartblast.model.Client@1a9d205: $ClientList_3.client
This is a snippet from my ClientList.html: (line 8 is the one causing
problems).
8 <tr jwcid="@For" source="ognl:clients" value="ognl:client" element="tr">
9 <td><span jwcid="@Insert" value="ognl:client.companyName">company
name</span></td>
This is a snippet from ClientList.java
public abstract class ClientList extends BasePage
{
@InjectObject("spring:clientService")
public abstract ClientService getClientService();
public List getClients()
{
return getClientService().getClients();
}
}
And finally a snippet from Client.java
public class Client implements java.io.Serializable
{
private Integer id;
private String companyName;
public String getCompanyName() {
return this.companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: newbie binding problem
Posted by matt wear <ma...@smartblast.com>.
Thanks for the reply. I tried element="literal:tr" and I still get the
same error.
Daniel Lydiard wrote:
> Try element="literal:tr"
>
> ----- Original Message ----- From: "matt wear" <ma...@smartblast.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Thursday, March 02, 2006 12:30 PM
> Subject: newbie binding problem
>
>
>> Hi all. I'm new to tapestry and have been having problems creating a
>> simple listing page. The page lists our companies clients and I keep
>> getting a Binding Exception. If someone could please look at the
>> code snippets below and point me in the right direction on this I
>> would very much appreciate it. Thanks.
>>
>> - Matt
>>
>> This is the error I get:
>> org.apache.tapestry.BindingException
>> Unable to update OGNL expression '<parsed OGNL expression>' of
>> $ClientList_3@15fea73[ClientList] to
>> net.smartblast.model.Client@1a9d205: $ClientList_3.client
>>
>>
>> This is a snippet from my ClientList.html: (line 8 is the one causing
>> problems).
>>
>> 8 <tr jwcid="@For" source="ognl:clients" value="ognl:client"
>> element="tr">
>> 9 <td><span jwcid="@Insert" value="ognl:client.companyName">company
>> name</span></td>
>>
>>
>> This is a snippet from ClientList.java
>>
>> public abstract class ClientList extends BasePage
>> {
>> @InjectObject("spring:clientService")
>> public abstract ClientService getClientService();
>> public List getClients()
>> { return getClientService().getClients();
>> } }
>>
>> And finally a snippet from Client.java
>>
>> public class Client implements java.io.Serializable
>> {
>> private Integer id;
>> private String companyName;
>> public String getCompanyName() {
>> return this.companyName;
>> }
>> public void setCompanyName(String companyName) {
>> this.companyName = companyName;
>> }
>> }
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: newbie binding problem
Posted by Daniel Lydiard <dl...@hotmail.com>.
Try element="literal:tr"
----- Original Message -----
From: "matt wear" <ma...@smartblast.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, March 02, 2006 12:30 PM
Subject: newbie binding problem
> Hi all. I'm new to tapestry and have been having problems creating a
> simple listing page. The page lists our companies clients and I keep
> getting a Binding Exception. If someone could please look at the code
> snippets below and point me in the right direction on this I would very
> much appreciate it. Thanks.
>
> - Matt
>
> This is the error I get:
> org.apache.tapestry.BindingException
> Unable to update OGNL expression '<parsed OGNL expression>' of
> $ClientList_3@15fea73[ClientList] to net.smartblast.model.Client@1a9d205:
> $ClientList_3.client
>
>
> This is a snippet from my ClientList.html: (line 8 is the one causing
> problems).
>
> 8 <tr jwcid="@For" source="ognl:clients" value="ognl:client" element="tr">
> 9 <td><span jwcid="@Insert" value="ognl:client.companyName">company
> name</span></td>
>
>
> This is a snippet from ClientList.java
>
> public abstract class ClientList extends BasePage
> {
> @InjectObject("spring:clientService")
> public abstract ClientService getClientService();
> public List getClients()
> { return getClientService().getClients();
> } }
>
> And finally a snippet from Client.java
>
> public class Client implements java.io.Serializable
> {
> private Integer id;
> private String companyName;
> public String getCompanyName() {
> return this.companyName;
> }
> public void setCompanyName(String companyName) {
> this.companyName = companyName;
> }
> }
>
> ---------------------------------------------------------------------
> 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
Re: newbie binding problem - RESOLVED
Posted by matt wear <ma...@smartblast.com>.
Thanks a lot Alan; that did the trick. I was stuck for hours on this.
Alan Chandler wrote:
> On Thursday 02 March 2006 20:30, matt wear wrote:
>
>> Hi all. I'm new to tapestry and have been having problems creating a
>> simple listing page. The page lists our companies clients and I keep
>> getting a Binding Exception. If someone could please look at the code
>> snippets below and point me in the right direction on this I would very
>> much appreciate it. Thanks.
>>
>> - Matt
>>
>> This is the error I get:
>> org.apache.tapestry.BindingException
>> Unable to update OGNL expression '<parsed OGNL expression>' of
>> $ClientList_3@15fea73[ClientList] to
>> net.smartblast.model.Client@1a9d205: $ClientList_3.client
>>
>
> I think this means that your @For loop can't bind its value parameter to
> "ognl:client"
>
> What you need is ...
>
>
>> This is a snippet from my ClientList.html: (line 8 is the one causing
>> problems).
>>
>> 8 <tr jwcid="@For" source="ognl:clients" value="ognl:client" element="tr">
>> 9 <td><span jwcid="@Insert" value="ognl:client.companyName">company
>> name</span></td>
>>
>>
>> This is a snippet from ClientList.java
>>
>> public abstract class ClientList extends BasePage
>> {
>> @InjectObject("spring:clientService")
>> public abstract ClientService getClientService();
>>
>
>
> public abstract Client getClient(); // provide a property for the for loop
> to write its variable to
>
>
>> public List getClients()
>> {
>> return getClientService().getClients();
>> }
>> }
>>
>> And finally a snippet from Client.java
>>
>> public class Client implements java.io.Serializable
>> {
>> private Integer id;
>> private String companyName;
>>
>> public String getCompanyName() {
>> return this.companyName;
>> }
>>
>> public void setCompanyName(String companyName) {
>> this.companyName = companyName;
>> }
>> }
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>
>
Re: newbie binding problem
Posted by Alan Chandler <al...@chandlerfamily.org.uk>.
On Thursday 02 March 2006 20:30, matt wear wrote:
> Hi all. I'm new to tapestry and have been having problems creating a
> simple listing page. The page lists our companies clients and I keep
> getting a Binding Exception. If someone could please look at the code
> snippets below and point me in the right direction on this I would very
> much appreciate it. Thanks.
>
> - Matt
>
> This is the error I get:
> org.apache.tapestry.BindingException
> Unable to update OGNL expression '<parsed OGNL expression>' of
> $ClientList_3@15fea73[ClientList] to
> net.smartblast.model.Client@1a9d205: $ClientList_3.client
I think this means that your @For loop can't bind its value parameter to
"ognl:client"
What you need is ...
>
>
> This is a snippet from my ClientList.html: (line 8 is the one causing
> problems).
>
> 8 <tr jwcid="@For" source="ognl:clients" value="ognl:client" element="tr">
> 9 <td><span jwcid="@Insert" value="ognl:client.companyName">company
> name</span></td>
>
>
> This is a snippet from ClientList.java
>
> public abstract class ClientList extends BasePage
> {
> @InjectObject("spring:clientService")
> public abstract ClientService getClientService();
public abstract Client getClient(); // provide a property for the for loop
to write its variable to
>
> public List getClients()
> {
> return getClientService().getClients();
> }
> }
>
> And finally a snippet from Client.java
>
> public class Client implements java.io.Serializable
> {
> private Integer id;
> private String companyName;
>
> public String getCompanyName() {
> return this.companyName;
> }
>
> public void setCompanyName(String companyName) {
> this.companyName = companyName;
> }
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
--
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org