Enable/Disable item Based Value from Select in Tabular Form

Hi Guys
I want to Disable text field in Tabular form, Based on the Select List Item Value.
Let's Say
I'm having one select lista and text box in each record in tabular form.
Select List having 2 items ... Add Text(return value 1) and No Text(return value 2)
if value =1 then i want to enable text box , so user can enter value.
if value=2 then text box won't allow to add text or will become disalbe.
Please Help
Thanks

Hi,
You can do this by using a small java script
<script language="JavaScript" type="text/javascript">
<!--
function FldEnableDisable(pThis)
if (pThis == 50)
  $x('P2_TEXT').disabled=true;}
else
{ $x('P2_TEXT').disabled=false; }
//-->
</script>Here P2_Text is the text box whose value I am enabling or disabling based on the selected value from a List box. On The list box I have onChange="javascript:FldEnableDisable(this.value)" ( You can specify this under HTML Form Element Attributes)
Thanks,
Manish Jha

Similar Messages

  • Returning multiple values from a called tabular form(performance issue)

    I hope someone can help with this.
    I have a form that calls another form to display a multiple column tabular list of values(needs to allow for user sorting so could not use a LOV).
    The user selects one or more records from the list by using check boxes. In order to detect the records selected I loop through the block looking for boxes checked off and return those records to the calling form via a PL/SQL table.
    The form displaying the tabular list loads quickly(about 5000 records in the base table). However when I select one or more values from the table and return back to the calling form, it takes a while(about 3-4 minutes) to return to the called form with the selected values.
    I guess it is going through the block(all 5000 records) looking for boxes checked off and that is what is causing the noticeable pause.
    Is this normal given the data volumes I have or are there any other perhaps better techniques or tricks I could use to improve performance. I am using Forms6i.
    Sorry for being so long-winded and thanks in advance for any help.

    Try writing to your PL/SQL table when the user selects (or remove when deselect) by usuing a when-checkbox-changed trigger. This will eliminate the need for you top loop through a block with 5000 records and should improve your performance.
    I am not aware of any performance issues with PL/SQL tables in forms, but if you still have slow performance try using a shared record-group instead. I have used these in the past for exactly the same thing and had no performance problems.
    Hope this helps,
    Candace Stover
    Forms Product Management

  • How to get a value from  select one choice (created by static view)

    Hi,
    Whene ever Iam trying to get value from select one choice which is created by static view iam getting only index.How to get the actual value in 11g .please help me anybody .Thanx in advance....
    Edited by: 874530 on Jul 22, 2011 11:05 PM

    Thnax for your quick reply..
    Iam using 11.1.1.3.0 version.
    My code is
    <af:selectOneChoice value="#{bindings.DenialLevel.inputValue}"
    label="#{bindings.DenialLevel.label}"
    required="#{bindings.DenialLevel.hints.mandatory}"
    shortDesc="#{bindings.DenialLevel.hints.tooltip}"
    id="soc2"
    valuePassThru="true"
    binding="#{backing_denialcomment.denialLevelList}">
    <f:selectItems value="#{bindings.DenialLevel.items}" id="si6"/>
    </af:selectOneChoice>
    and in bean am not able to get value of attribute .Iam getting only index...

  • How to get the value from select list to text box

    Hi,
    I have a select list i want to retrieve the value from select list to text box.
    How can i do that???
    Regards,
    Sakthi.

    Hi Sakthi,
    Yo can use the Java script for that..
    Dynamically the value will come into text box.
    Use the below script.
    <script type="text/javascript">
    function disFormItems()
    var lReturn = $v(here your select list name)
    alert(lReturn);
    document.getElementById(here your text box name).value =lReturn; }
    </script>Cheers,
    Shan

  • Problem in getting parameter value from selection screen in web dynpro abap

    Hi,
    I am facing problem in getting parameter value from selection screen.
    Please find my code below:
    DATA LT_PAR_ITEM TYPE IF_WD_SELECT_OPTIONS=>TT_SELECTION_SCREEN_ITEM.
    FIELD-SYMBOLS:<FS_PAR_ITEM> LIKE LINE OF LT_PAR_ITEM,
                                 <FS_OBJ_USAGE>    TYPE REF TO data.
      WD_THIS->M_HANDLER->GET_PARAMETER_FIELDS( IMPORTING ET_FIELDS = LT_PAR_ITEM ).
      LOOP AT LT_PAR_ITEM ASSIGNING <FS_PAR_ITEM>.
        CASE <FS_PAR_ITEM>-M_ID.
          WHEN `OBJ_USAGE`.
             ASSIGN <FS_PAR_ITEM>-M_VALUE->* TO <FS_OBJ_USAGE>.      
    [ Here, sy-subrc is 4,  <FS_OBJ_USAGE> is not assigning.]
        ENDCASE.
      ENDLOOP. 
    So, can any one solve this problem.
    Thanks in advance,
    Radhika

    Hi Radhika,
    Try using GET_RANGE_TABLE_OF_SEL_FIELD...
    Please Refer below code..
       DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
      DATA: RT_CARRID TYPE REF TO DATA.
      DATA: ISFLIGHT TYPE TABLE OF SFLIGHT.
      DATA: WSFLIGHT TYPE SFLIGHT.
      FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE.
    Retrieve the data from the select option
      RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
    Assign it to a field symbol
      ASSIGN RT_CARRID->* TO <FS_CARRID>.
      CLEAR ISFLIGHT. REFRESH ISFLIGHT.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE ISFLIGHT FROM SFLIGHT
                           WHERE CARRID IN <FS_CARRID>.
      NODE_FLIGHTS = WD_CONTEXT->GET_CHILD_NODE( NAME = `FLIGHTS` ).
      NODE_FLIGHTS->BIND_ELEMENTS( ISFLIGHT ).
    Thanks,
    Regards,
    Kiran

  • Remove Enable, Disable and Delete columns from searchUser.do

    Hello,
    What jsp form do I need to modify to remove the enable, disable and delete columns from the searchUser.do page? I edited tjspSearchUserResultsTiles.jsp but that didn't seem to do it.
    Thanks

    Hi,
    TableGenerator.jsp is the general jsp so you shouldn't modify it.You need to extend tcSearchUserAction.java class aand create a custom class.You need to over ride populateColumnHeadings and populateTableData.
    I won't suggest this approach until you are very much familiar with struts development and oim classes.
    Regards
    Nitesh

  • How to set value on MRU insert Tabular Form

    This post refers to the forum article found How to set value on MRU insert Tabular Form
    I have included the problem and proposed solution below. My problem follows
    Problem
    Hi,
    I am using a Tabular Form. I used the wizard and it created all of the items (Cancel, Submit, Add, Multidelete buttons, etc.). I have a table that is like an FK table. For instance, we could have a customer table, and then a customer address table. Each customer could have multiple addresses. In the address table, the first ID column is the customer ID. So in using the tabular form for the addresses, I need to make the first column the same when I insert. But when I choose add row, everything works fine except it tries to insert a null into customer id. The uniqueness of the row is determined by customer ID and address string.
    Any time I make it to this screen, all new rows will have the same ID with I have in a variable that I can reference from the page called :P0_ITM_CUST_ID.
    How do I set the first value for all inserts? My guess is I need to do this in Computations. I'm also guessing I need to do this with a replace statement. I'm just not sure how to reference the first column of the new row.
    Thanks!
    Tim
    Solution
    The way to do this is by using the "Default" value for that Column. Go to
    Home>Application Builder>Application xxx>Page yyy>Report Attributes>Column Attributes
    Set the default value for newly added rows as in
    http://img237.imageshack.us/img237/5758/screenshot012di2.jpg
    Hope this helps.
    Un-resolved problem
    have also tried to do this but the fields I see are not the same.
    Please see screenshot=http://krisjones.freewebspace.com/apex.JPG
    I am using the Oracle hosted environment, so 2.2.1.
    To my knowledge I have done the same as the user in the first post. Am I doing something incorrectly or should I have created the tabular form differently?
    Many thanks. Kris

    Kristian - You see a different version of the form depending on whether the selected column is the primary key column or not.
    Scott

  • MULTI ITEM ENTRY AT A TIME IN TABULAR FORM SUBMIT ONE TIME

    MULTI ITEM ENTRY AT A TIME IN TABULAR FORM SUBMIT ONE TIME

    No, it wasn't addressed to you but rather the OP - sorry for the confusion.
    I try where possible to point out that without asking a sensible and clear question, posters are unlikely to get sensible and clear answers. A lot of time is wasted on this forum trying to get people to ask questions properly.
    Cheers
    Ben

  • How to disable field based on the selected value

    Hi everyone,
    I have "employee" table,
    it contains the following field,
    emp_name
    emp_designation
    Category
    YearsHere the "category" is the select list value which has the following values in select list,
    Fresher
    Experienced,
    when the value :Fresher" is selected for "category" then the "Years" field should be disabled.
    I tried the following dynamic action ,
    Name:Disable_year
    sequence:20
    Event:Change     
    Selection Type:Item
    Item(s):Category
    Condition:equal to
    value:Fresher
    Fire When Event Result Is:TRUE
    selection type:P1_YEARBut it doesnt work.
    can anyone give alternate solution?
    Thank you.
    Regards,
    gurujothi

    Name:Disable_year
    sequence:20
    Event:Change     
    Selection Type:Item
    Item(s):Category
    Condition:equal to
    value:FresherTry return value instead of this display value(Fresher) of select list
    Fire When Event Result Is:TRUE
    selection type:P1_YEARIn your above dynamic action, where is the disable action?

  • How to read value from select list

    Hi,
    i'm using jdev 10.1.3.1.0, adf, jsp and struts.
    i've made a simple viewobject 'bestyrer' (danish for department) and it contains a list of all available department in my organization.
    it appears in my jsp page as a dropdown list and when the user chose a specific department all employees in that department are shown as a master detail relationship.
    It works and its standard drag'n'drop in JDev.
    I need to know which department the user have chosen because the information i show to the user depends on it.
    my view look like this:
    SELECT KBestyrer.BESTYRER,
    KBestyrer.NAVN
    FROM K_BESTYRER KBestyrer
    bestyrer is a number and navn is the name of the department.
    the code generated in my jsp based on drag and drop is:
    <html:select property="KBestyrerView"
    disabled="${!bindings[\'KBestyrerView\'].updateable}"
    onchange="DataForm.submit();">
    <html:optionsCollection label="prompt" value="index"
    property="KBestyrerView.displayData" />
    </html:select>
    and the corresponding HTML generated is:
    <select name="KBestyrerView" onchange="DataForm.submit();"><option value="0" selected="selected">0 Vejdirektoratet</option>
    <option value="1">101 København</option>
    <option value="2">147 Frederiksberg</option>
    <option value="3">151 Ballerup</option>
    <option value="4">153 Brøndby</option>
    <option value="5">155 Dragør</option>
    <option value="6">157 Gentofte</option>
    <option value="7">159 Gladsaxe</option>
    <option value="8">161 Glostrup</option>
    <option value="9">163 Herlev</option>
    <option value="10">165 Albertslund</option>
    <option value="104">999 Andet</option></select>
    First of all i don't want the indexed values as values of my individual options but the real values as seen in fron of the name. i.e. 101 147 151 and so on.
    how do i obtain this and how do i read the value the user have chosen?
    hope to receive some help.
    thanks
    br
    kim gabrielsen

    Ok,
    thanks for the pointer. it clearifies a bit but i cannot make it work.
    I've created a second binding as described in the dokument which gives me another binding in the pagedef file:
    <attributeValues IterBinding="KBestyrerViewIterator" id="Bestyrer">
    <AttrNames>
    <Item Value="Bestyrer"/>
    </AttrNames>
    </attributeValues>
    i guess i should be able to reference this binding using 'Bestyrer' as the id.
    in my JSP page i insert the following:
    <html:select property="KBestyrerView"
    disabled="${!bindings[\'KBestyrerView\'].updateable}"
    onchange="inspect(this.form)" >
    <html:optionsCollection label="prompt" value="#{bindings.Bestyrer.getInputValue()}"
    property="KBestyrerView.displayData" />
    </html:select>
    but it fails with an error:
    org.apache.commons.beanutils.NestedNullException: Null property value for '#{bindings'     at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:669)     at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)     at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:290)
    I've tried #{bindings.Bestyrer} and #{bindings.Bestyrer.inputValue()}
    but they fail too.
    so there is clearly something i don't understand regarding this binding stuff.
    Assuming i get this to work how do i actually accesss the value chosen by the user?
    as far as i recall in plain HTML i gave the select list a name like:
    name=MyList
    and called a javascript function like this:
    onchange="inspect(this.form)"
    in my JS function i could access the value like this:
    function inspect(form){
    alert(form.MyList.options[form.MyList.selectedIndex].text)
    but when i name the select list i receive an error:
    javax.servlet.jsp.JspException: Cannot find bean under name MyList     at org.apache.struts.taglib.html.SelectTag.calculateMatchValues(SelectTag.java:301)     at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:244)     at brugeroversigt.jspService(_brugeroversigt.java:75)     [brugeroversigt.jsp]
    I'm a bit confused here so any input would be appreciated.
    br
    kim gabrielsen

  • How to show valid field items based on previous selected field

    I am trying to use BC Web Apps to help my customers find products for their specific motor vehicle.
    By selecting the vehicle make and then the model. e.g. Chevrolet and then Camaro.
    This will then bring up a table with all the cosponsoring equipment part numbers.
    At the moment the closest I can get is two dropdown lists one with all the vehicle makes and another with every vehicle model.
    If I select Chevrolet I only want to see Chevrolet models in the dropdown list.

    Hi 2932464,
    2932464 wrote:
    Hi,
    I have a set of text Field items in oracle apex:
    Order Number
    Revision Number
    When we open the report, revision should be hidden.
    Only when the user enters unique order number (non-duplicate order numbers), revision number should be visible.
    If he enters duplicate order number, revision number should be hidden.
    Please help.
    Giving you example how to achieve this.
    Step 1. Create three Page Items
        1) P1_ORDER_NO - Text Field
        2) P1_REVISION_NO - Text Field
        3) P1_ENABLE_DISABLE_REVNO  - Hidden,Value Protected - No
    2. Create 3 Dynamic Actions
    1) Disable revision number on page load
        Event - Page Load
        Action - Disable
        Fire When Event Result Is  - True
        Selection Type - Item
        Item - P1_REVISION_NO
      2) Check duplicate order number
        Event - Change
        Selection Type - Item(s)
        Item(s) - P1_ORDER_NO
        Condition - is not null
        Action - Execute PL/SQL Code
        Generate opposite false action - Unchecked
        Fire When Event Result Is  - True
        Fire on page load - Unchecked
        Stop Execution On Error - Checked
        Wait for Result - Checked
        PL/SQL Code -
    declare
    l_count number;
    begin
      select count(*) into l_count
        from emp
       where empno = :P1_ORDER_NO;
    if l_count > 0 then
      :P1_ENABLE_DISABLE_REVNO := 1;
    else
      :P1_ENABLE_DISABLE_REVNO := 0;
    end if;
    end;
    Page Items to Submit = P1_ORDER_NO
    Page Items to Return  = P1_ENABLE_DISABLE_REVNO
    3 ) Enable and Disable Revision Number
        Event - Change
        Selection Type - Item(s)
        Item(s) - P1_ENABLE_DISABLE_REVNO
       condition - greater than or equal to
       value  - 1
       Action - Disable
       Fire on Page Laod - Unchecked
       Generate opposite false action - checked
       Selection Type = Item(s)
       Item(s) - P1_REVISION_NO
    Hope this helps you,
    Regards,
    Jitendra
    DER_NO

  • Unable to retreive values from selection screen built using WDR_SELEC_OPTIO

    Hi All,
    I have created a selection screen as below
    lr_field = wd_this->m_handler->create_range_table( 'YFMTFLOW' ).
    *  ASSIGN lr_field->* TO <fs_range>.
    *  ls_date-sign   = 'I'.
    *  ls_date-option = 'EQ'.
    *  ls_date-low    = 'US'.
    *  APPEND ls_date TO <fs_range>.
    * Add the select-option to the group
      wd_this->m_handler->add_selection_field(
        i_id           = 'FLOW'
        i_within_block = 'PROC'
        i_no_intervals = abap_true
        it_result      = lr_field ).
    If i enter some value  and click a button to retireve the values as below
    DATA
        lt_sel_item TYPE if_wd_select_options=>tt_selection_screen_item.
    types: ty_flow type range of yfmtflow.
      FIELD-SYMBOLS:
        <fs_sel_item> LIKE LINE OF lt_sel_item,
        <fs_process>   TYPE yfmtprocess,
        <fs_flow>   TYPE ty_flow.
    * Get the selection-screen items
      l_handler->get_selection_screen_items(
        IMPORTING et_selection_screen_items = lt_sel_item ).
    * Retrieve the values from the select-options items
      LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
        CASE <fs_sel_item>-m_id.
          WHEN `PROCESS`.
            ASSIGN <fs_sel_item>-m_value->* TO <fs_process>.
          WHEN 'FLOW'.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_flow>.
        ENDCASE.
      ENDLOOP.
    <fs_flow> is empty
    but after I enter value and then press enter and then click the button to retrieve the values I am able to get low value <fs_flow> not the sign and option
    Is it the standard functionality ,if yes how can we overcome
    Thanks
    Bala Duvvuri

    Am giving clear coding of select options.
    nOTE: S_CARR_ID IS THE DATA ELEMENT OF CARR ID  FIELD,
    FOR THAT I AM APPLYING SELECT OPTIONS IN BELOW CODING.
    WRITE THE BELOW CODE IN WDDOINT( ) METHOD OF
    REQUIRED VIEW
    Data: lt_range_table type ref to data,
         read_only type abap_bool.
    WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS-
    >WD_CPIFC_SELECT_OPTIONS( ).
    WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS-
    >INIT_SELECT_SCREEN( ).
    WD_THIS->M_HANDLER->SET_GLOBAL_OPTIONS(
         I_DISPLAY_BTN_CANCEL = ABAP_FALSE
         I_DISPLAY_BTN_CHECK = ABAP_FALSE
         I_DISPLAY_BTN_RESET = ABAP_FALSE
         I_DISPLAY_BTN_EXECUTE = ABAP_FALSE ).
    LT_RANGE_TABLE = WD_THIS->M_HANDLER-
    >CREATE_RANGE_TABLE( I_TYPENAME = 'S_CARR_ID' ).
    WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
              I_ID = 'S_CARR_ID'
              IT_RESULT = LT_RANGE_TABLE
              I_READ_ONLY = READ_ONLY ).
    BELOW CODE IN REQUIRED ACTION( SAY IN SOME BUTTON
    ACTION WHICH WILL RETRIEVE THE DATA FROM DATABASE TABLE
    USING SELECTI OPTIONS VALUES)
    fIRST THE GET REFERENCE TO NODE( CTRL F7--->READ
    CONTEXTB---FLIGHT NODE )
    ***THEN BELOW CODE
    DATA: RT_CARRID TYPE REF TO DATA.
    DATA:IS_FLIGHT TYPE TABLE OF SFLIGHT.
    FIELD_SYMBOLS: <FS_CARRID> TYPE TABLE.
    RT_CARRID = WD_THIS-> M_HANDLER-
    >GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
    ASSIGN RT_CARRID-> TO <FS_CARRID>.*
    SELECT * INTO CORRRESPONDING FIELDS OF TABLE IS_FLIGHT
       FROM SFLIGHT WHERE CARRID IN <FS_CARRID>
    NODE_FLIGHT->BIND_TABLE( IS_FLIGHT ).

  • Get values from selected row in a Table?

    Hello.
    I'm on VC 7.1 (the trial version downloaded from SDN).
    I'm trying to figure out a way to retrieve some values from the currently selected row in a Table element through the output connector.
    I have a web-service which returns results to the Table, and I want the user to be able to select one of the rows and then trigger another web-service call with some of the values from that row -- is this possible?
    Also, I can't find any documentation that lists what can and can't be done with each UI element, is there something like this some where? (the Modeler's guide doesn't help, and the Reference guide seems to focus on menu items and what the VC screen looks like)
    Thanks,
    Alon

    Hi Alon
    This is a very simple task.
    You just need drag the service which you want to execute, after select row, in model.
    Drag output connector from table to input connector of service. Then map the parameter.
    Regards
    Marcos

  • Dynamically enable a field based on a selected table row

    Hi everyone.
    I'm getting really confused right now, please show me the right way. My approach may be, and probably is, wrong since I am self learning this and all I have is an ASP.NET background.
    I have a page with a table in it. I've created a DataControl for a collection I've made and mapped it to the table. I added a column that shows an "edit" button. On it's click, I open a popup that shows the selected row's data. Naviguation controls are also present on the popup.
    This is working fine.
    My problem comes in the popup. Each row has multiples fields. These fields, shown on the popup, need to dynamically be enable/disable. To toggle those field, the only way I can see right now is to have a function that takes into parameter the rowId and the fieldName. Based on those two fields, I can get the necessary information to know if I need to enable or disable the control.
    What I was aiming for, but then again I totally failed, was to have that function called on the "enabled" EL Expression, returning a Boolean.
    Now that this has been said, can someone guide my on how to dynamically enable/disable each field based on the selected row.
    Thanks !

    Above +
    why don't you create a bean method that returns a Boolean ans through EL Expression Builder select the method to this property.
    btw .. on which components are you setting this?
    Also,
    If there is business logic that prohibits to update this object unless that is met.. you can also do it as..
    In EOImpl .. override isAttributeUpdateable(int i) method eg:
    @Override
    public boolean isAttributeUpdateable(int i) {
    if(i == this.ENAME && "KING".equalsIgnoreCase(this.getEname())){
    return true;
    }else
    return super.isAttributeUpdateable(i);
    and then in UI for the component say
    ReadOnly = #{bindings.Ename.updateable}
    Or, In UI
    disable = #{ bindings.Ename.attributeValue == 'KING' & bindings.Mrg.attributeValue == null ? true : false}
    adf does provides many ways to do it ..
    Cheers, Amit

  • How to get selected values from Select Many Choice List

    Hello All -
    I am using Select Many Choice List and wish to get the selected values in the bean. I have created method binding for valueChangeListener for the choice list, but not sure how to get the selected values.
    I am facing problem in getting values from valueChangeEvent.getNewValue(). For Select One Choice List this returns int, but some list type object for Select Many Choice List.
    When I try to print the value it comes something like:
    ArrayList newVal = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
    System.out.println(newVal);
    [Ljava.lang.Integer;@870ad8
    Could anyone please suggest how to type cast and use the return of valueChangeEvent.getNewValue() to get the selected values.
    Regards -
    Rohit

    Hi Timo -
    Thanks for the suggestion. I could get the values as below:
    public void multiOpUnitValChange(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding opUnitIter = (DCIteratorBinding)bindings.get("OperatingUnit2VOIterator");
    Integer[] values = (Integer[])valueChangeEvent.getNewValue();
    for (int i=0; i<values.length; i++){
    Row row = opUnitIter.getRowAtRangeIndex(i);
    System.out.println(row.getAttribute("OpUnitId"));
    Thanks -
    Rohit

Maybe you are looking for