I figured out the problem... it has to do with a class from the FlexLib called:

flexlib:PromptingTextInput

there seems to be a bug in it when it tries to bind to Null values... it doesn't clear out the old value. I will look into it more.

thanks,  kevin





On Mar 14, 2007, at 2:07 PM, Kevin wrote:

Has anyone had trouble returning NULL values from AMFPHP/MySQL.

When my database returns NULL for a certain field, it does not bind
properly in FLEX and the bound field takes on whatever value it had
previous to the service call.

Example: (Cairngorm)

(3 TextInput fields)
username
firstname
lastname

get result list of users from the server:
assign model.selectedUser = model.curentUserList.getItemAt(0)
(Binding works correctly)

username displays 'test'
firstname displays 'Test'
lastname displays 'User'

change assignment to model.selectedUser =
model.curentUserList.getItemAt(2)
(in this case firstname & lastname = NULL and Binding doesn't work
right)

username displays 'nextuser'
firstname displays 'Test' (this is the value from the previous
selection)
lastname displays 'User' (this is the value from the previous
selection)

it seems like if the new value is blank, it doesn't recognize that
there is a change required in the binding.

Thanks for the help.

- Kevin



Reply via email to