AbstractSingleSelectChoice tries to convert the input using the id generated by IChoiceRenderer

Details

Description

If one set a type for an AbstractSingleSelectChoice component, it will start to get error because the input being converted to model type was not generated by the converter, but by the IChoiceRenderer.

@devs, I think AbstractSingleSelectChoice needs to tweak the input to be understood by convertes ( my last patch ). I'm just not sure if this is a good idea, because we can't know for sure who will parse the input since one can override the FormComponent#convertInput method.

Pedro Santos
added a comment - 26/May/11 21:15 @devs, I think AbstractSingleSelectChoice needs to tweak the input to be understood by convertes ( my last patch ). I'm just not sure if this is a good idea, because we can't know for sure who will parse the input since one can override the FormComponent#convertInput method.

hrm. what is the usecase for setting a type on a choice component? like you have mentioned - there is no type converstion that is happening here, instead it uses a simple lookup from choice renderer. if anything, we should make calling settype() on it throw an exception.

Igor Vaynberg
added a comment - 27/May/11 05:04 hrm. what is the usecase for setting a type on a choice component? like you have mentioned - there is no type converstion that is happening here, instead it uses a simple lookup from choice renderer. if anything, we should make calling settype() on it throw an exception.

Igor Vaynberg
added a comment - 27/May/11 06:41 thought about it some more. the only clear way i see to make this better is to make settype() throw an exception when called on a component that uses an ichoicerenderer.