How to get the return value of the method by calling the stored procedure in ApplModuleImpl

Hello

I use Jdev 10.1.3.4
JSF, and ADF business components
I created a service method in the implementing class of module request to execute the strored procedure in the database.
This breeding returns a string value.
now, I slipped the method of service of data control palette on my JSF page and chose ADF parameter form when I droped.
It works very well.
now, I want to display the string returned by the method of service after the execution on the JSF page as global messages.
How can I achieve this.
Help, please

Thanks in advance

Kind regards
Ajit Agarwal

Hello

You must run programmatically run the method binding. If I'm not wrong then the following code will allow you to access the return value

OperationBinding oper = bindings.get("MyPLSQLAccessMethodBinding") (OperationBinding);
String returnValue = oper.execute ((String));

Once you have the string in a managed bean you can add it to the stack of messages JSF exposed by the FacesContext

Frank

Tags: Java

Similar Questions

  • How to show the stored procedure code

    Hello
    How can I get the code for creating a stored procedure using sqlplus instead of sql-developer? I want to get all of the code of the stored procedure. I saw it in writing

    SQL > desc proced_1

    I get the Argument Name, Type and input/output by default of the stored procedure, but if I want to get the code 'create procedure', how can I do?
    Thank you!

    Hai

    Try this

    Select * from user_source where name = 'Procedure_name '.
    online ordering;

    Concerning

    Srikkanth.M

  • How to test the stored procedure in SQL Developer or SQL Plus

    Hello

    It's small, but I am confused. Can someone give me the EXACT command to run to test my stored procedure described below. Please don't refer me to the documentation or offer some sort of pseudocode. I've been through the documentation - and through it again - and I just don't get it. I know that the procedure works in general because I'm calling ColdFusion, but I want to test developer SQL or SQL more before I call my ColdFusion page - it only makes sense. I'm probably not initialize variables right or something - not sure.

    You will see that it is a line right insert in the firstname and lastname data base and there are 2 IN OUT values as well. Please use a fake name for the firstname and lastname values to demonstrate. I appreciate it!

    create or replace
    procedure sp_insertDirector_A)
    vFirstname IN Directors.Firstname%TYPE,
    vLastname IN Directors.Lastname%TYPE,
    vInsertStatus in on NUMBER,
    vNewDirectorID IN OUT NUMBER
    )
    IS
    row_count NUMBER;
    BEGIN
    SELECT Count (*) FROM directors WHERE Lastname vLastname = row_count;
    IF row_count > 0 THEN
    vInsertStatus: = - 1;
    RETURN;
    END IF;

    INSERT INTO administration)
    FirstName, Lastname)
    VALUES)
    vFirstname, vLastname
    );

    SELECT Directors_Seq.CURRVAL INTO vNewDirectorID FROM DUAL;
    vInsertStatus: = 1;
    END;

    If someone can tell me exactly how to test, I'd appreciate it. I asked on another site and got many responses that I tried and did not work due to various errors. Once I get a working example, I'm sure I can get the idea and continue on. I mainly use the SQL Developer.

    Thank you, mallethead

    p.s. I think that my if - THEN followed by the instruction INSERT is fixed - it is woring. Seems a little odd to me however.
    declare
       l_instatus  number;
       l_newdirid  number;
    begin
       sp_insertDirector_A('bob','smith',l_instatus,l_newdirid);
       dbms_output.put_line(l_instatus);
       dbms_output.put_line(l_newdirid);
    end;
    /
    
  • How to get the return value from Java runtime.getRuntime.exec?

    I am running shell from a (GR 11, 2) Oracle database commands on aix.
    But, I would get a return value of a shell comand... as you get with "echo $?"

    I use a code like
    CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS
    import java.io.*;
    public class Host {
      public static int executeCommand(String command) {
        int retval=0;
        try {
            String[] finalCommand;
            finalCommand = new String[3];
            finalCommand[0] = "/bin/sh";
            finalCommand[1] = "-c";
            finalCommand[2] = command;
    
          final Process pr = Runtime.getRuntime().exec(finalCommand);
          pr.waitFor();
    }
       catch (Exception ex) {
          System.out.println(ex.getLocalizedMessage());
          retval=-1;
        }
        return retval;
    };
    /
    but I do not get a return value... because I don't know how to get the return value...

    Published by: user9158455 on 22-Sep-2010 07:33

    Hello

    Your pr.exitValue () has tried?

    I think you also need a finally block that destroys the sub-process

    Concerning
    Peter

  • using PostDelayedCall how to get the value passed through void * callbackData?

    Can someone tell me how to get the data passed through void * callbackData?

    The following code, panel_ptr has the right address but still contains zero.

    void CVICALLBACK value_changed (void * callbackData)
    {
    int * panel_ptr;
     
    panel_ptr = callbackData;
    calculate_new_value (* panel_ptr);
    }

    int sign;

    Panel = 2;

    PostDelayedCall (value_changed & Panel, 0.2);

    The problem is using the callbackData parameter if it is a pointer, it must be a pointer to something which is still topical at the moment that the callback executes. That is to say, you cannot pass the pointer to a local variable in callbackData as when the callback executes the pointer is no longer valid. You can switch from its value, instead, in this way:

    ... SomeFunction)

    {

    int sign;

    ...

    Panel = 2;

    PostDelayedCall (value_changed, (void *) Panel, 0.2);

    ...

    }

    void CVICALLBACK value_changed (void * callbackData)
    {
    int panel_ptr;
     
    panel_ptr = (int) callbackData;

    calculate_new_value (panel_ptr);

    return;
    }

    There are many discussions on the forums on callbackData parameter that you might want to read.

  • get the return value of a method of the application module in the workflow

    Hello

    I use jdeveloper 11.1.1.7.0

    I defined a method (return type is useful java card) in the Module of the Application and add this method to the client interface.

    also I have a workflow and in this TF firstly I should execute this method and put the return value for the pageFlowScope parameter. I know that to use this method as a methodCall and set it as an activity by default, but I don't know how to get the return value before entering the jsff page and set the pageFlowScope parameter.

    Habib

    Concerning

    When you add the activity to the way to deal, there are 'Return value' property that you can set to #{pageFlowScope.yourVariable}

    Dario

  • How to get the 6th element of a C.V. value column

    Hi all

    I use Oracle Business Intelligence 11.1.1.7.131017.

    I have a column with the following formula: C.V. ("Tickets". "Number of tickets"), but since we want to only show the values advocated by the past 6 months and which is an accumulative column, we added the rank function in the filter and placed as: grade (C.V. ("Tickets". " Number of tickets')) < = 6 and for the final formula, we need the minimum value that is placed in 6th place...

    My problem is how to get the value assigned to this position?

    Here's the column values:

    30719 (value I pretend-> min)

    31357

    32025

    32595

    33652

    34616 (I also use this value-> max)

    Any idea on how to get the value placed on tier 6?

    Thanks for the help and have a good week.

    Kind regards

    Frederico.

    I found a solution (poor, but it works)...

    As a minimum I want is always located in the row = 6 I put a case when row = 6, then returns the value I'm pretending, else return 0, so after that I need only the max of all values, as they are 0 or the value that I'm pretending, like this:

    MAX (CASE WHEN (GRADE (C.V. ("Tickets". "Number of tickets')) = 6) THEN of C.V. (FILTER ("Tickets"." Number of tickets' using 'status '. ((("" Resolved "="Resolvido")) END ELSE 0)

    I want to thank you all for the help, normally I post in the forum of the ADF but its good to know I can get a lot of support here as well...

    Many thanks to all,

    Frederico.

  • How to get the value with DBSequence in EL links

    Hello

    I have a DBSequence type id and check if the value is null or positive

    #{bindings. Id.inputValue! = null and links. Id.inputValue > 0? {"Edit": "Create"} does not work because the links. Id.inputValue returns a DBSequence and cannot convert Long

    How to get the value?

    JDev 11.1.1.6

    You can try this:

    #{bindings. Id.inputValue.sequenceNumber.value! = null and links. Id.inputValue.sequenceNumber.value > 0? {'Edit': 'Create'}

    Jean Lou

  • How to get the value of the outputtext in javascript and send it to backing bean

    Hi Experts ADF,

    JDev Version 11.1.1.7.0

    I have the following: the value of the outputtext must be treated in javascript and the serverlistener method has the same value. I founded this value returns a string that wshould see the mouseover NIJ.

    Help, please. Thanks in advance.

    < af:column sortProperty = "#{bindings." OrderProposalReadClient.hints.exceptions.name}.

    filterable = "true" sortable = "true".

    headerText = "#{suiviewBundle.EXCEPTIONS} '"

    ID = "c16" >

    < af:outputText value = "#{row.exceptions}" id = "ot32" clientComponent = "true" > "

    < af:clientListener type = "mouseOver".

    method = "customJsFunction" / >

    < af:serverListener type = "mycustomserverEvent".

    Method="#{pageFlowScope.ChangeOrderProposalBean.handleServerEvent}"/ >

    < / af:outputText >

    < / af:column >

    JavaScript

    < af:resource type = "javascript" >

    var customJsFunction = function (event)

    {

    var exceptiondata = AdfPage.PAGE.findComponentByAbsoluteId ('ot32');

    AdfCustomEvent.queue ();

    Returns true;

    }

    < / af:resource >

    BackingBean

    public String handleServerEvent(EC ClientEvent)

    {

    Please let me know how to get the value that javascript code sends here.

    Let's say javascript sends the value of outputtext as "001".

    So, I have to check "001" in my list and return a value that appears on mouseover.

    }

    Kind regards
    Roy

    Hello, Roy.

    To use the value on another component of the user interface, I shows an example:

    -code of the page

    shortDesc = "shortDesc" >

    method = "customJsFunction" / >


    -the javascript code

    var customJsFunction = function (event)

    {

    var exceptiondata = event.getSource ().findComponent("ot32").getValue ();

    AdfCustomEvent.queue (event.getSource (),

    "mycustomserverEvent,"

    {param1:exceptiondata},

    (true);

    Returns true;

    }

    -OutputTextCase11.java

    public void handleServerEvent (EC ClientEvent)

    {

    String param = (String) ce.getParameters () .get ("param1");

    RichOutputText outputText = (RichOutputText) ce.getComponent () .findComponent ("ot1");

    outputText.setShortDesc (param);

    outputText.setValue (param);

    AdfFacesContext.getCurrentInstance () .addPartialTarget (outputText);

    }

    I hope this helps you.

    RFH.

  • How to get the values of page jspx (view layer) to the custom method defined in AM

    Hello

    I have 1 text field and 1 submit to homepage.jspx. When I click the button submit, it will call the custom method defined in the 'Module of the Application' java class (ApplicationModuleImpl.java). Can I know how to get the value of this text field in this custom method.

    I used the getter and setter method, however it didn't work as it is defining the value correctly, but get method returns null. Its not allowing to use FacesContext. Could someone please tell me how to get the value of the text field to this custom method (that is, using ADFContext,... something like that)

    Thanks in advance

    User,
    you have mixed up something here. Bean (as you did) cannot use the module of the application. They belong to different layers.
    I suggest you to look at some first tutorials (http://docs.oracle.com/cd/E18941_01/tutorials/toc.htm) or watch the developer guide http://docs.oracle.com/cd/E16162_01/web.1112/e16182/toc.htm and take a look at some of the videos http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html

    Timo

  • How to get the value of the VO to the lov controller?

    Hello

    Can I know how to get the values of the View object, then pass in lov controller to execute the query... pls help...

    I tried the below:

    ' Public Sub processRequest (pageContext OAPageContext, OAWebBean webBean)
    {
    super.processRequest (pageContext, webBean);

    OAViewObject vo = (OAViewObject) am.findViewObject ("SeaoeAutoMosSummaryVO1");
    String s_it = (String) vo.getCurrentRow () .getAttribute ("ItemType"); / / If I enable this line, it will return the nullpointerexception error
    OAViewObject itemVO = (OAViewObject) am.findViewObject ("SeaoeAutoMosFIVO1");

    If ("lovValidate". Equals (PageContext.GetParameter (EVENT_PARAM)))
    {
    itemVO.setWhereClause (null);
    System.out.println ("b4 execute111");
    itemVO.setWhereClauseParams (null);
    itemVO.setWhereClauseParam(0,"F");
    itemVO.setWhereClauseParam(1,"OHO");
    itemVO.executeQuery ();
    }

    }

    yuchijoyce wrote:
    Jin

    I wanto add new line, the lov CO will have the value 2 in the base page move to filter the lov...
    the problem, I do face is: failed to get the vo value (new line) in lov CO.

    Try setting the PPR action with this field which will set the value in the session then get session value in the controller of the LOV and put the Original where clause.

    Thank you
    AJ

  • DVT:pivotFilterBar - how to get the selected values of the filter

    Hi all

    I have a question: how to get the selected values from the pivot table filter bar programmatically?

    I tried to use
    pivotTable.getDataModel().getDataAccess().getValueQDR(startRow, startCol, DataAccess.QDR_WITH_PAGE);
    but to the edge of the side DATA INCORRECTESdeclarations page, it seems that it will return the cached values.

    Environment: JDev 11.1.1.3.0 without tasks.

    Thank you
    Miroslaw

    Hello

    You can retrieve the value selected in the PivotFilterBar through the PivotFilterBar model, instead of dataaccess:

    Download the template of the bar pivot filter instance
    QueryDescriptior queryDescriptor = (QueryDescriptor) pivotFilterBar.getValue ();

    retrieve a list of criterion, each of them is used to fill each lov in the pivot filter bar
    ConjunctionCriterion conjunctionCriterion = queryDescriptor.getConjunctionCriterion ();
    List criterionList = conjunctionCriterion.getCriterionList ();
    for (int i = 0; i)<_criterionList.size(); i++)="">
    AttributeCriterion = (AttributeCriterion) criterionList.get (i) criterion.

    _selected is the currently selected value
    Selected object = criterion.getValues () .get (0);

    System.out.println (_selected);
    }

    Hope that helps,
    Chadwick

  • How to get the internal values of Photoshop one ID assigned

    I have difficulties to obtain values for the internal settings.  It's less hard to set, you can use the Listener Script to get the code to use.  Presumably, you use executeActionGet() with an ActionReference.  The problem is to know how to build the ActionReference.  It doesn't seem to be a lot of documentation on that.

    My immediate problem is how to get the parameters of the 3D camera. I know this requires Photoshop Extended, but the principle must be the same.  This code sucessfully defines these parameters:

    < code >

    function setPhotoshopCamera (angleX, angleY, angleZ, posX, posY, posZ) {}
    Camera
    var idGet3DCamera = stringIDToTypeID ("get3DCamera");
    var idSet3DCamera = stringIDToTypeID ("set3DCamera");
    var descCamera = new ActionDescriptor();

    Camera position
    var idKey3DCurrentCameraPosition =
    stringIDToTypeID ("key3DCurrentCameraPosition");
    var descCameraPosition = new ActionDescriptor();

    var idkeythreeDXPos = stringIDToTypeID ("key3DXPos");
    descCameraPosition.putDouble (idkeythreeDXPos, posX);
    var idkeythreeDYPos = stringIDToTypeID ("key3DYPos");
    descCameraPosition.putDouble (idkeythreeDYPos, posY);
    var idkeythreeDZPos = stringIDToTypeID ("key3DZPos");
    descCameraPosition.putDouble (idkeythreeDZPos, posZ);
    var idkeythreeDXAngle = stringIDToTypeID ("key3DXAngle");
    descCameraPosition.putDouble (idkeythreeDXAngle, angleX);
    var idkeythreeDYAngle = stringIDToTypeID ("key3DYAngle");
    descCameraPosition.putDouble (idkeythreeDYAngle, angleY);
    var idkeythreeDZAngle = stringIDToTypeID ("key3DZAngle");
    descCameraPosition.putDouble (idkeythreeDZAngle, angleZ);
    descCamera.putObject (idKey3DCurrentCameraPosition,
    (idKey3DCurrentCameraPosition, descCameraPosition);

    These must be defined in the ActionDescriptor to make it work,

    // , but we do not have them
    var idkeythreeDCurrentFStop = stringIDToTypeID ("key3DCurrentFStop");
    descCamera.putDouble (idkeythreeDCurrentFStop, 0.000000);
    var idkeythreeDCurrentFDist = stringIDToTypeID ("key3DCurrentFDist");
    descCamera.putDouble (idkeythreeDCurrentFDist, 0.500000);
    var idkeythreeDCurrentFocalPointX = stringIDToTypeID ("key3DCurrentFocalPointX");
    descCamera.putDouble (idkeythreeDCurrentFocalPointX, 0.500000);
    var idkeythreeDCurrentFocalPointY = stringIDToTypeID ("key3DCurrentFocalPointY");
    descCamera.putDouble (idkeythreeDCurrentFocalPointY, 0.500000);
    var idkeythreeDCurrentFOV = stringIDToTypeID ("key3DCurrentFOV");
    descCamera.putDouble (idkeythreeDCurrentFOV, 30.000000);
    var idkeythreeDOrthographic = stringIDToTypeID ("key3DOrthographic");
    descCamera.putBoolean (idkeythreeDOrthographic, false);
    var idkeythreeDOrthographicScale = stringIDToTypeID ("key3DOrthographicScale");
    descCamera.putDouble (idkeythreeDOrthographicScale, 6.928203);
    var idkeythreeDViewIndexString = stringIDToTypeID ("key3DViewIndexString");
    descCamera.putString (idkeythreeDViewIndexString, "");
      


    var / / desc = executeAction (idSet3DCamera, descCamera, DialogModes.ALL);
    return of ESCR;
    }

    < code >

    The problem is that it does not work unless you also set the lower elements.  I want to leave what they are currently defined, but I don't know how to get these values.  Apart from that, I'll get the values of position of camera beforehand.  9 ID, string or otherwise, this should be necessary are known from the top.

    I assume you are using something like:

    < code >

    Var ref = new ActionReference();
    ref.putIndex (idkeythreeDCurrentFStop, idkeythreeDCurrentFStop);
    var / / desc = executeActionGet (ref);
    < code >

    However, I was unable to get something to work.  I am not sure

    1. That of the putXXX method to use.
    2. What to use for the desiredClass, which is the first argument.

    Any help would be appreciated.

    That you will get the 3DCurrentCameraPositon

    var ref = new ActionReference();
    ref.putEnumerated( zTID("Lyr "), zTID("Ordn"), zTID("Trgt") );
    var desc = executeActionGet(ref).getObjectValue(stringIDToTypeID('layer3D')).getObjectValue(stringIDToTypeID('key3DState')).getObjectValue(stringIDToTypeID('key3DCurrentCameraPosition'));
    

    Which returns a descriptor with the following keys.

    Key 0 = key3DXPos: DescValueType.DOUBLETYPE
    1 key = key3DYPos: DescValueType.DOUBLETYPE
    2 = key3DZPos key: DescValueType.DOUBLETYPE
    3 = key3DXAngle key: DescValueType.DOUBLETYPE
    Key 4 = key3DYAngle: DescValueType.DOUBLETYPE
    5 = key3DZAngle key: DescValueType.DOUBLETYPE

    At least with my sample 3D layer. I don't really do a lot with the 3D, so there may be other keys.

  • How to get the RGB value of a pixel in a psd document using scripting Photoshop

    Hi, guys!    Does anyone know how to get the RGB value of a pixel in a psd document using scripts in Photoshop?  I myself have missed for a long time and could not resolve. I am very happy to hear your voice as soon as possible!

    Here is an example...

    var originalUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var doc = activeDocument;
    var Colour1 = GetHexColour(eyeDropperRGB(1,doc.height-1));
    var Colour2 = GetHexColour(eyeDropperRGB(20,doc.height-5));
    var Colour3 = GetHexColour(eyeDropperRGB(40,doc.height-14));
    alert("Colour 1 = " +Colour1 + "\rColour 2 = " +Colour2 + "\rColour 3 = " +Colour3);
    var decColour = eyeDropperRGB(40,doc.height-14);
    alert("Red = " +decColour[0] + "\rGreen = " +decColour[1] + "\rBlue = " +decColour[2]);
    app.preferences.rulerUnits = originalUnits;
    function GetHexColour(reqHex){
    var out='';
    for(No in colours = reqHex){
     out = out.concat(zeroPad(d2h(reqHex[No]),2));
     }
    return out;
    };
    function eyeDropperRGB(x,y) {
     var x2 = x + 1;
     var y2 = y + 1;
     var out = new Array(3);
     activeDocument.selection.select([[x,y], [x2,y], [x2,y2], [x, y2]], SelectionType.REPLACE, 0, false);
     for(ch in list = ["Red", "Green", "Blue"]) {
     histogram = activeDocument.channels[list[ch]].histogram;
      for (i = 0; i <= 255; i++) {
       if (histogram[i]) {
        out[ch] = i;
        break;
       }
      }
     }
      return out;
    };
    function d2h(d) {return d.toString(16);}
    function zeroPad(n, s) {
       n = n.toString();
       while (n.length < s)  n = '0' + n;
       return n;
    };
    
  • How to get the RGB color values on the color picker component?

    How to get the RGB color values on the color picker component?

    trace (cp.selectedColor);

    Returns something like:

    16750950

    trace (key2cp.hexValue);

    Returns:

    ff9966

    I'm looking for RGB, for example, 0.5 0.5 0.5, corresponding to a gray color.

    Is there a chance that the RGB settings are hidden somewhere or is there a conversion function at least?

    Thank you.

    If key2cp.hexValue returns a string like 'abcdef', use:

    var s:String = key2cp.hexValue;

    var n: Number = Number("0x"+s);

    var r: Number = n > 16 & 0xff;
    var g:Number = n > 8 & 0xff;
    var b:Number = n & 0xff;

Maybe you are looking for