Biblioteka jsf_html udostępnia HTML-owe elementy GUI, znaczniki dla wszystkich kombinacji UIComponent i rendererów z HTML RenderKit zdefiniowanych w specyfikacji JavaServer Faces. Jednemu komponentowi może odpowiadać więcej niż jeden znacznik, np. zarówno commandButton, jak commandLink odpowiadają funkcjonalności UICommand.
Ważniejsze znaczniki:
<h:commandButton id="submit"
action="#{userNumberBean.getOrderStatus}" value="Submit" />
<h:commandButton value="#{bundle.Submit}"
action="success"/>
<h:dataTable id="items"
value="#{cart.items}"
var="item">
<h:column >
<h:inputText id="quantity" size="4"
value="#{item.quantity}" >
</h:inputText>
</h:column>
</h:dataTable>
value mówi, po czym się iterujemy, var pozwala nazwać ,,bieżący'' element, by
odwoływać się do niego; można ustawić, które rzędy chcemy wyświetlać przez
first (numer pierwszego wyświetlanego) i rows (liczba wyświetlanych)
<h:message
style= "color: red;
font-family: 'New Century Schoolbook', serif;
font-style: oblique;
text-decoration: overline" id="errors1" for="userNo"/>
<h:inputText id="userNo" value="#{UserNumberBean.userNumber}">
<f:validateLongRange minimum="0" maximum="10" />
<h:panelGrid columns="2"
styleClass="list-background"
title="#{bundle.Checkout}">
<h:outputText value="#{bundle.Name}" />
<h:inputText id="name" size="50"
value="#{cashier.name}"
required="true">
<f:valueChangeListener
type="listeners.NameChanged" />
</h:inputText>
<h:message styleClass="validationMessage" for="name"/>
<h:outputText value="#{bundle.CCNumber}"/>
</h:panelGrid>
Pewna liczba własności jest wspólna dla wszystkich (czy prawie wszystkich) komponentów, są to np.:
<h:outputText style= "color: red" value="#{UserNumberBean.minimum}"/>
<h:outputText styleClass="subtitle" value="just a subtitle"/>
<inputText binding="\#{UserNumberBean.userNoComponent}" />
<h:inputText id="userNo"
value="\#{UserNumberBean.userNumber}"
validator="\#{UserNumberBean.validate}" />
<h:commandLink id="check" rendered="#{cart.numberOfItems > 0}">
<h:outputText value="#{bundle.CartCheck}"/>
</h:commandLink>
Informacje dodatkowe:
<h:dataTable id="items"
columnClasses="list-column-center, list-column-left,
list-column-right, list-column-center"
footerClass="list-footer"
rowClasses="list-row-even, list-row-odd"
styleClass="list-background"
value="#{cart.items}"
var="item">
<h:column >
<f:facet name="footer"
<h:panelGroup>
<h:outputText value="#{bundle.Subtotal}"/>
<h:outputText value="#{cart.total}" />
<f:convertNumber type="currency" />
</h:outputText>
</h:panelGroup>
</f:facet>
<h:inputText id="quantity" size="4"
value="#{item.quantity}" >
</h:inputText>
</h:column>
</h:dataTable>
<h:commandButton onclick="history.go(-1)" value="Go Back!"/>Można też skonfigurować np. ListBoxa tak, by strona była submitowana bezpośrednio po wyborze jednego z elementów - by to osiągnąć, należy dodać coś w stylu
onchange="this.form.submit()"