1 Reply Latest reply on Jul 1, 2015 10:45 AM by John_K

    Oracle MWA (Mobile Web Apps) - highlighting TextFieldBean() when entering quantity

    ganpat76

      HEllo,

      We are having a requirement in ORacle MWA where we have created a custom page for replenish count. There is a field for Quantity and its defaulted when the page is displayed. The user may change the quantity if he/she wishes and when they do that the whole value in the qty text field must be highlighted so they can change the value. What happens now is that if the default value is 10 (2 digits) and if the user wants to change that to 5(single digit), the they have to type 5 and use function key to remove the"0" otherwise the qty will be "50" instead of 5.

      This is all done on the intermec scanner device where we have mapped function key (F1-F12) for clearing field, clearing value, back button etc

       

      The requirement is that the qty field value should be highlighted(all the digits to the selected) when the cursor moves to the qty field. This is just like Windows, where the text field values are highlighted in blue when you enter that field.

      I am using the oracle.apps.mwa.beans.TextFieldBean for the qty field.

       

      Kindly help.

       

      Thanks,

        • 1. Re: Oracle MWA (Mobile Web Apps) - highlighting TextFieldBean() when entering quantity
          John_K

          I don't believe there is a method to select text in a TextFieldBean. My suggestion would be to set the flow of your page to skip the quantity field (i.e. session.setNextFieldName()), so by default the user doesn't enter it (i.e. they accept the default value). Then in the section of the fieldEntered in the listener for that field, have something like "myField.setValue(null)" so that if the user does choose to tab back into the qty field, the qty is immediately blanked out and they can type it in. Then you have two options to ensure they don't leave it blank - either et the field to required, or in the listener check whether the field is null in fieldExited() and if so, set it back to the default.