[EMAIL PROTECTED] wrote:
>
>
>Did you ever get any code samples for this? We are trying to do the same thing - we
>need to get the row that the user was on when they pressed a button in that row to go
>to another page.
>
>Thanks - Pat Ludwig, [EMAIL PROTECTED]
>
>
>
>
>
>
>
>[EMAIL PROTECTED] wrote:
>>Finding the Current Row in ND 4.0
>>
>>How do you find the current row number within a repeated object using ND 4.0? In
ND 3.0 we implemented the code below using the args[] variable. In ND 4.0 the
events
work differently. How can we access the the NVPList information in ND 4.0
using �public
int btnOk_onWebEvent(CSpWebEvent event)�
>>
>>Thanks
>>
>>John Lapham
>>
>>ND 3.0 Code
>>------------------------
>>//[[SPIDER_EVENT<onbtnViewReqsWebEvent>
>> public int onbtnViewReqsWebEvent( String args[] )
>> {
>> int command = PROCEED_WITH_BUILTIN_HANDLING;
>>
>>//------------------------------------------------------------------------------------
>> CSpNvpList nvpList = new CSpNvpList ();
>> nvpList.parse (args [1], CSpHttp.NVP_SEPARATOR, true, false);
>> int rowNumber = ((CSpNvp) nvpList.get (nvpList.size
>()-1)).getValue().intValue ();
>>//------------------------------------------------------------------------------------
>> CSpValue currRowValue = null;
>> CSpRepeated repeated = getRepeated("Repeated1");
>> CSpValue txbValue = repeated.getDisplayFieldValue("hdNode");
>>
>> if (txbValue instanceof CSpVector){
>> // There are multiple rows values in this Display Field
>> CSpVector vector = (CSpVector) txbValue;
>> currRowValue = vector.get (rowNumber);
>> //CSpHtml.sendMessage(CSpider.getOutputStream()," nodeID = "
>+ currRowValue );
>> }
>> else{
>> //There is only one value in this Display Field
>> currRowValue = txbValue;
>> //CSpHtml.sendMessage(CSpider.getOutputStream()," nodeID = "
>+ txbValue);
>> }
>>}
>>
>>
>>//]]SPIDER_EVENT<onbtnViewReqsWebEvent>
>>
>
I found that if I assigned the row number (using setValue in the OnBeforeDisplayEvent)
to a repeated href, that I could use getValue("*href_name") to get the value
(and
hence the row number) of the href. What I can't figure out is how to get the
values
of the other fields in the same row.
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]