valuelist

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

valuelist

Postby driedfruit » Tue Jun 26, 2012 8:20 am

I'm having some trouble getting started.

This is my fields.ini
Code: Select all
[standard]
widget:type = radio
vocabulary = YesNo


This is my valuelist.ini
Code: Select all
[YesNo]
1 = Y
0 = N


That changes the standard field to a radio button but it is not populating it with Y and N.

I have tried changing a few other things around like adding
widget:label = "Default"

And it sometimes updates and sometimes doesn't as if it is getting stuck in cache sometimes.

Am I doing something wrong? Do I need to clear any server cache after making updates?

I am clearing browser cache every time. And the server has APC. I am adding &refresh-apc=1 to the end of the url so APC should be refreshed every time as well.

Thanks.
driedfruit
 
Posts: 5
Joined: Tue Jun 26, 2012 8:10 am

Re: valuelist

Postby shannah » Tue Jun 26, 2012 11:02 pm

INI files have some reserved values, including 1 and 0. If you want to have 1 or 0 as a key, implement the valuelist either in the database (with __sql__) or in the delegate class (with valuelist__yesno()).

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: valuelist

Postby driedfruit » Wed Jun 27, 2012 11:10 am

Thanks.

I changed it to
Code: Select all
[YesNo]
y = Yep
n = Nope


and
Code: Select all
[standard]
widget:label = "Default"
widget:type = radio
vocabulary = YesNo


And I am having the same problem.
driedfruit
 
Posts: 5
Joined: Tue Jun 26, 2012 8:10 am

Re: valuelist

Postby shannah » Wed Jun 27, 2012 12:30 pm

Oh. The radio widget hasn't been implemented. You'll need to use either select or checkbox.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: valuelist

Postby driedfruit » Wed Jun 27, 2012 4:00 pm

That explains it. Thanks.

The other problem is it sometimes doesn't update.

I'll change it from
Code: Select all
[standard]
widget:label = "Default"
widget:type = checkbox
vocabulary = YesNo


to


Code: Select all
[standard]
widget:label = "Default"
widget:type = select
vocabulary = YesNo



And sometimes it will change between checkbox and select and sometimes it wont. Is there a server cache I need to clear?
driedfruit
 
Posts: 5
Joined: Tue Jun 26, 2012 8:10 am

Re: valuelist

Postby driedfruit » Fri Jun 29, 2012 6:53 pm

Anyone know how to make it update every time I change the valuelist and fields ini files?
driedfruit
 
Posts: 5
Joined: Tue Jun 26, 2012 8:10 am

Re: valuelist

Postby shannah » Fri Jun 29, 2012 7:11 pm

Are you using output caching?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: valuelist

Postby driedfruit » Sat Jun 30, 2012 12:51 pm

I don't know what that is. It is making temp files in the templates_c/dataface/ folder.

I have tried deleting everything in that folder and get same results.
driedfruit
 
Posts: 5
Joined: Tue Jun 26, 2012 8:10 am

Re: valuelist

Postby shannah » Wed Jul 04, 2012 10:29 am

This is your template cache. You don't need to empty this out. It is for the smarty compiled templates.
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 15 guests

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