Hi,
Wicket calls validators after conversion, thus if you have
TextArea<Collection<String>>, your validator has to be
IValidator<Collection<String>>.
Let your CripBlockConverter do the format checking, I don't see the need
for your converter.
>But now Wicket complains
'Complains' means what?
Sven
On 05/28/2014 03:20 PM, Oliver B. Fischer wrote:
I solved now this problem by subclassing TextArea and over-writing
convertInput().
But now Wicket complains if I reference this field as <textarea ...>
in my HTML template. I must declare it as <input...> but I need a
<textarea/>
Does someone know how to achive this?
Bye,
Oliver
Am 28.05.14 14:27, schrieb Oliver B. Fischer:
Hi,
I use a |TextArea| component in a form so that users can enter a set of
IP addresses. The target model is of type |Collection<String>|. I have
written a validator to validate the raw user input an a converter to
convert the string input into a collection of strings
(|Collection<String>|).
Now I cannot set the model for the used |TextArea| instance it has a
different object type then |String|.
Any idea how to handle this?
|public class MyForm<FormModel>
{
private final TextArea<String> cripField;
}
// The validator is validating the raw string
public class CripBlockValidator implements IValidator<String>
{/*...*/}
// The converter coverts the string input into a subtype of List<String>
public class CripBlockConverter extends AbstractConverter<IPList>
{/*...*/}
|
---------------------------------------------------------------------
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]