Howdy,
I'm currently doing this by using a widget that fires value change events after each key press. Pectin has three classes for this, EnhancedTextBox, EnhancedTextArea and EnhancedPasswordTextBox. You're example should work if it's bound to one of these widgets.
There's also a Conditions.textOf(userName).isEmpty() you might want to look at. I know 0.8 snapshot has an isBlank() condition too but I'm not sure if that's in 0.7 or not.
Cheers
Andrew