It may be necessary, but it is distasteful to announce it ahead of time.
Obama is not reassuring Democrats or the general public when he announces compromise before negotiations have even started.
It is best to announce your ideals and the policy you will fight for, then after actually going to the mat to get those ideals enacted, including using the bully pulpit to get the public to pressure your political opponents to give ground, and then when you've gone as far as you can, compromise as close as possible to the end, but apologize and say exactly who was the problem and what they demanded for their vote or their excuse for not giving it no matter what.
To do it the way Obama does is the equivalent of walking into a car dealership and telling them you are willing to pay a price they are comfortable with before you even say what model you want.
The Republicans seem to understand this, the Democrats, and Obama in particular, seem to think it's a virtue to tell us they are ready to pinch a loaf of compromise before their lunch has even reached the launch pad.