inputText.xhtml 862 Bytes
Newer Older
michael.simon's avatar
michael.simon committed
1
2
3
4
5
6
7
8
9
<ui:composition
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">

    <c:set var="id" value="#{not empty id ? id : label}" />
    <c:set var="required" value="#{not empty required and required}" />
10
    <c:set var="rendered" value="#{not empty rendered ? rendered : true}" />
michael.simon's avatar
michael.simon committed
11

12
    <p:outputLabel for="#{id}" value="#{label}" rendered="#{rendered}"/>
michael.simon's avatar
michael.simon committed
13
    <h:panelGroup>
14
	    <p:inputText id="#{id}" size="50" value="#{value}" label="#{label}" required="#{required}" rendered="#{rendered}">
michael.simon's avatar
michael.simon committed
15
16
17
18
19
20
	        <f:ajax event="blur" execute="@this" render="#{id}-message" />
	    </p:inputText>
	    <p:message id="#{id}-message" for="#{id}" />
	</h:panelGroup>
	
</ui:composition>