0

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

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

4

1 回答 1

0

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

我曾经用它在 HTML 中为Pagelist类型属性创建表格。

下面的示例可能会引导您找到一个方向。

例子:

<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. 
          }    


     }

}

%>
于 2019-07-15T05:49:37.380 回答