0

我遵循 Oracle Endeca 自定义可视化文档并开始在 eclipse 中开发自定义 portlet。当我将其部署到 endeca-portal 时。组件中不显示任何内容。但是我在 view.jsp 中看到了一个冗长的代码。有人可以帮助我在门户中显示 Hello 消息吗?那里已经存在的是什么?

<div class="eid-simple-portlet">
<table>
    <thead>
    <tr>
        <th><edisc:getMessage messageName="table-heading.data-set"/></th>
        <th><edisc:getMessage messageName="table-heading.record-count"/></th>
        <th><edisc:getMessage messageName="table-heading.attribute-count"/></th>
        <th><edisc:getMessage messageName="table-heading.sample-refinement"/></th>
        <th><edisc:getMessage messageName="table-heading.sample-keyword-search"/></th>
    </tr>
    </thead>
    <tbody>     
    <c:forEach items="${viewModel.dataSetMap}" var="mapEntry" varStatus="dsLoop">
        <c:set var="dataSetKey" value="${mapEntry.key}" />
        <c:set var="dataSetInfo" value="${mapEntry.value}" />

        <%-- set up search action URL --%>
        <portlet:actionURL var="searchURL" name="${filterActionName}">
          <portlet:param name="${dataSetKeyParam}" value="${dataSetKey}"/>
          <portlet:param name="${searchKeyParam}" value="${dataSetInfo.sampleSearchKey.key}"/>
          <portlet:param name="${searchTermParam}" value="${sampleSearchTerm}"/>
        </portlet:actionURL>

        <%-- set up refinement action URL if the sample exists --%>
        <c:if test="${not empty dataSetInfo.sampleRefinement}">
            <portlet:actionURL var="refineURL" name="${filterActionName}">
              <portlet:param name="${dataSetKeyParam}" value="${dataSetKey}"/>
              <portlet:param name="${refinementNameParam}" value="${dataSetInfo.sampleRefinement.name}"/>
              <portlet:param name="${refinementSpecParam}" value="${dataSetInfo.sampleRefinement.spec}"/>
            </portlet:actionURL>
        </c:if>

        <tr <c:if test="${dsLoop.count%2==0}">class="even"</c:if>>
            <td>${dataSetInfo.displayName}</td>
            <td><fmt:formatNumber type="number" value="${dataSetInfo.recordCount}"/></td>
            <td><fmt:formatNumber type="number" value="${dataSetInfo.attrCount}"/></td>
            <td>
                <c:choose>
                <c:when test="${not empty dataSetInfo.sampleRefinement and not empty refineURL}">
                    <a href="${refineURL}">
                        <edisc:getMessage messageName="refine-by-link-text">
                            <edisc:param value="${dataSetInfo.sampleRefinement.name}"/>
                            <edisc:param value="${dataSetInfo.sampleRefinement.label}"/>
                        </edisc:getMessage>
                    </a>
                </c:when>
                <c:otherwise>
                    <edisc:getMessage messageName="refinement-sample-not-available"/>
                </c:otherwise>
                </c:choose>     
            </td>
            <td>
                <c:choose>
                <c:when test="${not empty dataSetInfo.sampleSearchKey}">
                <a href="${searchURL}">
                    <edisc:getMessage messageName="search-for-link-text">
                        <edisc:param value="${dataSetInfo.sampleSearchKey.displayName}"/>
                        <edisc:param value="${sampleSearchTerm}"/>
                    </edisc:getMessage>
                </a>
                </c:when>
                <c:otherwise>
                    <edisc:getMessage messageName="search-sample-not-available"/>
                </c:otherwise>
                </c:choose>
            </td>
        </tr>
    </c:forEach>
    </tbody>
</table>
4

1 回答 1

0

Endeca custom poertlet.

This is the sample output I got after using the sample code. This is developed using liferay framework. So learning liferay framework to develop these custom components will help. It was erring out earlier because of some major.minor exception. Selecting the appropriate jdk version to compile solved the issue.

于 2014-11-07T10:12:34.033 回答