Not a bug. Defaults are allowed to supply either a literal default or a binding. The binding's "get" will evaluate to an object of the proper type. In fact, if memory serves, when you supply a literal value, tapestry wraps that in a "literal binding" anyway, because under the hood, all of those parameters are acting through bindings.
Robert GATAATGCTATTTCTTTAATTTTCGAA > On May 16, 2014, at 9:20 AM, Michael Wyraz <michael.wy...@evermind.de> wrote: > > Hi, > > I found something I do not understand and which is probably a bug. From > org.apache.tapestry5.corelib.base.AbstractTextField: > > @Parameter(required = true, allowNull = false, defaultPrefix = > BindingConstants.TRANSLATE) > private FieldTranslator<Object> translate; > > @Parameter(defaultPrefix = BindingConstants.VALIDATE) > @SuppressWarnings("unchecked") > private FieldValidator<Object> validate; > > But the type of the default() methods differ: > > final Binding defaultTranslate() > { > return defaultProvider.defaultTranslatorBinding("value", resources); > } > > final Binding defaultValidate() > { > return defaultProvider.defaultValidatorBinding("value", resources); > } > > The interfaces "Binding" and "FieldTranslator" have nothing common. So I > cannot imagine that (and how) this could work. > > Is it a bug? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org > For additional commands, e-mail: dev-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org For additional commands, e-mail: dev-h...@tapestry.apache.org