Hi, Tracy. Thank you for your continued help! It's very much appreciated; I've
been stuck for so long on this problem, I saw no light at the end of the
tunnel.
In answer to your questions, here's what the code does and perhaps you can
guide me as to where the invalidateProperties() and the commitProperties() need
to be called:
- The user clicks the Browse button in the row to select an image file.
- Then s/he can click the Upload button. At this point, the file is sent to
the Java servlet, which resizes it and stores it on the server, with the
record's "Premium ID" being its filename. The Premium ID is an alphanumeric
value, such as "ABCD123".
- The server generates a small XML response, which Flex then reads in the
UPLOAD_COMPLETE_DATA handler. This contains the filename, which is stored on
the datagrid.selectedItem.FileName custom variable; this variable isn't part of
the original dataprovider XML.
- In the set data() of the image column, the code checks to see if that value
exists; if so, it does an image.load() with the path + data.FileName. Else it
sets the image's load() to the value from the dataprovider.
After loading the image using data.FileName, the code calls the
outerDocument.datagrid.invalidateList(). I also have a Refresh button that
calls this. On some occasions, if I hit the Refresh button on the row enough
times, it seems to get the new image in. The code also has calls to the
outerDocument.datagrid.invalidateDisplayList() to no avail.
How does the invalidateProperties() and commitProperties() fit into this? May
you have a wonderful evening. Thanks for your help. Once I'm in the office on
Monday, I can use the trace method. By the way, how do you see the trace
statements? Do they come up in Flex Builder when the app is running? Sorry for
the newbie questions.
I'm eager to learn Flex because I see the potential for it for everybody who
builds for the Web. For me, these are growing pains