using group widget with json instead of xml
4 posts
• Page 1 of 1
using group widget with json instead of xmlHi there.. new to xataface and I am so far... impressed. I would like to adjust one thing though. I use a fair bit of JSON encoded fields to store meta data and it would be very helpful if I could get xataface to read and write JSON data behind the group widget instead of xml. Is there a pluggable system for parsers? is there anyway I could customize this without tearing the entire app apart?
Re: using group widget with json instead of xmlYes you can implement your own serializer for that field by implementing the fieldname__serialize() method in the delegate class. I'm going to need to look through my notes to find an example of this method for you. ... will post soon
Re: using group widget with json instead of xmlThat would be wicked when ever you get a chance.. the docs are pretty poor for that kind of stuff.
Re: using group widget with json instead of xmlYou can implement fieldname__parse() and fieldname__serialize() methods to override the serialization and loading of fields in your database. E.g.
Haven't tested this particular code, but should work. You may want to check out http://weblite.ca/svn/dataface/core/tru ... Record.php (the setValue() method is it asks the table to parse input). http://weblite.ca/svn/dataface/core/tru ... /Table.php (the parse() method...) http://weblite.ca/svn/dataface/core/tru ... alizer.php (actually does the serialization). Implementing xxx__parse() and xxx__serialize() overrides the default mechanisms.
4 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 4 guests |