Heres an example of the object I'm trying to serialize. "content" is
a query and then i turn it into this which differs slightly from the
results produced by the serializeQueryByColumn function.. I'm going
to experiment with the standard results a bit and see how it plays
with YUI.. just wanted to spur some conversation on this before i
opened a bug.. :-)
results = structnew();
results.resultset.result=arraynew(1);
results.recordsReturned=content.recordcount;
results.totalRecords=content.recordcount;
results.startIndex=0;
for(i=1;i lte content.recordcount;i=i+1){
results.resultset.result[i]=structnew();
results.resultset.result[i].memberid=content.memberID[i];
results.resultset.result[i].contentid=content.contentID[i];
results.resultset.result[i].contentType=content.contentType[i];
results.resultset.result[i].link=content.link[i];
results.resultset.result[i].image=content.image[i];
results.resultset.result[i].title=content.title[i];
results.resultset.result[i].datecreated=content.datecreated[i];
results.resultset.result[i].approved=yesnoformat(content.approved
[i]);
results.resultset.result[i].flagged=yesnoformat(content.flagged[i]);
}
On Feb 5, 12:54 am, Alan Williamson <[email protected]> wrote:
> You'll need to give us a lot more information to help here :)
>
> The OpenBD implementation has an extra flag to help you work with JS
> libraries, because the default implementation isn't at all useful when
> pushing to ExtJS or GWT.
>
> Sounds like you are passing in data type that can't be converted to
> JSON; possibly a CFC?
>
> Open up a bug report of a orking example of what works in CF but not in
> OpenBD and we'll look into it.
>
> thanks
>
>
>
> Bill Berzinskas wrote:
> > So, I use CF's serializeJSON, but not on queries because it doesn't
> > play well with my JS library (YUI to be exact).. YUI (at least in
> > the examples), much prefers a very convoluted data packet.. As best
> > as I can figure, It's a struct of arrays of structs..
>
> > one top level struct which contains data pertaining to the data set
> > (result count, start row, end row, result array).. Inside that,
> > theres an array of structs which are the data elements..
>
> > It took a while to get this right in CF.. and now, in openBD, I
> > receive an error "Data is not supported".. I *could* go find some
> > function to handle this, but figured I'd open it for discussion
> > first..- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
Open BlueDragon Public Mailing List
http://groups.google.com/group/openbd?hl=en
official site @ http://www.openbluedragon.org/
!! save a network - trim replies before posting !!
-~----------~----~----~----~------~----~------~--~---