selectOneMenu in editable dataTable not refreshing

jQuery UI Widgets
Post Reply
rsprasad
Posts: 1
Joined: 19 Feb 2017, 15:07

19 Feb 2017, 16:20

I am using JSF 2.0 with PrimeFaces 5.2 for my application deployed to weblogic 10.3.6.

I have a editable dataTable with a selectOneMenu i.e. "Staffing Profile Assignment". There is a rowSelect ajax event, which has been written to populate the "Staffing Profile Assignment" selectOneMenu (the bean method setSCStaffProfile() sets the values in the profileList List bean member variable). Code snippet from the xhtml given below -

<h:form id="form_defineCustomerEffort">
...
<p:dataTable id="addCustEffortSummTable" var="custeffsumvar" dynamic="true" editable="true"
value="#{oumOpportunityBean.customEffortEntities}" rowIndexVar="rowIndex"
selection="#{oumOpportunityBean.selectedCustomEffortForSC}"
selectionMode="single" scrollWidth="1190"
rowKey="#{custeffsumvar.id}" paginator="true"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
paginatorAlwaysVisible="false" rowsPerPageTemplate="5,10,15,20,30,50">

<p:ajax event="rowEdit"
listener="#{oumOpportunityBean.onRowEditCustomEffort}"
update=":form_defineCustomerEffort:msgs" />
<p:ajax event="rowEditCancel"
listener="#{oumOpportunityBean.onRowCancel}"
update=":form_defineCustomerEffort:msgs" />
<p:ajax event="rowSelect"
listener="#{oumOpportunityBean.setSCStaffProfile}"
update=":form_defineCustomerEffort:addCustEffortSummTable:sc_StaffProfileMenuSumm"
/>

<f:facet name="header">Custom Effort</f:facet>

<p:column>
<f:facet name="header"
style="width: 500px;white-space: -moz-pre-wrap !important;white-space: -pre-wrap;white-space: -o-pre-wrap;white-space: pre-wrap;word-break: break-all;white-space: normal;">
<h:outputText value="#"></h:outputText>
</f:facet>
<h:outputText value="#{rowIndex+1}" />
</p:column>

...

<p:column headerText="Staffing Profile Assignment">
<p:cellEditor>
<f:facet name="output"
style="width: 500px;white-space: -moz-pre-wrap !important;white-space: -pre-wrap;white-space: -o-pre-wrap;white-space: pre-wrap;word-break: break-all;white-space: normal;">
<h:outputText
value="#{custeffsumvar.oumStaffProfileForWbsCustEffort.profileName}" />
</f:facet>
<f:facet name="input"
style="width: 500px;white-space: -moz-pre-wrap !important;white-space: -pre-wrap;white-space: -o-pre-wrap;white-space: pre-wrap;word-break: break-all;white-space: normal;">
<p:selectOneMenu id="sc_StaffProfileMenuSumm" required="true"
requiredMessage="Please select a Staff Profile."
title="Please select a Staff Profile."
converter="assetStaffProfileConverter"
value="#{custeffsumvar.oumStaffProfileForWbsCustEffort}">
<f:selectItem itemLabel="Select Staff Profile" itemValue="" />
<f:selectItems id="sc_StaffProfileSelectitemsSumm"
value="#{oumOpportunityBean.profileList}" var="scProfile"
itemLabel="#{scProfile.profileName}" itemValue="#{scProfile}" />
</p:selectOneMenu>
</f:facet>
</p:cellEditor>
</p:column>

....

<p:column>
<p:rowEditor />
</p:column>

....

Now, the problem is that when a row from the dataTable is selected, through debug, we are able to determine that the profileList List is getting populated with values (through the setSCStaffProfile() bean method call), but the "Staffing Profile Assignment" selectOneMenu is not showing the values, except for "Select Staff Profile", giving the impression that the update target of the rowSelect event is not working.

Any resolutions please?

Post Reply

Return to “PrimeUI”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests