java - Wicket JQuery AbstractFormDialog does not render RadioChoice of Enumeration -
i have dialog box form. form contains radio choice consisting of enum types. when dialog opens, single circle gets displayed. expected 3 circles names of enums. what's error in code?
public class mynewdialog extends abstractformdialog { public mynewdialog( string id ) { super( id, "dialog title" ); form = new form( "dialogform" ); this.add( form ); radiochoice<gender> genders = new radiochoice<gender>( "list", getgenderlist(), new enumchoicerenderer<gender>( ) ); genders.setsuffix( " - " ); genders.setrequired( true ); form.add( genders ); } private list<gender> getgenderlist() { return arrays.aslist<gender>( gender.values() ); } //--- enum class "gender" public enum gender { male, female, family }; //--- html markup in file "mynewdialog.html" <html xmlns:wicket="org.apache.wicket"><body><wicket:panel> <form wicket:id="dialogform"> <input wicket:id="list" type="radio" /> </form> </wicket:panel></body></html>
radiochoice generates 'input' tags in html.for reason, should not assign in input tag, in span or div.
change html markup file to:
//--- html markup in file "mynewdialog.html" <html xmlns:wicket="org.apache.wicket"><body><wicket:panel> <form wicket:id="dialogform"> <span wicket:id="list" type="radio" /> </form> </wicket:panel></body></html>
Comments
Post a Comment