0

How to clear h:inputText in JSF when I click radio button?

I have tried the following code

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

If radio button's bean value is N then set empty string in the textbox bean value.

I even tried

t.setValue(null);

But it doesn't clear the textbox on click of radio button.

<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>
mmmmmm
  • 32,227
  • 27
  • 88
  • 117
Edward
  • 1,367
  • 8
  • 26
  • 43

0 Answers0