You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Ido M. Tamir" <ta...@imp.univie.ac.at> on 2005/06/29 13:40:26 UTC
[4.0] @Persist initial-value workaround
Hi,
@Persist
"This annotation works exactly like a <property> element, except that the
initial-value attribute can't be specified."
is this left out on purpose?
How can I currently create a property or parameter and connect it to a
component as in:
// @Persist or
@Parameter( defaultValue="new Distance()" )
public abstract Distance getDistance();
@Component( type = "TextField", bindings = {
"value=Distance.distance",
"displayName=selectSpan",
"translator=number,pattern=#",
"validators=required,min=1,max=20000"
})
public abstract TextField getSpan();
with Distance something like:
public class Distance {
public Long getDistance();
public void setDistance(Long dist);
}
Defining a parameter with defaultValue makes it
available, but it doesn't get changed upon
editing.
And as a property without initial-value it is of
course null.
Thank you very much for your
answer
Ido
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org