Page 1 of 1

Generating a value list based on another value list

PostPosted: Tue Nov 06, 2012 7:31 am
by Monty51
I have finally generated two select widgets that are each based on their own SQL query, but I'd like to generate the second widget based on the selection in the first widget, something along the lines of:

[first widget]
__sql__ "SELECT jvm FROM main ORDER BY jvm"

[second widget]
__sql__ "SELECT server FROM main ORDER BY server WHERE jvm = [first widget]"

Is this possible?

Thanks

Re: Generating a value list based on another value list

PostPosted: Tue Nov 06, 2012 9:08 am
by shannah
With straight valuelists you would require some custom javascript to stitch them together. I have developed a depselect widget that supports this type of behaviour. It requires Xataface 2.0 though.

You can read more about the depselect module here
http://xataface.com/dox/modules/depselect/latest/

I haven't produced a zip or tar file for it yet, but you can get it straight from the subversion repository (link is in the docs).

-Steve

Re: Generating a value list based on another value list

PostPosted: Tue Nov 06, 2012 12:55 pm
by Monty51
I confess I'm a bit confused...all I see available for download is 1.3.3. Is 2.0 a beta version?

Re: Generating a value list based on another value list

PostPosted: Tue Nov 06, 2012 12:57 pm
by Monty51
Disregard...I see the news about its availability on SourceForge.

Re: Generating a value list based on another value list

PostPosted: Tue Nov 06, 2012 1:07 pm
by Monty51
sorry to keep pestering, but with the 2.0 version, do I presume correctly that I can install it into the same directory heirarchy as xataface-1.3.2 and then change my applications index.php 'require_once' statement to the new directory? I.e.:

require_once '/var/www/html/xataface-1.3.2/dataface-public-api.php';

-- to --

require_once '/var/www/html/xataface-2.0alpha1/dataface-public-api.php';

Re: Generating a value list based on another value list

PostPosted: Tue Nov 06, 2012 1:12 pm
by shannah
Yes. That should work. Note, that I have removed FCKeditor and TinyMCE from the 2.0 distribution so if you need to use the htmlarea widget type you'd need to copy the lib/FCKeditor directory from 1.3.x into 2.0. The intention is to switch to using the ckeditor module instead though in those cases.

It is also intended that you install the g2 module for the new improved look and feel if you're in 2.0.

-Steve

Re: Generating a value list based on another value list

PostPosted: Tue Nov 06, 2012 1:17 pm
by Monty51
Thanks, and so noted. I'm nowhere that yet, but I'll try and remember that when it comes time :wink: