Invoking call back functions

Hi there,
While a client can invoke server side functions on the bean, is there anyway we can invoke a client side function (call back) from the bean itself?

Not within EJB, but there are many ways to communicate. RMI and JMS would be two possibilities; though I would be a bit suspicious about the legality of using RMI from within an EJB, JMS is perfectly acceptable.

Similar Messages

  • How to unrigister the call back function,in vb6 with DAQmx 8.5

    I use daqmx api which named DAQmxRegisterEveryNSamplesEvent to register my call back function,When I invoke the function  DAQmxErrChk (DAQmxStopTask(taskHandleAnalog)) to stop my Task.then i call the procedure AD_OPEN  again,it raise an error ,tell me that i need to unregister the event,the data has transfer into the buffer.how can i unregister the event,please look at the following code.
    Spoiler (Highlight to read)
    Private Sub create()
       Dim channel As String
        Dim minVoltage, maxVoltage As Double
        Dim samplesPerChannelPerRead As Double
        Dim sampleMode As Long
        Dim boolVal As Boolean
        On Error GoTo AdErrorHandler:
        ' Get values from UI controls
        channel = "Dev2/ai1:2"
        minVoltage = -10
        maxVoltage = 10
        samplesPerChannelPerRead = 100
         If (taskHandleAnalog <> 0) Then
             DAQmxErrChk (DAQmxStopTask(taskHandleAnalog))
            DAQmxErrChk (DAQmxClearTask(taskHandleAnalog))
            taskhandle = 0
        End If
        ' Configure the task
        DAQmxErrChk (DAQmxCreateTask("", taskHandleAnalog))
         DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandleAnalog, "Dev2/ai0", "", DAQmx_Val_InputTermCfg_RSE, minVoltage, maxVoltage, DAQmx_Val_VoltageUnits2_Volts, vbNullString))
        DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandleAnalog, channel, "", DAQmx_Val_InputTermCfg_Diff, minVoltage, maxVoltage, DAQmx_Val_VoltageUnits2_Volts, vbNullString))
    End Sub
    Private Sub AD_Open()
        DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleAnalog, "", 200, DAQmx_Val_Rising, DAQmx_Val_AcquisitionType_ContSamps, samplesPerChannelPerRead))
        'Find number of samples specified
        DAQmxErrChk (DAQmxGetTaskNumChans(taskHandleAnalog, numChannels))
        'Configure Event Callbacks
        DAQmxErrChk (DAQmxRegisterEveryNSamplesEvent(taskHandleAnalog, 1, 4, 0, AddressOf EveryNSamplesEventHandler1, Nothing))
     ReDim dataBuffer(numChannels * samplesPerChannelPerRead - 1)
        ' Start the DAQmx Task
    '    DAQmxErrChk (DAQmxCfgDigEdgeStartTrig(taskHandleAnalog, "/Dev1/PFI2", DAQmx_Val_Edge1_Falling))
        DAQmxErrChk (DAQmxStartTask(taskHandleAnalog))
        ' Update UI
        Exit Sub
    AdErrorHandler:
        MsgBox Err.Description
    End Sub

    This may be a bit late, so hopefully you found this on your own. But in order to unregister the event pass a null value for the callback function parameter in the DAQmxRegisterEveryNSamplesEvent function (Nothing in VB).
    National Instruments
    Product Support Engineer

  • How to use call back function ?

    i have MlEditmanager class which extends xyzManager class. I also want to extend Eventdispatcher .. but it is not possible to extend more than one class ...
    so the work around can be to create call back function. private var xyz:Function; --> how to use this syntax?
    Can someone help me how to achieve this?
    Urgent pls.

    Hi
    check out this link
    http://rushmeflex.blogspot.com/2010/09/cairngorm-2-view-notification.html
    Though this is not your requirement, however in the source code callback functions are used. You can get clue from that.
    Hope this helps
    Rush-me

  • HTTP Call back functionality

    Hi All,
        I need to implement a HTTP call back functionality to do a handshake between my portal and a 3rd party application.
    Framework: Oracle ADF
    Application server: Weblogic 10.3.6
    1. We will do a HTTP POST (that includes a token for validation purpose) from our portal to a 3rd party application, lets say, XAPP.
    2. Then the XAPP will make a call back using the call back URL of our portal. When they do the call back, they include the token that we provided to them in Step1.
    3. We need to accept the call back request and validate the token. After this I need to resume with the response processing from the initial POSTing session.
    4. After all the validations, I need to open XAPP's URL in a browser.
    Here the main catch is to keep the initial POSTing session alive(waiting) while accepting the call back request and then continue with the response processing from the initial POSTing session.
    Thanks for your help.

    Hi,
    make sure to post this to the WebCenter forum too as i would assume they more likely have this as a requirement too
    Frank

  • PL/SQL Call Back function is never called

    Hi, I have a AQ set to run a PL/SQL Call Back procedure, but the procedure is never called.
    Oracle version is 11.2.0.2 Standard Edition
    When I query aq$<queue>, the MSG_STATE column is always "ready".
    This is the queue creation script
    begin
      DBMS_AQADM.CREATE_QUEUE_TABLE ( queue_table => 'POLERMESSAGE',
                                      queue_payload_type => 'POLER_MESSAGE',
                                      multiple_consumers => TRUE );
      DBMS_AQADM.CREATE_QUEUE( queue_name => 'POLER_QUEUE',
                               queue_table => 'POLERMESSAGE');
      dbms_aqadm.add_subscriber( queue_name => 'POLER_QUEUE',
                                 subscriber => sys.aq$_agent( 'POLER_RECIPIENT', null, null ) );    
      dbms_aq.register ( sys.aq$_reg_info_list( sys.aq$_reg_info('POLER_QUEUE:POLER_RECIPIENT',
                                                                 dbms_aq.namespace_aq,
                                                                 'plsql://tr',
                                                                 HEXTORAW('FF')) ) ,
                           1 );    
      DBMS_AQADM.START_QUEUE(queue_name => 'POLER_QUEUE');    
    end;
    /This is the content of "tr" procedure
    create or replace
    procedure tr ( context raw,
                           reginfo sys.aq$_reg_info,
                           descr sys.aq$_descriptor,
                           payload raw,
                           payloadl number)
    as
      dequeue_options dbms_aq.dequeue_options_t;
      message_properties dbms_aq.message_properties_t;
      message_handle RAW(16);
      message poler_message;
    BEGIN
      dequeue_options.msgid := descr.msg_id;
      dequeue_options.consumer_name := descr.consumer_name;
      DBMS_AQ.DEQUEUE(queue_name => descr.queue_name,
                      dequeue_options => dequeue_options,
                      message_properties => message_properties,
                      payload => message,
                      msgid => message_handle);
      insert into lxtr values ( Nvl( To_Char(message.PolerMsgNro ), 'ooops' ), systimestamp ) ;
      commit ;
    end tr;If I query sys.reg$, I see it registered there:
    SQL> select subscription_name, location_name, status, state from sys.reg$;
    SUBSCRIPTION_NAME
    LOCATION_NAME
       STATUS     STATE
    "SPARCS"."POLER_QUEUE":"POLER_RECIPIENT"
    plsql://tr
            0         0I was working, until I re-compiled (don't ask...) the trigger that enqueue the message
    This is the section of the trigger (post insert for each row) that do the enqueuing. It seems to be working, since it is enqueuing. The issue is the dequeue.
    DECLARE
      enqueue_options dbms_aq.enqueue_options_t;
      message_properties dbms_aq.message_properties_t;
      message_handle RAW(16);
      message poler_message;
      err varchar2(2000);
    BEGIN
        message := poler_message(PolerMsgId,  PolerMsgNro );
        dbms_aq.enqueue(queue_name => 'POLER_QUEUE',
                        enqueue_options => enqueue_options,
                        message_properties => message_properties,
                        payload => message,
                        msgid => message_handle);
    END;If I run the code below, message is cleanly dequeued
    declare
      dequeue_options      dbms_aq.dequeue_options_t;
      message_properties   dbms_aq.message_properties_t;
      message_handle       RAW(16);
      message              poler_message;
    BEGIN
      dequeue_options.consumer_name := 'POLER_RECIPIENT' ;
      dbms_aq.dequeue( queue_name => 'POLER_QUEUE',
                       dequeue_options       => dequeue_options,
                       message_properties    => message_properties,
                       payload               => message,
                       msgid                 => message_handle);
      COMMIT;
    END ;Can anyone please give me any hints on what should I do next. There is nothing on the alert log...
    Thank you in advance,
    Tiago

    1) Very few PL/SQL programmers would consider it good form to have procedures with excessive numbers of parameters. In any language, though, it's possible to write poor code.
    2) Initially, you're right-- the performance of properly defined SQL statements via JDBC is little different than the performance of PL/SQL stored procedures. Frequently, however, SQL statements in Java applications do not take advantage of bind variables, which will significantly limit their scalability. Maintaining SQL statements in client applications makes it significantly more difficult on the support side-- if you find a bug in a stored procedure, you can fix the bug in one place-- if you find a bug in embedded SQL, you have to fix the code everywhere the client is deployed. Maintaining PL/SQL stored procedures also makes optimization easier-- frequently your DBA will be able to boil down a stored procedure to a couple of SQL statements and vastly improve performance (i.e. INSERT INTO <<table name>> SELECT <<column list>> from <<other table>> rather than looping over a cursor doing single-row inserts). Finally, PL/SQL stored procedures enable reuse-- when the next application wants to access the database, it doesn't have to rewrite your SQL.
    3) If the alternative to the bind variables (?'s) is a bunch of literals, I'll spend the extra time writing the code for the tremendous increase in scalability.
    4-6) You can certainly pass classes from Java to PL/SQL and back. You can also write Java stored procedures, rather than writing PL/SQL stored procedures). Oracle has been one of the leading proponents of Java.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Stateless Bean - scope of instance variable in EJB Timer call back function

    Hi,
    I would like to know on the scope of an instance variable of a Stateless Bean object,
    when used in a EJB Timer call back.Let me explain this in more detail below.
    I have a requirement to use a EJB Timer.
    For this, I have created a stateless object since Timer creation needs to be done
    from a stateless bean. I have a member variable "count" of the stateless bean class.
    In the timer call back(ejbTimeout), I am able to use this count variable during
    each time of the call back, and the value of this variable is also updated properly.
    I have a few queries with respect to the above behaviour:
    1) Does stateless bean object not get destroyed once the Timer is created from the Bean?
    2) If the Bean object is not destroyed, then when does the bean object get destroyed?
    3) If both (1) and (2) are not true, then can anyone explain on how the above behaviour is possible?
    Thanks in advance,
    Ulrich

    Hi Ulrich,
    The ejb timer is associated with the stateless session bean component, not with a particular bean instance. There is no formal relationship between the bean instance that called createTimer() and the bean instance on which the timer callback happens. If they're the same in your test run that's just a coincidence and not something your application should be depending on.
    In the stateless session bean model, the container can create and destroy stateless session bean instances at any time. The container is free to pick any stateless session bean instance to service any client invocation or timer callback. If you need to pass context into a timer callback, one way to do it is via the timer "info" object. However, the info object is immutable so it wouldn't be a good match for a counter. You could of course always just use a database for any necessary coordinated state.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to access Call Back Functions using *.dll in the Labview?

    Hai,
    I am Pavan Ram Kumar Somu.
    I am new to Labview, currently I am working on MVB Interface.
    I need to access the API functions from *.dll file in Labview, as of now , I am doing this with Call function Library node in Labview but it does not support the following data types like
        1. Pointer Arguments(To which memory it points in Labview)
        2. function pointers Arguments
        3 .pointers in structures and pointer structures in structures and many other data types.
    Please Answer the below queries also:
    1. How to pass pointer arguments to API functions in DLL and how to collect pointer  
        return types from API functions in DLL
    2. How to pass structure arguments to API functions in DLL and how to collect structure
        return types from API functions in DLL
    3. How to use callback functions(nothing but function pointers) in Labview and how to
        collect callback fuctions return types from API functions in DLL
    I need your help while passing these datatypes to API functions in DLL from labview.
    Suggest me if there is any other alternative for implementing this task.
    I am referencing some examples here:
    Examples:
    I)
    Unsigned short int gf_open_device(void *p_device_config, unsigned long int client_life_sign_timeout, unsigned short int *device_error)
    void *p_device_config: How to access/pass these arguments in LabView and to which memory location it points in LabView.
    II) #include <windows.h>
         #include <process.h>
         HANDLE rcvEvent0, rcvEvent1;
    /* Function call*/
    CanGetReceiveEvent(handle[0], &rcvEvent0);
    Above is a piece of C code, Now I want to use HANDLE datatype which is windows based, how to use these type in the LABVIEW.
    With regards
    Pavan Ramu Samu

    "Somu" <[email protected]> wrote in message news:[email protected]...
    Hai,
    I am Pavan Ram Kumar Somu.
    &nbsp;
    I am new to Labview, currently I am working on MVB Interface.
    &nbsp;
    I need to access the API functions from *.dll file in Labview, as of now , I am doing this with Call function Library node in Labview but it does not support the following data types like
    &nbsp;&nbsp;&nbsp; 1. Pointer Arguments(To which memory it points in Labview)
    &nbsp;&nbsp;&nbsp; 2. function pointers Arguments
    &nbsp;&nbsp;&nbsp; 3 .pointers in structures and pointer structures in structures and many other data types.
    &nbsp;
    Please Answer the below queries also:
    &nbsp;
    1. How to pass pointer arguments to API functions in DLL and how to collect pointer&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp; return types from API functions in DLL
    &nbsp;
    2. How to pass structure arguments to API functions in DLL and how to collect structure
    &nbsp;&nbsp;&nbsp; return types from API functions in DLL
    &nbsp;
    3. How to use callback functions(nothing but function pointers) in Labview and how to
    &nbsp;&nbsp;&nbsp; collect callback fuctions return types from API functions in DLL
    &nbsp;
    I need your help while passing these datatypes to API functions in DLL from labview.
    &nbsp;
    Suggest me if there is any other alternative for implementing this task.
    &nbsp;
    &nbsp;
    I am referencing some examples here:
    Examples:
    I)
    Unsigned short int gf_open_device(void *p_device_config, unsigned long int client_life_sign_timeout, unsigned short int *device_error)
    &nbsp;
    void *p_device_config: How to access/pass these arguments in LabView and to which memory location it points in LabView.
    &nbsp;
    II) #include &lt;windows.h&gt;
    &nbsp;&nbsp;&nbsp;&nbsp; #include &lt;process.h&gt;
    &nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp; HANDLE rcvEvent0, rcvEvent1;
    &nbsp;
    /* Function call*/
    CanGetReceiveEvent(handle[0], &amp;rcvEvent0);
    &nbsp;
    Above is a piece of C code, Now I want to use HANDLE datatype which is windows based, how to use these type in the LABVIEW.
    &nbsp;
    With regardsPavan Ramu Samu
    Search the forum (forums.ni.com) for callback, pointer or handle, and you'll find that it is all possible, but not very easy.
    e.g.: http://forums.ni.com/ni/board/message?board.id=170&message.id=88974&requireLogin=False
    Regards,
    Wiebe.

  • Event Handler Call Back Functions

    Hi all,
    I've followed http://wiki.sdn.sap.com/wiki/display/CRM/ExtendBOLModelBTwithcustomtabletyperelationship that wiki to get my Z table accessible in the BOL through a relationship to BT. Create and display opperations are working just fine.
    My problem is with Modify and Delete actions.
    Essentially, when I press Save in the BOL Browser (after modifying some field in my Z Entity) and have a look at the Event Trace, I see that the events Init, Save, Init have been called. The problem here is that Init is being called before Save, clearing the global class table that holds my entities. Therefore, when Save is called the table is empty and no entities are updated in the DB.
    My Init function is called on '88 (Initialize Document)' and the Save function is called on '80 (Save Document)'. Is there some way of ensuring that Init will not be called before Save?
    Thanks for your time and help,
    Patrick.

    Hi folks.
    Some more info.
    I've been trying to figure out how the SAP standard works, so I'm having a look at PARTNERSET/PARTNER, which have the same set up against BT that my objects have. I've put break-points in to the functions CRM_PARTNER_INIT_EC & CRM_PARTNER_SAVE_EC.
    From the BOL Browser I now find a Partner relationship, make a modification and press Save.
    I see that here, also, the calling order is INIT followed by SAVE; but here the modifications are actually stored to the DB.
    So, is there something wrong with the code in the INIT/SAVE functions from that wiki?
    Essentially, has anyone here ever taken a Z Table, created a BOL entry for it with a relationship to BT (or any other component) and had it actually work?
    I've read every resource I can find on this, the wiki I linked, another by a guy named Harel, another that has us use the component set SO2; the CRM WebUI programming book and the Deep Dive course material and you can add to that many, many forum posts. None of them result in entities (with relationships) that actually work.
    Some insight/help would be greatly appreciated.
    Thanks,
    P.
    Edited by: Patrick O'Neill on Oct 12, 2011 10:40 AM

  • Re: Forte and OrbixWeb call-back

    We have created a business process manager (BPM) layer between our client GUI
    and business model objects that supports Java call-in/call-out. This enables
    switching out the Forte windows with Java windows for a web solution with
    minimal code re-write.
    We were able to get most functionality to work as per our design, which
    included registering a call back function from a Java GUI in the BPM, but had
    to make some sacrifices due to a Forte bug, at least under 3.0.D. We turned
    in case #38434, detailing errors when we tried to fire a callback method with
    parameters, example below ("callback" was the Java object passed in.)
    method TestIIOPBackend.FireCallback(input message: Framework.string)
    begin
    if callback != nil then
    task.part.logmgr.putline('Firing callback');
    //WORKS
    callback.CallMe();
    //ERROR!
    callback.CallMeString(message);
    else
    task.part.logmgr.putline('Callback not set');
    end if;
    end method;
    This may have been fixed in 3.0.F, we found a way to work around it in our
    design and haven't investigated since.
    -DFR
    Ngai* Stuart <[email protected]> on 01/20/98 09:14:28 AM
    To: '[email protected]' <[email protected]> @ INTERNET
    cc:
    Subject: Forte and OrbixWeb call-back
    Has anyone actually tried the tech note 11153 "Java call-in/call-out and
    Forte
    Anchored Objects"? I'm trying to verify the callback mechanism from
    Forte to
    an IIOP Java client. Thanks.
    <<< Stuart Ngai (416)359-4306 [email protected] >>>
    ------ Message Header Follows ------
    Received: from pebble.SageIT.com by notes.bsginc.com
    (PostalUnion/SMTP(tm) v2.1.9c for Windows NT(tm))
    id AA-1998Jan20.101336.1771.787915; Tue, 20 Jan 1998 10:13:36 -0600
    Received: (from sync@localhost) by pebble.SageIT.com (8.6.10/8.6.9) id HAA03868
    for forte-users-outgoing; Tue, 20 Jan 1998 07:25:41 -0800
    Received: (from uucp@localhost) by pebble.SageIT.com (8.6.10/8.6.9) id HAA03862
    for <[email protected]>; Tue, 20 Jan 1998 07:25:39 -0800
    Received: from keeper.nesbittburns.ca(192.139.71.50) by pebble.sagesoln.com via
    smap (V2.0)
    id xma003860; Tue, 20 Jan 98 07:25:19 -0800
    Received: from NesbittBurns.ca (tds223.nesbittburns.ca) by
    keeper.NesbittBurns.ca (4.1/SMI-4.1)
    id AA22591; Tue, 20 Jan 98 10:23:47 EST
    Received: from nbtormail02.nesbittburns.ca by NesbittBurns.ca (5.x/SMI-SVR4)
    id AA12961; Tue, 20 Jan 1998 10:26:54 -0500
    Received: by nbtormail02.nesbittburns.ca with SMTP (Microsoft Exchange Server
    Internet Mail Connector Version 4.0.995.52)
    id <[email protected]>; Tue, 20 Jan 1998
    10:27:52
    -0500
    Message-Id:
    <c=CA%a=_%p=Nesbitt_Burns_In%[email protected]>
    From: "Ngai, Stuart" <[email protected]>
    To: "'[email protected]'" <[email protected]>
    Subject: Forte and OrbixWeb call-back
    Date: Tue, 20 Jan 1998 10:27:39 -0500
    X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.995.52
    Mime-Version: 1.0
    Content-Type: text/plain; charset="us-ascii"
    Content-Transfer-Encoding: 7bit
    Sender: [email protected]
    Precedence: bulk
    Reply-To: "Ngai, Stuart" <[email protected]>

    Peggy,
    1) Do you have experience with PowerBuilder and Forte' applications running at
    the same time on the same (laptop) computer? Here I'm thinking
    about any potential resource constraints? Memory Requirements?As log as you are using Win95 or NT you should not be concerned about WIN-resources. Memory depends more on what your 2 tier PB application requires than what your Fort&eacute; would require.
    Cheers,
    Troels
    Lindhard Fort&eacute; Solutions
    -----Original Message-----
    From: Peggy Lynn Adrian [SMTP:[email protected]]
    Sent: Thursday, January 15, 1998 10:31 PM
    To: [email protected]
    Subject: Forte and Powerbuilder Experience Needed
    I sent this query to Forte support but maybe someone out there can help me
    with practical experience
    with the following?
    ---------------------- Forwarded by Peggy Lynn Adrian/AM/LLY on 01/15/98 04:30
    PM ---------------------------
    Peggy Lynn Adrian
    01/14/98 03:55 PM
    To: [email protected]
    cc: Peggy Lynn Adrian/AM/LLY@Lilly
    Subject: Forte and Powerbuilder Experience Needed
    1) Do you have experience with PowerBuilder and Forte' applications running at
    the same time on the same (laptop) computer? Here I'm thinking
    about any potential resource constraints? Memory Requirements?
    2) Can PowerBuilder and Forte' applications call and interact with one
    another?
    The Forte' application will need to interact with the PowerBuilder application
    to pull out information maintained by the PB application.

  • How to call javascript function in back bean of jsf

    hi,
    i am trying to call java script function in back bean but not done. Is there any code for call javascript function in bean file.

    Java runs at server side.
    JSF produces HTML output.
    Server sends HTML output to client.
    Java stops running.
    HTML runs at client side.
    JS starts to run in HTML.
    Clear? Java is a server side language. JS is a client side language. To run JS using JSF, simply print it out to the HTML so that it get invoked when the HTML runs.

  • ADF Question: call javascript function from backing bean?

    Hi all,
    I am running JDeveloper 10.1.3.3 with ADF BC.
    Heres my situation:
    I have a table, and after inserting a new row, then committing, I want to call a javascript function. I tried using the onkeyup javascript to force a click of the save button, and then call my function after that. However, I really only want the second function to be called AFTER the commit has occurred.
    I have tried putting a setTimeout on the second function, but this never executes then. Is there some way that I can call the second javascript function from the backing bean? Is there a better workaround for this? Here is some code:
            function submitCreate(e) {
                var _event = (window.event) ? event : e;
                var KeyID = _event.keyCode;
                switch (KeyID)
                    case 13:
                        document.getElementById("form1:tvoTable:commitButton").onclick();
                        doAjax();
                        break;
            function doAjax() {
                var item = document.getElementById("form1:inputText3").innerHTML;
                getAjax(item, "FULL");
            }Thanks,
    Heather

    Maybe try adding an af:script block in your jsp as a partial target in your backing bean when you commit to the database? We are doing something similar when we get a tab DisclosureEvent but the principle should be the same.
    In our jsp we have:
    <af:script id="scriptID" text="alert('javascript here');"/>
    In the backing bean we have:
    method(DisclosureEvent de) {
    // get a component somehow or the component, we get it from the disclosure event
    // but you could use a binding also. if you don't have the exact script element you need
    // to find it like we do below.
    UIComponent c = de.getComponent();
    // Find our real script component
    UIComponent target = c.findComponent(":scriptID");
    // get the adf context
    AdfFacesContext adfContext = AdfFacesContext.getCurrentInstance();
    // add the script as a partial target.
    if(target != null) {
    adfContext.addPartialTarget(target);
    This relies on PPR though, which you may not be doing. If you are navigating to a new page you could set an indication in a backing bean and then access that in an <af:script> block in the new page or even generate the Javascript you want depending on your logic and access all of it via an EL binding on the af:script tag:
    <af:script id="scriptID" text="#{bbean.generatedScript}"/>
    Hope this helps!
    Steve

  • How to get caller id function back on iPhone 4s

    For some reason my phone comes up as unknown when I call other phones, and the caller id function is disabled in my settings, help????

    Contact your carrier. Caller ID is a carrier feature. Not all carriers support turning it on and off in the phone settings.

  • How to call back to C via JNI in Java started from C?

    Hi!
    This problem might seem outlandish, but I have not been able to find any other method to reach my goal. The situation is the following.
    There is a C++ program I intend to interface with a piece of Java code, called the manager. The C++ code invokes a VM, starts a Java glue code, that connects to the manager via RMI. This works fine. The glue code, however, can be called from the manager, via RMI as well. The problem is, that these calls should in turn call functions in the C++ code, that originally started the Java glue code. JNI can only load a library, but this is not what I want to do now. I want to somehow connect back to the C code that started the Java code. Is this possible at all?
    Thanks for your help,
    Ambrus

    What you want to do is not too tough, but there will be some details to be worked through. In particular, you have to figure out how to make your "callback" get from your "glue" code back into your C++.
    1. Calling back out is from java to C is pretty easy. There is a JNI function for registering a native method with the JVM. Here is an example of the registration code:
    // See if the service interface class is known.
    javaClass = javaEnv->FindClass("JavaInterfaceObject");
    if (javaClass != 0) {
    //Register a native method to place java server messages in the service log.
    // Define the service logger native method.
    JNINativeMethod methods[] = {
    {"addToMessageLog", "(Ljava/lang/String;)V", Java_addToMessageLog}
    // Register the method with the jvm.
    javaEnv->RegisterNatives(javaClass, methods, 1);
         javaEnv->ExceptionClear();     // Just in case not found.
         return TRUE;
    2. You have to define the native method:
    * Native method - callback to place java server messages in the service log.
    JNIEXPORT void JNICALL Server::Java_addToMessageLog(JNIEnv * javaEnv, jclass javaClass, jstring javaMsg) {
         jboolean     isCopy;
         const char* msg = javaEnv->GetStringUTFChars(javaMsg, &isCopy);
         Server::theServer->logger->addToMessageLog((char*)msg);
         if (isCopy)
              javaEnv->ReleaseStringUTFChars(javaMsg, msg);
    3. The real headache is that this is C code, not C++. In other words, if you really need to call into C++, then you need to seed your callback so that it has a pointer to the appropriate C++ object.

  • Calling a Function from another Function within CFC

    Hi all,
    I have many functions in my CFC that do various things, but
    one query is a query that selects absolutely every record from a
    table.
    The thing is, I need to do a query like this in another
    function to obtain only a recordcount of the same table used in
    both separate functions. Instead of writing the query out again,
    how can I utilise the function already written?
    My question is, how can I invoke and use the results of a
    query in one cffunction for another cffunction in the same CFC
    component?
    An example may look like the code attached...
    Many thanks for your patience and help!
    Mikey.

    quote:
    Originally posted by:
    Dan Bracuk
    Generally, to call a function from within a cfc, you do
    exactly what you do outside a cfc.
    For your specific case, if your requirements permit it, you
    might consider caching the big query for a couple of seconds. Then
    you can continously call the function and not have to wait for it
    to run and bring back the data each time.
    Do you mean to say that within a CFC function I can execute
    the same cfinvoke tags I use in normal CFM pages?
    Mikey.

  • How to call java function in javascript

    Hello Everyone,
    Can anyone tell me solution that:
    How to call java function in javascript?
    Thanks,
    VIDs

    You can't since Java is running on the server and javascript is running in the browser long after the Java side of things has finished executing. Assuming you're not talking about an applet here.
    But you can make calls back to the server through Ajax. All you need is something like a servlet on the receiving end which you can invoke through Ajax; from that point you can execute any Java code you want.

Maybe you are looking for

  • How do I pay for items on my wish list?

    I have created a wish list and want to purchase the songs and download them to a cd.  How do I do that?

  • Extended Display Setting Enhancements

    I have a SyncMaster Samsung monitor extending my MacBook Pro. When I enter the system settings, Displays I see that the menu bar and dock can only be on one monitor. In my setup some apps open in my MBP screen while the designs apps on the external m

  • DB Connect after BI 7 Upgrade - can extract but not display table contents

    Hi, After an upgrade from 3.1 non-unicode to BI 7 unicode on Windows OS, SQL Server 2005 DB, the DB Connect connection to another SQL Server 2005 database is still established and passes all checks. We are also able to load data from the datasources

  • Change Excise Invoice no in J1iex Tcode

    Dear Sirs ,                   I have done migo & capture excise invoice no date etc. Now i want to change excise invoice no through J1iex . is it possible. pls giv solution if any. Regards Abhishek Tiwari

  • I live in London Ontario - why does my iPhone think I am in Pennsylvania???

    My 'location services' worked fine yesterday, but today, it seems to think I am in East York Pennsylvania! I have tried to restart the phone, turn off then on all my location services settings, but no go! Im pretty sure im in London Ontario! CANADA!