如何检索 Javascript 中的数据页结果?

How can I retrieve data page results in Javascript?

我正在使用 Here Maps Javascript API 实施自定义 html 规则。我将坐标存储在数据类型中。 (大约 30000 行)我需要获取每一行并在 html 中绘制一条折线。如何在 html 规则中获取数据页结果?

由于我使用自定义服务并需要显示自定义部分,因此我需要在非自动生成的 html 规则上实施它并使用 Javascript。实际上,当我在 Javascript 变量中静态设置值时,我实现了我的目标。 (Pega 显示使用 Javascript API 生成的自定义地图部分没有问题)但是我必须从数据页面动态获取坐标。因为它在生产中是动态的。

检查 <pega:forEach name="YourPageListPage.PageList"> 标签。

我曾经用它在 HTML 中为 Pagelist 类型 属性 创建了一个 table。

以下示例可能会为您指明方向。

示例:

<table border="1">    
<pega:forEach name="YourPageListPage.PageList"> // YourPageListPage.PageList is Page in which you have 3000 rows

    <tr>    
       <TD>
         <pega:reference name="$THIS.COLUMN1"/> // --> COLUMN1 is the property name inside pagelist
      </TD>
      <TD>
         <pega:reference name="$THIS.COLUMN2"/> // -->  COLUMN2 is the property name inside pagelist
      </TD>
          </tr>
        </pega:forEach>
    </table>

读取JavaScript中任何剪贴板页面的另一种方法..

<%
ClipboardPage dataPage= tools.findPage("D_DatapageName");// if tools keyword is unrecognized then add PublicAPI tools = ThreadContainer.get().getPublicAPI(); above this line.
//D_DatapageName --> your data page name. You can give any Clipbord page here
ClipboardProperty pageListProperty=  dataPage.getProperty("PageListProperty"); 
// PageListProperty will be list property in your DataPage..for example pxResults in case if DataPage is of class Code-Pega-List

//now if you want to iterate on this pageListProperty then use below method
Iterator iterator = pageListProperty.iterator();
// For eg. iterate over pxResults 
while(iterator.hasNext()){
    ClipboardProperty pageProperty= (ClipboardProperty)iterator.next();
 // PageProperty can be of type Page or just a single property
 // But we need only the pages, so add below condition
    if(pageProperty.getMode()==ImmutablePropertyInfo.MODE_PAGE){
         Iterator iterator2 = pageProperty.iterator();
     // Iterate on all properties of single page (pxResults(1))
         while(iterator2.hasNext()){
             ClipboardProperty property= (ClipboardProperty)iterator2.next();
             String propertyLabel = property.getName(); // this will return the name of the property. For example pyNote

             String propertyValue = property.getStringValue(); // this will return the value inside property. 
          }    


     }

}

%>