Page 1 of 1

Property Groups - unable to use "value" attribute in Input

PostPosted:Tue Feb 07, 2012 2:16 pm
by fcamisa
Hi,

I when I try to specify e predefined value an an Input Form Element a get the following error:
Code: Select all
Class: 	com.openkm.core.ParseException
Message: 	Attribute "value" must be declared for element type "input"
I am using openKM Version: 5.1.9 (build: 7447).

This is the PropertyGroups.xml I am trying to use:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.0//EN"
                                 "http://www.openkm.com/dtd/property-groups-2.0.dtd">
<property-groups>
  <property-group label="Regione" name="okg:regione">
    <input label="Regione" type="text" name="okp:regione.nregione" value="veneto" />
    <select label="Tipo documento" name="okp:regione.tipo" type="simple">
      <option label="Circolare" value="Circolare"/>
	  <option label="DGR" value="DGR"/>
      <option label="Legge" value="Legge"/>
      <option label="Lettera" value="Lettera"/>
	  <option label="Nota" value="Nota"/>
	</select>
    <input label="Organo" type="text" name="okp:regione.organo" />
	<input label="Autore" type="text" name="okp:regione.autore" />
	<input label="Protocollo" type="text" name="okp:regione.protocollo"/>
	<input label="Data" type="date" name="okp:regione.data" />
	<textarea label="Oggetto" name="okp:regione.oggetto"/>
  </property-group>
</property-groups>
Thanks in advance for any help.

Francesco

Re: Property Groups - unable to use "value" attribute in Inp

PostPosted:Tue Feb 07, 2012 10:30 pm
by okmuser
I think you must declare value attributes to these inputs:
Code: Select all
<input label="Organo" type="text" name="okp:regione.organo" [b]value="organo"[/b]/>
<input label="Autore" type="text" name="okp:regione.autore" [b]value="autore"[/b]/>
<input label="Protocollo" type="text" name="okp:regione.protocollo" [b]value="protocollo"[/b]/>
<input label="Data" type="date" name="okp:regione.data" [b]value="data"[/b]/>

Re: Property Groups - unable to use "value" attribute in Inp

PostPosted:Wed Feb 08, 2012 5:26 pm
by pavila
To specify a default value you can use something like this:
Code: Select all
<okm = 'http://www.openkm.org/1.0'>
<okg = 'http://www.openkm.org/group/1.0'>
<okp = 'http://www.openkm.org/group/property/1.0'>

[okg:consulting] mixin
- okp:consulting.name (string) = 'default value' autocreated
- okp:consulting.comment (string) = 'other default' autocreated