I have a requirement where I need to come up with a feature to allow commenting on a given input text field.
It is exactly like a feature in Excel sheets, where commenting feature is built-in, the only difference here it is expected to
be a JSF component.
An Excel spreadsheet cell is considerably more complex than an HTML InputText field, which is what the basic JSF input field control is based on.
What you need is a compound control where there's a way to associate 2 (or more) data items with a single control - one data item for the contents, one for the comment. And a UI operation to enable/display the comments.
There's nothing like this in the core JSF tagset. Someone may have a extended tag that does this, but I don't know of any. You might have to create your own.
Customer surveys are for companies who didn't pay proper attention to begin with.