How to set foreach's items(wcm:idcService) — oracle-tech

    Forum Stats

  • 3,708,680 Users
  • 2,241,108 Discussions
  • 7,840,529 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to set foreach's items(wcm:idcService)

878281878281 Posts: 1
I use wcm:idcService get the service from the Oracle content server,and I set
the service as COLLECTION_GET_CONTENTS,var as contentInfo,when I use the
c:foreach tag to show my datas,how should I get the contentInfo,the code
below is not usefull.
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:wcm="http://www.oracle.com/jsp/wcm"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>homepage</title>
<link type="text/css" rel="stylesheet" href="../wcm/css/template.css"/>
<!-- <link type="text/css" rel="stylesheet" href="../../../css/template.css"/>-->
</head>
<body>
<jsp:include page="/wcm/templates/fragments/header.jspf"/>
<div id="container">
<jsp:include page="/wcm/templates/fragments/menu.jspf"/>

<jsp:include page="/wcm/templates/fragments/sidebar.jspf"/>

<wcm:idcService service="COLLECTION_GET_CONTENTS" var="contentInfo">
<wcm:idcParameter name="SortField" value="dInDate"/>
<wcm:idcParameter name="SortOrder" value="Desc"/>
<wcm:idcParameter name="hasCollectionPath" value="true"/>
<wcm:idcParameter name="dCollectionPath"
value="/Contribution Folders/root"/>
</wcm:idcService>

<c:forEach var="row" items="${contentInfo.resultSets.DOC_INFO.rows}"><!-- the items here is not getted from the var contentInfo,it is setted manually-->
<p>The content item <em>${row.dDocName}</em> is a
<u>${row.xWebsiteObjectType}</u></p>
</c:forEach>

<jsp:include page="/wcm/templates/fragments/footer.jspf"/>
</div>
</body>
</html>
</jsp:root>
This discussion has been closed.