Hey Everyone,
I want to create a subclass of a Form Component (Let's use TextField for this example) which takes a String in the constructor, and automatically adds the HTML for a Label before the field. I want to provide all the default functionality of a TextField (like adding behaviors, and validators), so I don't think a Panel will work for me. I found a post where it mentioned (as a hack)to override onRender to add HTML for the label directly, but this runs into problems when you include the Component in an AJAX page (whenever you re-add the component, it calls onRender, and you add the HTML for the label multiple times. Is there a way to do this using SimpleFormComponentLabel, or some other construct? Could I use FormComponentPanel? Or is there some configuration and functionality in AbstractTextCompnent and TextField which I would lose by using a FormComponentPanel? Thanks for any advice!! -Clay Lehman
