Execution of a declarative elements AJAX requests

HI guys,.

We are building an ADF based portal application and design involves the creation of a declarative component which will be 'built' in the jspx parent page. This declarative component, during rendering, you must call an AJAX JavaScript application, based on the attributes that have been passed into the constructor of declarative components highlighted below. Essentially, we need to take the value of the ss_Email field and use it in a custom js function (defined in the declarative component) to call an AJAX request to an external resource and view the results online in the component. The reason why this component must call the AJAX code is our end point expects a connection token that is generated from the browser. The call of the declarative component is defined as follows:

< af:form id = "f1" >
< af:panelGroupLayout id = "pgl1" layout = "vertical" >
< ss:ssConsumer id = "sc1" ss_Email = "[email protected]" ss_LastName = "Pradhan" / >
< / af:panelGroupLayout >
< / af:form >

What I did in my component declarative is to set the value of the attributes of elements in a field of entry as follows:

< af:inputText label = "email" id = "inputEmail" value = "#{ss_Email}. uploading" columns = "40" clientComponent = "true" >

It works and I can see the correct value passed into the component. I have a problem with is hang what component text input, such that I can call a method of Javascript that I can read my af:inputText value in a method and begin my AJAX call. I tried to attach an af:ClientListener but it does not help because there is no interaction of the user within that component, that is why none of the types of events (mouseover, blur, click, etc.) are useful. I need actually an event 'onload' for the declarative component, but of course, this does not exist. To solve this problem, I used a block of standard script to force the component to call my js method that is

< script language = "javascript" reporter = 'reporter' >
getTextValue();
< /script >

The problem I am facing now, is that I'm not sure that ADF JS API will give me the value of my input text. I tried the methods AdfPage.PAGE and tried to retrieve the correct value, but have so far failed.

var label = AdfPage.PAGE.findComponent('dc_pgl1:dc_pfl2:inputEmail').getValue();)
var Label2 = AdfPage.PAGE.findComponentById('dc_pgl1:dc_pfl2:inputEmail').getValue();)
var Label3 = document.getElementById('dc_pgl1:dc_pfl2:inputEmail').value;

I guess because it is a declarative component and not in the Page, I can't use these methods. Are there alternatives that should I try or pointers to other ADF JS method calls that I should try to get the value of my javascript input text.

Many thanks in advance,

Sanjay

Hello

as far as I know, all Trinidada component trh:script did the same thing as

Tags: Java

Similar Questions

  • AJAX request for example help

    Hi all
    I have a question regarding the excellent example Denes Kubicek has Section III - Ajax request for example - http://apex.oracle.com/pls/otn/f?p=31517:135:1771969688591802:NO. This example contains text, elements of field based on the data entered when the user clicks on the search button. I've implemented this example successfully, but one of my items in my test application is a Select list (real application will select a few items in the list). Can someone help me in completing my item in the list to select the exact data when search is selected? No data is returned. When my search for end users, I still want they to be able to apply the changes which is why I want the select list active for some items, thanks before all time.

    Hi Charles,

    {The question was that there were a few}'s to spare in the code. I commented on these stars and all seems ok now - the selection list is being updated as you selection/next/previous

    I have not, yet, have a unique demo application - I actually have 98 different ones in my workspace containing 1 156 pages. I keep meaning to all this merge in one great app and let everyone connect users. But I don't have time now to do for this number of pages! Most pages, are good in my applications 267 and 33642, so if you do a search for these numbers and my username (503936), then you will see most of the things I've done.

    Andy

  • Firefox an abortion any AJAX request when you press ESC

    Why firefox an abortion any AJAX request when you press the ESC key?

    I don't see any value in a feature like that. As a matter of fact, no other browser to do this.

    This has happened

    Each time Firefox opened

    Hello Fabio.

    First of all, and although that perhaps not related to your problem, I would remind you that the version of Firefox you use right now since been abandoned and are no longer supported. In addition, it has known bugs and security problems. I invite you to upgrade to the latest version of Firefox, for maximum stability, performance, security and ease of use. You can get it for free, as always, to www.getfirefox.com.

    As for your question, if you are absolutely sure that this problem is not an add-on you have installed and has not been changed in the latest versions, you should file a bug at bugzilla.mozilla.org to request this behavior to change.

  • AJAX request works just with a Wi - fi Blackberry Widget

    I'm doing an Ajax request to're RESTful WebService. When I run the Simulator everything works fine, but when I install the widget for blackberry on my device (9800) applications works when I'm using the Wifi connection...

    It's my config.xml file:

    
    http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="0.2.0.0">
      bbbb
      bbbb
      
      
      
      
      
      
      
      
      
      
        
        
        
        
        
        
        
        
        
      
      
      
      
        TCP_WIFI
        MDS
        BIS-B
        TCP_CELLULAR
        WAP2
        WAP
      
      
      
    
    

    Why this is happening?

    Finally! I found it! I have no why, but it works only on .com, .net o .org domains

    I made the request to a .mobi domain.

  • Cisco TMS 14.4 "Ajax request failed...". »

    Hi Experts,

    I installed Cisco TMS 14.4, installing all makes them very well, but at the first connection, I had error in Pop - Up The Ajax request failed...

    TMS ERRORCOOKIE {FF44A030-7F95-461C-8065-615FCE335F7B} var TMSError = {toggle: function (tableId) {var errorTable = $(tableId); errorTable.style.display = 'block';}} TMSElement.positionCenter (tableId); $('InfoTable').style.display = 'none '; }} Stop_Wait();   An error has occurred!
    Please click the back button on your browser to return to the previous page or click here to go to the front page of TMS. If the problem persists, contact your administrator to TMS.

    You can see the image

    Can someone help me

    Thank you

    Hello

    It should be a more specific error message in the log - web.txt, located in the \data folder in the MSDS on your server installation directory. What did he say?

    Kind regards
    Kjetil

  • affecting values to display only point during the AJAX request

    Hello

    Hello!

    In a master form / detailed in the report in detail, I'm filling two columns SERVICE_TAX_PCT and SERVICE_TAX_AMOUNT by an AJAX request after selection of the ACCOUNT_CODE.  The values are filled out with any problem.

    However, whenever I do these two fields in view-only mode, the values are not get defined.  Is there a way to set the values of a field at the same time, it should be limited to the user to modify?

    (APEX 4.2.6)

    img-1.png

    Thank you

    -Anand

    Hi Anand,

    anand_gp wrote:

    It works and makes the column read-only.  But in this case only for the line of action.  How do these two columns 'read only' permanent for all folders and all the time?

    (1) not remove the code from line 18 of your javascript that is function

       $("#f05_" + row_id).attr("readonly", true).addClass('row_item_disabled');
    

    (2) then create after updating dynamic action and put this code

    Event: after refresh

    Selection point: region

    Region: you select the region

    Action: Run Javascript

    Fire on charge: checked

    Code:

    $('input[name="f05"]').attr("readonly", true).addClass('row_item_disabled');
    $('input[name="f06"]').attr("readonly", true).addClass('row_item_disabled');
    

    Here replace f05, f06 with your markup of column

    Hope this helps you,

    Kind regards

    Jitendra

  • Declarative components based on declarative elements

    Hello

    I defined a declarative component (buttonBarRow) that comes from the other declarative elements (row and column). The record is correct, but the value of the attribute is not passed. So I was wondering if it is possible to create declarative components based on a declarative component in the same project.

    JDev 11.1.2.4

    <? XML version = "1.0" encoding = "UTF - 8"? >

    " < = xmlns:af af:componentDef ' http://xmlns.Oracle.com/ADF/faces/rich "var = 'uploading' componentVar = 'comp' definition 'private' = "

    ' xmlns:afc = ' http://xmlns.Oracle.com/ADF/faces/rich/component "xmlns =" http://www.example.org/Components " "

                     xmlns:f=" http://Java.Sun.com/JSF/core "xmlns:h =" " http://Java.Sun.com/JSF/HTML ">

    < xxx:row id = "dc_r1" >

    < f: facet = 'content of the line' name >

    < xxx:column number = '12' id = 'dc_c1' >

    < f: facet = 'content of the column' name >

    < h:panelGroup id = "pg1" layout = "block" styleClass = "#{!}" empty attrs.align? {'text -' + attrs.align: 'text on the left'} ">"

    < af:facetRef facetName = "primaryButton" / >

    < af:outputText value = "#{attrs.align}-#{empty attrs.align}" / >

    < af:spacer width = "10" height = "10" id = "dc_s1" / >

    < af:facetRef facetName = "secondaryButton" / >

    < / h:panelGroup >

    < / f: facet >

    < / xxx:column >

    < / f: facet >

    < / xxx:row >

    < af:xmlContent >

    < afc:component >

    < afc:display - name > buttonBarRow < / afc:display - name >

    < afc:facet >

    < afc:facet - name > primaryButton < / afc:facet - name >

    < / afc:facet >

    < afc:facet >

    < afc:facet - name > secondaryButton < / afc:facet - name >

    < / afc:facet >

    < afc:attribute >

    < afc:attribute - name > align < / afc:attribute - name >

    < afc:attribute - class > java.lang.String < / afc:attribute - class >

    < / afc:attribute >

    < afc:component - extension >

    < afc:component - tag-namespace > org.example.components < / afc:component - tag-namespace >

    < afc:component - taglib-uri > http://www.example.org/components < / afc:component - taglib-uri >

    < / afc:component - extension >

    < / afc:component >

    < / af:xmlContent >

    < / af:componentDef >

    The only clue that I found is the use of declarative components in other definitions of component declarative

    Doesn't look like this is supported.

    Timo

  • partial trigger on the declarative elements

    Hello

    I have a declarative component with many facets and a high component < af:panelGroupLayout >. I would like to refresh the entire component with PPR. In my page, I have a selectOneChoice with autoSubmit = 'true', but now I have to set the property partialTriggers to the declarative elements.

    So I created a new myPartialTriggers to attribute for declarative components as a string and changed the top element to < af:panelGroupLayout partialTriggers = "#{attrs.myPartialTriggers}" >. So now I can define the component property myPartialTriggers declarative the ID of the SelectOneChoice. It is not work that I get an exception:

    Error occurred: Houston-29000: Unexpected exception caught: java.lang.IllegalArgumentException, msg = cannot convert: c42:iflt9:dc_r2:dc_c2:naturalPersonSoc of type java.lang.String class at class [Ljava.lang.String;

    Thank you

    JDev 11.1.2.4

    Essentially, you surround the declarative component with a container and the container ppr. Read the whole story http://www.oracle.com/technetwork/developer-tools/adf/learnmore/005-how-to-bind-decl-comp-169123.pdf

    Timo

  • ADF Mobile: Models, reusable, declarative elements

    Hello

    Unfortunately, the developer's guide has no mention on the creation of templates, the reusable parts and declarative elements. ADF Mobile them currently support? Please enlighten us.

    Thank you
    Srini

    Not immediately.
    But you can use the deployment feature to develop reusable features which can be shared between applications.
    http://docs.Oracle.com/CD/E35521_01/doc.111230/e24475/deploying.htm#CHDCGBIE

  • Problem using the structure returned by the ajax request

    I'll send an ajax request that calls a method in a CFC.  The method executes a query and returns data.  I want to use the option of 'success' of the ajax call to display the return value "myString" in an empty div.  But nothing appears.  Everything else works.  Shouldn't the ajax call back for me "myString" and values "myNumber" which I can then use?  Or do I have the wrong syntax?

    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
        <script>
      function getMyData()  
      { 
      $.ajax({
      type: "post",
      url: "test.cfc",
      dataType: "json",
      data: {
      method: "getMyData",
      city: 'Hartford'
      }
      , success: function(data) {$('#result').html(myString);}
      , error: function(data) {$('#result').html('That failed');}
      });
      $('#anotherDiv').html('Goodbye');
      }
      </script>
    </head>
    <body>
    
    <a href="javascript:()" onclick="getMyData();">
       <div>Click here</div>
    </a> 
    
    <div id="result"></div>
    <div id="anotherDiv"></div>
    

    <cfcomponent>
      <cffunction name="getMyData" access="remote" returntype="struct" returnformat="json">
        <cfset var stcRetVal = StructNew()>
            <cfset stcRetVal.myString = "Hello">
            <cfset stcRetVal.myNumber = 75>
        
            <cfquery datasource="#application.mainDS#">
      insert into test 
                (city) 
                values 
                (<cfqueryparam value="#arguments.city#" cfsqltype="cf_sql_varchar">)
      </cfquery>
    
    
      <cfreturn stcRetVal>
      </cffunction>
    </cfcomponent>
    

    If your function should return you structure JSON like:

    {

    'myString': 'Hello,'

    "myNumber": 75

    }

    When you succeed, you do:

    success: {function (data)}

    $('#result').html (myString);

    }

    whence "myString"?  All that gets you back is in this object 'data '.  So, you might be able to do it instead.  Try to console.log (data) inside your success Manager.

    success: {function (data)}

    $('#result').html (.myString data);

    }

  • Is possible to use = href and onclick = Ajax.request to track outgoing link?

    Hello

    I m new in Oracle Apex and I try now to follow outgoing links on my Apex 3.2.1 application.

    When the user clicks on a link of my application that redirects to a past site, I want them to be taken on the site (href) and I also want a background script that fit into a table in oracle, this 'click '.

    For example, I have this link in a page of the APEX:

    When the user cliks in this link, I would like to run a procedure oracle, with a setting in the background. Let´s call this procedure, for example:

    SP_REGISTRA_ACESS_LINK(:P19_COD_TOPICO).

    This procedure to insert a record into a table called BAC_ACESS, ranger in the SYSDATE and value of ': P19_COD_TOPICO.

    Is it possible to link to a new site and call an AJAX request at the same time?

    Could someone give me an example of how I can do? How can I implement in my Apex 3.2.1 application?

    I m working with Apex 3.2.1 and RDBMS 9i. I can't spend any of these versions, cause Apex is installed in a production database that can be upgraded now to 10g / 11g.

    Best regards

    Sergio Coutinho

    Hello

    Ok
    One solution could be to make you your own custom County click procedure that you call in the URL.
    You go to this external link to procedure and other settings you need.
    Procedure to make your custom orders and last stage call owa_util.redirect_url and redirect the user to this external link
    http://download.Oracle.com/docs/CD/B13789_01/AppDev.101/b10802/w_util.htm#997457

    You create the APA procedure, analysis of schema and grant execute user to DAD.
    In addition, you may need change Apex schema function wwv_flow_epg_include_mod_local
    http://download.Oracle.com/docs/CD/E17556_01/doc/admin.40/e15521/adm_mg_service_set.htm#AEADM209

    Kind regards
    Jari

  • ADF 11 g - how to tell the difference between an entire page and an AJAX request

    Hello

    I noticed that a ControllerClass (an instance of oracle.adf.controller.v2.lifecycle.PagePhaseListener, which I defined in the ControllerClass of the pageDefinition property) also get a life cycle AJAX request. The question is how did I get the difference between a request for a full page and a PPR/AJAX application from inside the afterPhase() or beforePhase() method?
    Thank you.

    Rgds,
    Rudi

    isPartialRequest going to do: http://www.oracle.com/technology/products/adf/adffaces/11/doc/adf-richclient-api/apidocs/oracle/adf/view/rich/context/AdfFacesContext.html#isPartialRequest (javax.faces.context.FacesContext)

    John

  • AJAX request fail with "no transport.

    Hello

    I have the following call:

    $.ajax
    ({
        type: "POST",
        crossDomain: true,
        url: "http://domain.net:2000/login_check.php",
        dataType: "text",
        data: {user: username, pass: password},
        success: function(data)
        {
            if (data.trim() == "S")
            {
                window.location="profile.html";
            }
            else
            {
                window.location="index.html";
            }
        },
        error:function (xhr, ajaxOptions, thrownError)
        {
            alert(xhr.status);
            alert(thrownError);
        }
    });
    

    It works in a normal browser, and even in the emulator of ripple (isn't that the emulator ripple supposed to imitate and not just be a wrapper of chrome?), but on the device, the call fails. thrownError returns "no transport.

    Did I miss something in my file config.xml?

    
    
    
    
    http://www.w3.org/ns/widgets"
            xmlns:rim="http://www.blackberry.com/ns/widgets"
        version="1.0.0.0">
    
      Launch Lawyer
    
      
          Launch Lawyer
      
    
      http://opensource.org/licenses/alphabetical">
      
    
      
      
      
      
      
      
      
      
      
      
      
      
      
    
      
      
      
    
      
      
    
      
      
    
      
        
      
    
      
    
    
    

    in your config.xml file, try to add this element:

    
    TCP_WIFI
    BIS-B
    TCP_CELLULAR
    MDS
    WAP2
    WAP
    
    

    or configure this depends on you internet connection transport you use in the camera.

  • How to get the requested catalog of the same element status request workflow vRO 7 periodically?

    Hi all

    I design a WF in vRO7.

    I asked for a catalog item in the WF (to perform a pre-defined a BP published) in vRA 7.0.

    Here is the sample code snippet. Here the element is of type VCACCAFE:Catalogitem

    //********************************************

    var form = vCACCAFERequestsHelper.getRequestFormForCatalogItem (item);

    var request = vCACCAFERequestsHelper.requestCatalogItem (item, form);

    //******************************************

    I am able to process this request successfully. But now, I would like to check the status of this application periodically depending on the State of the application, I want to update a field in VRO and same WF.

    Now my question is, how can I recover the status of the catalog item query after periodically (say 5 minutes interval)?

    Can I use the method below, but thing is that how can I get the same request after 5 minutes?

    request.getExecutionStatus () .value ();

    Can you please help me out is it possible to get the details of the application even with the id of the request after 5 / x minutes?

    Thank you

    Miloud

    Hello

    You can do the following

    Mark your vRO like this query objects after the presentation

    Server.setCustomProperty(request, "CHECK_LATER", "1");
    

    Then place this code in a separate workflow on a calendar for every 5 minutes

    var watchedRequests = Server.getObjectsWithCustomPropertyKey("CHECK_LATER");
    
    for each(var request in watchedRequests)
    {
         // you can access the request submission content here
         var lMap = request.getRequestData();
         // the map is a vCACCAFELiteralMap but it has all VM property and CustomProperty values in it
         //e.g.
         var hostname = lMap.get("provider-Hostname").value;
    
         // assess request state and take appropriate actions here
    
         // remove the tag to avoid duplicate notifications
         // ONLY do for requests in a terminal state though!
         if(!inProgress)
         {
              Server.removeCustomProperty(request, "CHECK_LATER");
         }
    }
    

    Hope this helps

  • XSL Transform map failure during execution due to missing element Xpath

    Hello

    I have a case where I use a source variable which has two components. At run time, these variables can be non-existent depends on previous activities.

    The problem is the transformation XSL doesn't like it and fails with the error

    XPath expression cannot run.

    The XPath expression cannot run; the reason was: oracle.xml.parser.v2.XMLDOMException: import not allowed on nodes of type of document.

    Check the detailed origin described in the text of the exception message and verify that the XPath query is correct.

    How can I ignore for the mapping of similar transformation to affect ignoreMissingFromData activity?

    Thank you.

    Hello

    > variable source that has two components. At run time, these variables can be non-existent

    Are you talking about BPEL variables or XML elements? Can send you a sample xml?

    In any case, I think you could use getContentAsString or something like that in your XLST and causing its failure... A workaround is to use xslt:if or xslt: choose test if the element is there...

    See you soon,.

    Vlad

Maybe you are looking for