Hi
I have a store created and it loads the JSON Data which is in the form
show below. Now I am trying to get the list Controller to use the store
and display the ACCTNO+" "+ID1 for example "0001 Transfreight" in the list.
I obviously need to bind the store to the controller but I am not sure
how to do this given that the list controller is expecting an array. Any
clarification would be appreciated.
Thanks,
Simon
{"armaster":[
{"ACCTNO":"0001",
"ACTIVE":0,
"ALLOWPDISC":0,
"BULKOWNER":0,
"CALENDAR":"",
"CHANGED":0,
"CITY":"",
"COUNTRY":"Canada",
"DAILY":0,
"EXPORTCODE":"",
"FSCACCTNO":"0001",
"FSCCODE":"0001",
"FAXNO":"",
"GSTEXEMPT":0,
"HPMP":0,
"HOST":0,
"ID":"2LX0U0Q4V",
"INOTE":"",
"INOTEINVNO":"",
"ID1":"Transfreight",
"ID2":"4 Vidito Drive",
"ID3":"","ID4":"Dartmouth, NS",
"ID5":"","ID6":"B3B 1P9",
"INVBULK":0,
"INVCARD":1,
"LASTDOT":"",
"MONTHLY":0,
"NOTES":"",
"OILHEAT":0,
"OWNER":"YOURACCNT",
"PONO":"",
"PMTYPE":"",
"PRICECHNGE":0,
"PROMPT1":"",
"PROMPT2":"",
"PROMPT3":"",
"PROMPT4":"",
"PROMPT5":"","
PROMPT6":"",
"PROMPTMISC":"",
"PROVINCE":"",
"RECEIPTEXP":"",
"RECEIPTMSG":"",
"RENTER":0,
"SALESMANBP":"",
"SALESMANCL":"",
"SECURITY":"EVERYONE1",
"SENIOR":0,
"SITE":"2LV0KNDJN",
"SITEOWNER":0,
"TELNO":"",
"VALID":0,
"ZONE":"",
"_UPDATED":"20100608093656",
"_UPDATEDBY":"joe"}
]}
On 09/09/2011 2:15 AM, Martin Wittemann wrote:
> Hey,
>
>> In my case I want to build a Database Application with a list or table
>> (I am not sure which is best yet) of customers on the left side of the
>> window. When the user clicks on a customer in the list I want to
>> display the customer details in the same window to the right of the list.
>
> Sounds like a classic master-detail relation, perfectly suited for data
> binding.
>
>> Questions:
>>
>> 1) Should I use a list or table for the customer list? The text in the
>> customer list will not be just a single field. It could be a customized
>> combination of fields. The data will be obtained from the server in
>> Json format
>
> The table is a huge feature monster having all kind of features you
> might not need for that kind of list like sorting, reordering columns,
> editing and all that stuff. So I would suggest to go with a list and
> write a custom list item holding all the values you need to display.
> With that approach, you are able to use the data binding and you have
> the freedom to design the list item the way you like it.
>
>> 2) Should I use a store for the customer data? I have been reading the
>> documentation and using the demo browser to see when a store should be
>> used. I noticed that Remote table example just created a model and the
>> code does not show the use of a store. I have seen some other examples
>> of lists using a store. Can anyone explain when a store should be used?
>
> The problem you describe is about the missing data binding controller
> for the table. So using a store only makes sense if you need to have the
> data in a model object which then, can be handled by a controller
> easily. As there is no table controller, usually it makes not much sense
> to use a store to load data for the table. But using the list, the store
> is the way to go, especially when you have JSON data like you have.
>
> I would suggest to take a look at the code of the feedreader demo
> application we ship with qooxdoo. It has something similar like a
> master-detail view. A set of slides [1] came just to my mind I made some
> time ago which might also help to understand how the feedreader is build.
>
> I hope that gets you some answers,
> Martin
>
> [1] http://www.slideshare.net/wittemann/data-binding-in-qooxdoo (slide 101+)
>
>
> ------------------------------------------------------------------------------
> Why Cloud-Based Security and Archiving Make Sense
> Osterman Research conducted this study that outlines how and why cloud
> computing security and archiving is rapidly being adopted across the IT
> space for its ease of implementation, lower cost, and increased
> reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/
>
>
>
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops? How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel