0

h:inputText单击单选按钮时如何在 JSF 中清除?

我试过下面的代码

if(isExisting.equalsIgnoreCase("N"))
{
    t.setValue(""); 
}

如果单选按钮的 bean 值为 N,则在文本框 bean 值中设置空字符串。

我什至试过

t.setValue(null);

但它不会在单击单选按钮时清除文本框。

<td width="25%" align="left" class="content_row">
  <h:selectOneRadio id="existingLARB" value="#{LABB.LAOpr.tDetails.isExisting}">
    <f:selectItems value="#{LABB.LAOpr.yesNoList}" />
    <a4j:support event="onclick" reRender="existingDetails,existingDetailsLA" action="#{LABB.showExistingDetails}"></a4j:support>
  </h:selectOneRadio>
</td>
4

0 回答 0