Jsf 2 Richfaces工具提示不适用于h:outputlink标记?

Jsf 2 Richfaces工具提示不适用于h:outputlink标记?,jsf-2,richfaces,tooltip,download,commandlink,Jsf 2,Richfaces,Tooltip,Download,Commandlink,我在我的项目中使用JSF2.0和RichFaces4.0 h:outputlink下载文件。文件下载正确。但我使用图标显示下载选项和附件rich:tooltip在鼠标悬停在该图标上时显示工具提示,但该图标未显示。如果我使用a4j:commandlink,则工具提示会显示,但我无法使用a4j:commandlink实现元素下载功能。谁能告诉我工具提示不适用于h:outputlink的原因是什么?这是我的密码 <h:outputLink rendered="#{docList.docType=

我在我的项目中使用JSF2.0和RichFaces4.0 h:outputlink下载文件。文件下载正确。但我使用图标显示下载选项和附件rich:tooltip在鼠标悬停在该图标上时显示工具提示,但该图标未显示。如果我使用a4j:commandlink,则工具提示会显示,但我无法使用a4j:commandlink实现元素下载功能。谁能告诉我工具提示不适用于h:outputlink的原因是什么?这是我的密码

<h:outputLink rendered="#{docList.docType=='FILE' and not empty docList.docName}" value="/FileDownload" title="Download Documents">
                            <f:param name="fileId" value="#{docList.docId}"/>
                            <f:param name="fileName" value="#{docList.docName}"/>
                            <f:param name="fileSize" value="#{docList.docLength}"/>
                        <h:graphicImage library="images" name="doc_save_icon.png" style="border:0;"/>
                        <rich:tooltip styleClass="tooltip" layout="block" mode="ajax" value="Download Documents">
                                 Download Documents
                        </rich:tooltip>
                    </h:outputLink>

下载文件

哦,您错过了属性和id示例中的某个内容

<h:commandLink value="TEST12" action="STH" **id="cmdlnk"** />
<rich:toolTip **for="cmdlnk"**>This is test CMD Link</rich:toolTip>
<a4j:commandLink value="TEst" id="cmdlnka4j"></a4j:commandLink>
<rich:toolTip for="cmdlnka4j">This is test A4j LInk</rich:toolTip>

这是testcmd链接
这是测试A4j链路
您的新代码:

<h:outputLink id="fileDld" rendered="#{docList.docType=='FILE' and not empty docList.docName}" value="/FileDownload" title="Download Documents">
                        <f:param name="fileId" value="#{docList.docId}"/>
                        <f:param name="fileName" value="#{docList.docName}"/>
                        <f:param name="fileSize" value="#{docList.docLength}"/>
                    <h:graphicImage library="images" name="doc_save_icon.png" style="border:0;"/>
                    <rich:tooltip for="fileDld" styleClass="tooltip" layout="block" mode="ajax" value="Download Documents">
                             Download Documents
                    </rich:tooltip>
                </h:outputLink>

下载文件

哦,您错过了属性和id示例中的某个内容

<h:commandLink value="TEST12" action="STH" **id="cmdlnk"** />
<rich:toolTip **for="cmdlnk"**>This is test CMD Link</rich:toolTip>
<a4j:commandLink value="TEst" id="cmdlnka4j"></a4j:commandLink>
<rich:toolTip for="cmdlnka4j">This is test A4j LInk</rich:toolTip>

这是testcmd链接
这是测试A4j链路
您的新代码:

<h:outputLink id="fileDld" rendered="#{docList.docType=='FILE' and not empty docList.docName}" value="/FileDownload" title="Download Documents">
                        <f:param name="fileId" value="#{docList.docId}"/>
                        <f:param name="fileName" value="#{docList.docName}"/>
                        <f:param name="fileSize" value="#{docList.docLength}"/>
                    <h:graphicImage library="images" name="doc_save_icon.png" style="border:0;"/>
                    <rich:tooltip for="fileDld" styleClass="tooltip" layout="block" mode="ajax" value="Download Documents">
                             Download Documents
                    </rich:tooltip>
                </h:outputLink>

下载文件

hey Thank sugandha在我为其添加id和属性时工作正常。非常感谢您的回复hey Thank sugandha在我为其添加id和属性时工作正常。非常感谢您的回复