Modal Panel not able to get the variable values from the cal
aish Nov 17, 2008 5:24 PMHi,
I have a web page which displays values selected from the database table in a scollable datatable format. On selection of the record from the scrollable datatable, I try to display the values in a modal panel.
I am able to select the record from the scrollable datatable and a modal panel is displayed. But the modal panel is empty. It is not getting the record values selected from the scrollable data table.
Can you please take a look at the code below and let me know where I am going wrong. My bean is defined as "session" scope.
Thanks
Aish
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://sourceforge.net/projects/jsf-comp" prefix="c"%>
function AdminDataListRowClick()
{
var buttonObject= window.parent.document.getElementById("myForm:_id34:AdminSystems_cButton");
buttonObject.click();
}
<h:outputText value="Admin Systems: " style="width:640px"
styleClass="topicStyle" id="AdminSystemsData_oText1" />
<a4j:outputPanel id="AdminSystems_oPanel">
<rich:scrollableDataTable rowKeyVar="rkv" height="450px" width="400px"
id="AdminSystemsData_sTable"
value="#{AdminSourceSystemLoad.displayAdminSystemList}"
var="adminSystems"
selection="#{AdminSourceSystemLoad.scrollableAdminDataTableSelection}"
binding="#{AdminSourceSystemLoad.sdAdminTable}"
onRowClick="AdminDataListRowClick()" reRender="AdminSystems_oPanel">
<rich:column id="AdminSystemsData_column1">
<f:facet name="header" id="AdminSystemsData_facet1">
<h:outputText value="Source Sys Code" id="AdminSystemsData_oText4" />
</f:facet>
<h:outputText value="#{adminSystems.srcSysCode}"
id="AdminSystemsData_oText5" />
</rich:column>
<rich:column id="AdminSystemsData_column2" width="200">
<f:facet name="header" id="AdminSystemsData_facet2">
<h:outputText value="Source Sys Description"
id="AdminSystemsData_oText6" />
</f:facet>
<h:outputText value="#{adminSystems.srcSysCodeDescription}"
id="AdminSystemsData_oText7" />
</rich:column>
<rich:column id="AdminSystemsData_column3" width="200">
<f:facet name="header" id="AdminSystemsData_facet3">
<h:outputText value="Total Journal Lines"
id="AdminSystemsData_oText8" />
</f:facet>
<h:outputText value="#{adminSystems.jrnl_total_lines}"
id="AdminSystemsData_oText9" />
</rich:column>
</rich:scrollableDataTable>
</a4j:outputPanel>
<a4j:commandButton id="AdminSystems_cButton" value=""
style="width:1px;height:1px;this.style.display='none'"
action="#{AdminSourceSystemLoad.selectAdminSrcCodeJournals}"
immediate="true" oncomplete="Richfaces.showModalPanel('panel'); " />
<rich:modalPanel id="panel" width="740" height="300">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="Admin Graph"></h:outputText>
</h:panelGroup>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<h:graphicImage value="/images/close.png" style="cursor:pointer" id="hidelink"/>
<rich:componentControl for="panel" attachTo="hidelink" operation="hide" event="onclick"/>
</h:panelGroup>
</f:facet>
<a4j:include viewId="#{AdminSourceSystemLoad.page}"/>
</rich:modalPanel>
===== the code in this program is as follows: {AdminSourceSystemLoad.page} ==
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://sourceforge.net/projects/jsf-comp" prefix="c"%>
<h:panelGrid columns="6" style="width:740px" id="AdminSystems_pGrid1">
<h:outputText value="Src Code: " styleClass="topicStyle"
id="AdminSystems_oText3" />
<h:outputText value="#{AdminSourceSystemLoad.selectedSrcSysCode}"
styleClass="contentStyle" id="AdminSystems_oText4" />
<h:outputText value="Src Code Desc : " styleClass="topicStyle"
id="AdminSystems_oText5" />
<h:outputText
value="#{AdminSourceSystemLoad.selectedrcSysCodeDescription}"
styleClass="contentStyle" id="AdminSystems_oText6" />
<h:outputText value="Total Journal Lines : " styleClass="topicStyle"
id="AdminSystems_oText7" />
<h:outputText
value="#{AdminSourceSystemLoad.selectedTotalJournalLines}"
styleClass="contentStyle" id="AdminSystems_oText8" />
</h:panelGrid>