h:outputLabel adding unwanted newline character to label content
I've just come back to JSF after a multi-year absence so I'm still feeling my way a bit, but there is one thing that's current niggling me.
Is there a good reason why Mojarra 2.0.2 adds a new line character in front of the content of every element?
That results in this:
instead of this:
While Firefox ignores the \n character in most cases, if you put a label after, say, a checkbox field, the \n is converted into a space character, and there is no way to get rid of it. It's hard coded into the Renderkit source (LabelRenderer.java line 118):
writer.writeText("\n", component, null);
Is this a bug or a feature of the JSF spec? It seems to me that the only reason why you would add a newline was to make a source code more readable, in which case it should be added before the open label tag, not after it.