InputText extends standard InputText with skinning capabilities.
<div class="card">
<h5>Basic</h5>
<p:inputText/>
<h5>Floating Label</h5>
<span class="ui-float-label">
<p:inputText id="float-input" value="#{inputTextView.text}"/>
<p:outputLabel for="@previous" value="Username"/>
</span>
<h5>Left Icon</h5>
<span class="ui-input-icon-left">
<i class="pi pi-search" />
<p:inputText placeholder="Search" />
</span>
<h5>Right Icon</h5>
<span class="ui-input-icon-right">
<i class="pi pi-spin pi-spinner" />
<p:inputText />
</span>
<h5>Help Text</h5>
<div class="field">
<p:outputLabel for="username1" styleClass="block">Username</p:outputLabel>
<p:inputText id="username1" styleClass="block"/>
<small class="block">Enter your username to reset your password.</small>
</div>
<h5>Invalid</h5>
<div class="field">
<p:outputLabel for="username2" styleClass="block">Username</p:outputLabel>
<p:inputText id="username2" styleClass="block ui-state-error"/>
<small class="block ui-state-error">Username is not available.</small>
</div>
<h5>Disabled</h5>
<p:inputText disabled="true" />
</div>
package org.primefaces.showcase.view.input;
import jakarta.enterprise.context.RequestScoped;
import jakarta.inject.Named;
import io.quarkus.runtime.annotations.RegisterForReflection;
@Named
@RequestScoped
@RegisterForReflection(serialization = true)
public class InputTextView {
private String text;
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
}