It happens automatically. The dataTable uses your ID as a model, but the full ID is decorated to make it unique.
In th case of JSF message components, things (again) are handled automatically. If you're generating your own message, it needs to be a property for the row of the model that your dataTable is displaying.
Customer surveys are for companies who didn't pay proper attention to begin with.