There is no need of new method to TextField (or other FormComponents).
We already
have org.apache.wicket.markup.html.form.FormComponent#onDisabled(), it sets
the "disabled" attribute at the moment.

Sven's suggestion to use Behavior + IComponentInstantiationListener looks
the most flexible to me.
@Dan: this should solve the issue for Isis.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Dec 2, 2016 at 6:03 PM, Martijn Dashorst <[email protected]
> wrote:

> On Fri, Dec 2, 2016 at 12:21 PM, Pedro Santos <[email protected]> wrote:
> > After reading the thread on Isis's mailing list, I'm under the impression
> > that the best solution is to offer an API enabling users to configure how
> > the disabled text field will be shown. My suggestion is to add the method
> > TextField.showDisabledAsReadOnly(boolean) and to keep the current
> > "disabled" attribute as the default presentation of a disabled text
> field.
>
> Of course we can change the behavior in a major version such as 8.0.
>
> That said, changing disabled to mean readonly doesn't sound like a
> good idea as a general rule, only if the names convey different
> meanings.
>
>
> OTOH, I doubt adding a `setReadOnly` option to TextField is a good
> option as well.
>
> Martijn
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to