Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSF 2.0 Ajax Support

895260Nov 17 2011 — edited Nov 17 2011
I am trying to solve this problem for days but couldn't find a proper solution. People suggested to use Ajax but I couldn't implement it. I have a jspf page in which I am using facelets. I have a form with input values and a button. When user clicks on the button I want to check the validation and give user a feedback.

<?xml version="1.0" encoding="UTF-8"?>
<div class="rave-layout" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
<f:subview id="webfilteroverview">
<webuijsf:form id="form1">
<tr>
<td>
<webuijsf:label for="textField1" text="#{msg.reports_request_name}"/>
</td>
<td colspan="2">
<webuijsf:textField binding="#{report.reportNameField}" columns="26" id="textField1" required="true"
style="margin-left:10px;" styleClass="textfield"/>
</td>
</tr>

<h:commandButton value="push" action="#{report.submitReportRequest}">
<f:ajax execute="@form1" render="@form1"/>
</h:commandButton>

report.java:

public void submitReportRequest() {
if(reportNameField!=null){
submitted=true;
}
}

but it is giving:

PWC6143: No tag "ajax" defined in tag library associated with uri "http://java.sun.com/jsf/core"

error. However I am using JSF 2.0 and as far as I know JSF 2.0 has Ajax support included. What am I doing wrong?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 15 2011
Added on Nov 17 2011
2 comments
230 views