<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6001.18294" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" leftMargin=0
topMargin=0 CanvasTabStop="true" name="Compose message area">
<DIV><FONT face=Arial size=2>You've got a whole lot of things going wrong
there.</FONT></DIV>
<DIV><FONT face=Arial size=2>You should really look into the ExtJS docs
regarding DataStores.</FONT></DIV>
<DIV><A
title="http://www.extjs.com/deploy/ext-2.2/docs/?class=Ext.data.JsonStore CTRL + Click to follow link"
href="http://www.extjs.com/deploy/ext-2.2/docs/?class=Ext.data.JsonStore">http://www.extjs.com/deploy/ext-2.2/docs/?class=Ext.data.JsonStore</A></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>id is a property of the store, not the field. id
refers to the field whose value will be used as the record's id and used in
functions like getById.</FONT></DIV>
<DIV><FONT face=Arial size=2>the function record.set modifies the value found in
the field indicated in the first parameter and changes it to the value indicated
in the second parameter.</FONT></DIV>
<DIV><FONT face=Arial size=2>Your use of it fails because you don't have a field
named "name" .</FONT></DIV>
<DIV><FONT face=Arial size=2>If you did it would change the value in that field
in the record to the string "id"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Hope that helps at least point you in the right
direction to begin accomplishing what you are wanting to do.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Matt Priour</FONT></DIV>
<DIV><FONT face=Arial size=2>Kestrel Computer Consulting</FONT></DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><FONT face=Arial></FONT><FONT face=Arial></FONT><FONT
face=Arial></FONT><FONT face=Arial></FONT><FONT face=Arial></FONT><FONT
face=Arial></FONT><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=jmpmcmanus@gmail.com
href="mailto:jmpmcmanus@gmail.com">James McManus</A> </DIV>
<DIV><B>Sent:</B> Wednesday, September 30, 2009 6:08 PM</DIV>
<DIV><B>To:</B> <A title=users@geoext.org
href="mailto:users@geoext.org">users@geoext.org</A> </DIV>
<DIV><B>Subject:</B> [Users] Modify record in a store</DIV></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial
size=2></FONT><FONT face=Arial size=2></FONT><BR></DIV>Hi - I would like to
modify a record in a store, I created using GeoExt.data.FeatureStore. The actual
store looks like:<BR><BR> var store =
new
GeoExt.data.FeatureStore({<BR>
fields:
[<BR>
{id: new Date().getTime(), name: 'stfid', type:
'string'},<BR>
{id: new Date().getTime(), name: 'ch_0209_r_tax_val', type:
'float'}<BR>
]<BR> });<BR><BR>I thought I could
modify it by doing the following:<BR><BR>var record =
store.getAt(0);<BR>record.set("name", "id");<BR><BR>which would change stfid to
id. But that did not work. I think it is because I'm not dealing with the
presents of "fields". I've tried a variety of things without
success. Is there a simple way of doing this?<BR><BR>Thanks<BR>Jim<BR><BR>
<P>
<HR>
<P></P>_______________________________________________<BR>Users mailing
list<BR>Users@geoext.org<BR>http://www.geoext.org/cgi-bin/mailman/listinfo/users<BR></BODY></HTML>