[Dojo-interest] Re: FIltering table, updating contents

Jason Rogers jason.rogers at riskmetrics.com
Thu Feb 8 15:01:57 MST 2007


Sasha Firsov wrote:
> Jason Rogers wrote:
>   
>> Sasha Firsov wrote:
>>     
>>> Jason Rogers wrote:
>>>  
>>>       
>>>> I have a filtering table in which I would like to update data based on
>>>> some events in the page.  I am trying to talk to the table's store
>>>> variable (an instance of dojo.collections.Store, I believe) to
>>>> accomplish this, but it isn't having any effect.
>>>>
>>>> The code I have is roughly:
>>>>
>>>>  
>>>> filteringTable.store.update(filteringTable.store.getDataByKey(myObject.id),
>>>>
>>>> 'new value', myObject.field)
>>>>     
>>>>         
>>> Shall be :
>>> filteringTable.store.update(filteringTable.store.getDataByKey(myObject.id),
>>>
>>> "fieldName",'new value')
>>> Rendering will be done by FilteringTable automatically before end of
>>> update(...) call.
>>>
>>>   
>>>       
>> Actually, I copied that down wrong.  I am sending in the field name to
>> change and the new value to set it to in the right order.  That was
>> just a typo.  However, it doesn't update the data in the table. 
>> Curious.  I will dig around some more and step through FireBug and see
>> what I can find.
>>
>>     
> Next time before ask try to debug. And make a copy-paste the code: it is
> still not clear what really you have done.
> If you do the debug output, you also will see that actual data have not
> been modified.
> You need to pass "field" name, not the value:
> myObject.field - gives value.
>   
As I said it was a typo (due to the fact that I am emailing from a 
different machine than where I am developing).  I have been debugging 
for 2 days and have come up empty.  That's why I wrote the list.

-- 
Jason Rogers

RiskMetrics Group
Process Management Team
Ann Arbor, MI
t 646.778.4041
f 734.302.7694



More information about the Dojo-interest mailing list