Richfaces工具提示不适用于h:outputlink标记?
问题描述:
我正在使用JSF 2.0 & Richfaces 4.0为我的项目。有一个模型作为下载文件,为此我用 h:outputlink下载文件。该文件正确下载。但我用图标来显示下载选项&附加丰富:工具提示显示工具提示时鼠标悬停在该图标上,但它不显示。如果我使用a4j:commandlink工具提示显示,但我不能使用a4j:commandlink实施下载功能。任何人都可以告诉我tooltip不适用于h:outputlink的原因是什么?这里是我的代码...Richfaces工具提示不适用于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>
答
哦,你错过了某事for属性和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>
新密码:
<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>
嘿感谢sugandha当我将其工作的id &为其属性。非常感谢您的回复 – 2011-05-13 14:13:20