I\'m trying to implement a custom truncate converter, which truncates a string at a given index and adds a continuation symbol. The converter works fine, only when i hard co
Based on @Maks solution: It's possible to combine the converter and the attribute in one tag:
http://mycompany.com/some-identifier
truncate
bla.blablabla.Truncate
truncateIndex
Then you can use the converter like this:
You also don't need to grab the parameter from the component-attributes. A bean-property with the same name will be populated automatically:
@FacesConverter("bla.blablabla.Truncate")
public class Truncate implements Converter {
private String truncateIndex;
// getters + setters
...
}