1

How do I insert a tab in a jsf page?

<h:outputText class="text" value="#{BackingBean.line1}" /> 

This doesn't work:

String line1 = "Scale \t: " + vss.getScale(); 

Any idea?

1

1 Answer 1

2

Whitespace is in HTML by default not accounted as part of presentation. You'd need to use HTML elements like <br/> for a newline or <ul><li> for lists or <dl><dt><dd> for definitions. Most likely the <dl><dt><dd> is most suitable for you.

If you have a hard head in, you could always just set the CSS white-space property of the parent element to pre.

E.g.

<h:outputText ... styleClass="preformatted" /> 

(please note that the class attribtue is invalid. It should be styleClass)

with

.preformatted { white-space: pre; } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.