I am newbie here and want to know how can I implement one primefaces Showcase example in my dynamic web application.
I created a dynamic web application with jsf support and I added the primesfaces jar files to the web libraries.
Now I want to get the ajax example "simple PPR" work. How can I do that?
I have two files ".xhtml" and the bean-file:
Code: Select all
/** pprUpdate.xhtml */
<h:form>
<h:panelGrid columns="4" cellpadding="5">
<h:outputLabel for="name" value="Name:" style="font-weight:bold"/>
<p:inputText id="name" value="#{pprBean.firstname}" />
<p:commandButton value="Submit" update="display"/>
<p:ajaxStatus style="width:16px;height:16px;">
<f:facet name="start">
<h:graphicImage value="../design/ajaxloading.gif" />
</f:facet>
<f:facet name="complete">
<h:outputText value="" />
</f:facet>
</p:ajaxStatus>
</h:panelGrid>
<h:outputText value="#{pprBean.firstname}" id="display" />
</h:form>
Code: Select all
/** PPRBean.java */
package myPackage;
import java.io.Serializable;
public class PPRBean implements Serializable {
private String firstname;
public String getFirstname() {
return firstname;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
}
Aha