We've been using unformatters.  So the binding back to the model might
look like this:

<mx:Binding source="numFormatter.format(myText.text)"
destination="model.textValue" />



--- In flexcoders@yahoogroups.com, "Clarke Bishop"
<[EMAIL PROTECTED]> wrote:
>
> What's the best practice for using Formatters and Bindings together?
> 
> For example:
> - I have a currency value that's stored as a number in my model (And
in the
> database)
> - I retrieve the value and use the CurrencyFormatter to make it look
like
> $15,123 which is displayed in a TextInput component.
> - So far, so good. But, now my user edits the value and wants to save it
> back to the database
> - But, the new value in the TextInput component isn't a number anymore!
> 
> Do I:
> - Have to write an unformatter for each formatter?
> - Create a custom CurrencyTextInput component that has both a
formatted and
> unformatted version of the data
> - Am I looking at this all wrong and need to think differently?
> 
> It seems like this situation must come up all the time, and I expect an
> easier way to make it work. All the examples in the docs show formatting
> with two fields -- One formatted and one not formatted. But, I don't
think
> users want to see it this way.
> 
> Thanks much for any advice!
> 
>    Clarke
>








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to