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

Similar Messages

  • Automatically fill in field based on data from table rows

    hello,
    Users in our organization currently have to complete a number of different forms when an accident occurs. I am creating a .pdf that combines these fomrs into one, with the first portion being a data input section where the user inputs the data and then this populates other sections (pages of the form) that can later be saved and printed.
    The data input section contains subforms with tables. The tables have a row that has "add new item" and "delete this item" buttons.  The rows have dropdown list fields.
    I would like to create a field that will be automatically filled in with the values from the dropdown lists, including the values from the new rows that are added using the 'add new item' button.
    Any assistance in this regard would be most appreciated.  This is my first time on a forum, so I apologize if I have not been clear.
    Thank you.

    This is pretty complicated. You'll have to use scripting for this and I'll tell you how I'd approach this with JavaScript.
    First of all you need to decide at what point you want to populate this field with the drop down selections. I think you have two options.
    Option 1 - Automatically calculate this field each time a user makes a drop-down selection. It's possible that a user will enter data and then change a drop down value so you'll have to account for this.
    Option 2 - Create an update button that users click to calculate this field. There is still a risk that users will change the value in the drop down after clicking update, so you would want to use scripting to lock those fields (e.g. make them protected) when the update button is clicked. You could then change the caption of this same button or have a second button that when clicked would unlock those drop down fields.
    The other thing you need to do is figure out how to calculate this field. It seems to me you would probably build a string together that mixes text with the drop-down values. So your JavaScript would look something like this:
    calculatedField.rawValue = "The accident occurred on " + table.row1.date.rawValue + ". It was witnessed by " + table.row1.witness1.rawValue +
                                                      " and " + table.row1.witness2.rawValue + ".";
    When you're in the LC Designer JavaScript editor, hold control for the relative path to those fields and control + shift for the absolute path and then click on the fields whose values you want to access.
    I hope this points you in the right direction!

  • How to create dynamic ed flash charts based on user selected fields in Orac

    Hi all,
    Can any of the experts please tellme "how to create dynamic ed flash charts based on user selected fields in Oracle apex".
    Thanks
    Manish

    Hello,
    Lots of different ways to do this, I blogged about one way (using a Pipelined function) here -
    http://jes.blogs.shellprompt.net/2006/05/25/generic-charting-in-application-express/
    Other options include using a PL/SQL function returning the string to use as the dynamic query etc.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • 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

  • Auto populate fields based on dropdown selection

    New to forms and needing some insight
    Is there a way to auto populate a series of fields based on the selection of a dropdown box
    for instance;
    chosing a customer's name from a dropdown box would auto populate the address, city,state zip etc...

    Yes, but not easy and you do not want to have a large number of items.
    Programming List and Combo fields in Acrobat and LiveCycle forms - Part 1 by Thom Parker

  • Add selected table row value to PageFlowScope so I can access in taskflow

    Hi all,
    Running into a problem getting a value from a selected ADF table row to a taskflow that is displayed as an inline popup. Here's the scenario. I have a view which displays a table. When I click on an edit btn I display my taskflow as an inline popup. What I would like to do is take the currently selected table row, pull off lets say the row name value and pass it to my taskflow for display. I've tried settting this value inside a mbean when I click the edit btn using:
            AdfFacesContext.getCurrentInstance().getPageFlowScope().put("editTargetNameSource", targetName);
            String tmpClear = (String) AdfFacesContext.getCurrentInstance().getPageFlowScope().get("editTargetNameSource");Which seems to get set but when I attempt to grab this value using EL inside my taskflow jspx page it looks to not be set.
    <af:outputLabel value="Selected Row" id="ol1"/><af:outputText value="#{pageFlowScope.editTargetNameSource}"It seems like pageFlowScope for my popup taskflow != pageFlowScope for the page my table lives in. I've tried setting this as a input page param but I have a feeling I'm missing something. I'd like to be able to set this value inside my bean when a user clicks the edit btn and then display this value in my taskflow popup.
    Any help is appreciated,
    -Wraith

    Thanks for the links Timo. I still must be missing something here. In the vids you linked it looked like he was using regions to pass params from main page to a taskflow; setting a param on child taskflow (causes param to be required when dragging into main page). So I think I understand I add an expected param to my taskflow which somehow will be set by my main page. The part I'm missing is from my main page how can I get the selected table row value and set it in the expected pageflowscope param that my taskflow is expecting?
    I've tried several things:
    1) Using managed bean associated with my main page; setting param inside the bean on main page btn click and then try accessing this mbean param (couldn't access this value as different pageflowscope I believe)
    2) Programmatically setting PageFlowScope as I linked in previous post.
    3) using setPropertyListener I can set a static value setting value in pageflowscope.start and then inside adfc.config for the task set start value to another value expected by the taskflow page. This seemed to work but I can't figure out how to do the programmatic version of this using the currently selected row and its value.
    One who seems to be missing something,
    -Wraith

  • Dynamic Action - How to enable  text field based on a condition

    Hi,
    I have two text items. Need to create dynamic action for the following,
    1. Order_type - Drop down values having CONSUMER & WHOLESALE.
    2. Order_number- Text field
    Order number should be disabled and only on selection of order type ,order number should be enabled.
    Can someone please help me on this?

    Hi Gayathri,
    Gayathri Venugopal wrote:
    Hi,
    I have two text items. Need to create dynamic action for the following,
    1. Order_type - Drop down values having CONSUMER & WHOLESALE.
    2. Order_number- Text field
    Order number should be disabled and only on selection of order type ,order number should be enabled.
    Can someone please help me on this?
    Create two dynamic action
    1. Make it order number item disable on page load.
       Event : Page Load
       Action : Disable
       Fire When event result is : True
       Selection Type : Item
       Item : Your order number item
    2 . enable and disable order number on selection of order type(assuming when order type is null it is disable otherwise it is enable)
        Event : Change
        Selection type : item
        Item : your order type item
        condition : is not null
    True Action
        Action : Enable
        Fire When event result is : True
        Fire on page load : True
        Selection Type : Item
        Item : Your order number item
    False Action
        Action : Disable
        Fire When event result is : False
        Fire on page load : True
        Selection Type : Item
        Item : Your order number item
    Hope this helps you,
    Regards,
    Jitendra

  • How to script text field based on checkbox selection

    I've written a script to format specific text boxes based on what checkbox is chosen. However, I'm not sure what I need to script in order to CLEAR the text field once the checkbox is unchecked. As it stands now if the checkbox is selected it formats the text field with the necessary information, but if it's unchecked the information stays in the box. I'd like to be something like 'if all boxes are Off then display 0.00.' I've included the current script for reference
    var one = this.getField("Emp 500");
    var two = this.getField ("Emp+C500");
    var three = this.getField("Emp+S500");
    var four = this.getField("Fam500");
    var five = this.getField("NC500");
    var six = this.getField("Medical");
    if (one.value == 'Yes') {six.value='70.70'}        
    else if (two.value ==
    'Yes') {six.value='127.20'}
    else if (three.value == 'Yes') {six.value='141.32'}
    else if (four.value == 'Yes') {six.value='198.00'}
    else if (five.value == 'Yes') {six.value='0'}
    var one = this.getField("Emp 1500");
    var two = this.getField ("Emp+C1500");
    var three = this.getField("Emp+S1500");
    var four = this.getField("Fam1500");
    var five = this.getField("NC1500");
    var six = this.getField("Medical");
    if (one.value == 'Yes') {six.value='61.47'}
    else if (two.value == 'Yes') {six.value='110.49'}
    else if (three.value == 'Yes') {six.value='141.32'}
    else if (four.value == 'Yes') {six.value='123.04'}
    else if (five.value == 'Yes') {six.value='0.00'}

    Hi Gayathri,
    Gayathri Venugopal wrote:
    Hi,
    I have two text items. Need to create dynamic action for the following,
    1. Order_type - Drop down values having CONSUMER & WHOLESALE.
    2. Order_number- Text field
    Order number should be disabled and only on selection of order type ,order number should be enabled.
    Can someone please help me on this?
    Create two dynamic action
    1. Make it order number item disable on page load.
       Event : Page Load
       Action : Disable
       Fire When event result is : True
       Selection Type : Item
       Item : Your order number item
    2 . enable and disable order number on selection of order type(assuming when order type is null it is disable otherwise it is enable)
        Event : Change
        Selection type : item
        Item : your order type item
        condition : is not null
    True Action
        Action : Enable
        Fire When event result is : True
        Fire on page load : True
        Selection Type : Item
        Item : Your order number item
    False Action
        Action : Disable
        Fire When event result is : False
        Fire on page load : True
        Selection Type : Item
        Item : Your order number item
    Hope this helps you,
    Regards,
    Jitendra

  • How to show the columns dynamically in OBIEE report based on the selection?

    Hi,
    I have a requirement where the columns should be dynamically shown in report based on what we select in propmt page.
    I'm creating a report in OBIEE where i want to give an option to the end user to select the columns whichever he wants to see in the report.
    For example I have the following columns in the report already:
    Customer Name,
    Customer Number,
    Bank Account,
    Address
    I want to give an option to the user to select 'Customer Mail ID' dynamically and see the column to be displyed in the report along with the existing columns.
    Through 'Column Selector' user can select a single column at a time, but if he want to select more than one column, how can we do this ?
    Please help me out in resolving this issue.
    Thanks,
    Chaithanya.

    Hi Chaithanya,
    there's not a straight solution for this. You can create different analysis containing different number of columns and then directing the user to this analysis using Action Links or you can also use View Selector to switch from one view (analysis) to the other. But it's not going to be very flexible nor dynamic.
    J.

  • Interactive form that auto selects input fields based on initial selection

    i want to create a form that based on initial selections, automatically highlights "required" input fields.
    i.e.  if i create an item on the form called "promotion", when this item is "checked", all the fields that are required will automatically light up, and the person completing the form cannot exit, save, and submit the form until all related fields are filled in.
    is this possible using adobe products?  i have cs5 (with dreamweaver, indesign, etc.)
    can anyone point me toward any documentation that will show me how to do this?

    This forum is for Adobe FormsCentral (formscentral.adobe.com) which is a service that allows you to create, collect and analyze data using an online web form. You should ask general HTML form related questions in the Dreamweaver forums:http://forums.adobe.com/community/dreamweaver/dreamweaver_general
    I'll move your post to that forum so you don't need to retype it. They can help you out...
    Randy

  • Showing/Hiding certain fields based on Radioset selection

    Hello all,
    I'm like to know whether it is possible to Show/Hide certain fields using a RadioSet selection as it is done in Forms in ADF UIX. Kindly go through this post.
    Showing/Hiding certain fields based on Radio Group selection
    kindly help me out on this.
    Thanks & Regards,
    Arun.V

    Hi Arun,
    Here is what I do with my checkboxes, but I think that the radiobutton will do the same:
    <af:selectBooleanCheckbox text="selectBooleanCheckbox 1"
                          label="Label 1"
                          binding="#{backing_page1.selectBooleanCheckbox1}"
                          id="selectBooleanCheckbox1"
                          autoSubmit="true"
                          immediate="true"/>
    <af:inputText label="Label 1" binding="#{backing_page1.inputText1}"
                          id="inputText1"
                          disabled="#{!backing_page1.selectBooleanCheckbox1.selected}"
                          partialTriggers="selectBooleanCheckbox1"
                          value="#{backing_page1.selectBooleanCheckbox1.selected}"/>

  • Sum Fields Based on Dropdown Selection

    I have (1) dropdown field named (CAT) that contains (7) items and repeats in (31) rows.  I also have (3) different decimal fields (REG, TIMEHALF, and DBL) which may or may not contain data, that also repeat in the same (31) rows.  Lastly, I have a separate field (BASEBLDGTL) that is not connected to the table, which I want to use to calculate the (3) different decimal fields base on the selection of the dropdown field.  So basically, I'm looking for the BASEBLDGTL field to add all of the REG, TIMEHALF, and DBL fields together for each row if the first item in the dropdown field is selected.  I also want the BASEBLDGTL field to be able to pickup on possible changes to the selection of the CAT dropdown field.  Any help would be gracefully appreciated as I'm a complete idiot in Java and FormCalc.

    I'll give this a shot, but I'm not entirely sure what you're asking.
    var amounts = xfa.resolveNodes("tblParts.Row1[*]");
    var total = 0;
    for (var i=0; i<amounts.length; i++) if (amounts.item(i).ddSomething == "abc") total += amounts.item(i).ExpenseAmount;
    //go through the table, if the drop down matches what you're looking for, add that amount to the total
    nfExpenseABCTotal.rawValue = total;

  • Field Symbols and dinamicaly selecting tables

    I want to be able to select dinamicaly witch table to print.
    their structure is the very similar but not equal (the order of the elements change)
    so far im getting a "The data object "<WA_T>" has no structure and therefore no component ..." error
    how can give it a structure?
    FIELD-SYMBOLS: <t> TYPE STANDARD TABLE,
                       <wa_t> TYPE ANY.
        IF r1 = 'X'.
          ASSIGN ('TABI') TO <t>.
          ASSIGN ('WA_TABI') TO <wa_t>.
        ELSEIF r2 = 'X'.
          ASSIGN ('TABI2') TO <t>.
          ASSIGN ('WA_TABI2') TO <wa_t>.
        ELSEIF r3 = 'X'.
          ASSIGN ('TABI3') TO <t>.
          ASSIGN ('WA_TABI3') TO <wa_t>.
        ENDIF.
        LOOP AT <t> INTO <wa_t>.
          WRITE:/ <wa_t>-vkorg,
                  <wa_t>-name1,
                  <wa_t>-vbeln,
                  <wa_t>-audat,
                  <wa_t>-vbeln_d,
                  <wa_t>-wadat_ist,
                  <wa_t>-vbeln_b,
                  <wa_t>-fkdat,
                  <wa_t>-gbstk.
        ENDLOOP.
    Edited by: RagnaRock on Apr 8, 2010 12:18 PM

    The fields to be printed can not be directly referred in the field symbol. Use 'ASSIGN COMPONENT' statement to access the fileds.
    Modified the above program as per your requirements....
    FIELD-SYMBOLS: <t> TYPE STANDARD TABLE,
                                <wa_t> TYPE ANY,
                                <field> TYPE ANY.
    TYPES : BEGIN OF ty_tab,
             vbeln TYPE vbeln,
             erdat TYPE erdat,
            END OF ty_tab.
    DATA : tabi TYPE STANDARD TABLE OF ty_tab,
           wa_tabi TYPE ty_tab.
    SELECT vbeln erdat FROM vbak
      INTO TABLE tabi
      UP TO 10 ROWS.
    ASSIGN ('TABI') TO <t>.
    ASSIGN ('WA_TABI') TO <wa_t>.
    LOOP AT <t> ASSIGNING <wa_t>.
      ASSIGN COMPONENT 'VBELN' OF STRUCTURE <wa_t> TO <field>.  "Refer a particular field
      WRITE:/ <field>.
    ENDLOOP.
    Edited by: Satyajit on Apr 8, 2010 4:21 PM

  • Problem selecting table rows/cells in Indesign CC

    I have a problem when trying to select rows and cells within tables created in Indesign CC. I am using a Macbook Pro on OSX 10.9.4.
    As you can hopefully see from the image attached, I am unable to select cells & rows cleanly. Believe it or not the image attached shows the last 2 rows of the table selected. As I drag the cursor to highlight the cells/rows I want the highlighted section jumps all over the place so it is not clear which section of the table is actually selected.
    If anyone has any suggestions as to what might be causing this I would appreciate your thoughts.
    Thanks
    Craig

    I believe you should be on 9.1, this issue existed in that version and has been fixed in 9.2.1
    I would recommend that you upgrade InDesign CC to at-least 9.2.1
    Thanks
    Javed

  • Select Table row.

    Hi.
    I need some help!
    I'm implementing a web dynpro application with a simple table.
    That table has a row popin to show some more complete information about the table row.
    I have also a button on that popin and I want to, when that button is pressed, show that row information on a popup window.
    How can I get the information of that row?
    Regards

    Hi,
    Try this, it will give no of selected records.
    DATA lo_nd_et_postab_1 TYPE REF TO if_wd_context_node.
      DATA lo_el_et_postab_1 TYPE REF TO if_wd_context_element.
      DATA ls_et_postab_1    TYPE wd_this->Element_et_postab_1.
      DATA lt_et_postab_1    TYPE wd_this->Elements_et_postab_1.
      DATA: wa_temp TYPE REF TO if_wd_context_element,
            lt_temp TYPE wdr_context_element_set.
    * navigate from <CONTEXT> to <ET_POSTAB_1> via lead selection
      lo_nd_et_postab_1 = wd_context->path_get_node( path = `ZSHP_EXTENDED_DUE_LI.CHANGING_3.ET_POSTAB_1` ).
      CALL METHOD lo_nd_et_postab_1->get_selected_elements
        RECEIVING
          set = lt_temp.
      LOOP AT lt_temp INTO wa_temp.
        CALL METHOD wa_temp->get_static_attributes
          IMPORTING
            static_attributes = ls_et_postab_1.
        * append ls_et_postab_1 to lt_et_postab_1.  // if you watn use this statement
        CLEAR ls_et_postab_1.
      ENDLOOP.
    Cheers,
    Kris.

Maybe you are looking for

  • Airplay icon not showing on ipad 3

    Have just purchased an Apple TV 3 and set it up wanting to mirror my Ipad 3. I tried to find the Airplay icon by doubleclicking on the Home button but it wasn't there. I also can't find it when playing video for example. Both devices have latest S/W

  • Running SQLPLUS script from command prompt on SUN

    We are making a migration from VMS to SUN ( SunOS 5.10) and from 9i to 10g. We have encountered an unanticipated problem with running scripts from the command line in SUN(SQLPLUS execution from the command line). All of our packages have a naming con

  • W540, Ultra Dock and 3840*2160

    It took me some weeks to realize that the implementation of Nvidia is different from my W520 which was able to drive 3840*2160@30Hz natively through the built-in DP as well as the Dock's DP.  With the W540, I only get full Nvidia support (full means

  • Imovie error -50

    I try to export a video made in Imovie, but it gives an error everytime I try. It says; error while rendering: -50 (translation from dutch) I tried low quality and without the music.. Can somebody please help me?

  • Skype Number subscription was cancelled and will e...

    hi, My skype account notes ---- Your Skype Number subscription was cancelled. It will expire on April 22, 2013. There is a link for Get a new Skype Number . But I wanna contiune using the old skype number. how to renew the subscription and skype numb