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.

Similar Messages

  • 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

  • Getting a value of an input text component in backing bean

    I have created an input text component on a page where I will be entering a number, setting Autosubmit feature as true. ValueChangeListener property is set as #{test.displayTable} where displayTable is a method defined in test managed bean.
    Now I know to fetch the value entered in input text component by creating a RichInputText variable in Advanced property.
    But in case the Advanced property is blank, then how will I be able to retrieve the value of it? This is the code. I am not able to get the value entered in the component. I can't even find any getvalue method for it.
    FacesContext facesContext = FacesContext.getCurrentInstance();
    UIViewRoot root = facesContext.getViewRoot();
    RichInputText inputText = (RichInputText) root.findComponent("it1");  // it1 is the id of the input text component
    System.out.println("inputText: "+inputText);On using sop statement, this is the output which is getting generated, while I had entered 90.
    inputText: RichInputText[UIXEditableFacesBeanImpl, id=it1]

    One more thing. Once the VO is getting refreshed, I am able to display an inline message saying that 'Table refreshed Successfully!' (refer the code)
    But in case if the user doesn't enter anything, and press TAB button, I want to display an error message exactly besides the input text component, saying that 'Please Enter an Integer.' According to my understanding, if the user enters a null value then while casting string to Integer, it will throw an exception, so I will be writing the code in the catch part. Any suggestions?
    public void displayTable(ValueChangeEvent valueChangeEvent) {
            BindingContext bctx = BindingContext.getCurrent();
            BindingContainer bindings = bctx.getCurrentBindingsEntry();
            OperationBinding method = (OperationBinding)bindings.get("displayEmployeeTable");
            try {
                Integer getValue = Integer.valueOf(valueChangeEvent.getNewValue().toString());
                System.out.println("getValue: " + getValue);
                method.getParamsMap().put("deptId", getValue);
            } catch (Exception e) {
            method.execute();
            FacesMessage message = new FacesMessage("Table refreshed Successfully!");
            message.setSeverity(FacesMessage.SEVERITY_INFO);
            FacesContext fc = FacesContext.getCurrentInstance();
            fc.addMessage(null, message);
        }Edited by: Sonull on Jan 12, 2013 3:56 PM

  • 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.

  • How to check the checkboxes that are dynamically displayed in the browser

    Hi
    Here the requirement is ,I am dynamically diaplaying the text boxes based on the data captured from the database.Here depending upon the number characters in Database,related that much of checkboxes will display.How can i provide Javascript client event handling in this without knowing the checkbox ID'.
    Needs urgent reply,
    Regards
    Usman

    code to check all check boxes in a page.
    <body>
    <SCRIPT language=JavaScript>
    function doCheckAll()
      with (document.dam) {
        for (var i=0; i < elements.length; i++) {
            if (elements<i>.type == 'checkbox' )
               elements<i>.checked = true;
    </SCRIPT>
    <FORM  name=dam>
    <INPUT  type=checkbox value=1>
    <INPUT  type=checkbox value=2>
    <INPUT  type=checkbox value=3> <br>
    <INPUT  type=checkbox value=4>
    <INPUT  type=checkbox value=5>
    <INPUT  type=checkbox value=6> <br>
    <INPUT  type=checkbox value=7>
    <INPUT  type=checkbox value=8>
    <INPUT  type=checkbox value=9> <br>
    <INPUT onclick=doCheckAll() type=button value="Check all">
    <INPUT type=reset value="Reset">
    </FORM >
    </body>
    How you are generating check boxes? if you are generating checkboxes then you would also be generating ids for them. why cant you use them?
    Regards
    Raja

  • 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***

  • Need solution regarding input text component

    when the user enters some text in the input text field in the priview mode, the text entered by the user will fall in the destination only when the user clicks somewhere outside the component. else the entered text will not fall in the destination.can some one help providing a solution such that when the user enters some text it should immediately fall in the destination. if this component does not support this requirement is their any other component which could meet my requirement?

    Hi Divya,
    you can do it by simply taking a Input Text make the destination for the Text as one cell in Excel and take another component "push Button". Make the Push Button's source as the Destination of the Input Text and its Destination as another cell.
    Now after entering the text in Input Text and when u will click on push Button, it will insert the Text in Corresponding cell i.e Destination of Push Button. Now you can use that value as you want.
    Hope it will Help u.
    Thanks
    Prakash

  • How to check the checkbox of Adobe Installer with the Aplescript??

    Hi All,
    am trying to Install Adobe Flash Player thru stand alone Installer, I want to check the check box and need to click on Install button,
    Whem am trying to get the entire contents of window thru UIElementInspector, am unable to get the contents of checkbox and Install buttons..
    I just tried myself with the below script to click the checkbox, but did not succeed, error saying unable to get the checkbox.. Pls suggest how to check..
    tell application "System Events"
        tell process "Adobe Flash Player Install Manager"
            set frontmost to true
            click the checkbox "I have read and agree to the terms of the Flash Player License Agreement" of window "Adobe Flash Player 11.5 Installer."
        end tell
    end tell
    Pls check the below link to view the image of the Adobe Flash Player Installer.
    https://docs.google.com/document/d/1yzyBTrvi94QxjlEAlcbudOBpXiTGPEI2LA3D1iEo8Gw/ edit

    I'm working on a similar script, but when I execute the script, I run into this error:
    error "System Events got an error: Can’t make {563, 234} into type list." number -1700 from {563, 234} to list
    Any ideas? Here's the background: I'm trying to click the search box on this page: http://www.alexa.com/siteinfo/payeasenet.com
    Here's my UI Inspector results of said element:
    <AXGroup>
         <AXScrollArea: “”>
          <AXWebArea: “”>
           <AXGroup: “”>
            <AXGroup: “”>
             <AXTextField: “Enter a search query”>
    Attributes:
       AXRole:  “AXTextField”
       AXSubrole:  “AXSearchField”
       AXRoleDescription:  “search text field”
       AXChildren:  “<array of size 0>”
       AXHelp:  “”
       AXParent:  “<AXGroup: “”>”
       AXPosition:  “x=550 y=212”
       AXSize:  “w=214 h=30”
       AXTitle:  “Enter a search query”
       AXDescription:  “”
       AXValue (W):  “”
       AXFocused (W):  “1”
       AXEnabled:  “1”
       AXWindow:  “<AXWindow: “Payeasenet.com Site Info”>”
       AXSelectedTextMarkerRange (W):  “(null)”
       AXStartTextMarker:  “<AXTextMarker 0x60800024af80 [0x7fff758b4eb0]>{length = 24, bytes = 0xbd040000000000006024c514010000000000000001000000}”
       AXEndTextMarker:  “<AXTextMarker 0x600000248a30 [0x7fff758b4eb0]>{length = 24, bytes = 0xbf0400000000000040420c17010000000100000001000000}”
       AXVisited:  “0”
       AXLinkedUIElements:  “(null)”
       AXSelected:  “0”
       AXBlockQuoteLevel:  “0”
       AXTopLevelUIElement:  “<AXWindow: “Payeasenet.com Site Info”>”
       AXNumberOfCharacters:  “0”
       AXSelectedText (W):  “”
       AXSelectedTextRange (W):  “pos=0 len=0”
       AXVisibleCharacterRange (W):  “pos=0 len=0”
       AXInsertionPointLineNumber:  “0”
       AXTitleUIElement:  “(null)”
       AXAccessKey:  “(null)”
       AXRequired:  “0”
       AXInvalid:  “false”
       AXPlaceholderValue:  “”
       AXARIABusy:  “0”
    Actions:
       AXPress - press
       AXShowMenu - show menu
       AXScrollToVisible - AXScrollToVisible

  • Read email adress from a text file then check the validity of them

    a text file has three lines, each line contains one email adress:
    [email protected]
    qwe@@ws.com
    wer//@we.net
    read the email address from a text file, then check which one is invalid, output the invalid email adress in the console.

    no 3 .umm, an email adress can have more than 2 '.'s in it,
    example:
    [email protected]
    would be a valid email address.
    To decide what a valid address is you'd need to parse it against the correct standard.
    I think however that javax.mail.internet.InternetAddress does this for you, check out the docs:
    http://java.sun.com/products/javamail/1.2/docs/javadocs/javax/mail/internet/InternetAddress.html
    even if it parses it may not be a valid address though in that it may not actually exist.

  • HOW TO CHECK THE CHECKBOX VALUE WITH SQLCE DATABASE

    Hai All,
       Good Day! I am using VB in Visual Studio 2008. I have a form with check boxes and one button control. If i selected the check box and then click the button, check the database table field and check box text are equal. if both are equal then
    how to check?
     I have tried it. The code is:
    Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim conn As New SqlCeConnection
    Dim cmd As New SqlCeCommand
    conn.ConnectionString = "DataSource = E:\Vbprojectex\WindowsApplication3\WindowsApplication3\Database1.sdf"
    Try
    cmd.Connection = conn
    conn.Open()
    If CheckBox1.CheckState = 1 Then
    cmd.CommandText = "SELECT Aerator FROM ttabpagelist where Aerator = CheckBox1.Text"
    TextBox1.Text = 1
    End If
    cmd.ExecuteNonQuery()
    Finally
    conn.Close()
    End Try
    End Sub
    End Class
    Thanks & Regards Sasi ................. Go Green

    probably something like (ofc below will never give result since Aerator can't have 2 values, you will have to adjust the second check box column obviously)
    Try
    cmd.Connection = conn
    conn.Open()
    dim strsql as string = "= "SELECT Aerator FROM ttabpagelist "
    Dim whereConcatenator As String = " WHERE "
    Dim Wherestatement As String = String.Empty
    If checkbox1.checked = True Then
    Wherestatement += whereConcatenator
    Wherestatement += "Aerator = " & checkbox1.Text
    whereConcatenator = " AND "
    End If
    If checkbox2.checked = True Then
    Wherestatement += whereConcatenator
    Wherestatement += "Aerator = " & checkbox2.Text
    End If
    cmd.commandtext = strsql & wherestatement
    TextBox1.Text = 1
    End If
    cmd.ExecuteNonQuery()
    Finally
    conn.Close()
    End Try

  • Checking the checkbox based on the BSP application

    Hi all,
              I added a button and a checkbox in Accounts Application(CRMM_ACCOUNT).On clicking this button it call a custom bsp application.If there r no rows displayed in bsp, then this checkbox must not be checked else it must be checked.i.e
    1.I am calling bsp from pcui
    2.Based on bsp application ,I should change the pcui application.
              Do I have to call MAC in my BSP application?
    Please suggest.
    Regards,
    Ruby.

    Hello Ruby,
    chan you explain wht the Checkbox should indicate?
    Regards
    Gregor

  • Is the any "Input Text component" to input a DateTime value ?

    Hi all,
    I have a to create a GUI; a user must specify some date and time values on it.
    Is there any input component for this kind of need ?
    I mean, for instance, to input a Date I'd like to show a calendar.
    Cheers.
    Stefano

    Google for "java date picker". The very first hit looks like a good one (never tried it though).
    You can also look at SwingX's JXDatePicker.
    This seems to be a pretty common "advanced" component for people to try to make, so you have lots of choices. Just search around a little.

  • To check the checkbox dynamically used in thmlb tag

    Hi all,
    I am new to crm 2007,
      I have added a thtmlb tab to create a checkbox. I am able to get checkbox event to get value of the check box and process. But when reopen the  view the check box should be checked  dynamically depending on the conditions.
                   how to make a check box checked dynamically.
    Thanks
    Hema

    Hi john,
    I have table control with fore fileds like this..
    'text box'-------'get button'.
    chkbox---item-material---qty
    box1--1abcde--
    10
    box2--2xyhnb--
    20
    Nothing is allow input value except chkbox.
    Values are coming by one text box above this table.
    Text box allow input value..
    if i click box1 ...that row will be selected and it takes to second screen.....
    But this box is not allowing to check...
    kaki
    Message was edited by: Kaki R
    Message was edited by: Kaki R

  • 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

  • How can i disable some text and item in the reports from printing

    i have a requirment to prepare a report for cheque printing on a formatted cheque paper..so i want the data should be printed in the paper not the whole thing..how can i do this...
    it is like this
    Name:- <coming from database>
    Address :-
    Rs :-
    in printing i need only the data not Name,Address and Rs headings..
    plz help me out??

    Hi,
    The usual method to influence whether an item should be printed or not is to adjust the function which lies underneath the item (simply return FALSE when you don't need it. You can also adjust the input and then return TRUE). I hope this will help you to solve your problem.
    Regards,
    Vincent ([email protected])

Maybe you are looking for

  • IPod wont sync with iTunes. Error Message occurs.

    I just updated to the latest version of iTunes and when i try to sync my iPod i get the message "The software required for communicating with the iPod is not installed properly. Please reinstall iTunes to install the iPod software." I tried this and

  • Transport Request for logical database

    Hi , Could you please advice how to create Transport Request when we made the changes to logical database ( added new filed to the logical database) I have added payment term field to the logical database DDF, but Transport Request was not created fo

  • Can I use Oracle XE for commercial purpose?

    Hi can anyone please tell me if I can use Oracle XE for my company's database?

  • Error message on trying reply to email

    Ipod touch error message when replying to email.  "....message was rejected by the server because it does not allow relaying".  What is relaying...I want to reply to an email?  All of my contact emails are being rejected.

  • Nexus 5000 as NTP client

    We run 6509 core routers as NTP servers to other IOS routers/switches & servers of several OS flavours. All good. Recently added some Nexus 5000s and cannot get them to lock. No firewalls or ACLs in the path 6509 (1 of 4) state: LNPSQ01CORR01>sh ntp