Hi huseyin,

On Friday February 12 2010 16:33:28 hkalyoncu wrote:
> i want to populate a selectBox with ajax request.
> there is no problem with ajax request i can get the result in text or json
> anyway.
> but the tricky part is populating selectBox with this result.
> i can see only selectBox.add() method in the API Reference.
> but my return object is a long list with in the format of value - text
>  pairs (like in html selectbox)
> its very annoying to add each item with add() method. it would be great if
> there is method like
> selectBox.load(json_data);
> 
> what is the best way to achieve this? any suggested way?
You can use data binding to achieve this in an easy way. With data binding you 
can attach a model (e.g. represented by a JSON data structure) to the 
selectbox. 

Check out the demo at

        http://demo.qooxdoo.org/devel/demobrowser/#data~NamesList.html

to get a first impression how to work with data binding in qooxdoo.

Additionally you can read about it at the wiki 

        http://qooxdoo.org/documentation/1.0/data_binding

cheers,
  Alex

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to