Hello List,

 

Not easy to summarize this issue in the title … anyway.

 

I am facing an irritating behavior with a pojo that I want to modify in a
form.

This pojo implements a generic interface that forces the implementation of a
getter and a setter.

If I try to link the value of a TextField to the property handled by this
getter I get a happy
“org.apache.tapestry5.ioc.internal.util.TapestryException”

Like : 

org.apache.tapestry5.ioc.internal.util.TapestryException: Parameter
'translate' of component admin/Tasks:taskedit.taskeditform.foreignid is
bound to null. This parameter is not allowed to be null. [at
classpath:com/marketip/geoplanning/web/components/admin/TaskEditForm.tml,
line 138]

 

Here’s a sample :

 

Interface :

public interface Identifiable<T> {

                public T getId();

                public void setId(T id);

}

 

Pojo :

public class MyPojo implements Identifiable <String> {

                public String id;

                public String name;

                public String getId() {

                               return this.id;

                }

                public void setId(String id) {

                               this.id = id;

                }

                public Strign getName() {

                               return this.name;

                }

                public void setName(Strign name) {

                               this.name = name;

                }

}

 

TML  :

<t:form t:id="myForm">

                <t:textfield t:id="pojoId" t:value="myPojoInstance.id" />

                <t:textfield t:id="pojoName" t:value="myPojoInstance.name"
/>

</t:form>

 

=> this will show the above exception at render time, and simply removing
the “implements Identifiable<String>” of the MyPojo class will make
everything running just fine.

 

Above all, I don’t have the problem when running the application on Jetty
(Eclipse plugin) but I do have the problem when deploying the application on
a Tomcat 6.

 

Does anyone have an idea ?

 

Thanks,

 


Nicolas Gillet

 <mailto:philippe.su...@market-ip.com> nicolas.gil...@market-ip.com

Tel. +32.81.33.11.11

Fax.+32.81.33.11.10

 

cid:image001.jpg@01CAF041.1E9CE660

Chaussée de Marche, 774

B-5100 Naninne

Belgique

 

 

 

 

 

 

 

 

Reply via email to