java - How to link two values to dropdown in JSF? -
i have created entites , facde in netbeans. want create native query 2 feilds table. , bind them
string query = "select distinct(m.idmanufacturer),m.hmid "                 + " model m";  @suppresswarnings("unchecked") list<model> modellist = (list<model>) getentitymanager().createnativequery(query).getresultlist();   and used code
<f:selectitems itemlabel="#{mycontroller.modellist.idmanufacturer}"/>   to show values in dropdown. doesn't seem working. ideas?
try creating list of selectitems list<model> , give in value attribute.
e.g.
list<selectitem> modellist = new arraylist<selectitem>();   //implement conversion label value here. <f:selectitems value="#{mycontroller.modellist}"/>      
Comments
Post a Comment