【问题标题】:Page attribute value showing null in oracle webcenter sites 11g R1页面属性值在 oracle webcenter 站点 11g R1 中显示为空
【发布时间】:2017-10-22 19:43:59
【问题描述】:

您好,我在 oracle webcenter Sites 11g 工作。 我添加了一个新的页面属性名称 pagetitle 并在PageDefinition 中添加了该属性,并添加了具有 JSP 逻辑的新模板并添加了代码:

<%=ics.GetVar("pagetitle")%>

但是在创建新页面后查看页面时,pagetitle 的值显示为null

【问题讨论】:

    标签: webcenter-sites


    【解决方案1】:

    您必须在读取所需属性后首先加载页面资源。

    下面是显示'pagetitle'的示例代码

    <assetset:setasset name="Page" type='<%=ics.GetVar("c")%>' id='<%=ics.GetVar("cid")%>' />
    <assetset:getattributevalues name="Page" typename='PageAttribute' attribute='pagetitle' listvarname="pagetitlelist" />
    <ics:listget fieldname="value" listname="pagetitlelist" output="title"/>
    <%=ics.GetVar("title")%>
    

    【讨论】:

      【解决方案2】:

      通过 JSP 中的这一行,您可以获得所有属性:

      <ics:argument name="attributes" value="attribute1,attribute2,...,attributen" />
      

      如果要使用任何属性,请执行此操作。

      例如:${asset.attribute1}

      【讨论】:

        猜你喜欢
        • 2017-08-23
        • 1970-01-01
        • 2023-03-17
        • 1970-01-01
        • 2010-10-14
        • 2013-02-02
        • 1970-01-01
        • 2014-04-27
        • 1970-01-01
        相关资源
        最近更新 更多