-
1. Re: What is wrong with datascroller
amitev Dec 25, 2007 10:39 AM (in response to kks_krishna)jsf version?
-
2. Re: What is wrong with datascroller
kks_krishna Dec 25, 2007 10:49 AM (in response to kks_krishna)I resolved the problem. added subset inside h:column
-
3. Re: What is wrong with datascroller
baranjsf Aug 3, 2010 1:30 PM (in response to kks_krishna)Hi
I am new in richfaces.I have problem with datascroller.
I have one class named State:
public class State { private String name; private String capital; private String flagImage; public State(String name, String capital, String flagImage){ this.setName(name); this.setCapital(capital); this.setFlagImage(flagImage); } public void setName(String name) { this.name = name; } public String getName() { return name; } public void setFlagImage(String flagImage) { this.flagImage = flagImage; } public String getFlagImage() { return flagImage; } public void setCapital(String capital) { this.capital = capital; } public String getCapital() { return capital; } }
and I have one jsp page like this:
<body> <f:view> <h:form> -----------------------DATA TABEL----------------- <rich:dataTable value="#{backingBean7.stateList}" var="state" id="statesTable1" rows="3"> <h:column> <f:facet name="header">State</f:facet> <h:outputLabel value="#{state.name}"></h:outputLabel> </h:column> </rich:dataTable> <h:panelGrid style="text-align: left"> <rich:datascroller for="statesTable1" maxPages="2" selectedStyle="font-weight:bold" /> </h:panelGrid> -----------------------DATA LIST------------------ <rich:panel> <f:facet name="header"> Using rich:datascroller </f:facet> <rich:dataList id="statesTable2" value="#{backingBean7.stateList}" var="state" rows="3" > <h:outputLabel value="#{state.name}"></h:outputLabel> </rich:dataList> <h:panelGrid style="text-align: left"> <rich:datascroller for="statesTable2" maxPages="2" selectedStyle="font-weight:bold" /> </h:panelGrid> </rich:panel> ---------------------DATA DEFINITION------------------ <rich:panel> <f:facet name="header"> Using rich:datascroller </f:facet> <rich:dataDefinitionList id="statesTable3" value="#{backingBean7.stateList}" var="state" rows="3"> <h:outputLabel value="#{state.name}"></h:outputLabel> </rich:dataDefinitionList> <h:panelGrid style="text-align: left"> <rich:datascroller for="statesTable3" maxPages="2" selectedStyle="font-weight:bold"/> </h:panelGrid> </rich:panel> </h:form> </f:view> </body>
In my backing bean, stateslist will be initialized in init() method like this:
stateList = new ArrayList<State>();
stateList.add(new State("11", "111", "11111"));
stateList.add(new State("22", "222", "22222"));
stateList.add(new State("33", "333", "33333"));
stateList.add(new State("44", "444", "44444"));
stateList.add(new State("55", "555", "55555"));
stateList.add(new State("66", "666", "66666"));
stateList.add(new State("77", "777", "77777"));
stateList.add(new State("88", "888", "88888"));
stateList.add(new State("99", "999", "99999"));In my datatable, when I click on page numbers, datatable will not be updated(no action, no upfate), and in my datalist and datadefinitionlist, when I go to page 2 or 3 or..., records from page 1 will be added to other records.
Is there any special configuration or setting that I should insert in my web.xml or facesconfig?
I need help
-
4. Re: What is wrong with datascroller
ilya_shaikovsky Aug 4, 2010 4:37 AM (in response to baranjsf)check please if there are any exceptions in server log or client side problem logged in a4j:log.