-1

所以正如标题所说,我制作了一个声明性组件,但是当我将它添加到网页时,它只显示标签,而不是内容

我的标签

> <?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
      xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <jsp:directive.page contentType="text/html;charset=UTF-8"/>
 <af:componentDef var="attrs" componentVar="component">
 <af:goImageLink id="cm" icon="/img/contextmenu.gif" destination=""
                rendered="#{attrs.showPopup}">
  <af:showPopupBehavior popupId="contextMenu" triggerType="click"
                        alignId="cm" align="endAfter"/>
</af:goImageLink>
<af:popup id="contextMenu" contentDelivery="immediate" launcherVar="source"
          eventContext="self" rendered="#{attrs.showPopup}">
  <af:menu binding="#{backingBeanScope.popupProcedimentos.menu}" id="m1"></af:menu>
</af:popup>
<af:popup rendered="#{attrs.showPopup}" id="p1" contentDelivery="immediate"
          binding="#{backingBeanScope.popupProcedimentos.popupProcedimento}"
          launcherVar="source" eventContext="self">
  <af:dialog binding="#{backingBeanScope.popupProcedimentos.dialog}"
             stretchChildren="first" id="d1" title="Nova janela"
             contentWidth="500" contentHeight="500">
    <af:inlineFrame sizing="preferred"
                    binding="#{backingBeanScope.popupProcedimentos.inlineFrame}"
                    shortDesc="Nova página" id="iframe"
                    source="#{backingBeanScope.listaProcessoAdministrativo.procedimentoUrl}#{attrs.DDocName}"></af:inlineFrame>
  </af:dialog>
</af:popup>
<af:xmlContent>
  <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
    <display-name>popupProcedimentos</display-name>
    <component-extension>
      <component-tag-namespace>component</component-tag-namespace>
      <component-taglib-uri>/popupproceds</component-taglib-uri>
      <attribute>
        <attribute-name>showPopup</attribute-name>
        <attribute-class>java.lang.Boolean</attribute-class>
        <default-value>false</default-value>
      </attribute>
      <attribute>
        <attribute-name>DDocName</attribute-name>
        <required>true</required>
        <attribute-class>java.lang.String</attribute-class>
      </attribute>
    </component-extension>
  </component>
</af:xmlContent>
</af:componentDef>
</jsp:root>

我只是像这样在另一个页面中调用它

>     <popupproced:popupProcedimentos DDocName="sss" id="popup"  showPopup="true" >  </popupproced:popupProcedimentos>

但是渲染的 html 页面只是显示这样的标签,有什么帮助吗?

4

2 回答 2

0

我忘记在我用来测试它的页面的项目中声明标签库。现在一切正常。

于 2012-08-30T12:16:52.240 回答
0

声明性组件的第一行无效

"> <?xml 版本='1.0' 编码='UTF-8'?>"

坦率

于 2012-08-30T05:43:26.067 回答