<f:convertNumber> uses DecimalFormat under covers, and this is not related to phone numbers.
You need to create a custom Converter and do the job in getAsString() using regular String methods like substring() and friends.
@FacesConverter("phoneConverter") public class PhoneConverter implements Converter{ @Override public String getAsString(FacesContext context, UIComponent component, Object modelValue) { String phoneNumber = (String) modelValue; StringBuilder formattedPhoneNumber = new StringBuilder();
Use it as follows:
<h:outputText value="1234567890" converter="phoneConverter" />
source share