The only way that have worked for me is editing the proper underlying css class of the "shortDesc component" (AFNoteWindowShortDesc
) in the skin file and reading the value with the breakline character from a managed bean if you want to control where to break each line:
In my css-skin file:
.AFNoteWindowShortDesc {
white-space: pre; /* To produce the line break */
}
In a managed bean:
private String multilineText = "Hello\nWorld";
public String getMultilineText() {
return multilineText;
}
Finally in the page fragment:
<af:inputText label="Multiline shortDesc in ADF" id="it1"
shortDesc="#{pageFlowScope.departmentManagedBean.multilineText}"/>
Result:

But if your shortDesc
text is long and you only want it break automatically, then do this:
Skin file:
.AFNoteWindowShortDesc {
word-break: break-word;
}
Result:
