Data Table Not reRendering after form submit.
mikcantrell Jul 25, 2013 4:56 PMI have a simple rich:datatable. I have it setup to accept a variable and on blur submit that variable to a bean that runs an oracle query and it should rerender the datatable after that. It does get to the action method on my backing bean and runs the query but it does not refresh/rerender my datatable. Been looking at this for over a day now and would appreciate any help or advice. I have read many discussions but none have helped me.
Tomcat 7
RichFaces 4.3.3
--------------------------------
Libs
activation.jar
antlr-2.7.6.jar
asm.jar
asm-attrs.jar
cglib-2.1.3.jar
commons-beanutils-1.8.3.jar
commons-collections-3.2.jar
commons-digester-1.8.jar
commons-fileupload.jar
commons-io.jar
commons-lang.jar
commons-logging-1.1.1.jar
cssparser-0.9.5.jar
dom4j-1.6.1.jar
el-api-2.2.1-b03.jar
FastInfoset.jar
guava-14.0.1.jar
hibernate3.jar
hibernate-jpa-2.0-api-1.0.1.Final.jar
icefaces.jar
icefaces-ace.jar
icefaces-compat.jar
icepush.jar
javassist-3.12.0.GA.jar
javax.annotation.jar
javax.servlet.jsp.jstl-1.2.1.jar
javax.servlet.jsp.jstl-api-1.2.1.jar
jboss-el-2.0.0.GA.jar
jsf-api-2.1.3-b02.jar
jsf-impl-2.1.3-b02.jar
jsr305-1.3.9.jar
jsr305-1.3.9.jar
jta-1.1.jar
log4j.jar
myfaces-api-2.1.12.jar
myfaces-impl-2.1.12.jarr
myfaces-bundle-2.1.12.jar
ojdbc6.jar
oscache-2.1.jar
poi-3.7.jar
richfaces-archetype-kitchensink.jar
richfaces-archetype-simpleapp.jar
richfaces-components-api-4.3.3.Final.jar
richfaces-components-ui-4.3.3.Final.jar
richfaces-core-api-4.3.3.Final.jar
richfaces-core-impl-4.3.3.Final.jar
sac-1.3.jar
slf4j-api-1.6.1.jar
util-bridges.jar
util-java.jarutil-taglib.jar
----------------------------------------
PAGE
<?xml version="1.0"?>
<faces-config
version="2.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
>
<managed-bean>
<managed-bean-name>MCGContentFrm</managed-bean-name>
<managed-bean-class>edu.mcg.common.app.beans.MCGContentFrm</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>MCGGenesFrm</managed-bean-name>
<managed-bean-class>edu.mcg.common.app.beans.MCGGenesFrm</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>MCGDiagnosesFrm</managed-bean-name>
<managed-bean-class>edu.mcg.common.app.beans.MCGDiagnosesFrm</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>MutationsFrm</managed-bean-name>
<managed-bean-class>edu.mcg.common.app.beans.MutationsFrm</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>MVCountsFrm</managed-bean-name>
<managed-bean-class>edu.mcg.common.app.beans.MVCountsFrm</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>MCGProtocolsFrm</managed-bean-name>
<managed-bean-class>edu.mcg.common.app.beans.MCGProtocolsFrm</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<lifecycle>
<phase-listener>com.liferay.faces.util.lifecycle.DebugPhaseListener</phase-listener>
</lifecycle>
</faces-config>
----------------------------
BACKING BEAN
package edu.mcg.common.app.beans;
import java.util.ArrayList;
import java.util.List;
import javax.faces.model.SelectItem;
import edu.mcg.common.formBeans.MCGProtocolsFB;
import org.richfaces.model.Filter;
public class MCGProtocolsFrm
{
MCGProtocolsFB fb = new MCGProtocolsFB();
private String mcgpIdSF = "";
private String nctIdSF = "";
private String statusSF = "";
private String titleSF = "";
private String phasesSF = "";
private List<SelectItem> suggLst = new ArrayList<SelectItem>();
private List<MCGProtocolsFB> lst = new ArrayList<MCGProtocolsFB>();
public synchronized List<MCGProtocolsFB> getLst()
{
this.lst = new ArrayList();
String sqlWhere = " ROWNUM < 500 ";
fb = new MCGProtocolsFB();
if (!this.mcgpIdSF.equals(""))
{
sqlWhere = sqlWhere + " AND mcgp_id = '" + this.getMcgpIdSF() + "'";
}
if (!this.nctIdSF.equals(""))
{
sqlWhere = sqlWhere + " AND nct_id = '" + this.getNctIdSF() + "'";
}
if (!this.statusSF.equals(""))
{
sqlWhere = sqlWhere + " AND status LIKE '%" + this.getStatusSF() + "%'";
}
if (!this.titleSF.equals(""))
{
sqlWhere = sqlWhere + " AND title LIKE '%" + this.getTitleSF() + "%'";
}
if (!this.phasesSF.equals(""))
{
sqlWhere = sqlWhere + " AND phases LIKE '%" + this.getPhasesSF() + "%'";
}
fb.setSqlWhere(sqlWhere);
fb.setList();
lst = fb.getList();
return lst;
}
public synchronized void setLst(List<MCGProtocolsFB> lst)
{
this.lst = lst;
}
public List<SelectItem> getSuggLst()
{
if (suggLst == null || suggLst.size() == 0)
{
setSuggLst();
}
return suggLst;
}
public void setSuggLst()
{
suggLst = new ArrayList<SelectItem>();
if (suggLst != null)
{
suggLst.clear();
}
SelectItem item = new SelectItem("", "");
suggLst.add(item);
//suggLst = new ArrayList<String>();
MCGProtocolsFB fb = new MCGProtocolsFB();
fb.setSqlOrdBy("mcgp_id");
fb.setList();
for (int i = 0; i < fb.getList().size(); i++)
{
MCGProtocolsFB fb2 = new MCGProtocolsFB();
fb2 = (MCGProtocolsFB) fb.getList().get(i);
item = new SelectItem(fb2.getMcgpIdSF(), fb2.getNctIdSF() + " " + fb2.getTitleSF());
suggLst.add(item);
}
}
public synchronized String getMcgpIdSF()
{
/* fb = new MCGProtocolsFB();
fb.setMcgpIdSF(this.mcgpIdSF);
fb.setList();
*/ return mcgpIdSF;
}
public synchronized void setMcgpIdSF(String mcgpIdSF)
{
// System.out.println("\nMIK IN SET MCGPIF = " + this.mcgpIdSF);
// fb.setMcgpIdSF(this.mcgpIdSF);
// fb.setList();
this.mcgpIdSF = mcgpIdSF;
}
public synchronized void filter()
{
System.out.println("\nMIK IN SET MCGPIF = " + this.mcgpIdSF);
// fb.setMcgpIdSF(this.mcgpIdSF);
// fb.setList();
}
public synchronized String getNctIdSF()
{
return nctIdSF;
}
public synchronized void setNctIdSF(String nctIdSF) {
this.nctIdSF = nctIdSF;
}
public synchronized String getStatusSF() {
return statusSF;
}
public synchronized void setStatusSF(String statusSF) {
this.statusSF = statusSF;
}
public synchronized String getTitleSF() {
return titleSF;
}
public synchronized void setTitleSF(String titleSF) {
this.titleSF = titleSF;
}
public synchronized String getPhasesSF() {
return phasesSF;
}
public synchronized void setPhasesSF(String phasesSF) {
this.phasesSF = phasesSF;
}
}
-----------------------------------------
SQL OUTPUT FROM HIBERNATE
MIK IN SET MCGPIF = CDR0000749229
Hibernate: select mcgprotoco0_.mcgp_id as mcgp1_5_, mcgprotoco0_.nct_id as nct2_5_, mcgprotoco0_.title as title5_, mcgprotoco0_.status as status5_, mcgprotoco0_.phases as phases5_ from mcg_protocols_mv mcgprotoco0_ where 1=1 and ROWNUM<500 and mcgp_id='CDR0000749229'
-----------------------------------
VISUAL OF DATATABLE