Well, yeah, I couldn't get the state mechanism to work -- I was calling the submit() with the name and value in the wrong place. :\
Note to self: Start looking at the first place it's possible to screw up, because that's where the error usually is, it seems...