jeudi 27 juillet 2017

Checkbox uncheck and check Other field is getting blank

<tr:table id="UserTable" width="100%" ......>
  <tr:selectBooleanCheckbox id="ctrl_select" value="#{user.isSelected}" autoSubmit="true" valueChangeListener="#{userAction.onUserSelected}" onchange="submit()"/>
  <tr:inputText id="effDate" simple="true" value="#{user.effectiveDate}" disabled="#{!user.isSelected}"/>

Action: onUserSelect based on business logic I am setting effective Date.

1: When I check the checkbox its submited and effDate is enabled. 2: I clear the date 3: Uncheck the checkbox. I can see the date and its disabled. 4. check the checkbox again, Date field is enabled But the effDate is blank.

I do not want the effDate to be blank. I believe the UpdateModel is called. Is there a way not to set the value to blank??




Aucun commentaire:

Enregistrer un commentaire