1. <a href ="<h:outputText value = "#{content.url}" rendered = "#{content.url!=null && content.url!='-'}"/>" target="_blank"><h:outputText value="点击下载" /></a>
2. <h:outputLink value="#{content.url}" title="#{content.url}">
<h:outputText value="点击下载" />
</h:outputLink>
3. <h:outputLink value="#{content.url}" title="#{content.url}">
<h:outputText value="点击下载" rendered="#{content.url !='-' && content.url!=''}" />
</h:outputLink>
4. <h:outputLink value="#{content.url}" title="#{content.url}" target="top">
<h:outputText value="点击下载" rendered="#{content.url !='-' && content.url!=''}" />
</h:outputLink>
5. <h:outputText value='<a target="top" href="#{manualpopularizemb.mpPicPath}#{item.picurl}" styleClass="inputnoborder" >#{item.picurl}</a>' escape="false" />
6. <h:outputLink value="javascript:;" onclick="location.href='#{next.editurl}'"rendered="#{next.editurl!=null && next.editurl!=''}">
<h:outputText title="#{next.title}" value="#{next.displayTitle}"/>
</h:outputLink>
7. <h:outputLink value="javascript:;" onclick="clickDetailBtn('#{next.seqid}','#{next.instanceState}');"rendered="#{next.editurl==null || next.editurl==''}">
<h:outputText title="#{next.title}" value="#{next.displayTitle}"/>
</h:outputLink>
其中,clickDetailBtn()函数的实现如下:
function clickDetailBtn(seqid,state){
jQuery('#hidseqid').val(seqid);
jQuery('#hidstate').val(state);
jQuery('#detailBtn').click();
}
JSF页面的相关代码:
<!-- 查看任务详情页面的条件保存 -->
<h:commandButton action="#{wfworkspacemb.goDetail}"id="detailBtn" style="display:none;"></h:commandButton>
<h:inputHidden id="hidseqid" value="#{wfcurrenttask2.seqid}"></h:inputHidden>
<h:inputHidden id="hidstate" value="#{wfcurrenttask2.instanceState}"></h:inputHidden>
(友情提示:本博文章欢迎转载,但请注明出处:hankchen,http://www.blogjava.net/hankchen)