test.xhtml
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"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui">
<h:head>
<title>Test</title>
</h:head>
<h:body style="font-size:0.6em;">
<h:form prependId="false">
<p:carousel id="carousel" value="#{testBean.someValues}" var="value" rows="1" itemStyle="width:180px; padding:5px;">
<h:panelGrid columns="1">
<h:outputText value="Content: #{value}" />
</h:panelGrid>
</p:carousel>
<p:spacer height="10"/>
<p:commandButton value="update" update="carousel"/>
</h:form>
</h:body>
</html>
Code: Select all
@ManagedBean
@ViewScoped
public class TestBean implements Serializable{
private String[] someValues = {
"Content1",
"Content2",
"Content2",
"Content4",
"Content5",
"Content6",
"Content7"
};
public String[] getSomeValues() {
return someValues;
}
}
I got this:
Other issue that I realized is regarding the <p:spacer height="10"/>. As we can see, it rendered a width space, and not a height space.
I'm using Firefox 3.6.13 and Prime 2.2 RC2.
When using Chrome, the issue is when rendering the carousel component for the first time (even before hitting update):