Xpages get a handle on next rowData or Doc in a repeat -


in repeat control want able handle on data in next row in order modify data displayed in current row (i have move , down actions, , don't want display them if move not possible).

it seems should able this. cannot within in repeat itself, when writing repeat not know data next repeat. shouldn't there easy way next document?

here reduced version of repeat control:

<?xml version="1.0" encoding="utf-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core">  <xp:repeat                 id="repeat1"                 var="rowdata"                 indexvar="repeatindex"                 value="#{view1}"><xp:this.facets>                     <xp:text                         disabletheme="true"                         xp:key="header"                         escape="false"                     >                         <xp:this.value><![cdata[<table class='lotustable repeatrowcolors' border='0' cellspacing='0' cellpadding='0' width='800px'> <tr class ='lotusfirst lotussort scope='col'> <th class ='loutsfirstcell'></th> <th class ='loutsfirstcell'>category</th> <th class ='lotuscenter'>move</th> <th>task</th> </tr> </thead>]]></xp:this.value>                      </xp:text>                     <xp:text                         disabletheme="true"                         xp:key="footer"                         escape="false"                     >                         <xp:this.value><![cdata[</table>]]></xp:this.value>                      </xp:text>                 </xp:this.facets>                 <xp:this.rows><![cdata[#{javascript:var rows:integer = viewscope.get("rows"); if (rows == null) {return 5} else {return rows}}]]></xp:this.rows>                 <xp:tr id="rowdatacontainer">                      <xp:td                         style="width:55px;min-width:55px;max-width: 55px;">                         <xp:text                             escape="true"                             id="computedfield2">                             <xp:this.value><![cdata[#{javascript:rowdata.getcolumnvalue("category");}]]>                             </xp:this.value>                         </xp:text>                     </xp:td>                  </xp:tr>             </xp:repeat> </xp:view> 

you can view's next row within repeat with

var nextrow = view1.getallentries().getnthentry(repeatindex + 2); 

"view1" xp:dominoview assigned repeat control , "repeatindex" indexvar of xp:repeat.

you can next row document's uniqueid with

nextrow ? nextrow.getuniversalid() : "" 

and e.g. form field with

nextrow ? nextrow.getdocument().getitemvaluestring("form") : "" 

accordingly, previous row

var prevrow = view1.getallentries().getnthentry(repeatindex);