Validation on Disabled input text

it seems <af:validateRegExp cannot work inside a <af:inputText disabled='true'>, is there any easy way to have this client side validation on a disabled input text in ADF?

I am wondering if you could create a transient attribute in the EO that displays the data from the attribute. The "real" attribute would not be disabled, and would then validate.
You then display the transient attribute on the form, and it would be non-update-able since it is transient.
You could then place entity level validation on the entity (instead of on the attribute) since it is based on a second value in your form. Haven't tested it, but it would seem to be a solution.
Stuart

Similar Messages

  • Ho to make a read only / disabled input text mandatory?

    Hi All,
    I'm using ADF to display data for a human task. Part of my requirement is to display a payload attribute as an output text/ read only input text. If this is null, the form should compel the user to choose from a list of values.
    How do I make an output text mandatory? Is there another way around this?
    I tried creating an input text and making it read only and mandatory, this doesn't work. Apparently, you cant make a disabled/read only input text mandatory?
    JDev : 11.1.1.4
    Thanks
    PP

    Hello! What does mandatory field mean for you? If there should be validation while saving, it will be: faces message will be shown with text, as it is defined in business rules in entity object. If you just wish to see blue “*” in front of label, just use “panelLabelAndMessage” component with “showRequired” property = “true”. If you wish to see some red frame around disabled field or button, if it has null value, I don’t know how to help you, but wish to know how to do that too.

  • Disabling input text component on checking the checkbox

    Hi,
    I have created INPUT TEXT and CHECKBOX dynamically by the following code.
    List<UIComponent> children;
    children = pgl.getChildren();
    RichPanelGroupLayout pgll;
    pgll = new RichPanelGroupLayout();
    pgll.setLayout("horizontal");
    List<UIComponent> children1;
    children1 = pgll.getChildren();
    RichInputText it;
    it = new RichInputText();
    UIComponent cb = new RichSelectBooleanCheckbox();
    children1.add(it);
    children1.add(cb);
    children.add(pgll);
    Now on checking the checkbox i shud disable the inputtext box.. can someone help me out in getting it?

    In the valueChangeListener of the checkbox, set the disable propoerty of the input box to true and call the partial trigger on the input box using AdfFacesContext.addpartialTarget("idoftheinputbox"). Also set the partial submit of the checkbox to true.

  • About disable input text by js

    i have a group of radio button , and when i click one, i want to disable one input text, can i perform it ? how can i define the js function ?
    like:
    <TR><TD class="TD1" width=80>
    private</TD><TD class="TD2" width=200>
    <input type="radio" name="R01010008" value="01010008010000" onclick="jsRioDisabled('R01010008','01010009000000')"checked>in
    <input type="radio" name="R01010008" value="01010008020000" onclick="jsRioDisabled('R01010008','01010009000000')">out
    </TD></TR>
    <TR><TD class="TD1" width=80>
    password</TD><TD class="TD2" width=200>
    <input type="text" size="20" name="01010009000000" maxlength="20" value="" >
    </TD></TR>
    3x

    function jsRioDisabled() {
         if(document.formName.R01010008[0].checked) {
              // Do something.
         } else if(document.formName.R01010008[0].checked) {
              // Do something else.
         } else {
              // Default action.
    }This is just a simple way of doing it...
    ***Annie***

  • Disabling input text by EL

    Hello there i have this code
    <af:inputText value="#{bindings.TypeCurrency.inputValue}"
    label="Tipo de Cambio:"
    required="#{bindings.TypeCurrency.hints.mandatory}"
    columns="#{bindings.TypeCurrency.hints.displayWidth}"
    maximumLength="#{bindings.TypeCurrency.hints.precision}"
    shortDesc="#{bindings.TypeCurrency.hints.tooltip}"
    id="it6"
    disabled="#{bindings.Money.inputValue==69}"
    partialTriggers="monedaId"> The disable EL is not working any clue??

    Hi,
    My guess, maybe because the "==" operator applied on the data type of your input component will not return true if it is comparing values of different precision and scale.
    Try using ">" if it works.
    disabled="#{bindings.Money.inputValue > 69}"regards,
    pino

  • Compare two input text in adf

    Hi
    i used the Build JDEVADF_11.1.1.4.0
    I want to make compare  validation between two  input text  Are equal or not . same Thing when i create new email i must enter the password and re enter password if not   equal  he give me message

    Hi,
    for a validation String, you can put autosubmit=true and in the valuechangeListener make the comparation.
    How to compare two Strings in java? http://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java

  • How to Disable client side validation for the message text input

    Hi,
    I have scenario where i need to by pass the client side validation for a message text input
    Scenario is
    I have a message text input field(say XYZ), i set the max length for the item as 20
    Now when im trying to enter the greek characters into it, it is allowing me to enter till 20 characters
    But when i try to submit the form ..my client side validation is firing..
    The Error says the XYZ is too long
    The problem is, in greek each character takes two bytes.(In english it is only 1).While entering the content it allowing 20 characters and when validating it is checking for bytes(if we enter in greek the length will be 40 bytes not 20)
    I cannot increase the max length .coz i have restrict the character length to 20 only.(english or Greek).
    Please help me in this regard.
    Regards
    Sandeep.

    Thanks for the information.But we dont have any option either declaratively or programatically to disable the client side validation for the message text input..I referred java docs ..i dint find any method which does..
    Correct me if im wrong

  • Disable Backspace when in input text fields

    Im trying to find a way to disable the keyboard backspace
    button from going back a page in the site but allowing it to
    function as a character delete when needed for typing in an input
    text field of a form.
    Strangely this problem only occurs for about a minute after
    the page is opened....after that it then works correctly. You can
    see what I mean by accessing the site's contact page
    www.safetybusiness.co.uk
    I have found two different sets of code to disable the
    Backspace completely, but this then means it doesn't work at all
    when wanting to delete in the text field.
    Method 1:
    <script type="text/javascript">
    if (typeof window.event != 'undefined')
    document.onkeydown = function()
    if (event.srcElement.tagName.toUpperCase() != 'INPUT')
    return (event.keyCode != 8);
    else
    document.onkeypress = function(e)
    if (e.target.nodeName.toUpperCase() != 'INPUT')
    return (e.keyCode != 8);
    </script>
    Method 2:
    <script>
    function checkShortcut()
    if(event.keyCode==8 || event.keyCode==13)
    return false;
    </script>
    <body onkeydown="return checkShortcut()">
    Anyone know how I can overcome this?

    The TextField class has a tab order property. You may want to
    look into this. As for disabling the backspace key, you can grab
    key presses from user input. I'm not 100% on this but you could use
    Flash to test the key being pressed. If backspace is pressed, find
    out the current object with focus (unsure of this part), if it's an
    input box in flash, have flash handle it or if a text box doesn't
    have focus, send it out to javascript to have it handle it.

  • Run button's method action without input text's validation raise

    Hi
    My English isn't very good
    I use jdeveloper 11.1.1.3.0
    I have a button and an inputText(with validation) on the page. I defined a method action for the button.
    when I click the button, the input Text's validation raise and the button's method doesn't run.
    If I set immediate=true for the button then the validation doesn't raise but in this case also button's method doesn't run.
    How can I run button's method action without input text's validation raise?
    Habib

    If I set immediate=true for the button then the validation doesn't raise but in this case also button's method doesn't run.This should have worked . Run your application in debug mdoe and put a debug pointer in your actionListener to see if the control goes there.
    Also put partialSubmit="true" for your button.

  • Retain all form field values after input text field validation failure

    Hi,
    I have a form with 1 input text field, one Command button and one h:selectManyListbox. when User enteres some values in input field and clicks on command button named Add, the value is validated. If input is invalid, then an error message appears next to the field. If input is valid, then the value is added into h:selectManyListbox. Adding to list box is done using Ajax4Jsf.
    Probelm:
    Let's assume user entered 3 valid values one after another and all are added into the list box. When he enters a wrong value, and error message appears. however, the entered values in list box goes away. Is there a way to retain the values even after validation failure.
    Code is given below;
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
    <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
    <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
    <h:panelGroup>
         <h:outputLabel for="inputEmailId1" value="Email Id: " />
         <t:inputText value="#{bean.newEmailId}" id="inputEmailId1" maxlength="100" size="40" immediate="true">
              <t:validateEmail message="Enter a valid Email Id." />
         </t:inputText>
         <t:message for="inputEmailId1" styleClass="errorStyleClass" />
    </h:panelGroup>
    <t:panelGroup style="text-align: left;" >
         <a4j:commandButton value="Add" styleClass="buttonsSub" action="#{bean.addSharedEmails}"
              reRender="inputEmailId1, selectedSharedEmails" />
    </t:panelGroup>
    <t:panelGroup style="text-align: left;">
         <h:selectManyListbox id="selectedSharedEmails" size="8" style="width:100%;" immediate="true">
              <f:selectItems value="#{bean.sharedEmails}" />
         </h:selectManyListbox>
    </t:panelGroup>
    Thanks in advance,

    Use the attribute "binding" instead of a "value". This will remember the value. You can also make sure that you dont have anything in your constructor or class level that initialises that value to "" or null. Because if JSF is remembering your value but your initialization that gets triggered before the page loading resets it to default values then you need to change that part of the code.

  • Disabling a Text Input created through the TEXT TOOL?

    Hi There,
    I have created a text input area. I havent used the flash
    text components. I used the TEXT TOOL. In the properties I set it
    to "input" type so that i could input data. All the features works
    fine except one. I have to disable the text area when user clicks a
    button. I dint get any help from the flash help.
    The main objective is that the text input area shouldnt take
    input from the user when the button is ON, once the button is off,
    the cursor should be at the point where the user left and he can
    type thru.
    Is this possible? I have achieved this functionality using
    the textarea component of Flash, but not using the input text area
    created using the TEXT TOOL.
    Can anyone help me.

    use the type property of textfields to change your textfield
    to "dynamic "when you want to disable input and assign it to
    "input" when you want to enable input.

  • Auto unselect disabled input on selecting other text

    test html like described below
    <pre><nowiki><html>
    <body>
    <input disabled value="some test text"> some text test<input value="some test text">
    </body>
    </html></nowiki></pre>
    if you dblclick on text disabled input and then dblclick on some other text on page you will see what i mean. Also have this bug on Win7.

    Hi Vyanky, I don't believe that's possible without some major functionality. The problem, as you probably know, is that it's a lookup with checkboxes. If it was added directly in InfoPath, then it wouldn't be an issue. You should consider adding "Other"
    as a separate yes/no field instead. That way you'll be able to add an action rule to it to enable the text box.
    cameron rautmann

  • Autosubmit in input text changing other fields

    Hi,
    I have an af:inputText set to autosubmit. When it gets called it is changing the value of an already set selectonechoice to null. This is causing some major issues in usability. Is this normal behavior? I am using JDeveloper 11.1.1.6
    Here is what my page has:
    <af:selectOneRadio label="#{makepaymentviewcontrollerBundle.XX}"
    requiredMessageDetail="#{makepaymentviewcontrollerBundle.YY}"
    id="sor1" showRequired="true"
    required="true" layout="horizontal"
    autoSubmit="true" immediate="true"
    binding="backingBeanScope.YY.sor1"
    value="#{backingBeanScope.YY.paymentMethod}">
    <af:selectItem label="11" value="11" id="si2"/>
    <af:selectItem label="22" value="22" disabled="true"
    id="si1"/>
    </af:selectOneRadio>
    and
    <af:inputText label="#{makepaymentviewcontrollerBundle.11}"
    id="it4"
    validator="#{backingBeanScope.YY.it4_validator}"
    required="true"
    value="#{backingBeanScope.YY.line1}"
    autoSubmit="true" immediate="true" columns="28">
    Is there anyway to avoid the behavior that the input text is changing the values of the radio button in the managed bean ?
    Edited by: 919315 on Mar 16, 2012 12:11 AM
    Edited by: 919315 on Mar 16, 2012 12:14 AM

    The problem seems to be that you have the value for the radio button bound to backing bean scope. The docs say this about backing bean scope:
    backingBeanScope: Used for managed beans for page fragments and
    declarative components only. The object is available for the duration between the
    time an HTTP request is sent until a response is sent back to the client. This scope
    is needed because there may be more than one page fragment or declarative
    component on a page, and to avoid collisions between values, any values must be
    kept in separate scope instances. Use backingBeanScope scope for any
    managed bean created for a page fragment or declarative component.Backing bean scope (and request scope) beans lose their state in between requests.
    John

  • How to use multiple patterns for masking/format the input text

    Hi All,
    I am using Jdeveloper 11.1.1.5 and i have a requirement where i need to format my input Text value in these below patterns:-
    Format
    Example
    AA9A 9AA
    EC1A 1BB
    A9A 9AA
    W1A 1HQ
    A9 9AA
    M1 1AA
    B33 8TH
    A99 9AA
    AA9 9AA
    CR2 6XH
    DN55 1PT
    AA99 9AA
    For Example :-  If user puts value as EC1A1BB, it should automatically changed to EC1A 1BB
                                 if user puts value as W1A1HQ, it should be automatically changed to W1A 1HQ and so on..
    If it could have been one format , i might have followed this :- https://blogs.oracle.com/jdevotnharvest/entry/get_social_security_numbers_right
    But for multiple patterns i am not able to get through to the proper solution.
    Is there any way to achieve this ? Please suggest.
    Regards,
    Shah

    For the validation you should be able to use one regular expression where you add the logical or (|)  (check the doc http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html) between the groups. If none of the patterns matches you have an error.
    For the for formatting I'm not sure you can use only one expression.
    I suggest to write one method which does the checking on and the formatting may be using an array of patterns to check and iterate the patterns in a loop. Once you found a match you can read the needed format from another array (or an other dimension if you prefer to use a multidimensional array).
    Timo

  • How to use a radio button in enabling/disabling a text box in report progra

    Hi,
        Could any please let me know, how to use a radio button in enabling/disabling a text box in report program.

    *& Report  ZMR_RADIO_BUTTONS
    REPORT  ZMR_RADIO_BUTTONS.
    PARAMETERS : R1  RADIOBUTTON GROUP G1,
                 R2  RADIOBUTTON GROUP G1.
    PARAMETERS : A1 TYPE I,
                 A2 TYPE I.
    AT SELECTION-SCREEN OUTPUT.
    *initialization.
    IF R1 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF R2 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    modify screen.
    ENDLOOP.
    ENDIF.
    START-OF-SELECTION.
    *IF R1 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 1.
    ENDIF.
    *ENDLOOP.
    *ENDIF.
    *IF R2 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 0.
    ENDIF.
    *ENDLOOP.
    *ENDIF.

Maybe you are looking for

  • Sending HTML Email Using Report Bursting

    Hello all, I have a requirement whereby I am sending the report as an attachment to some users and as a link to other users. Report bursting would seem to be the answer and is working well with the exception of the HTML formatted email. When attempti

  • 10.6.8 update: Macbook only shows grey screen

    I've downloaded and installed 10.6.8. After rebooting I only get the grey screen with the spinning wheel and the progress bar. After the progress bar has filled to about 10%, the progress bar jumps back to zero, fills again to about 10% and then Macb

  • Camera Raw Plug in for Elements 11?

    My Elements 11 is unable to open Nikon 7100 NEF (raw) files athat open correctly with Nikon View NX2.  Adobe download website doesn't contain Camera Raw fix after 2012 prior to 7100 introduction. How do I add correct plug-in?

  • IDVD will not burn dual layer disc correctly.

    I have an iMac9,1 Intel Core 2 Duo 2.66 GHz with 8 gigs of ram, with a OPTIARC DVD RW AD-5670S DVD-writable to -R, -R DL, -RW, +R, +R DL, +RW. It will not spit out a properly formated disc from IDVD. I get the "Supported disc not available" message,

  • Iphoto would not import movies from Iphone 4 - ANYBODY ELSE HAS ISSUES?

    Hello, Yes Iphone 4 is so sexy. I have reception issues too unfortunatly , only where reception is weak anyway, but yes it happens... also iphoto would not import most of the times the iphone 4 videos? any suggestions why and how to fix it ? Many thx