How to use "selectOneRadio" to enable/disable a Picklist.

Hi,
I m new to JSF and having a requirement to enable/disable two picklists using "<h:selectOneRadio>".
Kindly reply if anyone has done similar thing before or if any one can provide any suggestions on how to acheive this?
Thanks in Advance!
Vivek

Finally,
I found a way to get this done... I managed to get this work using JavaScript. Look for the code below.
<script type="text/javascript">
function enablePickList(form,radio,picklist1,picklist2)
var radio = document.forms[form][[form+":"+radio|http://www-128.ibm.com/developerworks/forums/]][0].checked;
if(radio)
document.getElementById(form+":"+picklist1).disabled = false;
document.getElementById(form+":"+picklist2).disabled = true;
else
if(!radio)
document.getElementById(form+":"+picklist1).disabled = true;
document.getElementById(form+":"+picklist2).disabled = false;
</script>
<h:selectOneRadio id="myRadio1"
value="#{GLAccountDimension.enablePicklist}" onclick="enablePickList ('glaccountinsert','myRadio1','AccountLevelList1','AccountLevelList2');">
<j:selectItem itemValue="true" itemLabel="Select">
<h:selectOneMenu id="AccountLevelList1"
value="#{GLAccountDimension.glAccountLevel1}"
immediate="true" disabled="true">
<j:selectItems value="#{GLAccountDimension.glAccountLevel1List}" />
</h:selectOneMenu>
</j:selectItem>
<j:selectItem itemValue="false" itemLabel="Select">
<h:selectOneMenu id="AccountLevelList2"
value="#{GLAccountDimension.glAccountLevel2}"
immediate="true" disabled="true">
<j:selectItems value="#{GLAccountDimension.glAccountLevel2List}" />
</h:selectOneMenu>
</j:selectItem>
</h:selectOneRadio>

Similar Messages

  • How to use shortDesc in the disabled inputtext

    hi,all
    i encounter a problem,our team must use disabled inputtext when the text is only used to output string.
    the reson we don't use outputext is if there is noting in the outputtext,there is nothing displayed.
    how to use shortDesc in the disabled inputtext?
    here is the code:
    <af:inputText value="#{bindings.shortdesc.inputValue}" disable="true"
    id="ot2" columns="25" shortDesc="#{bindings.longdesc.inputValue}"
    simple="true"/>
    thanks all

    Hi,
    ........... I use JDev 11g ..............
    If you make your inputText disabled -----> shortDesc will not be displayed.
    You can make a workaround to achieve this by using popup as :
    1- add showPopupBehavior inside your inputText as :
    <af:inputText label="label1" id="it1" disabled="true">
                    <af:showPopupBehavior triggerType="mouseOver"
                                          align="endBefore" alignId="it1"
                                          popupId="p1"/>
                  </af:inputText>2- add a popup which will display your shortDesc text
    <af:popup id="p1">
                      <af:outputText value="Sameh POPUP" id="ot1"/>
              </af:popup>I hope it is useful.
    Sameh Nassar

  • How to create "Verbose mode" (Enable/disable trace output)?

    Hi there! I'd like to do as Papervision:
    // Block Papervison3D trace output
    Papervision3D.VERBOSE = false;
    that is, a global variable for enabling/disabling the trace outputs of my own program. I come up with creating
    a class and putting a static boolean member variable. But there is something I'm not sure about: How to use
    it...
    For example: every time I need to do a trace, would I have to put this ? -->
    if( MyClass.VERBOSE ) trace("whatever");
    So it isn't needed to instance the object because a static variable is used. That's the way, isn't it?
    Thanks and regads.

    From the book I'm reading, the author uses it the same way you're saying:
    Inside your Classes, you have
    private var _verbose:Boolean = false;
    I noticed he uses it always (or almost) in the constructor of the classes:
    public function whatever (var:*, verbose:Boolean);
    //I tend to use verbose:Boolean = false on the constructor too so you don't have to always set it.
    inside the constructor you have:
    _verbose = verbose;
    and normaly inside methods handling events like Event.OPEN, Event.INIT, IOErrorEvent.IO_ERROR, HTTPStatusEvent.HTTP_STATUS, you have something like this:
    private function onOpen (e:Event):void {
         if (_verbose) {
              trace("The loading process has begun, or whatever");

  • How to use SelectOneRadio within a DataTable

    Hi,
    I have a requirement to have a radio button for each row in the datatable. It is to enable selecting one row(only one row) from the table and proceed to the next page. The table should look like
    o Name1 address1 city1 state1
    o Name2 address2 city2 state2
    o Name3 address3 city3 state3
    o Name4 address4 city4 state4
    Next>>
    The data structure I have is a collection on objects of type person.
    Class person
    String id;
    String name;
    String address;
    String city;
    String state;
    getters and setters
    I tried to use SelectOneRadio within a Column, but that didnt help. As obvious it treats each rows radio button as a seperate radio group.
    <h:datatable var="person" value="#{personList}>
    <h:column>
    <h:selectOneRadio>
    <f:selectItem itemValue="#{person.id}"/>
    </h:selectOneRadio>
    </h:column>
    <h:column>
    <h:outputText value="#{person.name}"\>
    </h:column>
    </h:datatable>
    I am new to JSF. I searched thru some JSF websites and book, but couldnt find a solution. Can someone help me solve this.
    Thanks in advance
    Rani

    Hi,
    after some time probing into this issue I think none of the many proposed sollutions really solves the underlying problem: Working around the issue becomes much to complicated for JSFs stated design goal of easing development. Certainly for such a common case scenario no workaround should be neccessary, especially given the fact that JSTL is easily able to model this without the need for workarounds!
    In my opinion JSF TagLib implementations should attempt to solve this in a coming version.
    One part of the sollution might be to make <f:selectItem> search it's parent element recursively, i.e. allow the expected container element to be the nearest direct or indirect parent that's suitable. This would allow developers to envelope a <h:dataTable> tag with a <h:selectOneRadio> element. Any <f:selectItem> element inside would therefore be part of a single choice radio button selection, regardless of them being distributed over multiple rows or columns.
    Another part of the sollution might be to allow <h:selectOneRadio> and similar tags to be substitutes for <h:column> tags inside tables. This way a complete column of radio buttons could be used to chose a single value, thereby allowing multiple columns of radio buttons to choose multiple values within the same table.
    Please forward this suggestion for enhancement in kind to the expert group working on the further development of the JSF taglibs. I guess many people besides me already use it as a classical example of complications using JSF during lectures about the tomic, and at least in this case the problem seems completely solvable.
    Kind regards,
    Sascha Baumeister
    software architect, university lecturer and former JCP spec lead JSR086

  • How can I control the enable/disable of command buttons in ADF JSF

    I have been having a great deal of trouble trying to work out how to control the command button such that if the rowset is null then the button is disabled. The trick is that the rowset is not defined by the view where the command button is located. The rowset is defined by a view which has a "view" command button which displays the specific row selected, then this view has a command button that will display the detail rowset of the selected master row, but if there are no detail records I want the button to be disabled. How can I do this in ADF JSF? If I use a backing bean to make the determination prior to the page rendering then how does the backing mean method set the parameter necessary to disable the command button? Any advice or tutorial that I can use is most appreciated. My goal with using ADF JSF effort was to demonstrate that a complex app could be generated with minimum coding, I would like to keep to this concept if possible. Thanks,
    Michael

    Hi Michael,
    You can probably set the Enabled property of the command button using an EL that would evaluate and return true or false based on your requirement.
    Check out these links for more information on using the EL.
    http://radio.weblogs.com/0118231/2006/11/10.html
    http://database.in2p3.fr/doc/oracle/Oracle_Application_Server_10_Release_3/web.1013/b25947/web_dcp006.htm
    -Arun

  • How to use telnet to enable SNMP in a router ?

    Hi,
    Is it possible to enable the snmp in a router via telnet with the wan address(I have the routers' passwords) ?
    If yes, how
    Router 1 : Cisco 871 w
    Router 2 : Sagem – F@st 3304 v2
    thank you
    Waiting...

    Hi,
    Command Prompt:
    telnet @router
    login: root
    Password: ********
    [root @ home]$
    What I should do next  ?

  • How to make checkbox option enable/disable

    Hello,
    i am newbie in coldfusion...i want to make an option answer after my first check box answer is true
    code :
    <tr>
        <td><table width="100%"  border="0">
      <tr>
    <tr>
        <td>Do you have a car? </td>
        <td><input name="car_type" type="checkbox" value="1">Yes<input name="car_type" type="checkbox" value="0">No</td>
    </tr>
    <tr>
        <td width="100%"></td>
        <td><strong>(Select your car type)</strong></td>
    </tr>
      <tr>
        <td></td>
        <td><input name="car_bmw" type="checkbox" value="1">
          BMW</td></tr>
       <tr><td></td>
        <td><input name="car_mercedes" type="checkbox" value="1">
          Mercedes</td></tr>
        <td></td>
        <td><input name="car_toyota" type="checkbox" value="1">
          Toyota</td>
         <td></td>
        <tr><td>
        </td><td>Others<input name="car_others" type="text" size="20" maxlength="100" /></td>   
      </tr>
      <tr>
    Thank u

    What have you tried? 
    This is a client-side interaction, not server-side, so it should be fairly straightforward to do in JavaScript (I'd recommend using jQuery as it will make things a bit easier).
    -Carl V.

  • Enable/Disable messageChoice

    I have a page with a combination of picklists, LOVs and text boxes. When the page loads a particular picklist is disabled (which I have working). Once the user enters 3 separate values from other picklists and LOVs then the picklist that was originally disabled should be enabled. I tried enabling the picklist in the processFormRequest but i get the following error. Any suggestions on how to go about doing this?
    (This developer mode error is thrown instead of being registered due to the lack of the page context object.) The OA passivation framework coding standard has been violated. Web bean properties cannot be modified in the controller processFormData or processFormRequest method. Web bean properties should be modified in the processRequest method only. An attempt to modify a web bean has been made in the following call stack:

    Hi,
    This error comes when you try to set the properties by getting the handle to the control, you can't write such code in PFR.
    In PFR use PPR to enable /disable items.
    Regards,
    Reetesh Sharma

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

  • Does anyone know how to enable/disable a dropdown menu in Forms at runtime?

    Is there a way how to disable/enable dropdown menu for menus that have multiple sub levels in Oracle Forms? I am trying to use the set_menu_item_property function but this takes 'menu.item' format for the first argument. I am trying to enable/disable a menu item in the form of 'menu.item.subitem' and was not able to do it using this function. If anyone knows a different function or method, please reply. I have shown an example below.
    Setup -> Software -> Front Page
    From the above example, I can enable/disable Software using set_menu_item_property function. But, how do I enable/disable the Front Page menu in Oracle forms at runtime?
    Thanks
    Edited by: user480347 on Aug 24, 2010 3:37 PM

    Yes you are on the right track. You need to pass then complete menu name to set_menu_item_property
    Immediate_parent menu.item_name e.g
    For example you have menu like this
    Id like
    A1    A10 > A1010
    Home > Input > Form 1
    A1    A10 > A1020
    Home > Input > Form 2 To disable Form 2 you must pass menu name as
    A10.A1020Hope it helps

  • Need an enable/disable Labview VI for SC-2062 relay board using PCI-6503 DAQ Card.

    I am using Labview 6i, and I need to write an enable/disable VI that will enable and disable 6 of the 8 relays at any time while keeping the whole vi running. Therefore one or more positions may be changed at a time, but positions that don't change cannot be interrupted when changing others (no port resets allowed). I was wanting to maybe send a 1 by 6 array of some sort out but I can't figure out how to use the array to communicate with the DAQ card, relay board and SC-2051 adaptor. There also needs to be error handling in and out. Thanks for your help. Any examples would be very helpful.

    Hello;
    The best way to go about that is to disable the data points correspondent to the channels you want to disable. Meaning that you can ignore the datapoints of the channels you want to disable on the fly. That is the only way to disable channels on the fly.
    Regards
    Filipe A.
    Applications Engineer
    National Instruments

  • Use rich:fileUpload/ to enable/disable my buttons with checking file names

    Hello!
    I need to upload some files with using <rich:fileUpload>,and i did it but i need to check file names for some reasons and enable or disable upload button but my problem is that when i open my modal panel and click add button of <rich:fileUpload> and then add upload button of <rich:fileUpload>(not my upload button but upload button wich <rich:fileupload> has) i check file name but the button is not enable/disable until i close my modal panel and open it agin,so i need to know how to modify my code to make it work?
    <rich:modalPanel  id="uploadFile" autosized="true" resizeable="false">
                    <f:facet name="header">
                     <h:panelGroup>
                         <h:outputText value="uploadFiles"></h:outputText>
                     </h:panelGroup>
                 </f:facet>
                 <h:form>
                      <rich:fileUpload  maxFilesQuantity="#{uploadBean.maxUploadFiles}" allowFlash="true" fileUploadListener="#{uploadBean.uploadListener}" immediateUpload="false"/>
                             <table>
                                <tr>
                                     <td><h:commandButton disabled="#{!uploadBean.xlsNameValid}" rendered="#{!uploadBean.admin}"  action="#{uploadBean.upload}" value="upload" /></td>
                                     <td><h:commandButton action="#{uploadBean.clearFiles}" value="cancel" id="cancel"/></td>
                                </tr>           
                           </table>
                 </h:form>
                 <rich:componentControl for="uploadFile" attachTo="cancel" operation="hide" event="onclick"/>
              </rich:modalPanel>

    No the problem is that file is being checked on server side, but if file is invalid the button Upload(my button ,not standart rich:fileUpload) must be disbaled,and shown,but i have to close this modal panel and open it again to see my button enabled/disabled

  • What does "Adjustments disabled" mean and how do I get it enabled?

    When 2.1 came out I bought it, but have only tried to use it today. Projects works, Metadata works but Adjustments says "Quick Preview On (adjustments disabled). I have a couple of questions?
    1) How did this happen?
    2) What does it mean and?
    3) How can I get them enabled?
    Thanks so much

    Well, that was easy. I looked throughout the manual, but couldn't find this. I assumed that there was some problem with my registration. This is a most satisfying answer. Thanks so much.

  • How do you Enable/Disable a user's ScreenSaver and set it's time

    How do you Enable/Disable a user's ScreenSaver and set it's "Start Screen Saver" time.
    I am writting an application in java which uses JNI and a screen saver to lock users out of the computer unless they enter the correct username and password.
    If they enter the correct password I need to Enable the ScreenSaver at a specific about of time (time can be changed remotely) so I can "log out" the user.
    I need to disable the screen saver after the screen saver runs so that it doesn't run while the java login program is running.
    I have this working already on Windows XP but can't find any way to program this on Mac OS X.
    Thank you for any help!

    http://forums.macosxhints.com/showthread.php?t=61525
    Disable
    defaults -currentHost write com.apple.screensaver idleTime 0
    Enable for 180 seconds
    defaults -currentHost write com.apple.screensaver idleTime 180

  • How to Enable/Disable MessageTextInput Read Only property in PFR?

    Dear All,
    When i click on a submit button i need to enable/disable the Read only property of MessageTextInput item.
    Can any one tell me how to do this?
    I am executing the code
    if (pageContext.getParameter("EnableBT") != null) {
    OAMessageTextInputBean beanEmployeeIdCL = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("EmployeeIdCL");
    beanEmployeeIdCL.setReadOnly(false);
    When i used the above code in Process Form Request method it is showing developer mode exception in run time as we can call the above code only in Process Request form.
    Request to please help regarding this.
    Thanks & Regards,
    CAK

    CAK,
    You need to make use of Partial Page Rendering (PPR) & SPELL. Modifying the bean property in PFR is not supported in OAF.
    Refer - PPR section of Devguide for more.
    Regards
    Gyan

Maybe you are looking for

  • White screen - Laptop doesn't recognise own display as default

    Hi all, I've had a search on the forum for the same issue but there doesn't seem to be any issue exactly matching this, so posting. I bought an IdeaPad Flex 14 about 9 months ago. It was fine up til about 6 months ago. Then it started to boot to a wh

  • Looking through pictures make iphoto take pauses every 3 or 4 picture,this started after update fro 4 of april.What is wrong??

    Hi.. I have been using Iphoto and Aperture a few years.Both programs has been improoved several times during last years,but after update on 4 of april 2013 something changes in surch a negative way that fustration comes too surface too often. When I

  • Authentication Window

    Hi I have installed Snow Leopard 4 times now and each time i get too a point that I cannot see the authentication window. First thing first. When i installed it everything was ok, i installed some software and after some time when i wanted to install

  • Installation date/time of a database !!

    How can i determine the installation date/time of my databases? I can forget to note the date and time of my database instances. After some time since we have one than more databases, it becomes important to remember thier installation sequence. Than

  • Library on one computer but not another

    I login to two authorized computers and can't see my library on one of them. My account balance shows up on each so I know it is the correct account. Why would my library not be visible on it?