Is sql functions or trigger possible for adf button component

while developing project using ADF BC and JSF, is possible to invoke sql functions or trigger for an adf button component. plz reply

For this you define a method in the application module which you expose to the client. Then you can drag this method onto the button. The method is call when you click the button.
Inside the method you can call pl/sql functions. Read chapter "37.5 Invoking Stored Procedures and Functions" here http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcadvgen.htm#sm0297
Timo

Similar Messages

  • How to set the Data Synchronisation mode for ADF BC component?

    Hi All,
    How to set the Data Synchronisation mode for ADF BC component
    Thanks
    Raghavendra

    Can you clarify what you mean by the data synchronization mode?
    If you mean the Sync Mode, then in 10.1.3 you set this property by:
    1. Selecting your DataBindings.cpx file
    2. Expanding the "Data Control Usages" section in the structure window
    3. Selecting the ADFBC-based data control
    4. Setting the "syncMode" property in the property inspector.

  • Failing to create new SQL farm with FSconfig.exe for ADFS federation Services on an Azure SQL

    I'm building ADFS in Azure. My plan is to use the Azure SQL. The problem is that FSconfig seams not to work with Azure SQL. Here's what i did untill now:
    - I followed the documentation and created a new login and user (adfslogin, adfsuser) in a new
    "adfsv21" database. Then i added the user to db_owner role.
    - From c:\windows\adfs i run FSconfig: FSConfig.exe CreateSQLFarm /ServiceAccount mysa /ServiceAccountPassword ******** /SQLConnectionString "database=Adfsv21;server=[azureServer];User Id=mysa;Password=********" /AutoCertRolloverEnabled. I
    tried it with both accounts, mysa and adfsuser with the same poor results.
    The result is: "The following error occurred: The specified service account mysa is not valid.  Specify
    a different service account, and try again."
    - I configured odbc and tested the connection. mysa can connect but adfsuser caanot. Why?
    To be short, its not working. See this post with similar problems: google to "SQL server farm configuration error"...
    So, is Azure SQL & ADFS not complatible? Really not?

    My apologies for take a super long time to reply.  Are you still having issues here?  How can we help?
    Thanks Guy

  • What is the recommended way to get a java.sql.Connection to the DB  for ADF

    How do I create a standalone database connection based on the datasource setup in ADF?
    I have seen code like this in a method of AppModuleImpl.java but that seems a bit of a hack.
    Connection conn = this.getDBTransaction().createStatement(0).getConnection();
    What I need is a java.sql.Connection to the database used in the application module so I can call PL/SQL code and or work with AQ queues.
    I would prefer a separate connection from the one used by the ADF model so it can have its own transaction control etc.
    But I would like to get the connection created authenticated based on regular datasource setup.

    http://www.oracle.com/webfolder/technetwork/jdeveloper/howto/11114/managedserver/wlsadfms.html#8c
    https://blogs.oracle.com/jdevotnharvest/entry/accessing_weblogic_jdbc_datasource_from

  • SQL functions extract and XMLSequence for a one-to-many (1:N) relationship

    I have have the following XML document loaded into a XMLType table. I'd like to retrieve the lineitem id together with the purchaseorder id and report id. How would the query look like? I've tried a lot but this one-to-many relationship is killing me.
    Many thanks!
    <report id=...>
    <purchaseorder id=...>
    <lineitems>
    <lineitem id=...>...</lineitem>
    <lineitem id=...>...</lineitem>
    <lineitem id=...>...</lineitem>
    </lineitems>
    </purchaseorder>
    <purchaseorder id=...>
    <lineitems>
    <lineitem id=...>...</lineitem>
    </lineitems>
    </purchaseorder>

    You can easily modify the above query to your needs:
    SQL> with qry as (
      2  select t.column_value.extract('/report/@id') report_id,
      3         t.column_value.extract('/report/purchaseorder') purchaseorder,
      4         t.column_value.extract('/report/purchaseorder/lineitems/*') lineitems
      5  from table(xmlsequence(xmltype('<document>
      6                                    <chapter>
      7                                      <report id="1">
      8                                        <purchaseorder id="1">
      9                                          <lineitems>
    10                                            <lineitem id="1">Item 11</lineitem>
    11                                            <lineitem id="2">Item 12</lineitem>
    12                                            <lineitem id="3">Item 13</lineitem>
    13                                          </lineitems>
    14                                        </purchaseorder>
    15                                        <purchaseorder id="2">
    16                                          <lineitems>
    17                                            <lineitem id="1">Item 21</lineitem>
    18                                          </lineitems>
    19                                        </purchaseorder>
    20                                      </report>
    21                                      <report id="2">
    22                                        <purchaseorder id="1">
    23                                          <lineitems>
    24                                            <lineitem id="1">Item 31</lineitem>
    25                                            <lineitem id="2">Item 32</lineitem>
    26                                          </lineitems>
    27                                        </purchaseorder>
    28                                        <purchaseorder id="2">
    29                                          <lineitems>
    30                                            <lineitem id="1">Item 41</lineitem>
    31                                            <lineitem id="2">Item 42</lineitem>
    32                                          </lineitems>
    33                                        </purchaseorder>
    34                                      </report>
    35                                    </chapter>
    36                                  </document>'
    37  ).extract('/document/chapter/*'))) t)
    38  select q.report_id,
    39         q1.column_value.extract('/purchaseorder/@id') purchase_id,
    40         q2.column_value.extract('/lineitem/@id') lineitem_id,
    41         q2.column_value.extract('/lineitem/text()') lineitem
    42  from qry q,
    43       table(xmlsequence(q.purchaseorder)) q1,
    44       table(xmlsequence(q1.extract('/purchaseorder/lineitems/*'))) q2
    45  /
    REPORT_ID  PURCHASE_ID     LINEITEM_ID     LINEITEM
    1          1               1               Item 11
    1          1               2               Item 12
    1          1               3               Item 13
    1          2               1               Item 21
    2          1               1               Item 31
    2          1               2               Item 32
    2          2               1               Item 41
    2          2               2               Item 42
    8 rows selected.
    SQL>

  • Calling action listener for a BUTTON component in java bean page

    Hi,
    I have made it like this.
    public void handleButtonPressed(ActionEvent event){
    System.out.println("success!!!!!");
    //code for calling actionlistener
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    Application application = fctx.getApplication();
    ExpressionFactory exprFactory = application.getExpressionFactory();
    MethodExpression methodExpr = null;
    methodExpr = exprFactory.createMethodExpression(elctx, "#{exbean.handleButtonPressed}",null,new Class[] { ActionEvent.class });
    MethodExpressionActionListener actionListener = null;
    actionListener = new MethodExpressionActionListener(methodExpr);
    button.addActionListener(actionListener);
    Even after making the listener Function as Void wHen i click the button i m getting the error saying."ARGUMENTS MISMATCH,ADF_FACES60097"??
    can you help me out?
    and in the msg log i m getting this
    "SkinFactoryImpl> <getSkin> Cannot find a skin that matches family portal and version v1.1. We will use the skin portal.desktop.
    <MethodExpressionActionListener> <processAction> Received 'javax.el.PropertyNotFoundException' when invoking action listener '#{exbean.handleButtonPressed}' for component 'null'
    <MethodExpressionActionListener> <processAction> javax.el.PropertyNotFoundException: Target Unreachable, identifier 'custombean' resolved to null"
    I Have tried with this giving Void TYPE as an argument
    methodExpr = exprFactory.createMethodExpression(elctx, "#{exbean.handleButtonPressed},Void.TYPE,new Class[] { ActionEvent.class });
    I M getting the same error.
    Edited by: chaya on Dec 22, 2011 2:47 PM

    yeah but i m creating button itself dynamically by java code....
    //code
    UIComponent button;
    button = findComponentInRoot("cb1");
    RichPanelGroupLayout pgl;
    pgl = (RichPanelGroupLayout)button.getParent();
    List<UIComponent> children;
    children = pgl.getChildren();
    RichPanelGroupLayout pgll;
    pgll = new RichPanelGroupLayout();
    RichInputText it;
    it = new RichInputText();
    it.setLabel("New textbox " + (children.size()));
    RichCommandButton but = new RichCommandButton();
    but.setPartialSubmit(true);
    but.setText("Delete");
    /*calling actionevent*/
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    Application application = fctx.getApplication();
    ExpressionFactory exprFactory = application.getExpressionFactory();
    MethodExpression methodExpr = null;
    methodExpr = exprFactory.createMethodExpression( elctx,"#{inbean.actionPerformed}",null, new Class[] {ActionEvent.class});
    MethodExpressionActionListener actionListener = null;
    actionListener = new MethodExpressionActionListener(methodExpr);
    but.addActionListener(actionListener);
    /*end of call*/
    children.add(pgll);
    children.add(it);
    children.add(but);
    AdfFacesContext.getCurrentInstance().addPartialTarget(pgl);
    //code to call method
    public void actionPerformed(ActionEvent event) {
    System.out.println("entered sec bean");
    return " ";}
    this way i m trying to create a button programatically and tryin to add actionlistener which is not working.
    the actionlistener is throwing error.... with the line
    methodExpr = exprFactory.createMethodExpression( elctx,"#{inbean.actionPerformed}",null, new Class[] {ActionEvent.class});

  • SQL function extract

    Hello XML Guru,
    Could you tell me where i can find informations about how SQL function extract works for extracting XML data stored as relational-object?
    Is VIEW always created for extracting XML data when executing this SQL function extract?
    Thanks for your help.

    You'll find documentation on this function in the [Oracle XML DB Developer's Guide| http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb03usg.htm#sthref336] .
    HTH
    Chris

  • Programmtically Setting View Criteria in ADF Query Component

    I have created two view criterias for a View Object and used ADF Query component for searching. User can select any one of the View Criteria from "saved search" in ADF Query component. but i want to set it programmatically based on some business rules. How i can do that?

    No I don't want to set view criteria on search click. Actually I have ADF Query component on my page which is by default disabled. There are also some fields outside the query component on the value of which i enable ADF Query component and wants to set a particular ViewCriteria based on context. All ViewCriterias are defined and listed in "saved search" of ADF Query component but i don't want to allow user to select it but wants to application set it automatically based on context. For it i will be needed to set a particualar ViewCriteria for ADF Query component through code and then refresh ADF Query component to show newly set ViewCriteria. I know how to refresh query component or any other component through code but don't know how to set ViewCriteria on ADF Query component?

  • For each row of a table call a pl/sql function

    Hi,
    i have a search form in adf like this:
    parameter1:___
    parameter2:____
    buttonSearch
    Table with results
    field1 field2 field3
    row1 ------ --------- -------
    row2 ------ --------- -------
    row3 ------ --------- -------
    The user inputs the parameters 1 and 2 then press buttonSearch and the query execute and returns rows 1 to 3.
    What i need is for each row call pl/sql function and passed the parameter 1 and 2 and field 1 to 3 (plsql function recives 5 parameters (parameter1, parameter2, field1 , field2 and field3) )
    my buttonSearch call a java class that execute ExecuteWithParamters method.
    I create the call to my plsql function on Application module class and then export as a java interface.
    So i have the function to use in the viewcontroller layer, but i don't know where to use it, and how to pass the paramters: the parameter 1 and 2 that user inputs and the row fields.....
    any ideas....
    thanks!!

    Hi,
    for this you need to call the PLSQL function upon table rendering, which means that you need a field in the table referencing a managed bean. In the managed bean you can use #{row} and resolve it using a ValueExpression. #{row} gives you access to the current rendered row (this is why you need to do it when the table renders) and thus allows you to call getAttribute(name) to get the values of field 1 - 3. The search field value you should get through the bindings reference (assuming the search form uses ADF). Then you create an operation binding for the executeWithParameters and call operationBindingName.getParamsMap().put(argname, argvalue); on it.
    Frank
    Ps.: I am concerned about the performance you get and wonder if it isn't possible to create a transient attribute that executes the function and displays the results. As I understand, the search parameters are only to filter the result set, which you still can do

  • Is it possible to retrieve RAD's extended variables with a pl/sql function?

    Good morning everyone,
    We have our forms and reports(10g) application, SSO enabled and we are using OID on 10g app server. some of our users use smart card to log in to the system and some who do not have smart cards provide their database userid, password and SID.
    In the case of users who login with smart card, as a one time effort, they have to register their smart card. At that point OID presents a form prompting for their username, password, sid and then a RAD record is created for that particular user.
    And from then on when the user enters the system using his smart card(12345@mil), forms servlet, does the look up of dbusername,dbpswd,sid which belong to the 12345@mil and user's database credentials are passed to the application. The entire application logic is based on that userid which is also an internal userid in the application. Everything is working fine.
    I have read the documentation and found that 12345@mil is stored in the "cn" parameter and the orclownerguid and orclusernameattribute are stored under "cn"=extended properties in the oid. I am able to see this from the oid console.
    But now I need some help. If I only know the id of the user as "12345@mil" , is it possible to manually query the RAD and retrieve the orclusername from a pl/sql function?
    Any help is greatly appreciated.
    Regards,
    Suma.

    Please can anyone help me????
    Regards,
    Suma.

  • SQLJ : sending refcursors via out parameters of PL/SQL functions possible ?

    Hello,
    in SQLJ it's possible to get a refcursor back from a PL/SQL
    function via
    the return value(the usual case in the online examples).
    Is it also possible to give a refcursor back via an out
    parameter
    so that the return value could be used for others ways ?
    SQLJ generation in JDeveloper handles the first way, but we
    didn't
    get it to work with the out parameter.
    Thank you for your help.

    It's certainly possible to have a stored procedure with an OUT parameter that is a REF CURSOR and use that to return data to JDBC. That's actually the most common way that JDBC programmers get ResultSets from stored procedures. I would have to assume that SQLJ would facilitate that?
    Is there a reason that you're looking to use a stored function rather than a stored procedure? The latter seems like a much more logical construct when you have OUT parameters. I've never seen a stored function that was defined with any OUT parameters.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com

  • How does one access custom function in OBIEE RPD for Session Init Block SQL

    Hello:
    We are using SSO for authentication and authorization for OBIEE, using Init Blocks in the RPD and httpHeader as the source of variables in the Instanceconfig.xml file. (As long as the user is member of one group, the results are fine. However, as soon as the user is assigned to multiple groups, group values become URI-encoded.)
    To solve the problem of URI-encoding, we have deployed a function to the DB (ora 10gr2).
    The problem I am running into is that when I call the function from an Init Block (Security), OBIEE Presentation Services (OPS) acts as though the function does not exist or is not called.
    Initialization String: select group_OBIEE(WEBGROUPS) from dual
    ("group_OBIEE" is the function that was deployed.)
    Testing: Successfully tested the function in PL/SQL as well as using the Test button in RPD.
    Reason for the fuction: The function decodes the extra characters using a substr function. SSO uses Shibboleth for Authentication and Authorization.
    For example, for our group name, we expect to obtain the following value:
    edw:hrdir;edw:findir (2 groups separated by a semi-colon)
    However, we are obtaining the following: (Determined via the narrative view in Answers: @{biServer.variables['NQ_SESSION.GROUP']} )
    URI-ENCODED&lt;edw%3ahrdir%3bedw%3bfindir&gt;
    Please note: There are no such problems when we are passing only a single group value (i.e. edw:hrdir). So, in cases when we pass only for Group for the user, we are able to authenticate and authorize w/o a problem.
    Any suggestion on how to call the function or a better way to approach this problem?
    Thanks in advance for your help.

    You don't need a function to assign the groups in your Init Block. In fact you should not use it. You need to use a standard select and define the Init Block as Row-Wise. This means the BI Server knows the Init Block will return more than one row. You select statement should look like this:
    SELECT 'GROUP', YOUR_GROUP_NAME FROM YOUR GROUP_USERS_TABLE WHERE YOUR_USER_ID_COLUMN = ':USER'

  • XMLType schema detail lost in pl/sql function for a jdeveloper webservice

    If I write a very simple pl/sql procedure to wrap as a web service to return the XML from an XMLtype table column, the jdeveloper (11.1.1.3) web service generation process seems to ignore the detail
    of the registered XMLTypes' schema, and converts the 'output' to an xsd:string in the generated WSDL file, which has knock on effect that generated data controls are 'dumb' in only seeing output as a string, and providing no real data functionality at XML schema level. Since I know web service data controls work fine when provided with the correct level of detail in the WSDL, what am I missing in terms of pursuading jdeveloper to generate wsdl's with full xsd schema info for the return XMLType?
    This is my table:
    ID NOT NULL NUMBER(12)
    SPEC SYS.XMLTYPE(XMLSchema "http:
    //localhost:8080/public/demo
    /xsd/sample2.xsd" Element "b
    ooks") STORAGE BINARY
    PRD_ID NOT NULL NUMBER(10)
    ISSUE NOT NULL NUMBER(6)
    EDIT_NO NOT NULL NUMBER(6)
    PUBLISHED_BY_PEO_ID NUMBER(10)
    PUBLISHED_ON_DT DATE
    EFFECTIVE_FROM_DT NOT NULL DATE
    EFFECTIVE_TO_DT DATE
    =======================================================
    This is the XML Schema:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="urn:books"
    xmlns:bks="urn:books">
    <xsd:element name="books" type="bks:BooksForm"/>
    <xsd:complexType name="BooksForm">
    <xsd:sequence>
    <xsd:element name="book"
    type="bks:BookForm"
    minOccurs="0"
    maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="BookForm">
    <xsd:sequence>
    <xsd:element name="author" type="xsd:string"/>
    <xsd:element name="title" type="xsd:string"/>
    <xsd:element name="genre" type="xsd:string"/>
    <xsd:element name="price" type="xsd:float" />
    <xsd:element name="pub_date" type="xsd:date" />
    <xsd:element name="review" type="xsd:string"/>
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:string"/>
    </xsd:complexType>
    </xsd:schema>
    =================================================
    This is the pl/sql:
    function GetSpecificationById (p_spec_id in NUMBER) return XMLType
    IS
    l_specification sys.XMLType;
    BEGIN
    select specification
    into l_specification
    from specifications
    where id = p_spec_id;
    return l_specification;
    EXCEPTION
    WHEN OTHERS THEN -- handles all other errors
    ROLLBACK;
    END GetSpecificationById;
    ==============================================
    And this is the generated WSDL:
    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions
    name="MyWebService1"
    targetNamespace="http://devsafetrytrailcom/MyWebService1.wsdl"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://devsafetrytrailcom/MyWebService1.wsdl"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    >
    <wsdl:types>
    </wsdl:types>
    <wsdl:message name="MyWebService1_getspecificationbyid">
    <wsdl:part name="pSpecId" type="xsd:decimal"/>
    </wsdl:message>
    <wsdl:message name="MyWebService1_getspecificationbyidResponse">
    *<wsdl:part name="result" type="xsd:string"/>*
    </wsdl:message>
    <wsdl:portType name="MyWebService1">
    <wsdl:operation name="getspecificationbyid" parameterOrder="pSpecId">
    <wsdl:input message="tns:MyWebService1_getspecificationbyid"/>
    <wsdl:output message="tns:MyWebService1_getspecificationbyidResponse"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="MyWebService1" type="tns:MyWebService1">
    <soap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getspecificationbyid">
    <soap:operation soapAction="http://devsafetrytrailcom/MyWebService1.wsdl/getspecificationbyid"/>
    <wsdl:input>
    <soap:body use="literal"
    namespace="http://devsafetrytrailcom/MyWebService1.wsdl"
    parts="pSpecId"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"
    namespace="http://devsafetrytrailcom/MyWebService1.wsdl"
    parts="result"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="MyWebService1">
    <wsdl:port name="MyWebService1Port" binding="tns:MyWebService1">
    <soap:address location="http://localhost:7101/SafetyTrail-Model-context-root/MyWebService1Port"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    Edited by: user592403 on Jul 26, 2010 9:57 AM

    Anyone seen this problem before??

  • Calling PL/SQL Functions And Open Oracle Reports From ADF Application

    Hi all,
    My company will convert some projects from Oracle forms to Oracle ADF so, we need to call the PL/SQL functions and open the Oracle Reports (which are already exist) from ADF Application.
    Thank You..
    Jack.N

    Hi Jack.N,
    calling PL/SQL Functions -----> http://sameh-nassar.blogspot.com/2010/01/create-plsql-function-and-call-it-from.html
    Open Oracle Reports ---------> http://radio-weblogs.com/0137094/2008/06/15.html
    You will find The Integration between ADF and other systems in ---> http://wiki.oracle.com/page/ADF+Integration
    Sameh Nassar

  • Using pl/sql functions for transformation

    How can I use pl/sql functions in the transformation mapping field for my interface?
    I have a name field where firstname and lastname are concatenated via a space-character and I would like to extract this 'name' field to 2 separate database attributes.
    This means that I need to use a function that uses SUBSTRING and INSTR to be able to get the firstname and lastname separatly out of the name-field.
    The INSTR-function isn't known inside the expression editor in ODI so I'm wondering how I can use my own function?

    Hi Romanna,
    Are you sure? Where did you do your transformation?
    -Source, Staging area or Target
    I try this on Oracle target...
    FIRST_NAME = substr(MYTABLE.FIRST_LASTNAME, 1, instr(MYTABLE.FIRST_LASTNAME, ' ')-1)
    LAST_NAME = substr(MYTABLE.FIRST_LASTNAME,instr(MYTABLE.FIRST_LASTNAME, ' ')+1)

Maybe you are looking for

  • MSI - KT3 Ultra-ARU Raid + XP

    Hi, I have just built a new system using the MSI - KT3 Ultra-ARU motherboard and am having issues instaling Windows XP professional. The system has been set with 2 Maxtor HD on Raid 0 Stipping. On installing Windows XP and Raid Driver 2.0 that comes

  • Animated GIF--Quality and File Size

    I'm having a hard time getting a quality image and a decent file size. Even if I save animated GIFs and open with PE an try to resave them, the motion is choppy and the file size is more than double the original. For example, the following image is l

  • Condition type in sales order - enhance extractor

    Can anyone help me in enhancing field condition type for sale flow. I need to filter sales orders with condition type 'minimum order surcharge' in BI. There is KONP table having condition type field. Do I need to enhance VAHDR or VAITM. Please help.

  • Changing file associations doesn't work after CS4 install

    I am running into an issue on any machine I install CS4 on in which I would like (for the time being) to keep CS2 or CS3 on whereby the Open with in get info always defaults to the particular CS4 app, no matter if I set it to CS2/CS3 and hit change a

  • 10.5.7 Faster and 10.5.8 Even Faster!

    I have to say that upgrading my really old first gen PowerMac G5 (dual 2.0GHz, June 2003 model) to 10.5.7 brought a real jump in interface speed. 10.5.8 is even better! I said when 10.5.7 came out that it was like getting a new faster Mac for free. W