voyent
Disabling a particular row in a datatable IceFace  XML
Forum Index -> General Help
Author Message
krishna2088

Joined: 11/Aug/2016 05:04:49
Messages: 2
Offline


I have a screen in which certain data are displayed. I am using datatable option to display the data and rowselector to select the row. If I select any row some option will pop up through which user can manipulate the data(like edit and delete), but i want some data to be non editable.


I have a screen in which i am showing data on month basis, like if current month is August then my page will show previous two months data and the next 10 months data.

Now i want current months and previous two months data to be non editable or disable while selection the row through rowselector.

Months || Date
June 2016 || 28.06.2016
July 2016 || 30.07.2016
August 2016 || 29.08.2016
September 2016 || 28.09.2016
October 2016 || 29.10.2016
November 2016 || 28.11.2016
December 2016 || 28.12.2016

[/]

Below is the my View page and rowselector function: [u]

[ <i:dataTable id="ConfigurationOne"
headerClass="dataTableCommonHeader"
headerClasses="table_header"
columnClasses="stringColumn, stringColumn w80"
rowClasses="level2ColorStyle, level1ColorStyle"
value="#{configOneBean.monthsDateList}" var="row" cellpadding="0"
cellspacing="1" columnWidths="50px,100px" rows="25"
width="40%"
onrowmouseover="this.style.cursor='default';this.style.backgroundColor='#F1F1F1'??;"
onrowmouseout="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
>

<i:column>
<i:rowSelector value="#{row.selected}"
selectionListener="#{configOneBean.rowSelectMonthsListener}" />
<f:facet name="header">
<i:outputText value="#{resApp['config.type.code']}" />
</f:facet>
<i:panelGroup style="width:200px;overflow:hidden;">
<i:outputText value="#{row.NRPV_NRPA_CODE}" />
</i:panelGroup>
</i:column>

<i:column>

<f:facet name="header">
<i:outputText value="#{resApp['config.type.name']}" />
</f:facet>
<i:panelGroup style="width:200px;overflow:hidden;">
<i:outputText value="#{row.NRPV_CREATED_BY}" />
</i:panelGroup>
</i:column>



</i:dataTable>]

--------------------------------------------------------------------------
[public void rowSelectMonthsListener(RowSelectorEvent event) {
int selectRow = event.getRow();
initActionMap();
if (event.isSelected()) {

this.monthsDate = monthsDateList.get(selectRow);
getAllMonthsAndDate();
actionMap.put(WorkMode.EDIT_GROUP, true);

} else {

this.monthsDate = null;
workMode = WorkMode.EMPTY;
}
}]
krishna2088

Joined: 11/Aug/2016 05:04:49
Messages: 2
Offline


Anybody.... Please reply ??
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team