0

I am new to the JSF Icefaces components, I tired the example which is explained in enter link description here for textEntry. when I am running it shows only a blank page. I am using netbeans IDE and properly loaded all necessary libraries into project.

Thanks in advance.

My Jsf File:

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:ace="http://www.icefaces.org/icefaces/components"
  xmlns:icecore="http://www.icefaces.org/icefaces/core"
  xmlns:ui="http://xmlns.jcp.org/jsf/facelets">


    <ui:define name="sample">
        <h:form id="textEntryForm">
            <ace:panel id="personalInfoPanel" header="Personal Info">
                <h:panelGrid id="inputGrid" columns="1" width="100%">
                    <ace:textEntry id="firstNameTxt" value="#{userBean.firstName}" labelPosition="left" required="true" requiredIndicator="(*)" indicatorPosition="right">
                    </ace:textEntry>

                    <ace:textEntry id="lastNameTxt" value="#{userBean.lastName}" labelPosition="left" required="true" requiredIndicator="(*)" indicatorPosition="right">
                    </ace:textEntry>

                    <ace:textEntry id="adds1Txt" value="#{userBean.adds1}" labelPosition="left" required="true" requiredIndicator="(*)" indicatorPosition="right">
                    </ace:textEntry>

                    <ace:textEntry id="adds2Txt" value="#{userBean.adds2}" labelPosition="left" required="true" requiredIndicator="(*)" indicatorPosition="right">
                    </ace:textEntry>

                    <ace:textEntry id="cityTxt" value="#{userBean.city}" labelPosition="left" required="true" requiredIndicator="(*)" indicatorPosition="right">
                    </ace:textEntry>

                    <ace:textEntry id="countryTxt" value="#{userBean.country}" labelPosition="left" required="true" requiredIndicator="(*)" indicatorPosition="right">
                    </ace:textEntry>

                </h:panelGrid>
                <h:panelGrid width="100%">
                    <ace:message id="firstNameMsg" for="firstNameTxt"/>
                    <ace:message id="lastNameMsg" for="lastNameTxt"/>
                    <ace:message id="adds1Msg" for="adds1Txt"/>
                    <ace:message id="adds2Msg" for="adds2Txt"/>
                    <ace:message id="cityMsg" for="cityTxt"/>
                    <ace:message id="countryMsg" for="countryTxt"/>
                </h:panelGrid>
            </ace:panel>
        </h:form>
    </ui:define>

My Bean File:

package sample;


import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

@ManagedBean
@SessionScoped
public class UserBean {
private String firstName;
private String lastName;
private String adds1;
private String adds2;
private String city;
private String country;

public String getFirstName() {
    return firstName;
}

public void setFirstName(String firstName) {
    this.firstName = firstName;
}

public String getLastName() {
    return lastName;
}

public void setLastName(String lastName) {
    this.lastName = lastName;
}

public String getAdds1() {
    return adds1;
}

public void setAdds1(String adds1) {
    this.adds1 = adds1;
}

public String getAdds2() {
    return adds2;
}

public void setAdds2(String adds2) {
    this.adds2 = adds2;
}

public String getCity() {
    return city;
}

public void setCity(String city) {
    this.city = city;
}

public String getCountry() {
    return country;
}

public void setCountry(String country) {
    this.country = country;
}

}

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • why this line`` is outside of form? – techipank Jun 28 '16 at 06:58
  • And i guess issue is while doing copy paste you forget to copy template `template="/resources/templates/content-template.xhtml"` make sure you have this file in your structure for more info you can study Facelets UI Tag – techipank Jun 28 '16 at 07:02
  • it's mistakenly placed. –  Jun 28 '16 at 07:09
  • @techipank Where i get this template file? is it necessary to design Ice Face components? –  Jun 28 '16 at 07:14
  • unfortunately source code of that file is not given in the link which you provided alternatively you can follow this [link](http://stackoverflow.com/a/4793959/2034153) and design your template – techipank Jun 28 '16 at 08:33

0 Answers0