Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Have you tried use facelets?</p> <p>That will allow you to assing your own ids ie:</p> <p></p> <p>me:labelKeyThingo can then use the id=#{labelKey} to make a unique label. Here is an example facelet called <strong>m:textPassword</strong> from my bad code:</p> <pre><code> &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jstl/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"&gt; &lt;ui:composition&gt; &lt;c:set var="styleClass" value="formPrompt" /&gt; &lt;c:set var="requiredLabel" value="" /&gt; &lt;c:choose&gt; &lt;c:when test="${required=='true'}"&gt; &lt;c:set var="required" value="true" /&gt; &lt;c:set var="styleClass" value="formRequiredPrompt" /&gt; &lt;c:set var="requiredLabel" value="*" /&gt; &lt;/c:when&gt; &lt;/c:choose&gt; &lt;h:panelGroup id="#{id}_formRowTemplateLabel_panelGroup"&gt; &lt;h:outputLabel for="#{id}" styleClass="#{styleClass}" id="#{id}_formRowTemplate_outPut" value="#{label}" /&gt; &lt;c:if test="${required == 'true'}"&gt; &lt;h:outputText value="#{requiredLabel}" styleClass="formRequiredPromptAsterix"&gt;&lt;/h:outputText&gt; &lt;/c:if&gt; &lt;/h:panelGroup&gt; &lt;h:panelGroup id="#{id}_textPasswordTemplate_panelGroup"&gt; &lt;h:inputSecret required="${required}" id="#{id}" value="#{property}" styleClass="formText"&gt; &lt;f:validator validatorId="Maserati.Password" /&gt; &lt;f:validateLength maximum="16" minimum="8" /&gt; &lt;ui:insert name="additionalTags"&gt;&lt;/ui:insert&gt; &lt;/h:inputSecret&gt; &lt;h:message styleClass="formErrorMsg" id="#{id}_textPasswordTemplate_msg" for="#{id}" /&gt; &lt;/h:panelGroup&gt; &lt;/ui:composition&gt; &lt;/html&gt; </code></pre> <p>It is used thusly:</p> <pre><code> &lt;m:textPassword id="password" label="#{msgs.passwordPrompt}" property="#{individualApplicationMBean.password}" required="true" maxlength="16" /&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload