2

I'm using a passthrough element inside Facelet page like this:

<input jsf:value="#{...}"/>

And I'd like to attach a Converter to it. How can I achieve this?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
ravshansbox
  • 748
  • 11
  • 21

1 Answers1

4

Just the same way as when you would be using a normal JSF <h:inputText> component instead of plain HTML, with either the converter attribute

<input jsf:value="#{...}" jsf:converter="fooConverter" />

or the <f:converter> tag.

<input jsf:value="#{...}">
    <f:converter converterId="fooConverter" />
</input>

Table 8-4 of the Java EE 7 tutorial lists which JSF component the given passthrough element will ultimately be converted to, before insertion in the JSF component tree. The Facelets VDL lists all available tags+attributes for those JSF components.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555