This discussion is archived
3 Replies Latest reply: Nov 19, 2012 3:36 PM by Shay Shmeltzer RSS

ADF Mobile amx:inputText with clear button?

965856 Newbie
Currently Being Moderated
How can you add a clear button to an amx:inputText control to achieve the behavior when it is pressed the data in the inputText is cleared?

An example of this in iOS is the Safari browser URL field, to quickly clear it you tap the X in the control.
  • 1. Re: ADF Mobile amx:inputText with clear button?
    Shay Shmeltzer Employee ACE
    Currently Being Moderated
    You'll need to set the value of the field to be null.
    So for example try this page:
    <?xml version="1.0" encoding="UTF-8" ?>
    <amx:view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:amx="http://xmlns.oracle.com/adf/mf/amx"
              xmlns:dvtm="http://xmlns.oracle.com/adf/mf/amx/dvt">
      <amx:panelPage id="pp1">
        <amx:facet name="header">
          <amx:outputText value="Header" id="ot1"/>
        </amx:facet>
        <amx:inputText label="label1" id="it1" value="#{viewScope.search}"/>
        <amx:commandButton text="clear" id="cb3">
          <amx:setPropertyListener to="#{viewScope.search}" type="action" from="#{''}"/>
        </amx:commandButton>
      </amx:panelPage>
    </amx:view>
  • 2. Re: ADF Mobile amx:inputText with clear button?
    965856 Newbie
    Currently Being Moderated
    Yes, I understand this can be done separately, however, what I wanted is a way to make the cancel button appear within the actual text field on the right as it does on many iOS applications. If you look at the Safari application on iOS and do a search you will see what I mean.

    If it is not possible to do this yet, will this be added to a feature release?
  • 3. Re: ADF Mobile amx:inputText with clear button?
    Shay Shmeltzer Employee ACE
    Currently Being Moderated
    Right now we don't have built-in capability for this in our inputText component.
    I filed an ER for this.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points