I see two problems: 1) setId(T) should be type void, not String.
2) Tapestry is not currently aware of generics, so everywhere you see type T in your class, Tapestry sees java.lang.Object. There's an issue about handling this better, but its very tricky. On Jan 15, 2008 2:27 AM, Davor Hrg <[EMAIL PROTECTED]> wrote: > it happens after submit bacuse > when renderring filed needs getter to render value, > > after submit the binding expression "team.id" is evaluated > to populate value received through form submit > it is then that setter is needed, hence error only then > > you probabla should add > public void setId(T id); > > to ISimpleDesc interface to have setter available. > > or persist the id separately and not try to modify the id. > > Davor Hrg > > > On Jan 15, 2008 8:59 AM, Foror <[EMAIL PROTECTED]> wrote: > > In the project there is a following: > > > > public interface ISimpDesc<T> { > > public <T> getId(); > > } > > > > public class Team implements ISimpDesc<String> { > > > > // hibernate annotations > > @DocumentId > > @Id > > @MinLength(min=2) > > @MaxLength(max=50) > > @Pattern(regex="[\\w-]+") > > private String id; > > > > public String getId() { > > return id; > > } > > public String setId(String id) { > > if (id == null) { > > return; > > } > > > > this.id = id; > > } > > } > > > > In tml: > > > > <t:label for="id"/>: <span > > class="comment">(${message:default.lat-comment})</span> > > <t:textfield t:id="id" value="team.id" translate="translate:string" > > disabled="disabledId" label="message:content.id"/> > > > > In Windows XP on Tomcat 5.5 and Jety 6 and JDK 1.5.0_08 there were problems > > with > > transformation of type of the "id" to String (from Object to String), > > I have added this "translate="translate:string"" for fix problem. > > > > In Debian 4.0 on Tomcat 5.5 and JDK 1.5.0_10 there were problems > > "Expression team.id for class ru.getdone.view.pages.team.form.FormFor > > is read-only." after submit form. > > > > org.apache.tapestry.internal.bindings.PropBinding.set(PropBinding.java:67) > > org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.writeParameter(InternalComponentResourcesImpl.java:229) > > org.apache.tapestry.corelib.base.AbstractTextField._$update_parameter_value(AbstractTextField.java) > > org.apache.tapestry.corelib.base.AbstractTextField.processSubmission(AbstractTextField.java:184) > > org.apache.tapestry.corelib.base.AbstractField.processSubmission(AbstractField.java:186) > > org.apache.tapestry.corelib.base.AbstractField.access$100(AbstractField.java:33) > > org.apache.tapestry.corelib.base.AbstractField$ProcessSubmissionAction.execute(AbstractField.java:98) > > org.apache.tapestry.corelib.base.AbstractField$ProcessSubmissionAction.execute(AbstractField.java:92) > > org.apache.tapestry.corelib.components.Form.onAction(Form.java:330) > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]