Search code examples
cssoracle-adforacle-adf-mobile

How to give background color for input textBbox in ADF Mobile?


I am trying to give background color for Input TextBox. If I used inline Style it will giving color to field. Now how can I change my background color.

Below is my code:

 <?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="Name" id="it1"  inlineStyle="background-color:blue;"
  value="#{preferenceScope.feature.feature1.security.username}"/>
  <amx:inputText label="Password" id="it2"
  value="#{preferenceScope.feature.feature1.security.password}"/>
  <amx:inputText label="URL" id="it3" value="#{preferenceScope.feature.feature1.security.url}"/>
</amx:panelPage>
</amx:view>  

Below is Out Put:

enter image description here


Solution

  • Create CSS file (new => html => css file) and add below code

       .textcolor input{
            background-color:Blue !important;
        }
    

    in input text Style Class property write textcolor (the class you just added to the css file).

    then open adfmf-feature.xml select your feature under content tab include the css file you created.

    That's it.