ADF set (true) disclose to showDetailItem using javascript and pass event

Hi all

We strive to integrate oracle ADF and Oracle Forms. We use integration javascript to call/interact with oracle forms

Presentation of the ADF:

Activate us or disable the appropriate showdetailitem based on a link.

To enable forms indicating technicality (with id formssd1) and the javascript event passes to the forms, we use the code below

function refreshReport(evt) {
  var formsLayout = AdfPage.PAGE.findComponentByAbsoluteLocator("pt1:r1:0:formssd1");
  if (formsLayout != null) {
   if (!formsLayout.getDisclosed()) {
   formsLayout.setDisclosed(true);
   }
  }
  var reportLink = evt.getSource();
  var reportID = reportLink.getProperty('reportID');
  alert(document.forms_applet);
  if (document.forms_applet != null) {
   document.forms_applet.raiseEvent('refresh', reportID);
  }
  else {
   window.setTimeout(invokeReport(reportID), 20000);


  }
}

Problem/question:

The forms showDetailItem is it disclosed (true), it works fine. The javascript event through to the form and the form refreshes the report

If the forms point showDetail is not disclosed, javascript allows the showdetail.  But the document.forms_applet attribute is not set.

ADF: 12.1.3

Forms: 11g R2

Can you please let me know, how to reach the attribute (document.forms_applet)?

I was able to solve the issue myself. I used a combination of clientListener and serverListener. I called the "document.forms_applet.raiseEvent" of managed bean and it solved my problem

Tags: Java

Similar Questions

  • To rasterize a layer using Javascript and maintain his position by other layers.

    Try to use javascript to rasterize the entire contents of a certain layer by name.

    It must maintain its position.

    I cobbled together sort of a script, but he still goes art swept to the top layer.

    Ex, up and down I have 4, RasterizeMe, Layer 2, layer 1 layer.

    The content of swept end on layer 4

    Any help would be apprecieated, or if theres a better way to do it.

    //  Rasterize Layer by name
        if ( app.documents.length > 0 ) {
            doc = app.activeDocument;
            if(!doc.saved){
                Window.alert("This script needs to modify your document. Please save it before running this script.");
            }else{
                createRasterLayer(doc);
            }
        }else{
            Window.alert("You must open at least one document.");
        }
    
    function createRasterLayer(doc){
        var totalLayers = doc.layers.length;  //get the total number of layers in the active document
        for ( var i = 0 ; i < totalLayers ; i++){  //looping through layers             
            var currentLayer = doc.layers[i];
            var tempItem;
            if(currentLayer.visible == false) continue;   //We don't want to deal with hidden layers
            currentLayer.locked = false;                       //Unlock the layer if needed
            var layerName = new String( currentLayer.name );
            if ( layerName.indexOf("RasterizeMe") == 0 ) {
                currentLayer.hasSelectedArtwork = true;   //Select ALL in the layer
                if(doc.visibleBounds[2] == 0) continue;   // ignore empty layers
                var newoptions = new RasterizeOptions;  
                newoptions.resolution = 350;
                if ( doc.selection.length > 0 ) {
                    newGroup = app.activeDocument.groupItems.add();
                    for ( z = 0; z < doc.selection.length; z++ ) {
                        doc.selection[z].move( newGroup, ElementPlacement.INSIDE);
                       }
                    doc.rasterize (newGroup, newGroup.visibleBounds, newoptions);
                }
            }
        }
    }
    

    you add the group to the document, it will be the subject most on the top layer of most

    newGroup = app.activeDocument.groupItems.add();
    

    This allows to add the group to the current layer

    newGroup = currentLayer.groupItems.add();
    

    or if theres a better way to do it.

    I'd do it

    -loop through all layers,

    -hide everything except the one you want to rasterize,

    -The document raster

    -display layers

  • Extract PDF form data using JavaScript and write in the CSV file

    I received a PDF file with a form.  The form is * not * formatted as a table.  My requirement is to extract form field values and write into a CSV file that can be imported into Excel.  I tried using the menu item "Merge data from spreadsheet files" automated in Acrobat Pro, but the release includes both the labels and values.  I'm mostly just interested in the form field values.

    I would use JavaScript to extract the data from the form and learn JavaScript write CSV file (since I know what should look like the spreadsheet of end).  I got regarding the extraction of the fields in the form:

    this.getField("Today_s_Date").value;

    And the rest of this post: http://StackOverflow.com/questions/17422514/how-to-write-a-text-file-in-Acrobat-JavaScript , I tried to write to CSV using:

    var cMyC = "abc";

    var doc = this.createDataObject ({cName: "test.txt", cValue: cMyC});

    but I get the following error:

    "SyntaxError: syntax error".

    1:Console:Exec ".

    Ideally, I don't want to use a third-party tool online to make, because the data are sensitive.  But please let me know if you have any suggestions.  The ideal output is a CSV file that an end business user can open in Excel to see the format of spreadsheet of his choice.

    Did anyone done this before?  Open to hearing alternatives as well.  Thanks in advance!

    The code you have posted works fine for me in the JavaScript console, so I suspect the problem is something else. Where did he put the code and y at - he seized another code?

    In addition, if CSV is not a strong requirement, I would say that you use delimited by tabs instead. Fields normally cannot contain tab characters, this is a good qualifier to use. It will be also more reliable when you import in Excel. If you need to process the field data that may contain quotes, you need prepare correctly the string data and can use a JavaScript library like this: https://github.com/uselesscode/ucsv

  • using Javascript and ScriptUI to create a form that brings in a symbol in the library

    Hi all

    I tried to gather the right info to use javascript to create a shape to bring in particularsymbols of the symbol library based on the variables of the form. I took pieces of various examples of scripts and tried to make this work, but my problem is when I try to use conditional statements.

    This is a limited version of what I want to do, but just to get the message.

    1. I want to select a script that has various dropdowns. I want the first dropdown to give me 3 options: 10, 13, 18

    2. I would also like another drop-down list that gives me three options: needle single, double needle and knife-blade.

    3. I wish that it have an "ok" button and the button "Cancel".

    4. from there when I click the ok button, a symbol is presented library according to what parameters have been given to the form.

    ex. If I selected 10 the first descent to the bottom and double needle in the second, I would like to "SYMBOL" be pulled from the library and centered on the artboard.

    ex. If I have selected 13 the first descent to the bottom and double needle in the second, I would like to 'SYMBOL B' to be pulled from the library and centered on the artboard.

    I got the user interface is displayed and it works as expected, as well as to bring it into a symbol, my problem comes when I try to integrate functions and conditional statements.

    Here is my script. Please let me know what I am doing wrong.

    myDoc var = app.activeDocument;
    var palette is new window ('dialog', 'Create a shell');.
    Pallette.Add ('statictext', undefined, ' fill opening in inches: ");
    Pallette.orientation = "row";
    var myDropdown is Pallette.add ('dropdownlist', undefined, ['10', '13', '18']);.
    myDropdown.selection = 1;
    var myButtonGroup is Pallette.add ('group');.
    myButtonGroup.orientation = "column";
    var btnCreate = myButtonGroup.add ('button', undefined, 'OK');
    MyFillSelection = myDropdown.selection
    btnCreate.onClick = function () {}
    If (MyFillSelection = '13') {}
    symbolRef = A myDoc.symbols ["SYMBOL"];
    symbolItemRef1 = myDoc.symbolItems.add (symbolRef);

    Redraw();
    }

    }
    btnCancel var = myButtonGroup.add ('button', undefined, 'Cancel');

    Pallette.Show ();

    If anyone has any input, it would be much appreciated.

    Thank you

    MyFillSelection = myDropdown.selection is outside the service, so it will always read '13', anything to change value.

    Place this line in your service and add the text property... MyFillSelection = myDropdown.selection.text;

    then do your if comparisons, that will do.

  • Remove the Cookie using Javascript and App_Process

    Dear experts Apex!

    I've tried throughout the day and I think it's finally time to ask!

    I use jquery tabs with the jquery cookie option enabled.
    It works very well, but since I have a lot of pages I want to delete the cookie when you move to another page.
    This is due to the fact that if I open the tab-3 on page 1 and go to the page 2 subsequently, tab-3 on page two will be selected, whereas it be tab-0.

    My idea is that the cookie should be created from scratch when you switch pages.

    That's why I created an application process:
    Begin
    HTP.p ('<script type="text/javascript">');
    HTP.p ('$.cookie(''tabID Cookie'', null);');
    HTP.p ('</script>');
    
    End;
    and set the condition to equals "dc".

    Since I was on the menus (drop) list, the value of the application of these list items has the value "dc" as well.
    I know that the application process is triggered since I tested it with an alert message.

    However, the cookie is not deleted!

    You have everything related to me?

    Thanks in advance!

    Brgds,

    SEB

    Hello

    Ok

    You have to load the htmldbQuery plugin?
    Calculate a value of zero before the header element P510_SEL_TAB if it is null.

    Kind regards
    Jari

    Published by: jarola on March 4, 2011 13:48

    And make sure your hidden item is not "hidden and protected."
    Use only the hidden type

    Published by: jarola on March 4, 2011 13:50

    In fact, I don't have use of the hidden element calculation

    My hidden element

    Display as: hidden
    Source: only when current value in session state is null
    Source type: static assignment (the value corresponds to the attribute of the source)
    Source of value or an expression: 0
    Default value: 0
    By default the value Type: static text with Substitutions of Session State

    Published by: jarola on March 4, 2011 13:57

    If you do not use the htmdlQuery plugin, below should work

    
    
  • Setting a value to variable using an sql and javascript

    Hello

    I'm trying to be a value of variables using javascript and sql. The code is as below:


    < script >
    function getDueDate() {}
    function getVal (item) {}
    If ($x (point) .value! = "")
    Return parseFloat ($x (item) .value);
    on the other
    Returns a null value.
    }
    $x('P26_DUE_DATE').value = select sysdate + $x ('P26_PAY_TERM') of the double
    }
    < /script >

    Can this be achieved?

    Hello

    JS and SQL are 2 different languages, so you can't do what you want to do using this script. The good thing is that you can still do so using JS.

    $x('P26_DUE_DATE').value = select sysdate + $x ('P26_PAY_TERM') of the double

    the "Select Sysdate" try to use the date JS Object (http://www.w3schools.com/jS/js_obj_date.asp) to add dates together.

    Martin
    -----
    [http://apex-smb.blogspot.com/]
    [http://apex.stackexchange.com/]

  • Change a selection list using javascript

    Hi all

    yesterday, I had a doubt using apex_item.checkbox and how to modify them using javascript:
    Re: Passing a checkbox as a parameter to a javascript function

    Today, I am facing a similar problem, but with select lists. Here it goes. I have a report with apex_items, like this:
    select 
    apex_item.checkbox(1,"ID",NULL,NULL,NULL,'f01_#ROWNUM#') " ",
    apex_item.select_list_from_lov(2,"SW_STATUS",'F2010051_SET_STATUS','onChange="setItems(''f01_#ROWNUM#'',''f03_#ROWNUM@'')"','NO') sTATUS,
    apex_item.select_list_from_lov(3,"REVISIO",'F2010051_SET_REVISIO',NULL,'NO','f04_#ROWNUM#') "REVISIO"
    from Fx1_v
    The javascript code is as follows:
    <script type="text/javascript">
    function setItems(cb,estat){
      elem = $x(cb);
      alert(elem.value);
      $x(cb).checked = true;
    
      elem2 = $x(estat);
      alert(elem2.value);  
    }
    </script>
    The idea is that whenever the g_f02 (a selection list) element changes, call the JS function with two parameters: a checkbox (g_f01) and another select list (g_f03). The function should change the items in a defined values. The box changes ok thanks for the help I had yesterday, but I can't work with the third element (list g_f03). When I try to show the value, it says no "defined."

    How can I see the real value of the LOV selection list and change to 1, for example?
    Thank you very much, any help will be appreciated!

    Published by: Elena.mtc on 19-May-2011 08:11

    Hello

    Do you have the typo in the query?
    Should it be

    select
    apex_item.checkbox(1,"ID",NULL,NULL,NULL,'f01_#ROWNUM#') " ",
    apex_item.select_list_from_lov(2,"SW_STATUS",'F2010051_SET_STATUS','onChange="setItems(''f01_#ROWNUM#'',''f03_#ROWNUM#'')"','NO') sTATUS,
    apex_item.select_list_from_lov(3,"REVISIO",'F2010051_SET_REVISIO',NULL,'NO','f04_#ROWNUM#') "REVISIO"
    from Fx1_v
    

    And JavaScript

    
    

    Kind regards
    Jari

  • Addition of this paragraph textFrame using Javascript

    Hello

    I have a block of text that contains 4 paragraphs.

    How can I add a paragraph 5 using Javascript and set some content in there?

    I tried:

    work \\Doesn't myTextFrame.contents += "\rNew Text."

    Also, I couldn't find any available method to add a new paragraph as paragraph of the text block property seems readonly.

    Help, please!

    Examples of Javascript:

    Add text at the end of the text in the text block.
    To do this, we will use the last insertion point in history.
    ('\r' is a carriage return character).
    myTextFrame.parentStory.insertionPoints.item(-1).contents = "\rThis is a new paragraph of example text.";

    --

    Thomas B. Nielsen

    http://www.nobrainer.dk

  • How to display the context menu using javascript in application of apex

    Hi all

    y at - it someone who has set up a context menu using javascript in its request for apex. We may be able to open other pages I need when clicking on items in the context menu.

    Please answer as soon as possible. I will be very grateful to you all.

    Published by: user12259335 on November 23, 2009 01:18

    Hello
    Sorry, you are right, I don't send you all the :), but I have a request - could you just give me your email address to send you the code.
    Tahnks

  • JavaScript and advanced Actions

    I try to do the following in Captivate 6.0:

    1. Display an animated gif of the dice on a slide in Captivate [work]
    2. When you click on:
      1. Generate a number 1-6 as a result of "the launch" and assign it to a variable [of work]
      2. Show / hide items on the page so that the user can see the result of their deployment and a next button so they can continue to [does not]

    I tried to reach the Show / Hide by:

    • Jump to the current slide, using JavaScript and
    • Advanced action on enter to the slide, which checks if the value of the dice has been set and then show / hide objects as you wish.

    Unfortunately, it seems that when I jump to the same slide using JavaScript, enter it event is not called. If I click back, and then forward on the playback bar, I see the desired result.

    I have included the JavaScript and the tip Action (fixed on enter to the slide) below.

    Is there a way to:

    1. Update the JavaScript so that when I jump to the current slide, enter to be executed? OR
    2. Call my action advanced directly from JavaScript? OR
    3. Get the desired result in a different way... I'm not particularly fussed I used JavaScript or advanced Actions to achieve this!

    Here are the details:

    Variable (set through project-> Variables...)


    Dice_Value = - 1

    Fast action (in between)

    If Dice_Value is greater than or equal to 1

    Hide Dice_Animation

    Hide Dice_Click_Box

    See the Dice_Value_Text

    See the Dice_Next

    See the Dice_Next_Caption

    On the other

    See the Dice_Animation
    See the Dice_Click_Box
    Hide Dice_Value_Text
    Hide Dice_Next
    Hide Dice_Next_Caption

    JavaScript (called when the user clicks on the animation of dice)

    function rollTheDice() {}

    cpObj = document var. Captivate;
    var diceValue = 1;
    currentTime var = cpObj.cpEIGetValue ('cpInfoCurrentTime');
    var lastDigit = parseInt (currentTime.charAt (7));
    {Switch (lastDigit)}

    case 7:

    diceValue = 1;
    break;

    case 8:

    diceValue = 2;
    break;

    case 9:

    diceValue = 4;
    break;

    case 0:

    diceValue = 5;
    break;

    by default:

    diceValue = lastDigit;
    break;

    }
    cpObj.cpEISetValue ('m_VarHandle.Dice_Value', diceValue);
    cpObj.cpEISetValue ('cpCmndGotoSlide', cpObj.cpEIGetValue ('rdinfoCurrentSlide'));
    cpObj.cpEISetValue('rdcmndResume',1);

    }

    rollTheDice();

    If you return to the first image of a slide, the action that is triggered by the event progress on enter is not executed. I'm an advanced user action, Javascript is still just a mystery to me. If I want to enter action to repeat itself, I will return to the slide before the slide that contains a conditional action (slide has already been visited, so setting a variable and checking that one) get immediately to the next slide. This way subsequently enter event repeats. Haven't checked it yet, but maybe browse the framework before the first frame of the current slide will be work as well (micro-navigation), something I have to try it because maybe you need to get a couple of frames further back.

    Lilybiri

  • Update using jQuery and java script

    Is it possible using javascript and jQuery to update the two forms of this page, in tandem, as the fields change? http://www.milesmemorials.com/product-GH54.html  As you can see there are two forms, the first holds all the choices element and has an 'Add to Cart' button, the other after clicking on 'continue the evidence' shows and gathers name, Tel, email and all the other fields in the first form (which will be "hidden" once this problem is solved) everything will show will be name phone and email. Currently what is happening, it's choices are made, you click on the button of the evidence, but if a selection is then replaced by items duplicate in form2 are not updated unless the proof button back and then you click New. This may cause incorrect information submitted. So back to my original question, is it possible using javascript and conery for updating both forms in tandem as the fields change?

    Any help really appreciated!

    Take a look at the event .change here http://api.jquery.com/change/

    The figure shows a select field, but this can easily be replaced by a text field.

  • Problem by setting the page_items value into session using javascript

    Hi team,

    When I put in page article from the code below in javascript, it is not be defined.

    function showdetail (t, A, B)

    get var = new htmldb_Get (null, $x ('pFlowId') .value, null, & APP_PAGE_ID.);

    Get.Add('P1_H_A',A);
    Get.Add ('P1_H_B', B);

    }

    This code of java script after setting this process two fields hidden P1_H_A and P1_H_B, I call an on_demanad. Who uses this value filed hidden both in the pl/sql code.

    But this hidden fileds two P1_H_A and P1_H_B do not define themselves in the session.

    Please suggest me a way to solve this problem.

    Thank you and best regards,
    Rajendra Yadav

    Published by: rajendra on February 26, 2012 02:40

    Hello

    There are several errors in your JavaScript code.

    Try this:
    Application process to create On Demand MODEL from source

    htp.prn('OK');
    

    Then JavaScript

    function showdetail(t,A,B){
    var ajaxRequest = new htmldb_Get(null,$v("pFlowId"),"APPLICATION_PROCESS=DUMMY",$v("pFlowStepId"));
     ajaxRequest.add("P1_H_A",A);
     ajaxRequest.add("P1_H_B",B);
     var ajaxResult = ajaxRequest.get();
    }
    

    Kind regards
    Jari

    http://dbswh.webhop.NET/dbswh/f?p=blog:Home:0

  • Find a component inside the jsf fragment using javascript in adf

    Hi all

    I use jdeveloper 11.1.1.5.
    I want to find a component inside my frgament of jsf using javascript.
    Inside the jspx page, I was able to find the component using
    AdfPage.PAGE.findComponentByAbsoluteId ("ID");

    Now my requirement is I have a fragment of jsf, and I want to find the component within jsf frgament using javascript.

    I'm looking for the component.


    Please suggest

    Thank you

    Published by: Navin K December 21, 2011 16:24

    Hello

    fragments are displayed in the ADF regions, which are containers of naming. So a good strategy would be to first find the region

    var region = AdfPage.PAGE.findComponentByAbsoluteId("regionId");
    
    if(region != null){
    
      var comp = region.findComponent("ID");
      ...
    } 
    

    Another option would be

      var comp = AdfPage.PAGE.findComponentByAbsoluteId("regionId:ID"); 
    

    If you have a side handle server for the component, and then a third option exists, which is to call getClientId on this element and pass the customer ID to the JavaScript (for example af:clientAttribute)

    Frank

  • Activate the commnad ADF button using javaScript

    I am trying to turn a commnad button when clicking on a component Boolean Checkbox select. A JavaScript function is called when the user clicks the check box. In the method, I try to get a referecne to the command button (to be enabled). But the reference returns always null/undefined.

    Code in javascript:

    function enableDisableViewDetails (event) {}
    var chkBox = event.getSource ();
    var checkBoxValue = chkBox.getValue ();

    var viewDetailsBtn = AdfPage.PAGE.findComponentByAbsoluteId ('pglhead:pg12:pg13:pg15:viewDetails');
    var viewDetailsBtn = AdfPage.PAGE.findComponent ("pglhead:pg12:pg13:pg15:viewDetails");
    var viewDetailsBtn = event.getSource (.findComponent('pglhead:pg12:pg13:pg15:viewDetails'));
    Alert (viewDetailsBtn);

    If (checkBoxValue.toString () == 'true') {}
    viewDetailsBtn.disabled = true;
    }
    }

    The code in the JSFF page:

    < af:selectBooleanCheckbox
    ID = "rowSelection' clientComponent = 'true '.
    value = "#{row." Selected} ">"
    < af:clientListener method = "enableDisableViewDetails" type = "click on" / >
    < / af:selectBooleanCheckbox >

    Can someone help me please how to refer to the command button (the button is in some other configuration group Panel in the same fragment)?

    JDev Version: 11.1.1.1.3.0

    Any reason that you try this without the use of PPR?

    CM.

  • Cannot use datasource in ADF set in Glassfish

    Hello guys!

    I created a simple application of ADF in jdeveloper 12 c with mysql database and application 3.1 the glassfish server. No problem creating business with the "Business Component of Table" Wizard (using the jdbc connection) local component. I created a display module and put some table data model component.

    I defined a data jdbc (jdbc/MyDS) source in glassfish and successfully test and before you deploy my application and I changed the configuration of module of the application of url jdbc to the data source jdbc (with the same name as the glassfish jdbc connection) in the jdeveloper project.

    I start the browser with the url on the right and I got a popup error "Configuration AppmoduleLocal" not found

    I tried all day... with no success... help!

    AppmoduleLocal is configured in Databindings.cpx? See also similar post:

    https://community.Oracle.com/thread/2354528?TSTART=0

Maybe you are looking for

  • Tecra S11: Detection for the Toshiba tool: your product is not found error

    Hello I use Toshiba detection tool quickly find drivers for my tecra, but since a month now, the page gives this errorYour product is not found It is not a problem to choose my phone in the new drop-down list, but it was uncomfortable, when it worked

  • Black screen to Satellite A210 - 11L

    Hello! I am a semi-professional user. Last year, I bought a portable Satellite A210 - 11L with HD2400 and Windows vista operating system. When I m using my laptop suddenly the display become the white or with lots of vertical lines, and after a secon

  • Not recognized as an administrator

    When I was installing Windows updates, a message appeared stating that I don't have an administrator authority to install the updates, even if I don't have one account on the computer. For this reason, I can't uninstall some programs because I am not

  • PowerEdge 1600SC "no boot device with ' error

    Hi all!I recently acquired a PowerEdge 1600SC server of my fathers company. We used it changed in 2004 just so that you all know. When I try to start it, it starts to beep loud and quite rude. I opened it upward, the it Department had disconnected th

  • my HP Officejet j4550 all in a series is not compatible with my windows 7 64 bit

    TRY TO DOWNLOAD THE DRIVERS TO BE ABLE TO USE MY PRINTER, A VERY DIFFICULT TIME