@@ -712,10 +712,7 @@ else if (_inputType.equalsIgnoreCase("checkbox"))
712712 {
713713 IPropertyValidator textChoiceValidator = PropertyService .get ().getValidatorForColumn (_boundColumn , PropertyValidatorType .TextChoice );
714714 if (textChoiceValidator != null )
715- {
716- List <String > strVals = StringUtils .isEmpty (strVal ) ? List .of () : List .of (strVal );
717- renderTextChoiceFormInput (out , formFieldName , value , strVals , disabledInput , textChoiceValidator );
718- }
715+ renderTextChoiceFormInput (out , formFieldName , value , toListForRender (strVal ), disabledInput , textChoiceValidator );
719716 else
720717 renderTextFormInput (out , formFieldName , value , strVal , disabledInput );
721718 }
@@ -812,10 +809,21 @@ protected void renderSelectFormInputFromFk(RenderContext ctx, HtmlWriter out, St
812809 }
813810 else
814811 {
815- renderSelectFormInput (out , formFieldName , value , List . of ( Objects . toString ( value ) ), disabledInput , entryList );
812+ renderSelectFormInput (out , formFieldName , value , toListForRender ( value ), disabledInput , entryList );
816813 }
817814 }
818815
816+ List <String > toListForRender (Object value )
817+ {
818+ if (null == value || value instanceof String )
819+ return StringUtils .isEmpty ((String ) value ) ? List .of () : List .of ((String )value );
820+ if (value instanceof MultiChoice .Array arr )
821+ return arr ;
822+ if (value instanceof List <?> l )
823+ return l .stream ().map (o -> Objects .toString (o , null )).toList ();
824+ return List .of (Objects .toString (value ));
825+ }
826+
819827 protected void renderFileFormInput (HtmlWriter out , String formFieldName , Object value , String strVal , boolean disabledInput )
820828 {
821829 var input = InputBuilder .file ()
0 commit comments