This discussion is archived
1 Reply Latest reply: Apr 16, 2009 4:53 AM by 843833 RSS

Problem with blueprints rating

843833 Newbie
Currently Being Moderated
Hello,

I have a problem with Rating component of Blueprints, it display but doesn´t work and return javascript error:

'gradeReadOnly is null or isn't an object'

My configuration is:

JSP:
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" 
xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:a4j="https://ajax4jsf.dev.java.net/ajax" 
xmlns:ui="http://java.sun.com/blueprints/ui/14" version="2.0">
.
.

<ui:rating id="rating" maxGrade="5" grade="#{FilmInsertManagedBean.grade}" gradeReadOnly="false"/>
ManagedBean:
private int grade = 0;
private String[] ratingText;

    public void setGrade(int grade) {
        this.grade=grade;
    }
    public int getGrade() {
        return grade;
    } 
     public String[] getRatingText() {
        return new String[]{"Hate", "Below", "Average", "Above", "Love"};
    }
Tomcat v6.0
jdk1.6

And this libraries:

/JSF/WebContent/WEB-INF/lib/ajax4jsf-1.1.1.jar
/JSF/WebContent/WEB-INF/lib/batik-awt-util-1.6-1.jar
/JSF/WebContent/WEB-INF/lib/batik-ext-1.6-1.jar
/JSF/WebContent/WEB-INF/lib/batik-gui-util-1.6-1.jar
/JSF/WebContent/WEB-INF/lib/batik-util-1.6-1.jar
/JSF/WebContent/WEB-INF/lib/bp-ui-14.jar
/JSF/WebContent/WEB-INF/lib/commons-beanutils-1.7.0.jar
/JSF/WebContent/WEB-INF/lib/commons-codec-1.3.jar
/JSF/WebContent/WEB-INF/lib/commons-collections-3.2.jar
/JSF/WebContent/WEB-INF/lib/commons-digester-1.8.jar
/JSF/WebContent/WEB-INF/lib/commons-discovery-0.4.jar
/JSF/WebContent/WEB-INF/lib/commons-fileupload-1.2.1.jar
/JSF/WebContent/WEB-INF/lib/commons-lang-2.1.jar
/JSF/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar
/JSF/WebContent/WEB-INF/lib/commons-validator-1.3.1.jar
/JSF/WebContent/WEB-INF/lib/jakarta-oro-2.0.8.jar
/JSF/WebContent/WEB-INF/lib/jstl-1.2.jar
/JSF/WebContent/WEB-INF/lib/myfaces-api-1.2.6.jar
/JSF/WebContent/WEB-INF/lib/myfaces-impl-1.2.6.jar
/JSF/WebContent/WEB-INF/lib/tomahawk12-1.1.8.jar
/JSF/WebContent/WEB-INF/lib/shale-remoting.jar

Have someone any idea that what happend? Thank you and sorry for my English.
  • 1. Re: Problem with blueprints rating
    843833 Newbie
    Currently Being Moderated
    I have found the solution. It's an incompatibility between:

    ui:rating from BluePrints and t:inputDate from Tomahawk

    I replaced t:inputDate and I put ui:popupCalendar.

    After I had to change my web.xml because ui:popupCalendar return error and I read in a forum that I had to replace:

    <servlet-mapping>
           <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    and I put:

    <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>