Hi,

if you don't specify the type, a TextField will try to resolve the type from its model, see AbstractTextComponent#resolveType() and IObjectClassAwareModel.

>Shouldn't there be a pre-examination wheter a component converter is available?

Without type there can't be a converter.

Sven

On 09/07/2013 08:42 PM, Malte Neumann wrote:
Hello!

I've got a problem with a TextField and the depending CustomConverter. The converter of the component is not been called. So the default converter takes the task and fails.

In my case this problem occurs when my IModel.getObject returns null.

The problem arises in the FormComponent.convertInput method. Because of the null value, the typeName is null and a generic typcast is made and fails. Shouldn't there be a pre-examination wheter a component converter is available?

If I explicitly set a type through TextField.setType my converter is called correctly.

Is that behaviour intended this way?

Malte

---------------------------------------------------------------------
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]

Reply via email to