[SOLVED] Using dropdowns with search features in Uniface 9 + Bootstrap mobile/web development

Author: georges.herzet@gmail.com (jnrHerzet)

 Hi everyone,  We are currently developing some mobile/web applications using Uniface 9.7 + Bootstrap and were looking for an HTML5 dropdown component with build-in search feature ( see  https://github.com/silviomoreto/bootstrap-select )  .   Here's a code example for this kind of components  : <select class="selectpicker" data-show-subtext="true" data-live-search="true"> <option data-subtext="Rep California">Tom Foolery</option> <option data-subtext="Sen California">Bill Gordon</option> <option data-subtext="Sen Massacusetts">Elizabeth Warren</option> <option data-subtext="Rep Alabama">Mario Flores</option> <option data-subtext="Rep Alaska">Don Young</option> <option data-subtext="Rep California" disabled="disabled">Marvin Martinez</option> </select>   Now what we wanted to do is filling the dropdown from an Uniface entity   ( let's say  MYENTITY.MODEL , with a DROPDOWNENTRY field)  in a DSP .   We tried several approches, but none worked .   Here's a code snippet of the layout in the DSP :  <div id="uent:MYENTITY.MODEL"> <select class="selectpicker" data-show-subtext="false" data-live-search="true"> <div id="uocc:MYENTITY.MODEL"> <option id="ufld:DROPDOWNENTRY.MYENTITY.MODEL"></option> </div> </select> </div> Is there a way to make such code work or should we try something else ?    And is there a document describing how Uniface transforms the layout at runtime , i.e. how the various substitution take place ?    Many thanks beforehand. Best Regards, Georges

2 Comments

  1. Solved.  It's possible to add items programmaticaly in Javascript .  So we just need to create an arrays of objects for the dropdown & initialize it with a weboperation.


    Author: jnrHerzet (georges.herzet@gmail.com)
  2. Thanks for your update. And good to hear that you could solve this.


    Author: diseli (daniel.iseli@uniface.com)