Categorias
iiiiii
selectRecords apex
Descripcion
selecciona los elemento que fueron checkeados en l
javascript
var i, selectedIds = ":",
model = this.data.model;
for ( i = 0; i < this.data.selectedRecords.length; i++ ) {
selectedIds += model.getValue( this.data.selectedRecords[i], "ID") + ":";
}
-------------------------------------------------------------------------------------------------------------------------
setear los registros seleccionados en una grilla interactiva
esta funcion se crea en crear funciones o variables globales javascript
(function($) {
$(function() {
function selectFirstRow() {
var el$,
ig$ = apex.region("emp").widget(),
view = ig$.interactiveGrid("getCurrentView");
if ( view.supports.selection ) { // view must support selection
// only if something not already selected
if ( !view.getSelectedRecords() || view.getSelectedRecords().length === 0 ) {
el$ = view.getDataElements();
if ( el$ && el$.length > 0 ) {
view.setSelection( [ el$.first() ] );
}
}
}
}
var region$ = $("#emp"); /// change to your detail IG static id
region$.on("gridpagechange", function(event, ui) {
setTimeout(function() {
selectFirstRow();
}, 0);
});
});
})(apex.jQuery);