Meta valuelist
Posted: Wed Jan 11, 2012 12:26 am
Reading the documentation about dynamic select boxes http://xataface.com/wiki/index.php?-table=wiki&-search=master&-action=browse&-submit=Submit&-cursor=3&-skip=0&-limit=30&-mode=list&-recordid=wiki%3Fpage_id%3D90It says that a meta valuelist is created automatically when the valuelist has 3 columns.
The folowing is copied from the Java code to illustrate the Master/slave list topic.
// Let's get all the slaves available.
$app =& Dataface_Application::getInstance();
$query =& $app->getQuery();
$table =& Dataface_Table::loadTable($query['-table']);
$slaves = $table->getValuelist('slaves_list');
$slave_masters = $table->getValuelist('slaves_list__meta');
// Note that the slaves_list__meta valuelist is automatically created
// because we had three columns in the slaves valuelist.
// The first and third columns effectively create a 2nd valuelist
// named 'slaves_list__meta'
My question is, does the sql query in the valuelists.ini ( example from same topic pasted below) initiate the creation of the meta list? Or is it a result only in the Java code.
;valuelist for the slave
[slaves_list]
__sql__ = "select slave_id, slave_name, master_id from slaves"
If I were to use a 3 column valuelist, would I then be able to access and use the values in the meta list for other purposes than a master/slave dynamic select, without the java code?
Also, will 4 columns or n columns also generate more meta type lists. For instance will a four column list generate a meta list with the first and fourth columns etc....
The folowing is copied from the Java code to illustrate the Master/slave list topic.
// Let's get all the slaves available.
$app =& Dataface_Application::getInstance();
$query =& $app->getQuery();
$table =& Dataface_Table::loadTable($query['-table']);
$slaves = $table->getValuelist('slaves_list');
$slave_masters = $table->getValuelist('slaves_list__meta');
// Note that the slaves_list__meta valuelist is automatically created
// because we had three columns in the slaves valuelist.
// The first and third columns effectively create a 2nd valuelist
// named 'slaves_list__meta'
My question is, does the sql query in the valuelists.ini ( example from same topic pasted below) initiate the creation of the meta list? Or is it a result only in the Java code.
;valuelist for the slave
[slaves_list]
__sql__ = "select slave_id, slave_name, master_id from slaves"
If I were to use a 3 column valuelist, would I then be able to access and use the values in the meta list for other purposes than a master/slave dynamic select, without the java code?
Also, will 4 columns or n columns also generate more meta type lists. For instance will a four column list generate a meta list with the first and fourth columns etc....