5
如何轉義f:SelectItem itemLabel
屬性,以便我可以在標籤中添加超鏈接?如何轉義f:selectItem itemLabel屬性
使用下面的代碼,我可以逃避h:outputText
而不是f:selectItem
。
<h:outputText value="MyLink <a href="http://google.com" >Google </a>" escape="false"/>
<h:selectOneRadio id="p" value="#{bean.somevalue}" required="true" >
<f:selectItem escape="false" escapeItem="false" itemLabel="One <a href="http://google.com" >Google </a>" itemValue="O" />
<f:selectItem escape="false" escapeItem="false" itemLabel="Two <a href="http://stackoverflow.com" >Stackoverflow</a>" itemValue="T" />
</h:selectOneRadio>
我想在下面的圖片
你是真棒 – Praneeth
不客氣。 – BalusC
我只是修復了文檔錯誤。遲到比晚起更好:https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1107?FocusedWorklogId=24233&page=com.atlassian.jira.plugin.system.issuetabpanels%3Aworklog-tabpanel#worklog-24233 – edburns