Combobox not editable on Web Client

Hi All,
I am showing one global variable(text datatype) with diaplay type COMBOBOX and attached one Custom value list with it . And checked the editable check box.

Now, when I am in smart client, it is editable But on web client it is coming non-editable.
Can anyone tell me where I am wrong!

Thanks in advance.

Version 3.5-build 513

In webbrowsers I don’t think editable combos work, part of how combos behave in a browser. Perhaps you can try a type-ahead, behaviour should be similar to what you want to achieve.

pbs,

i had this same problem. It is quite easy to overcome. I don’t know whether this works with custom value lists stored in servoy, but it certainly works if you store them in a table and create your custom value lists when you run you solution based on a set of text fields in a value list table.

  1. Create your value lists based on the contents of individual text fields on login/on open.
  2. I call these fields the same as the empty valuelists that i have on login and also the same as the element is use on the form to trigger the value list.
  3. you create the value list on login, i force an ‘edit’ and an ‘other’ to be added to the bottom of each. Here is a code sample. This loops through all the columns in my customer table (i have individual settings for each user, you might not need this and just have a single table with a single valuelist record), and creates valuelists that i have previously defined in the solution as empty custom ones:
var allDP= forms.login.alldataproviders;

for (var i = 0 ; i < allDP.length ; i++ )

{

if(allDP[i].indexOf('rw_vl_') >= 0)
{
globals.valuelist_sel=allDP[i];
globals.valuelist_tempname = forms.login[globals.valuelist_sel];

if (globals.valuelist_tempname=='' || globals.valuelist_tempname==null)
{
var query = 'select '+globals.valuelist_sel+' from so_customer where id = 10116';
var dataset = databaseManager.getDataSetByQuery(controller.getServerName(), query, null, 1);
var dataArray = dataset.getColumnAsArray(1);
globals.valuelist_tempname=dataArray[0];

forms.login[globals.valuelist_sel]=globals.valuelist_tempname;

}
globals.valuelist_tempname=globals.valuelist_tempname+'\n-'
globals.valuelist_tempname=globals.valuelist_tempname+'\nedit'
globals.valuelist_tempname=globals.valuelist_tempname+'\nother'

application.setValueListItems(globals.valuelist_sel,globals.valuelist_tempname.split('\n'))

}
}

I then use on and data change whenever i change the data in one of my drop downs. By using the same name on the form element as the valuelist, you can create a global method for the edit and other function, to display the datafrom the triggered dataprovider in a global field on an edit form. on editing this you can push it back into the table and then recreate the valuelist so it is up to date in the solution:

var el=application.getMethodTriggerElementName()
var frm=application.getMethodTriggerFormName()
var dp=forms[frm].elements[el].getDataProviderID()

application.output ('-'+forms[frm][dp]+'-')
if ( forms[frm][dp]=='edit')

{

forms[frm][dp]=''
//set the global to equal the value list stored in the customer table of the same name as the element

globals.valuelist_tempname=forms.Prefs_Valuelists[el]

globals.valuelist_sel=el

//get the name of the value list without the rw_lv_ stuff
var pos = utils.stringPosition(globals.valuelist_sel,'_',1,3)//returns 4 for the sample
if (pos==-1){
globals.valuelist_name=globals.valuelist_sel.substring(6)
}
else
{
globals.valuelist_name=globals.valuelist_sel.substring(9)
}
//application.output(globals.valuelist_sel+' - '+globals.valuelist_name +' - '+pos)
application.showFormInDialog(forms.Prefs_Valuelists,  -1,-1,-1,-1, 'Edit Menus', false, false, true); 



}

else if ( forms[frm][dp]=='other')

{

globals.valuelist_tempname=forms[frm][dp]
globals.form_from=frm
globals.databasefield_from=dp

application.showFormInDialog(forms.Edit_Other,  -1,-1,-1,-1, 'Other', false, false, true); 

}

I then have an OK and a cancel button on the form. The following comits the record to the table:

forms.Prefs_Valuelists[globals.valuelist_sel]=globals.valuelist_tempname
globals.valuelist_tempname=globals.valuelist_tempname+'\n-'
globals.valuelist_tempname=globals.valuelist_tempname+'\nedit'
globals.valuelist_tempname=globals.valuelist_tempname+'\nother'

application.setValueListItems(globals.valuelist_sel,globals.valuelist_tempname.split('\n'))
application.closeFormDialog()

Given the Jan is watching this forum, i am acutely embarrassed by my code, but it does work!!!

So there you go edit and other for value lists in webclient.

David