java - How do I filter with more than one letter in primefaces selectonemenu? -
i using primefaces selectonemenu. user request me have option type more 1 letter have filtering, works on 1 letter. possible?? have extracted code of selectonemenu on xhtml file. hope helps. help:
<p:selectonemenu required="true" requiredmessage="#{esmessage['warn.esttc3s5.coursetype']}" id="ddcoursetype" value="#{dtwebvoesttc3s4.coursetypeid}" height="300" style="width:421px" onchange="sublistupdate();" effect="fade"> <p:ajax listener="#{dtselectedcoursetitlevo.filterlist(dtwebvoesttc3s4.coursetypeid, dtcoursetitlevo)}" update="ddcoursetitle" /> <f:selectitem itemlabel="#{eslabel['lbl.esttc3s4.lblselectcoursetype']}" itemvalue="" noselectionoption="true" /> <f:selectitems value="#{dtcoursetypevo.coursetypelist}" var="coursetype" itemlabel="#{language.localestring eq 'zh'? coursetype.coursetypechi: coursetype.coursetype}" itemvalue="#{coursetype.coursetypeid}"/> </p:selectonemenu> ........................................................ <p:remotecommand id="teachernamelistremotecommandid" name="sublistupdate" action="updatecoursetitlelistdata3s4form" update="ddcoursetitle" />
why don't use filter option selectonemenu
component?
filter="true" filtermatchmode="startswith"
source: http://www.primefaces.org/showcase/ui/input/onemenu.xhtml
edit: of course can set match mode different options contains
or whatever want
Comments
Post a Comment