Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Aug 2009
    Location
    Binh Duong
    Posts
    14

    This is different...problem with stock name

    This is a error:
    Code:
    11.Aug.09 09:41:22,041 <ERROR> Exception caught while subscribing to item 'VIC'
    com.lightstreamer.adapters.remote.RemotingException: Generic exception on remote
     side: startIndex cannot be larger than length of string.
    Parameter name: startIndex
            at com.lightstreamer.adapters.remote.data.DataProviderProtocol.readSubsc
    ribe(DataProviderProtocol.java:83)
            at com.lightstreamer.adapters.remote.data.RemoteDataProvider$1.onReplyRe
    ceived(RemoteDataProvider.java:198)
            at com.lightstreamer.adapters.remote.request_reply.RequestSender.onNotif
    yReceived(RequestSender.java:296)
            at com.lightstreamer.adapters.remote.request_reply.NotifyReceiver.onNoti
    fyReceived(NotifyReceiver.java:172)
            at com.lightstreamer.adapters.remote.request_reply.NotifyReceiver.run(No
    tifyReceiver.java:92)
    I have a function updateitem then:
    Code:
    var pushtable = new OverwriteTable(page1, schema1, "MERGE");
    
    	pushtable.onItemUpdate = updateItem1;
    	function updateItem1(item,updateInfo) {
    		if (updateInfo.isValueChanged("Count")){ 		    
    		    var ars = updateInfo.getNewValue("Count").split('|');			
    		    if(ars != null){
    			    if((parseInt(document.myForm.hiddencount.value) < ars.length)&&(flag)){				    			
    				    for(var i = 0;i<ars.length;i++){			
    					    addRow('stocks',i, ars[i]);						
    				    }						    
    				    page = new PushPage();
    				    page.onEngineCreation = function(engine) {
    						engine.connection.setAdapterName("PROXY_HELLOWORLD");
    						engine.changeStatus("STREAMING");
    					}
    			}			
    			page.bind();			
    			pushtable = new OverwriteTable(ars, schema, "MERGE");
    			pushtable.setSnapshotRequired(true);
    			pushtable.setRequestedMaxFrequency(1.0);
    			pushtable.setPushedHtmlEnabled(true);
    			// set highlighting effect when updating a cell
    			pushtable.onChangingValues = function(itemPos, visualUpdateInfo, itemName) {
    				if (visualUpdateInfo != null) {
    				  var cold = (itemPos % 2 == 1) ? "#eeeeee" : "#ddddee";
    				  if(visualUpdateInfo !="#arrow")
    				  visualUpdateInfo.setRowAttribute(hotColor, cold, "backgroundColor");
    				}
    			};
    			pushtable.onItemUpdate = updateItem;		 
    			page.addTable(pushtable, "stocks");
    			flag = false;
    			}
    		}
    	}
    ...and updateInfo.getNewValue("Count")='ACB|ACT|ACF...|VI C'.

    Please help me resolve this problem.!

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    the client code is not related to this problem, you had an exception ("startIndex cannot be larger than length of string.") on the subscribe method of your remote adapter.

 

 

Similar Threads

  1. adapting the stock demo adapter
    By mrwonderfulone@gmail.com in forum Adapter SDKs
    Replies: 3
    Last Post: January 19th, 2012, 09:46 AM
  2. This is different...problem with stock name
    By lethanhclub in forum Client SDKs
    Replies: 0
    Last Post: September 11th, 2009, 04:49 AM
  3. problem with number of stock name
    By lethanhclub in forum Client SDKs
    Replies: 6
    Last Post: August 26th, 2009, 11:15 AM
  4. Stock List Adapter
    By minhphan200677 in forum Adapter SDKs
    Replies: 1
    Last Post: April 14th, 2008, 10:26 AM
  5. DISTINCT not supported in Stock Demo
    By gmccone in forum Client SDKs
    Replies: 1
    Last Post: March 30th, 2007, 11:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 10:35 PM.