2015-10-08 23 views
0

我想在Siebel Open UI中实现特定的代码,该代码访问表中特定列的属性值。当我在控制台中运行时,我得到的是相同的代码。但是当在PR文件中实现时,我将属性值设置为undefined。下面是我的代码:无法访问siebel中的表内容打开UI

TilesPR.prototype.ShowUI = function() 

    { 
     console.log("Inside show ui"); 
     SiebelAppFacade.TilesPR.superclass.ShowUI.call(this); 
     var pm = this.GetPM(); 
     var placeholder= pm.Get("GetFullId"); 
     console.log('The fullId is '+placeholder); 
     var table_id=placeholder.split('A') 
     console.log('The table_id is '+table_id[1]); 
     var table_string='s_'+table_id[1]+'_l'; 
     console.log("The table_string value is "+table_string); 
     $('#'+table_string).css('border','2px solid black');//This code works 
     var i=0; 
     $('#'+table_string+' tbody tr').each(function() 
     { 
     console.log("Inside the function"); 
     i++; 
     var x=i+'Account_Status'; 
     console.log(x); 
     $('#'+x).attr('name'); 
     var valuee= $('#'+x).attr('name'); 
     console.log(valuee);//Gives me undefined all the time 

     }); 

    }; 

有人可以请帮助我的情况在此先感谢

回答

0

嘿Geethu安约瑟夫,

我假设你在这里有一个列表小程序用了很多?值。

您应该总是尝试使用Siebel Open UI命令,特别是在这种情况下,因为您希望从前端获取值(在某些情况下,这可能是一个不良副作用),因此尝试获取信息使用Siebel Open UI命令直接进入业务组件。

因此,让我们假设你想要一个列表小程序的所有信息,你应该得到的ResultSet,然后读取它的值。

var resultSet = this.GetPM().Get("ResultSet"); 

它会返回一个包含列表中所有结果的JavaScript对象,以便您可以读取要使用的值。

然后你有,阅读它...

var resultSet = this.GetPM().Get("ResultSet"); 
resultSet[<<RowID>>][<<Control Name>>] 
Example: resultSet[0]["Status"] 

我希望帮你,祝你好运开放UI的下一个步骤。

亲切的问候, Myracle