A virtual keyboard for text input.
<div class="card">
<h:form>
<div class="ui-fluid formgrid grid">
<div class="field col-12 md:col-4">
<p:outputLabel for="default" value="Default Layout: "/>
<p:keyboard id="default" value="#{keyboardView.value1}"/>
</div>
<div class="field col-12 md:col-4">
<p:outputLabel for="qwerty" value="Basic QWERTY: "/>
<p:keyboard id="qwerty" value="#{keyboardView.value2}" layout="qwertyBasic"/>
</div>
<div class="field col-12 md:col-4">
<p:outputLabel for="alphabetic" value="Alphabetic Layout: "/>
<p:keyboard id="alphabetic" value="#{keyboardView.value3}" layout="alphabetic"/>
</div>
<div class="field col-12 md:col-4">
<p:outputLabel for="custom1" value="Custom Layout 1: "/>
<p:keyboard id="custom1" value="#{keyboardView.value4}" layout="custom"
layoutTemplate="prime-back,faces-clear,rocks-close"/>
</div>
<div class="field col-12 md:col-4">
<p:outputLabel for="custom2" value="Custom Layout 2: "/>
<p:keyboard id="custom2" value="#{keyboardView.value5}" layout="custom"
layoutTemplate="create-space-your-close,owntemplate-shift,easily-space-spacebar"/>
</div>
<div class="field col-12 md:col-4">
<p:outputLabel for="keypad" value="Default Keypad: "/>
<p:keyboard id="keypad" value="#{keyboardView.value6}" keypadOnly="true"/>
</div>
<div class="field col-12 md:col-4">
<p:outputLabel for="password" value="Password Mode: "/>
<p:keyboard id="password" value="#{keyboardView.value9}" password="true" keypadOnly="true"/>
</div>
<div class="field col-12 md:col-4">
<p:outputLabel for="rtl" value="RTL: "/>
<p:keyboard id="rtl" value="#{keyboardView.value1}" dir="rtl"/>
</div>
</div>
</h:form>
</div>
@Named
@RequestScoped
public class KeyboardView {
private String value1;
private String value2;
private String value3;
private String value4;
private String value5;
private String value6;
private String value7;
private String value8;
private String value9;
public String getValue1() {
return value1;
}
public void setValue1(String value1) {
this.value1 = value1;
}
public String getValue2() {
return value2;
}
public void setValue2(String value2) {
this.value2 = value2;
}
public String getValue3() {
return value3;
}
public void setValue3(String value3) {
this.value3 = value3;
}
public String getValue4() {
return value4;
}
public void setValue4(String value4) {
this.value4 = value4;
}
public String getValue5() {
return value5;
}
public void setValue5(String value5) {
this.value5 = value5;
}
public String getValue6() {
return value6;
}
public void setValue6(String value6) {
this.value6 = value6;
}
public String getValue7() {
return value7;
}
public void setValue7(String value7) {
this.value7 = value7;
}
public String getValue8() {
return value8;
}
public void setValue8(String value8) {
this.value8 = value8;
}
public String getValue9() {
return value9;
}
public void setValue9(String value9) {
this.value9 = value9;
}
}