databinding detail

1 view
Skip to first unread message

richajax

unread,
Feb 9, 2009, 2:29:20 PM2/9/09
to chainjs
I am trying to databind just like what the samples describes.
and quick question...

If I have json like below
[
{ "@attributes":{name: 'Braeburn', value: 'Eating'} },
{ "@attributes":{name: 'Bramley', value: 'Cooking'} },
];

instead of,
[
{ name: 'Braeburn', value: 'Eating' },
{ name: 'Bramley', value: 'Cooking' },
];

How do I assign the class name to bind ?
something like below doesn't seem to work.

<tbody id="info">
<tr>
<td class="@attributes.name"></td>
<td><input type="text" class="@attributes.value"/></td>
</tr>
</tbody>

Rizqi Ahmad

unread,
Feb 11, 2009, 4:17:30 AM2/11/09
to chainjs
Hey!

try this plugin: http://friendpaste.com/WgMzFX0bHyrfD4iGmK1D9
download it as file and include it in a script tag after chain.js

Ivn't tried it yet, so please give feedback.

Rizqi

Rizqi Ahmad

unread,
Feb 17, 2009, 1:50:04 AM2/17/09
to chainjs
Hey!

This one should work. check this out: http://friendpaste.com/WgMzFX0bHyrfD4iGmK1D9

Rizqi

richajax

unread,
Feb 23, 2009, 5:13:06 PM2/23/09
to chainjs
This works great !!
We are expecting to use heavily on javascript databinding.
this will be a great kick start for us

thanks
> > >  </tbody>- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages