Meta valuelist

A place for users and developers of the Xataface to discuss and receive support.

Meta valuelist

Postby kedikatt » 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....
kedikatt
 
Posts: 18
Joined: Sun Dec 25, 2011 6:25 am

Re: Meta valuelist

Postby shannah » Wed Jan 11, 2012 1:50 pm

This feature is limited to 3 columns. It's been a long time since I've used this feature so I'm a little hazy on the specifics.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 14 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved