Hi Christian,
you put a model in the list that is bound to the textfield. When you change the 
textfield and do anything - so, the change event for the textfield occurs - 
then the model in the list is updated. Your Anna is becoming a Jane.

Clicking the save button is "doing anything". So, your list is update and 
afterwards you again put a model in the list. The result is the same name twice.

Try to add a name with the save button. Than change the name in the textfield 
and click on the label of your form (the label is as good as anything except 
the save button) and you will see your entry just changes.

Cheers, Frank

> -----Ursprüngliche Nachricht-----
> Von: Christian Phang [mailto:[email protected]]
> Gesendet: Montag, 15. Februar 2010 17:18
> An: [email protected]
> Betreff: [qooxdoo-devel] [Ask] Form and List Data Binding
> 
> Hello Qooxdoo-ers,
> 
> First of all, I would like to thank the developers for creating such a
> great JavaScript Framework. Creating Ajax-based Rich Internet
> Application is so much fun now.
> 
> Currently I'm exploring the Qooxdoo Data Binding feature. In order to
> help me understand it, I created a very simple application in Qooxdoo
> Playground [http://preview.tinyurl.com/yay7lfe].
> 
> The application should do following things:
> 1. The user enters a text in name text field, e.g., Anna
> 2. He presses the save button.
> 3. A new item with "Anna" as a label is added to the list.
> 
> It works well for the first item. However if I try to add a second
> item, e.g., Jane and press Tab, then the item with label Anna will be
> replaced with Jane.
> 
> Can someone please enlighten me? What did I do wrong in the code? How
> should I change the code to meet the requirement?
> 
> Thank you in advanced.
> 
> Best regards,
> 
> Christian
> 
> -----------------------------------------------------------------------
> -------
> 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


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische 
Information mbH. 
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 
101892. 
Geschäftsführerin: Sabine Brünger-Weilandt. 
Vorsitzender des Aufsichtsrats: MinR Hermann Riehl.



------------------------------------------------------------------------------
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