Hi,
I've a problem to get this component running.
Actually it runs but shows just 5 radiobuttons in a row instead of the 5 stars
In html it is then of course rendered as a series of <input>s
and not as a series of <div><a>--</a></div>
What could be the problem here...???
PrimeFaces 3.0.1
Tomcat 7
JSF 2.1.6
Problem with Rating component
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
do you have h:head tag?
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
That's basically my setup
That's the template, that I'm filling with my JSF pages
Than the following is created
Which is a bit strange because in the showcase the p:rating tag does not create input tags.
Don't be confused I'm just trying right now with the Labs Snapshot, usually I'm on 3.0.1
Code: Select all
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:pretty="http://ocpsoft.com/prettyfaces">
<h:head>
[..]
</h:head>
<h:body>
[..]
</h:body>
</html>
Than the following is created
Code: Select all
<!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">
<head>
<link type="text/css" rel="stylesheet" href="/justbuyit/javax.faces.resource/theme.css.jsf?ln=primefaces-smoothness" />
<link type="text/css" rel="stylesheet" href="/justbuyit/javax.faces.resource/primefaces.css.jsf?ln=primefaces&v=3.1-SNAPSHOT" />
<link type="text/css" rel="stylesheet" href="/justbuyit/javax.faces.resource/rating/rating.css.jsf?ln=primefaces&v=3.1-SNAPSHOT" />
<script type="text/javascript" src="/justbuyit/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=3.1-SNAPSHOT"></script>
<script type="text/javascript" src="/justbuyit/javax.faces.resource/primefaces.js.jsf?ln=primefaces&v=3.1-SNAPSHOT"></script>
<script type="text/javascript" src="/justbuyit/javax.faces.resource/rating/rating.js.jsf?ln=primefaces&v=3.1-SNAPSHOT"></script>
<title>Title</title>
</head>
<body>
<div id="productRating">
<input type="hidden" name="j_idt33" value="j_idt33" />
<span id="j_idt33:messages"></span>
<script id="j_idt33:messages_s" type="text/javascript">$(function(){PrimeFaces.cw('Growl','widget_j_idt33_messages',{id:'j_idt33:messages',msgs:[]});});</script>
<span id="j_idt33:j_idt34">
<input name="j_idt33:j_idt34_input" type="radio" value="1" />
<input name="j_idt33:j_idt34_input" type="radio" value="2" />
<input name="j_idt33:j_idt34_input" type="radio" value="3" />
<input name="j_idt33:j_idt34_input" type="radio" value="4" checked="checked" />
<input name="j_idt33:j_idt34_input" type="radio" value="5" />
</span>
<script id="j_idt33:j_idt34_s" type="text/javascript">$(function() {PrimeFaces.cw('Rating','widget_j_idt33_j_idt34',{id:'j_idt33:j_idt34',behaviors:{rate:function(event) {PrimeFaces.ab({source:'j_idt33:j_idt34',process:'j_idt33:j_idt34',update:'j_idt33:messages',event:'rate'}, arguments[1]);}}},'rating');});</script>
<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="583952924873727405:-4800618003172545757" autocomplete="off" />
</div>
</body>
</html>
Don't be confused I'm just trying right now with the Labs Snapshot, usually I'm on 3.0.1
I've removed step by step every thing I could imagine and the "bad" one was a jquery include
And having the solution I found immediately the solution http://stackoverflow.com/questions/5457 ... primefaces
Thank u all for looking at my problem
Code: Select all
<script type="text/javascript" language="javascript" src="#{facesContext.externalContext.requestContextPath}/resources/js/jquery-1.7.1.js" />
Thank u all for looking at my problem
-
- Information
-
Who is online
Users browsing this forum: No registered users and 47 guests