explorers' club

explorations in dev, science, sci-fi, games, and other fun stuff!

TextInput gets a real RIA makeover

1 Comment

I have been working on a personal project for sometime now. It makes heavy use of forms and renderer type class. This means loads of mx:TextInput. The issue was that I wanted the effect of inline editing on a form that, at first glance, looks like any pre-filled data will just appear as labels (or in this case a TextInputs minus their borders).

One approach was to simply use mx:states and swap out labels for textInputs and visa versa when needed. That would probably entail either some intense if/else and switch statements or just doing a massive form state swap when one of the controls is activated. I don’t like this because a) it deals with states which IMHO kinda suck and are finicky and b) seems very inefficient.

The other approach (which I opted for) was to have the actual control switch its state manually. In this case not states as in mx:states but rather it would handle its own display logic based on the user interaction. Enter the new com.jwopitz.controls.TextInput. When you are not editing it looks like a simple label with a prompt and when you want to edit it, WHALLLA, just click it and it appears to be the TextInput it really is.

I think this makes the component itself more inline with what a RIA is. Forms by nature are not really all that exciting and RIA-ish. I mean really, how much more fun can entering data be? But this very simple addition to the TextInput’s feature set might help make a boring form into a ….. well … less….. boring form. šŸ™‚

Keep in mind, even though I have done quite a bit of use testing with this, there may be a few undiscovered bugs. Hey its a beta version right? If any major issues come up, shoot me an email.

Anywhoo… I have updated jwo_lib and the example file (link above). I will post updates to the docs here shortly.


One thought on “TextInput gets a real RIA makeover

  1. I think this is great. I am a tufte fan and I hate the thought of having textinputs with their borders when there is information in them.

    This is great!

    Thanks for sharing.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s