【问题标题】:Custom Component in Endeca Studio - Nothing Displays in new portletEndeca Studio 中的自定义组件 - 新 portlet 中不显示任何内容
【发布时间】:2014-10-23 16:25:58
【问题描述】:

我遵循 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>

【问题讨论】:

  • 您有示例代码吗?您正在执行哪些步骤来部署它?
  • 谢谢@radimpe。我想通了。发生了major.minor 异常。改正后它起作用了。

标签: oracle tag-cloud endeca endeca-workbench


【解决方案1】:

这是我使用示例代码后得到的示例输出。这是使用 liferay 框架开发的。因此,学习 Liferay 框架来开发这些自定义组件会有所帮助。由于一些major.minor异常,它早些时候出错了。选择合适的 jdk 版本进行编译解决了这个问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-10-03
    • 2014-09-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多