Enable/disable lov button in a multi-row bloc

Hi all,
I have a form in which there is a multi-row block with some lov buttons related to some items,
in query mode, user should not be able to modify item, item property update_allowed is set to false, that worked, but user is able to modify item when he clicks on the lov button...so i want to disable the button for query records and for record in (insert or new), button should be enable,
i tried some tips but don't work, do you have any idea
Thanks for your help.

Hi,
Can you suggest some methods to enable/disable LOVs in my search query? I have a customized VC which performs search and I need to enable/disable the LOVs depending on requirement.
Abhishek

Similar Messages

  • LOV button navigation in multi row block

    We have two fields in a multirow block, Role Type and Parent Role Type(which is a LOV button). When the current row selector is on a Role Type row all Parent Role Type LOV buttons for all the rows change only the current selected row. With Designer we set Keyboard/Mouse navigable properties to Yes(in the OLB) which fixed it but with Headstart these properties do not fix this problem. Any info and suggestions would be appreciated. Thanks.

    Ok, now I understand.
    Unfortunately, you have run into some standard forms behavior that doesn't work the way you want it to. The LOV button is not navigable, because your cursor needs to be sitting in the data item when the call to the LOV is made. Since this button is not navigable, the cursor will not move to the current record when you press the button. (Actually, the button is identical on each record.)
    Possible solutions:
    1 - use only 1 button in an overflow below. (Create your own action item instead of using the LOV button preference.)
    2 - don't use a button at all. (Headstart provides the LOV toolbar button.
    3 - Try generating the lov as a poplist. (See Oracle Designer online help).
    4 - Use the new Oracle Look and Feel (available only on the web) to create a button in the field ('...').
    Regards,
    Lauri

  • Need help with OA Framework. Enable/Disable LOV dynamically

    Hello,
    I am new to OA Framework. My requirement is as follows;
    The page should have a field with parameter org code (LOV). When the user selects an org and click GO button, the page should display all the inactive items (which have no Sales order or work order for last 2 years). In the table region, user selects single record or multiple records by a check box. The selected records should be processed after clicking a submit button in the table region. The process is, calling an API to change the status of the item to Inactive or some other status. The status should be determined by the user by selecting a LOV within the table region. I could create LOV based field for org code and could display the data on the page. I have been trying to display the LOV for item status , I have created a LOV under table region under table components > table actions. I could open the LOV and select a value, but the value is not defaulting to the field on the page. Somebody please help me with a suggestion or if you have the code for a similar kind of requirement please share with me.
    Also, need some suggestion on how to enable and disable LOV dynamically. I want to display the 2 LOV's in different regions. I want to enable the LOV for Item Status only after the org code is selected and the page populated after the user clicks GO button.
    Thanks in Advance…..

    Hi,
    I could open the LOV and select a value, but the value is not defaulting to the field on the page.pls check the LOV mapping ,this might be wrong.
    to enable/Disable LOV dynamically ,u need to use PPR,please check the lab solution exercise create employee chapter to learn to implement PPR functionality.
    Thanks
    Pratap

  • Enable/disable operation buttons according to the selected row in table?

    Hi,
    I used JDev 11.1.1.2.0
    On my main page, it has a query section and display search result to a table component, and also has some operation buttons like (update/delete) on the toolbar.
    I want to enable/disable the operation buttons according to some filed value of the selected row in the table, and I searched the OTN forum, found more questions like this but seemed no found one right solution.
    The table is single selection, and has a status column, its data type is Integer, and I want to enable buttons when the selected row's status field value is 0 or 1, disable buttons when status value is other values.
    Table code like:
    <af:table value="#{bindings.VO1.collectionModel}" var="row"
    rows="#{bindings.VO1.rangeSize}"
    emptyText="#{bindingsVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.VO1.rangeSize}"
    rowBandingInterval="0"
    filterModel="#{bindings.VOCriteriaQuery.queryDescriptor}"
    queryListener="#{bindings.VOCriteriaQuery.processQuery}"
    filterVisible="true" varStatus="vs"
    selectedRowKeys="#{bindings.VO1.collectionModel.selectedRow}"
    selectionListener="#{bindings.VO1.collectionModel.makeCurrent}"
    rowSelection="single" id="resId1">
    Operation buttons code like:
    <af:commandToolbarButton text="Update" id="ctb2" action="editDAF"/>
    Any suggestion will be great help.
    Thanks,
    zeroxin

    Hi,
    create an attribute binding in the PageDef file for the status field. Then setup the button PartialTriggers property to point to the table ID. The button's disabled property then points to the status attribute binding like
    #{bindings.statusField.inputValue=='value'}
    Frank

  • Enabling and disabling the button in the multi record block

    hi all,
    i am using
    Forms [32 Bit] Version 6.0.8.24.1 (Production)
    Oracle Database 10g Release 10.2.0.1.0 - Production
    i have a multi record block each block contains a button(button is to approve the record in terms of changing the status)
    i have the items like date,remarks and button
    the button should be enabled if the remarks is not null otherwise it should be disabled.
    for this in pre-record trigger i have written
    if :record is null then
       set_item_property('button',enabled,property_false);
    else
          set_item_property('button',enabled,property_false);
    end if;what problem is enable and disable is impacting on all the buttons in the block. in other words if first record's remarks is null then all the records button is disabled. if first record's remarks column is not null then all the records of the button column is enabled.
    i have to make enable and disable the button for the corresponding record.that means if first record's remarks column is not null then only first records button should be enabled others should be disabled.
    Thanks..

    You need to set the No. of items displayed to 1 as Ammad had said, additionally you can set the X and Y Position (Just Y will do and having fixed X) of the button depending upon the current record.
    can u explain this part alone bit more (setting the position of x and y)You need to calculate the variable Y_POS depending upon the current position of the cursor that is the current record.
    You can find the current record Y_POS using combination of
    V_CURRENT_RECORD := :SYSTEM.CURSOR_RECORD;
    V_TOP_RECORD := GET_BLOCK_PROPERTY ('BLOCK_NAME', TOP_RECORD);
    V_ITEM_Y_POS := GET_ITEM_PROPERTY ('ITEM_NAME', Y_POS);
    -- Also needs to add the Y_POS of the relative other items in the muti-record block
    V_HEIGHT := GET_ITEM_PROPERTY ('BUTTON_NAME', HEIGHT);
    -- Note :- TOP_RECORD  Returns the record number of the topmost visible record in the given block.
    V_Y_POS := V_ITEM_Y_POS + ((V_CURRENT_RECORD - V_TOP_RECORD) * V_HEIGHT);
    -- You will need to add Distance between Items in records if anyThen you can Set the current Y_POS of the button.
    SET_ITEM_PROPERTY ('BUTTON_NAME', Y_POS, V_Y_POS);
    [/code[
    Hope this helps
    Best Regards
    Arif Khadas
    Edited by: Arif Khadas on Feb 24, 2011 4:58 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Disabling a button in a multi record block

    Hi everyone,
    I have a multi record block with a button on each record, I have to be able to disable a button at runtime (following some conditions).
    the SET_ITEM_INSTANCE_PROPERTY (item, record, enabled, property_false) does not work !
    Any idea on how can I do it ?
    Thanks for any help.

    I don't think "enabled" is a valid property for SET_ITEM_INSTANCE_PROPERTY. You were probably thinking of SET_ITEM_PROPERTY but this won't work for you at the record level.
    The only thing I can think of right off hand is to set the visual attribute using SET_ITEM_INSTANCE_PROPERTY to make each button look enabled or disabled. You could define 2 visual attributes, say something like VA_BUTTON_ENABLE and VA_BUTTON_DISABLE.
    If you want the button to look enabled then:
    SET_ITEM_INSTANCE_PROPERTY(item, record, visual_attribute, 'VA_BUTTON_ENABLED'');
    If you want the button to look disabled then:
    SET_ITEM_INSTANCE_PROPERTY(item, record, visual_attribute, 'VA_BUTTON_DISABLED');
    Then, in your WHEN-BUTTON-PRESSED trigger, look at the visual attribute for that record using the GET_ITEM_INSTANCE_PROPERTY, and if the visual attribute is VA_BUTTON_ENABLED then execute your button code otherwise don't do anything.
    Give it a try and see if that works for you.
    Hope it helps.
    Travis

  • Enabling/Disabling a button in Web appl. based on exception in a Query

    Hi all,
    I am wondering whether we can grey out a button in the web applic. designer based on whether a report has an exception showing.
    So now we can enable or disable a button, so at runtime, when the web app runs, and a condition is visible in the analysis item table, then the button (save for example) should be disabled, otherwise if there are no exceptions then it should be enabled.
    I am thinking Javascript, but not sure how to read the exceptions in a web apps query?
    Thanks for any help forwarded.
    Regards
    SMS

    Hi Sumit,
    just add one more attribute of type wdy_boolean, and bind this attribute to readonly property of button by coding.
    then as per your cell value set the attribute value, below is the some sample code.
    METHOD wddoinit .
      DATA: lv_node TYPE REF TO if_wd_context_node,
            lt_mara TYPE ig_componentcontroller=>elements_mara,
            wa_mara TYPE ig_componentcontroller=>element_mara.
      SELECT matnr
             ersda
             ernam
             mtart
             matkl
             meins FROM mara INTO CORRESPONDING FIELDS OF TABLE lt_mara
                                     WHERE meins = 'GM' OR meins = 'CCM'.
      SORT lt_mara BY meins.
      lv_node = wd_context->get_child_node( name = wd_this->wdctx_mara ).
      LOOP AT lt_mara INTO wa_mara.
        IF wa_mara-meins = 'GM'.
          wa_mara-readonly = 'X'.
        ELSE.
          wa_mara-readonly = ' '.
        ENDIF.
        MODIFY lt_mara FROM wa_mara TRANSPORTING readonly.
        lv_node->bind_structure(  SET_INITIAL_ELEMENTS = ABAP_FALSE
                                  new_item = wa_mara ).
      ENDLOOP.
      lv_node->bind_table( new_items = lt_mara ).
    ENDMETHOD.
    Regards
    Srinivas

  • Enable / Disable a button Based on a value

    Hi all,
    How can i enable or Disable a Button Based on some input Text value.
    Here is the ADF Code fragment:
    *<af:switcher id="customActionButtons"*
    *facetName="#{actionAvailable.isCustomActionButtons}">*
    *<f:facet name="true">*
    *<af:panelGroupLayout layout="horizontal" id="pgl10">*
    *<af:commandToolbarButton actionListener="#{invokeActionBean.setOperation}"*
    *text="#{wf:getResourceValue('APPROVE', 'bindings.customActions')}"*
    *disabled="#{!bindings.APPROVE.enabled}"*
    *action="#{invokeActionBean.invokeOperation}"*
    *partialSubmit="false"*
    *visible="#{wf:isCustomActionAvailable('APPROVE', 'bindings.customActions')}"*
    *id="ctb2">*
    *<f:attribute name="DC_OPERATION_BINDING"*
    *value="bindings.APPROVE"/>*
    *</af:commandToolbarButton>*
    *<af:inputText value="#{bindings.input.inputValue}"*
    *label="#{bindings.input.hints.label}"*
    *required="#{bindings.input.hints.mandatory}"*
    *columns="#{bindings.input.hints.displayWidth}"*
    *maximumLength="#{bindings.input.hints.precision}"*
    *shortDesc="#{bindings.input.hints.tooltip}"*
    *id="it1">*
    *<f:validator binding="#{bindings.input.validator}"/>*
    *</af:inputText>*
    I have highlighted the Button and Input text in Bold.
    Any suggestions,
    Thanks,
    karthik

    you need to set the autosubmit property for the text field to true. and set the partial trigger for the the button to that input text id.
    and set the rendered property for the button based on the input text value.
    same idea is exist in this link:
    http://groundside.com/blog/GrantRonald.php?title=conditional_rendering_of_jsf_fields_depe&more=1&c=1&tb=1&pb=1
    Edited by: M.Jabr on Feb 7, 2011 1:26 AM

  • 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

  • Screen Personas 2.0 Enable/Disable script button in Javascript

    Hi,
    Has anyone tried enabling or disabling script buttons on a flavor using Javascript. I have two script buttons,
    The first one (Button1) searches for a contract based on the contract id provided by the user in a text box. (So, the script triggers the transaction me33k, fetches and displays the relevant fields in the flavor)
    Now, based on whether the contract is present in the system the user needs to click another script button (Button2) which will allow him to create an order. Currently the button is disabled (ScriptButton.IsEnabled = false in the Properties menu).
    In the Button1 script towards the end, I need to enable Button2 is a contract is found. So in the Button1 script, at the final step I try to calculate in JS and write the following JS code,
    var args.btn2id = document.getElementById("Personas/blahblahblah");
    args.btn2id.disabled = false;
    But this is never works. And I have noticed that the control id does not return the control object in Javascript (so, args.btn2id is always null) and I tried removing the '/' and various other options.
    Has anyone ever tried to enable/disable buttons in Personas? Is it even possible?
    Abhijeet

    You don't have access to the Personas control properties from JavaScript to dynamically change them.
    About the only thing that comes to mind is Tobias' method to hide the script button if you want to disable it.

  • Enable/Disable a button

    I was wondering how could i disable a button until another
    action has been accomplished before enabling a button. Is there
    anyone that could help me on this?

    This might help - it's a script I picked up somewhere a few
    years ago that disables a button once it's been pushed, then if the
    page has not been submitted after a few seconds, it will flash an
    alert to the user telling them to hold their horses. It's helped
    cut down on people resubmitting things.
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    function disableForm(theform) {
    if (document.all || document.getElementById) {
    for (i = 0; i < theform.length; i++) {
    var tempobj = theform.elements
    if (tempobj.type.toLowerCase() == "submit" ||
    tempobj.type.toLowerCase() == "reset")
    tempobj.disabled = true;
    setTimeout('alert("Your form is being submitted. The process
    will finish in a few seconds.")', 3000);
    return true;
    else {
    alert("Your form is being submitted. The process will finish
    in a few seconds.");
    return false;
    // End -->
    </script>

  • How to enable/disable a button in Photoshop panel?

    Anyone know how you'd create the proper code in a Photoshop extension panel so that certain buttons in the panel could be enabled or disabled dynamically as needed? 

    Hi Sonunew2flex,
    Write one public function in main application file as below...
    // In main application file
    public function changeButtonDisableStatus(bool:Boolean):void
         yourNuutonId.enabled = bool;
    //In your hear renderer do this
    if(cb.selected=true)
       Application.application.changeButtonDisableStatus(true);
    else
       Application.application.changeButtonDisableStatus(false);
    Thanks,
    Bhasker

  • JDev 10 - disable command button depending on which row is selected

    I am using JDeveloper 10, and I have a table which has some data columns and a selection facet with View and Edit command buttons.
    I would like all rows to be viewable. When you click the view event it goes to another .jsp with the view action.
    It does the same thing with the edit action, however I would like to only allow rows which have an EffectiveDate column in the future to be editable.
    Is there some way to disable the edit button when those rows are selected, or to throw a validation error when the edit button is clicked for that row?
    Thanks!
    Jeff
              <af:table value="#{bindings.RateList.collectionModel}" var="row"
                          rows="#{bindings.RateList.rangeSize}"
                          first="#{bindings.RateList.rangeStart}"
                          emptyText="#{bindings.RateList.viewable ? 'No rows yet.' : 'Access Denied.'}"
                          selectionListener="#{bindings.RateList.collectionModel.makeCurrent}"
                          selectionState="#{bindings.RateList.collectionModel.selectedRow}">
                  <af:column sortProperty="RateType" sortable="false"
                             headerText="#{bindings.RateList.labels.RateType}">
                    <af:outputText value="#{row.RateDescription}"/>
                  </af:column>
                  <af:column sortProperty="EffectiveDate" sortable="false"
                             headerText="#{bindings.RateList.labels.EffectiveDate}">
                    <af:outputText value="#{row.EffectiveDate}">
                      <f:convertDateTime pattern="dd-MMM-yyyy"/>
                    </af:outputText>
                  </af:column>
                  <f:facet name="selection">
                    <af:tableSelectOne text="Select and">
                      <af:commandButton text="View" action="view">
                        <af:setActionListener from="#{row.rowKeyStr}"
                                              to="#{requestScope.requestRowKey}"/>
                      </af:commandButton>
                      <af:commandButton text="Edit"
                                        action="edit"/>
                    </af:tableSelectOne>
                  </f:facet>
                </af:table>

    So, I first tried using Chan advice, I added a new editable property from the database and then added Edit buttons to each row in the table with disabled property set to the editable property.
    This correctly displayed buttons which were editable in the correct rows.
    However, I was no longer using the select functionality which passed the rowId of the selected row to the edit page.
    I wasn't able to quickly solve this problem so I tried John's solution.
    I feel really dumb, but after about 20 rereadings it was still completely Greek to me, I have no idea what he was recommending.
    So I added onclick="return editTest()" to the Edit button.
    The I added ID to the relevant locations, and the following javascript to the page, and this is working well enough now.
    (Oh, I display the date in a slightly odd dd-MMM-yyyy format, due to slightly odd customer requirements.)
    I've probably misspelled one of the months, haven't yet finished testing.
    A couple of gotchas I found
    - Do not add onclick="editTest()" or else it will continue processing and allow all rows to be edited.
    - Putting date = document.getElementById('mainFormId:tableId:'+i+':EffectiveDateId'); would work for the original search,
    but after filtering results i and found_it are not equivalent, and date was not found in the page.
               function editTest(){
                  var found_it;
                  var date;
                  for (var i=0; i < document.getElementsByName('mainFormId:tableId:selected').length; i++)  {
                     if (document.getElementsByName('mainFormId:tableId:selected').checked) {               
    found_it = document.getElementsByName('mainFormId:tableId:selected')[i].value;
    date = document.getElementById('mainFormId:tableId:'+found_it+':EffectiveDateId');
    var result = date.innerHTML.split("-");
    var day = result[0];
    if (day.charAt(0) == '0'){
    day = day.charAt(1);
    var month;
    var monthTxt = result[1];
    switch (monthTxt) {
    case 'Jan':
    month=0;
    break;
    case 'Feb':
    month=1;
    break;
    case 'Mar':
    month=2;
    break;
    case 'Apr':
    month=3;
    break;
    case 'May':
    month=4;
    break;
    case 'Jun':
    month=5;
    break;
    case 'Jul':
    month=6;
    break;
    case 'Aug':
    month=7;
    break;
    case 'Sep':
    month=8;
    break;
    case 'Oct':
    month=9;
    break;
    case 'Nov':
    month=10;
    break;
    case 'Dec':
    month=11;
    break;
    default:
    month=11;
    break;
    var year = result[2];
    var today = new Date();
    var effDate = new Date();
    effDate.setDate(day);
    effDate.setMonth(month);
    effDate.setYear(year);
    if (effDate < today) {
    alert ('Sorry, you cannot change a rate with an effective date in the past');
    return false;
    } else {
    return true;

  • ENABLING/DISABLING of buttons

    Hi,
    I have two buttons in my application. One is submit and other is redirect. I wanted the second button to be enabled only on click of the first one. Can any one help me on this please?
    Thanks in advance
    Akhil

    Take a look at this thread Disable button using javascript
    It has a link to some examples which should help you.
    Chris

  • Using multiple LOV popups in a multi-row updatable report but save to 1 col

    Hi,
    I'm trying to generate a multirow updatable report, which has only 1 writeable column. There is a read-only column that indicates the type of value that the writeable column should contain (it's a varchar2). The second column will be a LOV popup.
    I can create the report by setting the 2nd column to a LOV and it's fine, however I really want the LOV to be different, depending upon the value of the first column for the row.
    For example, if the first column is "list" then I want the popup to show all my "lists"
    If the first column is "role" then I want to the popup to show all my "roles".
    There will be a mixture of values within the entire rowset.
    I've so far managed to use a case statement to generate different LOV popups, which are displayed as required but the returned data isn't written back to the correct field.
    If I use the same p_idx value then there is only one javascript function created and it always stores the data in the first rows column.
    If I use unique p_idx values, then it works better but selecting a value for the 2nd row will store it there but also overwrite the 1st rows value as well.
    My SQL for the report currently looks like this (cut down for clarity)
    SELECT RULACTPRMIDD, /* PK */
    CASE PRMNME /* type */
    WHEN 'list' THEN
    APEX_ITEM.POPUPKEY_FROM_QUERY(2,rulactprmval,
    'SELECT LSTNME r, LSTNME d FROM LSTLST', 0)
    WHEN 'role' THEN
    APEX_ITEM.POPUPKEY_FROM_QUERY(2,rulactprmval,
    'SELECT ROLNME r, ROLNME d FROM PDRROL', 0)
    END dynamic_popup
    FROM CPNRULACTPRM
    I can't think of an example where i've seen this done within the Apex development environment otherwise I would refer you to that.
    An alternative option would be to pass the type of value required to the same LOV and then get the LOV query to only show the appropriate values - i'll look into this as a workaround option.
    thanks

    User478832,
    I didn't look thru all the code but I have a feeling your problem is the 9th line in the On Demand process. (the 9th line in this post anyway)...
    htp.prn('<option value="' || rec.cpc_name|| '">' || rec.cpc_name|| '</option>');
    You modified your query to get a different column but your returning the same column later: rec.cpc_name x2
    I assume you want to display NAME and return ID so change it like this...
    htp.prn('<option value="' || rec.cpc_id || '">' || rec.cpc_name|| '</option>');
    Let me know if that helps...
    Dan

Maybe you are looking for

  • How to Set the Colow for a Watermark

    Foe CS5/ActionScript: Hi all, I want to change the default color of a watermark. So I tried: [code] m_workingDocument.watermarkPreferences.watermarkFontColor = myIndesignApp.colors.add({name:"WatermarkColor", model:ColorModel.PROCESS, colorValue:[0,1

  • No CLAMAV 0.90.1 update?

    Looks like right out of the box (doing all apple software updates) my ClamAV is out of date. 10.4.8 Server comes with 0.88.5? How can I upgrade to 0.90.1? Seems like a security risk considering I can't get any updates now.

  • Seller of a locked iPod is not available anymore

    Ho to unlock an iPod if the seller has it still locked in his account but is not available anymore?

  • Music Store purchases in my Shopping Cart

    I am receiving error today when trying to purchase songs listed in my shopping cart. Error states that credit card processing is temp unavailable and to try again soon. Is anyone else having this problem today...Saturday, Dec 03? Thx... Carlton

  • Screen issues when waking up from sleep

    Very strange things going on with the screen on my new MBP, it has only occurred on a very few occasions now, after waking up from sleep. I noticed two strange effects happening, not at the same time so I don't know if they are related or not. 1) Som