Calling a C++ MFC dialog from c code

Hi,
I use MFC for the GUI and want to use a dialog class from within the C code. Is that possible? Any comments gratefully appreciated.

You DLL needs:
CWinApp(Ex) derived class and also your CDIalog. The easiest way is creating a MFC DLL using the wizard. You need to Create a MFC DLL (statically or dynamically linked like you want - Not a MFC Extension DLL).
In your  CWinApp class you create a function named i.e. ShowMyDialog. In this function you load the Dialog dynamically using new and you check if the dialog is already existing. Deleting of the diaglg may be done in the destructor.
Than you need a plain "C" export function. Since the Application class has a global variable  like every MFC project has, you can use this global variable to access the CWinApp::ShowMyDialog.
At all it is not that difficuilt. If you have further questions feel free to ask.
Best regards
Bordon
Note: Posted code pieces may not have a good programming style and may not perfect. It is also possible that they do not work in all situations. Code pieces are only indended to explain something particualar.

Similar Messages

  • Call ODBC Data Source Administrator dialog from java code

    Hai all
    Is it possible to call "ODBC Data Source Administrator dialog " using java code.
    Tell me whether it is possible or not?
    If yes then kindly give the code please.

    try{
    Runtime.getRuntime().exec("odbcad32.exe");
    } catch(Exception e){
    e.printStackTrace();
    }or
    try{
    ProcessBuilder pb = new ProcessBuilder("odbcad32.exe");
    pb.start();
    }catch(IOException e){
      ioe.printStackTrace();
    }make sure path variable has %SystemRoot%\system32; value.
    guess both have to work... :)
    NOTE: It is OS Dependent (specially for MS WINDOWS based OS's) & the second method would work for Jdk versions of 5.0 & above..
    Hop this would be of some help :)
    REGARDS,
    RaHuL

  • Calling a native C Library, from C++ code -

    Hi all! please bear with me as i am not sure if my question was specific enough but here goes nothing.
    i have a native function that i set up in Java. i use JNI to create my C header file(stub) . all that is good and well but inside my C++ code i want to be able to call a separate C++ function that calls a separate C DLL(library). it seems to me that java shouldn't care about this but evidently it does. i can give you the code and see what you think instead of me trying to explain it all. I am using Linux and g++.
    my first idea is that somehow java still needs to know about the C DLL but i dont understand why since i am not calling any functions from the C Library from Java, but rather in my C++ code. please look at the code below. thanks!
    //THIS IS THE .java File *********************
    public class HelloWorld
    public native double getPopulation(double w, double x, double y, double z);
    static
       System.loadLibrary("populationLib");
            public static void main(String[] args)
                    HelloWorld hello = new HelloWorld();
                    double value = hello.getPopulation(-89.3, 30.1, -89.6, 30.8);
                    System.out.println("value returned is: " + value);
    }now i perform javac HelloWorld.java which creates HelloWorld.class.
    now i perform javah -jni HelloWorld which creates my HelloWorld.h C stub.
    //THIS IS the HelloWorld.h C Stub*******************
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    #include <shapefil.h>  //*NOTE - i had to add this on my own for the C Library that i want to access
    /* Header for class HelloWorld */
    #ifndef _Included_HelloWorld
    #define _Included_HelloWorld
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class:     HelloWorld
    * Method:    getPopulation
    * Signature: (DDDD)D
    JNIEXPORT jdouble JNICALL Java_HelloWorld_getPopulation
      (JNIEnv *, jobject, jdouble, jdouble, jdouble, jdouble);
    double setPopulation(double, double, double, double); //*NOTE - also i had to add this function because it is the separate C++ function that i mentioned at the beginning. this function will try to call the C library functions from shapefil.h.
    #ifdef __cplusplus
    #endif
    #endif
    //this is HelloWorld.cpp, my C++ code to match the C Stub that was created earlier***********
    #include <iostream>
    #include "HelloWorld.h"
    using namespace std;
    JNIEXPORT double JNICALL Java_HelloWorld_getPopulation(JNIEnv *env, jobject obj, jdouble w, jdouble x,
                                                                                      jdouble y, jdouble z)
      jdouble pop;
      pop = setPopulation(w, x, y, z);
      return (jfloat)pop;
    double setPopulation(double x1, double y1, double x2, double y2)
      SHPHandle mySHPhandle = NULL;
      DBFHandle myDBFhandle = NULL;
      SHPObject *mySHPobject = NULL;
      DBFFieldType stuff;
      int field_count;
      int record_count;
      //**NOTE** - these 4 calls below access the functions in the object file that was created through the shapefile C library
      mySHPhandle = SHPOpen("file1.shp", "rb");
      myDBFhandle = DBFOpen("file2.dbf", "rb");
      field_count = DBFGetFieldCount(myDBFhandle);
      record_count = DBFGetRecordCount(myDBFhandle);
      cout << "in set population: x1: " << x1 << " y1: " << y1 << " x2: " << x2 << " y2: " << y2 << endl;
      return 10.0;
    }now i need to compile and create the shared library for Java to use:
    g++ -shared -I/include files needed -L/library files needed HelloWorld.cpp -o libpopulationLib.so
    file successfully created.
    now i must run Java against it to see if it runs:
    $Java HelloWorld
    Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/user/work/iga/src/population/libpopulationLib.so: /home/user/work/iga/src/population/libpopulationLib.so: undefined symbol: SHPOpen
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1030)
    at HelloWorld.<clinit>(HelloWorld.java:35)
    As you can see it cannot see the function SHPOpen from the external C library i needed to call. I am fairly new to Java and therefore really new to JNI but what surprises me is that Java even cares about or needs to know what i do outside of the original native function that i declared at the beginning.
    In any event, what do i need to do to solve this?
    thanks so much for your time and patience and help in advance..
    Edited by: usmsci on Feb 20, 2008 8:56 AM

    Names a mangled in C++.
    They are not mangled in C.
    You can't mix C and C++ without dealing with that.
    I don't see anything in your code that deals with that.

  • Call COPY FILES window dialog from FORMS 6i

    Hello.
    I'm working with FORMS 6i and I need to make script witch will copy all files from CD to HARD DRIVE ...
    Now I'm using this command to call XCOPY DOS command and this working great...
    Win_Api_Shell.WinExec( 'cmd.exe /c xcopy /y /e '||xcopy_sting, WIN_API.SW_SHOWNORMAL, false );
    BUT....
    I have FROM & TO destinations parameters and I want to use windows copy dialog witch will be opened by button press automaticaly..
    ( I mean on SMALL COPY DIALOG WINDOW when you pressing CTRL+C)
    TNX

    You can use a host command to perform the copy.
    declare
    ls varchar2(299);
    begin
    ls :='copy '|| source dir || destination dir ;
    Host(ls);
    End;
    And you can create 2 text items in the form and use the get_file or win_api_dialog to get the directory name.
    Use it in the above
    Rajesh ALex

  • Calling Windows File Open Dialog from Forms

    Has anyone used the File Open Dialog of MS-Windows from within
    forms? How do you invoke it and how do you pass arguements (in
    and out) to communicate with it?

    GET_FILE_NAME built-in
    Description
    Displays the standard open file dialog box where the user can
    select an existing file or specify a new file.
    Syntax
    FUNCTION GET_FILE_NAME
    (directory_name VARCHAR2,
    file_name VARCHAR2,
    file_filter VARCHAR2,
    message VARCHAR2,
    dialog_type NUMBER,
    select_file BOOLEAN;
    Built-in Type unrestricted function
    Returns VARCHAR2
    Enter Query Mode yes
    Parameters
    directory_name     
    Specifies the name of the directory containing the file you want
    to open. The default value is NULL. If directory_name is NULL,
    subsequent invocations of the dialog may open the last directory
    visited.
    file_name     
    Specifies the name of the file you want to open. The default
    value is NULL.
    file_filter     
    Specifies that only particular files be shown. The default
    value is NULL. File filters take on different forms, and
    currently are ignored on the motif and character mode
    platforms. On Windows, they take the form of Write Files
    (*.WRI)|*.WRI| defaulting to All Files (*.*)|*.*| if NULL.
    On the Macintosh the attribute currently accepts a string such
    as Text.
    message     
    Specifies the type of file that is being selected. The default
    value is NULL.
    dialog_type     
    Specifies the intended dialog to OPEN_FILE or SAVE_FILE. The
    default value is OPEN_FILE.
    select_file     
    Specifies whether the user is selecting files or directories.
    The default value is TRUE. If dialog_type is set to SAVE_FILE,
    select_file is internally set to TRUE.
    ** Built-in: GET_FILE_NAME
    ** Example: Can get an image of type TIFF.
    DECLARE
    filename VARCHAR2(256)
    BEGIN
    filename := GET_FILE_NAME(File_Filter=> 'TIFF Files (*.tif)
    |*.tif|');
    READ_IMAGE_FILE(filename, 'TIFF', 'block5.imagefld);
    END;

  • Java script callback not called from plugin code

    Hi,
    I am having a plugin which works on FF 3.6. I am trying to make it work on FireFox 4/5. My java script callback for resize is getting called only for first time from plugin code and second time onwards its not getting called. We are using Gecko 2.0 plug-in library.
    I found two bugs in Firefox which may cause call to invalid callback.
    https://bugzilla.mozilla.org/show_bug.cgi?id=664682
    https://bugzilla.mozilla.org/show_bug.cgi?id=653083
    I think because of these two bugs my callback is not getting called. Is there any update for FireFox 4/Firefox5 with the fix for above two issues?
    Thanks,
    Rohit

    The first Bug is listed as a duplicate of the 2nd Bug you posted.
    I don't see any information in the Bug report about which version is going to specifically get the patch. Firefox 4 isn't supported any longer, and I can only assume that with an '''''Importance:''''' of '''normal''', that it won't be "pushed" to Firefox 5. AFAIK, with the new Fast Release schedule only security bugs are going create a situation where a '''''dot#''''' release is going to be made, and other Bugs that have been patched might then be included. With the current release schedule it's going to be 6 weeks between versions, vs the previous 12 to 14 months, or so.
    You may want to try a 6.0 beta to see if it is fixed there.

  • How can i call the certificate selection dialog box from source code?

    How can i call the certificate selection dialog box from source code?
    NB: Of course if i have more than one certificate in the Microsoft Keystore 'My'.
    Thank You in advance

    I found an example of the "TestStand UI Expression Control.ctl" and it works just the way I need it. (check the link)
    Proper use of "TestStand UI ExpressionEdit Control" in LabVIEW http://forums.ni.com/ni/board/message?board.id=330&requireLogin=False&thread.id=10609 
    The "Expression Browser Dialog Box Button" F(x) stays disable while editing the VI, however it become available when the VI is called from TestStand.
    Thank you,
    Hecuba
    Mfg. Test Engineer
    Certified LabVIEW Associate Developer

  • How to call a transaction from ABAP code

    Hi everybody,
    How do I run a transaction from my ABAP code?
    For example, through my ABAP code, I want to call the ME24 transaction (Maintain Purchase Order).
    Thanks for the help,
    Roy

    CALL TRANSACTION
    Syntax
    CALL TRANSACTION ta { [AND SKIP FIRST SCREEN]
                        | [USING bdc_tab [bdc_options]] }.
    Extras:
    1. ... AND SKIP FIRST SCREEN
    2. ... USING bdc_tab [bdc_options]
    Effect
    The statement CALL TRANSACTION calls the transaction whose transaction code is contained in data object ta. The data object ta must be of character type and must contain the transaction code in uppercase letters. If the transaction specified in ta cannot be found, an untreatable exception is triggered. The additions suppress the display of the initial screen and allow you to execute the transaction using a batch input session.
    At CALL TRANSACTION the calling program and its data is kept, and after exiting the called transaction, processing is resumed in the calling program after the call.
    When the transaction is called, the ABAP program linked with the transaction code is loaded in a new internal session. The session of the calling program is kept. The called program runs in an SAP LUW of its own.
    If the called transaction is a dialog transaction, after loading the ABAP program the event LOAD-OF-PROGRAM is triggered and the dynpro defined as initial dynpro of the transaction is called. The initial dynpro is the first dynpro of a dynpro sequence. The transaction is finished when the dynpro sequence is ended by encountering the next dynpro with dynpro number 0 or when the program is exited with the LEAVE PROGRAM statement.
    If the called transaction is an OO transaction (as of release 6.10), when loading all programs except class pools the event LOAD-OF-PROGRAM is triggered and then the method linked with the transaction code is called. If the method is an instance method, implicitly an object of the corresponding class is generated and referenced by the runtime environment. The transaction is finished when the method is finished or when the program is exited using the LEAVE PROGRAM statement.
    After the end of the transaction call, program execution of the calling program resumes after the CALL TRANSACTION statement.
    Note
    At the statement CALL TRANSACTION, the authorization of the current user to execute the called transaction is not checked automatically. If the calling program does not execute a check, the called program must check the authorization. To do this, the called program must call function module AUTHORITY_CHECK_TCODE.
    Addition 1
    ... AND SKIP FIRST SCREEN
    Effect
    This addition suppresses the display of a screen of the initial dynpro of a called dialog transaction. The addition AND SKIP FIRST SCREEN suppresses the first screen under these prerequisites:
    For the initial dynpro, in the Screen Painter the own dynpro number must not be specified as the next screen number.
    All mandatory input fields of the initial dynpro must be filled completely and with the correct values by the SPA/GPA parameters
    If these prerequisites are met, that screen of the dynpro is displayed that is specified in the Screen Painter as the next dynpro of the initial dynpro.
    Example
    If the static next dynpro of the initial dynpro of the called dialog transaction FLIGHT_TA is not the initial dynpro itself, its screen is suppressed, because its input fields are filled using the SPA/GPA parameters CAR and CON.
    DATA: carrid TYPE spfli-carrid,
          connid TYPE spfli-connid.
    SET PARAMETER ID: 'CAR' FIELD carrid,
                      'CON' FIELD connid.
    CALL TRANSACTION 'FLIGHT_TA' AND SKIP FIRST SCREEN.
    Addition 2
    ... USING bdc_tab [bdc_options]
    Effect
    Use this addition to pass an internal table bdc_tab of row type BDCDATA from the ABAP Dictionary to a dialog transaction. The additions bdc_options control the batch input processing. When a transaction with addition USING is called, the system field sy-binpt is set to value "X" in the called program - while this transaction is running, no other transaction can be called with this addition.
    The internal table bdc_tab is the program-internal representation of a batch input session and must be filled accordingly. The structure BDCDATA has the components shown in the table below.
    Component Description
    PROGRAM Name of the program of the called transaction
    DYNPRO Number of the dynpro to be processed
    DYNBEGIN Flag for the beginning of a new dynpro (possible values are "X" and " ")
    FNAM Name of a dynpro field to be filled or batch input control statement, for example, to position the cursor
    FVAL Value to be passed to the dynpro field or to the control statement
    Using the internal table bdc_tab, you can provide any number of screens of the called transaction with input and user actions.
    System Fields
    sy-subrc Description
    0 The batch input processing of the called transaction was successful.
    < 1000 Error in the called transaction. If within the transaction a message was sent, you can receive it using the addition MESSAGES.
    1001 Error in batch input processing.
    Note
    Outside of ABAP Objects you can specify the additions AND SKIP FIRST SCREEN and USING together. However, this does not make sense, because the addition AND SKIP FIRST SCREEN is desigend only to fill the mandatory input fields using SPA/GPA parameters, while the batch input table specified with USING controls the entire transaction flow including the display of the screens.
    Example
    Call of the Class Builder (transaction SE24) and display of class CL_SPFLI_PERSISTENT. The internal table bdcdata_tab contains the input for the batch input processing of the first dynpro (1000) of the transaction. Using structure opt, the batch input processing is set to suppress the first screen and to display the next screen in the standard size.
    DATA class_name(30) TYPE c VALUE 'CL_SPFLI_PERSISTENT'.
    DATA: bdcdata_wa  TYPE bdcdata,
          bdcdata_tab TYPE TABLE OF bdcdata.
    DATA opt TYPE ctu_params.
    CLEAR bdcdata_wa.
    bdcdata_wa-program  = 'SAPLSEOD'.
    bdcdata_wa-dynpro   = '1000'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_CURSOR'.
    bdcdata_wa-fval = 'SEOCLASS-CLSNAME'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'SEOCLASS-CLSNAME'.
    bdcdata_wa-fval = class_name.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=CIDI'.
    APPEND bdcdata_wa TO bdcdata_tab.
    opt-dismode = 'E'.
    opt-defsize = 'X'.
    CALL TRANSACTION 'SE24' USING bdcdata_tab OPTIONS FROM opt.

  • How to call a .bat file from java code?

    How to call a .bat file from java code? and how can i pass parameters to that .bat file?
    Thanks in advance

    thanks for ur reply
    but still i am getting the same error.
    I am trying to run a .bat file of together tool, my code looks like below
    import java.lang.Runtime;
    import java.lang.Process;
    import java.io.File;
    class SysCall{
         public static void main(String args[]){
              String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
              //String path="D://Borland//Together6.2//bin//Together.bat ";
              Runtime r= Runtime.getRuntime(); //Declare the system call
              try{
                   System.out.println("Before batch is called");
                   Process p=r.exec(cmd);
                   System.out.println(" Exit value =" + p.exitValue());
                   System.out.println("After batch is called");
              /*can produce errors which must be caught*/
              catch(Exception e) {
                   e.printStackTrace();
                   System.out.println (e.toString());
    I am getting the below exception
    Before batch is called
    java.lang.IllegalThreadStateException: process has not exited
    at java.lang.Win32Process.exitValue(Native Method)
    at SysCall.main(SysCall.java:17)
    java.lang.IllegalThreadStateException: process has not exited

  • How to get exit code from C code when calling java method via JNI?

    Hi, All
    in my project, i need to call a java method from C code using JNI, yet I do
    not know how to
    retrieve the exit code of java program. the java code is like below
    public static void main(....)
    if(error){
    System.exit(-77);// the exit code is -77
    and the JNI c code may like below
    /* Invoke main method. */
        (*env)->CallStaticVoidMethod(env, mainClass, mainID, mainArgs);
    //here I want to retrieve the exit code from java to check if there is an
    error
    any suggestions? thanks

    Hi Liang Zhang,
    In your C code add:
    void (JNICALL y_exit)(jint code) {
    and when you are initialazing JVM options add:
    JavaVMOption options[...];
    options[...].optionString = "exit";
    options[...].extraInfo    = y_exit;
    See http://java.sun.com/j2se/1.3/docs/guide/jni/jni-12.html
    Best regards, Maksim Rashchynski.

  • Calling a javascript function from java code and getting tha value in Java

    Hi,
    I would like to call a Java script function confirmRemove() from Java code upon meeting a condition..
    for example the code snippet is:
    if(true){
    // I want to call js confirmRemove() over here. And get the value of variable "answer" in this if block.
    <html>
    <head>
    <script type="text/javascript">
    function confirmRemove() {
         var answer = confirm("Are you sure you want to Delete?")
    </script>
    </head>
    <body>
    <form>...

    Hi,
    Back in 2003 I have used an Applet which contain java code and this java code was calling the java scripts ( different methods, DHTML etc..)
    There was a component developed by NetScape called JSObject I am not sure it there is other third party component other then the JSObject
    look at this article which shows how (based on JSObject)
    [http://java.sun.com/products/plugin/1.3/docs/jsobject.html|http://java.sun.com/products/plugin/1.3/docs/jsobject.html]
    Regards,
    Alan Meio
    London,UK

  • Calling a Configuration Entry Point from a C# code module

    Hi,
    Is it possible to call a configuration entry point from a C# code module?
    I have a custom process model which creates some configuration entry points.
    One of the entry points, calls a C# method in a code module to display a Startup screen for the operator.
    In an Editor User Interface, I have added a toolbar, now I want to execute the previous entry point initiated from my C# code to get the Startup screen again when a button is clicked on the toolbar.
    Best regards

    Hi James,
    Thanks for your suggestion, but unfortunely the code hangs after executing the entrypoint, if have tried it in two ways, but both have the same result. Do you have any idea how to fix this.
    Trial 1:
      Engine engine = new Engine(); ApplicationMgr applicationMgr = (ApplicationMgr)engine.GetInternalOption(InternalOptions.InternalOption_ApplicationManager);EntryPoints entryPoints = applicationMgr.ConfigurationEntryPoints; int intIndex = 0;foreach (EntryPoint entryPoint in entryPoints) {    switch (entryPoint.Name.ToUpper())    {        case "TOGGLE ONLINE <-> OFFLINE":            object objEditArgs = System.Type.Missing;           entryPoint.Run(objEditArgs); // Application hangs after executing this command, the entrypoint does not execute!             break;        default:            break;     }
         intIndex++;
    Trial 2:
      Engine engine = new Engine(); ApplicationMgr applicationMgr = (ApplicationMgr)engine.GetInternalOption(InternalOptions.InternalOption_ApplicationManager);EntryPoints entryPoints = applicationMgr.ConfigurationEntryPoints; int intIndex = 0;foreach (EntryPoint entryPoint in entryPoints) {    switch (entryPoint.Name.ToUpper())    {
            case "TOGGLE ONLINE <-> OFFLINE":           // Application hangs after executing next command, the entrypoint does not execute!           applicationMgr.GetCommand(CommandKinds.CommandKind_ConfigurationEntryPoints_Set, intIndex).Execute(true);              break;        default:            break;     }
         intIndex++;
    Best regards

  • How to Call Total Amount field from t.code - PC00_M40_ANN in driver program

    Hi,
    There is a standard Transaction for Payroll Annual display - PC00_M40_ANN. From this transaction we can see the Pension Amount month wise and in Totals as well as.
    In my report, we want to call Total Amount (from T.Code PC00_M40_ANN).
    For Ref., I have design a Smartform with its driver program. In driver program i required this Value...
    Plz guide..

    Hi,
        Please check the below code ....
        Declare variables , structures .....
      call function 'CU_READ_RGDIR'
        exporting
          persnr          = pernr-pernr  <--- pass the pernr
        importing
          molga           = w_molga
        tables
          in_rgdir        = itrgdir
        exceptions
          no_record_found = 1
          others          = 2.
      if not w_molga is initial.
        call function 'CD_READ_LAST'
          exporting
            begin_date      = pn-begda
            end_date        = pn-endda
          importing
            out_seqnr       = w_seqnr
          tables
            rgdir           = itrgdir
          exceptions
            no_record_found = 1
            others          = 2.
      endif.
      if itrgdir is initial.
        continue.
      else.
        select single relid from t500l into w_relid where molga = w_molga.
        call function 'PYXX_READ_PAYROLL_RESULT'
          exporting
            clusterid                    = w_relid
            employeenumber               = pernr-pernr
            sequencenumber               = w_seqnr
            read_only_international      = 'X'
          changing
            payroll_result               = itresult
          exceptions
            illegal_isocode_or_clusterid = 1
            error_generating_import      = 2
            import_mismatch_error        = 3
            subpool_dir_full             = 4
            no_read_authority            = 5
            no_record_found              = 6
            versions_do_not_match        = 7
            error_reading_archive        = 8
            error_reading_relid          = 9
            others                       = 10.
    get all the earnings and deductions
        loop at itresult-inter-rt into wa_rt.
          case wa_rt-lgart.
            to get the net pay
            when '/560'.
              wa_pernr-npay = wa_rt-betrg.
              v_npay = wa_rt-betrg.
           endcase.
    endloop.

  • Programatically calling control flows from java code

    Hi all,
    I have a bounded taskFlow that uses pageFragments. This flow is a region in a page(.jspx).
    In my page fragment, I have a inputComboboxListOfValues with a ValueChangeListener code in a java bean.
    I want when a value is changed, to programatically call "controll flow" (this one has: "From Activity Id" -the page fragment with that inputComboboxListOfValues, and "To Activity Id" - the default Activity on this task Flow).
    So when the value change, practically I want to restart the flow programatically and pass the selected value as input parameter.
    Since the inputComboboxListOfValues is not like a button where in the "Action" property you can set the Control Flow and navigate somewhere, the only option I have is to programatically cause navigation from java code (example: the value change listener code).
    Can this be achieved?
    Any advice is helpfull.

    Hi,
    Absolutely, you can do it using the NavigationHandler. Try the following in you value change listener:
    FacesContext context = FacesContext.getcurrentInstance();
    NavigationHandler handler = context.getApplication().getNavigationHandler();
    handler.handleNavigation(context, null, outcome);
    // Render the response after that phase, the button actions should not be called
    context.renderResponse();
    // Add the following line if you want to prevent further value change listeners to be called
    // throw new AbortProcessingException();Regards,
    ~ Simon

  • Calling a PL/SQL from Forte code

    Hi, We are using the Sun UDS 5.1.3
    I need to call directly from the code a PL/SQL stored procedure. It is true that this would defeat the Forte layer purpose but I have a very specific case. Is there an easy way to do so?

    I don't remember how after all these years, but I remember that I made a native Informix call in a special way. So it seems logical that you should be able to do the same for Oracle...
    Scott

Maybe you are looking for

  • How do I add an email for facetime

    I want to give my daughters a different email for her iPod so she can FaceTime and it doesn't come up on my phone. So I set up an email for her and it won't let validate it.  So my question is do I have to make a iTunes account for it to work and if

  • How to Save a File in Oracle Forms 6 ?

    Dear All, I am using Oracle Forms 6. I need to save a file in .lst format. I am using, flnm:=get_file_name('E:\',file_filter=>'Text Files(*.lst|*.lst|'); I f I use this, It prompts me to save the file. I want to save it automatically without asking m

  • Add to my Dropbox button unresponsive

    Whenever you try to add something into the Dropbox account and you click the "add to my Dropbox " button it doesn't do anything

  • Migrate my aplication from JDev10.1.3 to JDev11 and use oraks.jks file

    Hi group, I'm having trouble jdev10.1.3 import of my project to jdev11 because not found any files equivalent to oraks.jks, archiving of privileges for me to sign a webservice, someone has had this problem, and that tag xml, as I could be replacing t

  • Query_Data_Source_Name question

    Dear all, In my form, there is a block 'B_BLOCK' used 'from clause query' method to retrieve data. i.e. Set_Block_Property ('B_BLOCK', Query_Data_Source_Name, v_sql) will be used. In this multi records block, I set the Query Arrary Size = 0, Number o