Page 1 of 1

Problem with Select element

PostPosted:Wed Jul 27, 2016 12:42 pm
by khpavel
Hello,
please help me in following problem.

I created property group with one element:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.3//EN"
    "http://www.openkm.com/dtd/property-groups-2.3.dtd">
<property-groups>
  <property-group label="multilist" name="okg:multilist">
    <select label="multilist" name="okp:multilist.multilist"   type="multiple" table="multilist"  
            optionsQuery="select $ID, $name from DatabaseMetadataValue dmv where dmv.table='multilist'">
    </select>
    </property-group>
</property-groups>

table "multilist" previously created with the following query
Code: Select all
INSERT INTO OKM_DB_METADATA_TYPE (DMT_TABLE, DMT_REAL_COLUMN, DMT_TYPE, DMT_VIRTUAL_COLUMN) VALUES ('multilist', 'col00', 'text', 'ID');
INSERT INTO OKM_DB_METADATA_TYPE (DMT_TABLE, DMT_REAL_COLUMN, DMT_TYPE, DMT_VIRTUAL_COLUMN) VALUES ('multilist', 'col01', 'text', 'name');
there are some values in OKM_DB_METADATA_VALUE:
Code: Select all
DMV_ID	DMV_COL00	DMV_COL01 ...	     DMV_TABLE
5		002			Value2			multilist
6		001			Value1			multilist
I tryed to add property group to document. But no form element is shown in form.
Screenshot_1.png
Screenshot_1.png (4.82 KiB) Viewed 2258 times
What do I do wrong?

Re: Problem with Select element

PostPosted:Wed Jul 27, 2016 3:03 pm
by khpavel
In addition: I use OpenKM Comunity 6.3.1

Re: Problem with Select element

PostPosted:Fri Jul 29, 2016 7:31 am
by jllort
I suggest change column names:
id -> mul_id
name -> mul_name

The xml definition seems right. Check OKM_DB_METADATA_TYPE table values are correctly registered.

Is shown some error in catalina.log file ?

Re: Problem with Select element

PostPosted:Tue Aug 02, 2016 11:49 am
by khpavel
Hello!

Yes. it helps. Thank you!