Commit operation on Programmatic VO

Hi,
I am using a programmatic VO to fetch data from webservice.
Now I need to update the data in the VO through a submit/save button.
I am unable to do so.
I have tried binding the commit operation of corresponsing AM onto the submit button.
Also tried doing the commit operation programmatically using the code:
OperationBinding action = bindingsImpl.getOperationBinding("Commit");
action.execute();
Can you please guide me on how we can update the VO.
Thanks,
Malathy.

Hi,
Yes, we need to commit the data through a call to the webservice method.
But I need to hold the data entered in the form somewhere before I pass the request
to the webservice.
That cache I am trying to do through VO.
But my VO is not based on any EO.Its a programmatic VO.So was wondering
if by any chance we can update the VO.
Thanks,
Malathy.

Similar Messages

  • Error while invoking the commit operation in a data control

    JDeveloper 11.1.2
    When we invoke the commit operation exposed thru the data control, sometimes we get the following error:
    Caused by: java.lang.NullPointerException
    at oracle.jbo.server.DBTransactionImpl.addPendingEvent(DBTransactionImpl.java:5751)
    at oracle.jbo.server.DBTransactionImpl.sendOrQueueEventForSharedTrans(DBTransactionImpl.java:6659)
    at oracle.jbo.server.DBTransactionImpl.fireTransactionStateEvent(DBTransactionImpl.java:6693)
    at oracle.jbo.server.DBTransactionImpl.doAfterCommit(DBTransactionImpl.java:2301)
    at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2159)
    at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2352)
    This issue is intermittent but occurs many times.
    I am NOT able to find any issues with the code.
    Any pointers on resolving the issue.
    Thanks,
    Navaneeth

    My problem is special, we change the AM configuration to EJB (2.1 stateful, let's put performance issue aside) and deploy remotely, however, there's a NullPointerException occurred at the same line number as your case when we change the task flow id of the dynamic region, because the ADF framework always calls Rollback during region refresh, this Rollback cause the NullPointerException. Even if I caught and ignore this error, there will be always a NullPointerException thrown the next time we do any VO attribute update (kind of same as the blog entry described below).
    http://adfbugs.blogspot.com/2011/08/rollback-is-executed-when-region-is.html
    I am not sure if we could benefit from fixing of your SR by Oracle. Please share if you have any hints, thank you!
    Edited by: codeplay on Mar 30, 2012 9:42 AM

  • Help required in commit operation

    hello ,
    i have written on procedure , in Which i am selecting the data from table1 and then insert the data into table 2 and then i am applying a commit.
    the table 1 contains more tha 4 laks(0.4 million) records.
    now i really need your suggection about the commit operation to be takes palce?
    can i perform commit after the insertion of 4 Lc record OR can i perform the commit after every 10,000 insertion of record?
    Thanks in advance for your suggestion. also let me know the reason also.
    thanks,
    prashant

    923315 wrote:
    hello ,
    i have written on procedure , in Which i am selecting the data from table1 and then insert the data into table 2 and then i am applying a commit.
    the table 1 contains more tha 4 laks(0.4 million) records.
    now i really need your suggection about the commit operation to be takes palce?
    can i perform commit after the insertion of 4 Lc record OR can i perform the commit after every 10,000 insertion of record?
    Thanks in advance for your suggestion. also let me know the reason also.
    thanks,
    prashantWhen you say you are doing it in a procedure, are you doing an insert .. select .. from ..
    or are you selecting from your source table in a loop and insert single rows at a time into the target table?

  • Commit operation not enabled after createinsert in detail table

    Hi Everybody,
    After clicking createinsert operation for detail table in master detail, i got unique contraint error from db.after rectifiying the data for newly created row..commit operation not enabled to save the data.
    Please find the code i used in my jsf.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1">
          <af:messages id="m1"/>
          <af:form id="f1">
            <af:panelBox text="PanelBox2" id="pb2">
              <f:facet name="toolbar">
                <af:group id="g2">
                  <af:commandButton actionListener="#{bindings.Delete1.execute}"
                                    text="Delete1"
                                    disabled="#{!bindings.Delete1.enabled}"
                                    id="cb4"/>
                  <af:commandButton
                                    text="CreateInsert1"
                                    disabled="#{!bindings.CreateInsert1.enabled}"
                                    id="cb3"
                                    action="#{backingBeanScope.MyIndustryBean.cb3_action}"/>
                  <af:commandButton actionListener="#{bindings.Commit.execute}"
                                    text="Commit"
                                    disabled="#{!bindings.Commit.enabled}"
                                    id="cb5"/>
                  <af:commandButton actionListener="#{bindings.Rollback.execute}"
                                    text="Rollback"
                                    disabled="#{!bindings.Rollback.enabled}"
                                    immediate="true" id="cb6">
                    <af:resetActionListener/>
                  </af:commandButton>
                </af:group>
              </f:facet>
              <af:table value="#{bindings.IndustryEOView1.collectionModel}"
                        var="row" rows="#{bindings.IndustryEOView1.rangeSize}"
                        emptyText="#{bindings.IndustryEOView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                        fetchSize="#{bindings.IndustryEOView1.rangeSize}"
                        rowBandingInterval="0"
                        filterModel="#{bindings.IndustryEOView1Query.queryDescriptor}"
                        queryListener="#{bindings.IndustryEOView1Query.processQuery}"
                        filterVisible="true" varStatus="vs"
                        selectedRowKeys="#{bindings.IndustryEOView1.collectionModel.selectedRow}"
                        selectionListener="#{bindings.IndustryEOView1.collectionModel.makeCurrent}"
                        rowSelection="single" id="t1" width="448"
                        inlineStyle="height:193px;" partialTriggers="::cb3 ::cb4">
                <af:column sortProperty="IdDesc" filterable="true" sortable="true"
                           headerText="#{bindings.IndustryEOView1.hints.IdDesc.label}"
                           id="c2">
                  <af:inputText value="#{row.bindings.IdDesc.inputValue}"
                                label="#{bindings.IndustryEOView1.hints.IdDesc.label}"
                                required="#{bindings.IndustryEOView1.hints.IdDesc.mandatory}"
                                columns="#{bindings.IndustryEOView1.hints.IdDesc.displayWidth}"
                                maximumLength="#{bindings.IndustryEOView1.hints.IdDesc.precision}"
                                shortDesc="#{bindings.IndustryEOView1.hints.IdDesc.tooltip}"
                                id="it2">
                    <f:validator binding="#{row.bindings.IdDesc.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="IdPlace" filterable="true" sortable="true"
                           headerText="#{bindings.IndustryEOView1.hints.IdPlace.label}"
                           id="c1">
                  <af:inputText value="#{row.bindings.IdPlace.inputValue}"
                                label="#{bindings.IndustryEOView1.hints.IdPlace.label}"
                                required="#{bindings.IndustryEOView1.hints.IdPlace.mandatory}"
                                columns="#{bindings.IndustryEOView1.hints.IdPlace.displayWidth}"
                                maximumLength="#{bindings.IndustryEOView1.hints.IdPlace.precision}"
                                shortDesc="#{bindings.IndustryEOView1.hints.IdPlace.tooltip}"
                                id="it1">
                    <f:validator binding="#{row.bindings.IdPlace.validator}"/>
                  </af:inputText>
                </af:column>
              </af:table>
            </af:panelBox>
            <af:panelBox text="PanelBox1" id="pb1">
              <f:facet name="toolbar">
                <af:group id="g1">
                  <af:commandButton actionListener="#{bindings.Delete.execute}"
                                    text="Delete"
                                    disabled="#{!bindings.Delete.enabled}"
                                    id="cb2"/>
                  <af:commandButton
                                    text="CreateInsert"
                                    disabled="#{!bindings.CreateInsert.enabled}"
                                    id="cb1"
                                    action="#{backingBeanScope.MyIndustryBean.cb1_action}"/>
                  <af:commandButton actionListener="#{bindings.Create.execute}"
                                    text="Create"
                                    disabled="#{!bindings.Create.enabled}"
                                    id="cb7"/>
                </af:group>
              </f:facet>
              <af:table value="#{bindings.IndustryRatinEOView1.collectionModel}"
                        var="row" rows="#{bindings.IndustryRatinEOView1.rangeSize}"
                        emptyText="#{bindings.IndustryRatinEOView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                        fetchSize="#{bindings.IndustryRatinEOView1.rangeSize}"
                        rowBandingInterval="0"
                        filterModel="#{bindings.IndustryRatinEOView1Query.queryDescriptor}"
                        queryListener="#{bindings.IndustryRatinEOView1Query.processQuery}"
                        filterVisible="true" varStatus="vs"
                        selectedRowKeys="#{bindings.IndustryRatinEOView1.collectionModel.selectedRow}"
                        selectionListener="#{bindings.IndustryRatinEOView1.collectionModel.makeCurrent}"
                        rowSelection="single" id="t2"
                        partialTriggers="::t1 ::cb1 ::cb2 ::cb7">
                <af:column sortProperty="RatingId" filterable="true" sortable="true"
                           headerText="#{bindings.IndustryRatinEOView1.hints.RatingId.label}"
                           id="c5">
                  <af:selectOneChoice value="#{row.bindings.RatingId.inputValue}"
                                      label="#{row.bindings.RatingId.label}"
                                      required="#{bindings.IndustryRatinEOView1.hints.RatingId.mandatory}"
                                      shortDesc="#{bindings.IndustryRatinEOView1.hints.RatingId.tooltip}"
                                      id="soc2" autoSubmit="true">
                    <f:selectItems value="#{row.bindings.RatingId.items}" id="si2"/>
                  </af:selectOneChoice>
                </af:column>
                <af:column sortProperty="RatingSubId" filterable="true"
                           sortable="true"
                           headerText="#{bindings.IndustryRatinEOView1.hints.RatingSubId.label}"
                           id="c6" partialTriggers="soc2">
                  <af:selectOneChoice value="#{row.bindings.RatingSubId.inputValue}"
                                      label="#{row.bindings.RatingSubId.label}"
                                      required="#{bindings.IndustryRatinEOView1.hints.RatingSubId.mandatory}"
                                      shortDesc="#{bindings.IndustryRatinEOView1.hints.RatingSubId.tooltip}"
                                      id="soc1" partialTriggers="soc2">
                    <f:selectItems value="#{row.bindings.RatingSubId.items}"
                                   id="si1"/>
                  </af:selectOneChoice>
                </af:column>
                <af:column sortProperty="Place" filterable="true" sortable="true"
                           headerText="#{bindings.IndustryRatinEOView1.hints.Place.label}"
                           id="c4">
                  <af:inputText value="#{row.bindings.Place.inputValue}"
                                label="#{bindings.IndustryRatinEOView1.hints.Place.label}"
                                required="#{bindings.IndustryRatinEOView1.hints.Place.mandatory}"
                                columns="#{bindings.IndustryRatinEOView1.hints.Place.displayWidth}"
                                maximumLength="#{bindings.IndustryRatinEOView1.hints.Place.precision}"
                                shortDesc="#{bindings.IndustryRatinEOView1.hints.Place.tooltip}"
                                id="it3">
                    <f:validator binding="#{row.bindings.Place.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="RatingDesc" filterable="true"
                           sortable="true"
                           headerText="#{bindings.IndustryRatinEOView1.hints.RatingDesc.label}"
                           id="c3">
                  <af:inputText value="#{row.bindings.RatingDesc.inputValue}"
                                label="#{bindings.IndustryRatinEOView1.hints.RatingDesc.label}"
                                required="#{bindings.IndustryRatinEOView1.hints.RatingDesc.mandatory}"
                                columns="#{bindings.IndustryRatinEOView1.hints.RatingDesc.displayWidth}"
                                maximumLength="#{bindings.IndustryRatinEOView1.hints.RatingDesc.precision}"
                                shortDesc="#{bindings.IndustryRatinEOView1.hints.RatingDesc.tooltip}"
                                id="it4">
                    <f:validator binding="#{row.bindings.RatingDesc.validator}"/>
                  </af:inputText>
                </af:column>
              </af:table>
            </af:panelBox>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>

    Hi,
    Need to set partialSubmit true for CreateInsert and partialTrigger attribute for Commit button(Select Createinsert button for partialTrigger )

  • ADF datacontrol Commit operation - commitng only few tables

    Hello Everyone,
    This is my requirement.
    The application has several View-objects each derived from a corresponding single EO/DB TABLE. I mean that there are no joins in the view object query and just one VO-EO/table relationship.In the transaction I'm just INSERTING rows into several view objects.
    All I need is that At the final commit operation, only the few tables should get committed at the DB level and not all the tables.Is there a way to do this and I know that I cannot use the generic COMMIT operation at the data control as it commits rows into all the tables.
    Any help is appreciated.
    Thankyou,
    Sri

    Having view objects that are to commited & not commited in separate AM as suggested by John is the solution.
    But how about this,
    in beforeCommit() method, get handle to the View objects that are not to be commited and get their associated entities and set the row state to "Initialized".
    Setting the row state to "Initialized" would
    You can use the setNewRowState() method to mark the entity as being Initialized, which removes it from the transaction's list of pending changesCheck for same documentation in ADF Developer's guide:
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcvalidation.htm#sthref721
    Thanks,
    Navaneeth

  • Call the database table on commit operation and fetch the rows

    Hi
    I am new to Bpel. I have a task to call the database table on commit operation and fetch the rows and call a webservice iteratively for fetching the data into a file?
    Can anybody help me on this
    Thanks and regards
    Richa

    HI,
    update ZYBKP set MATNR = <b>zcore_2-ZDUMMY</b> where matnr = <b>zcore_2-ZDUMMY</b>.
    update ZY310 set MATNR = zcore_2-ZDUMMY where matnr = zcore_2-ZDUMMY.
    update ZYBCS_LOT set MATNR = zcore_2-ZDUMMY where matnr = zcore_2-ZDUMMY.
    <b>YOU ARE COMPARING SAME MATERIAL AND UPDATING WITH THE SAME..</b> AND ALSO ZCORE_2 IS A DATABASE TABLE AND MAY NOT CONTAIN ANY VALUE AT THAT POINT...
    in these statments you say that
    update table set matnr = 'MATNR' WHERE MATNR = 'MATNR'.
    EVEN THOUGH THIS STATMENT IS EXECUTED THERE WILL NOT BE ANY CHANGE IN THE TABLE...
    Thanks,
    Mahesh

  • Commit Operation in ReturnListener - From a dialog

    Hi,
    I'm using JSF JSP page in ADF framework.
    Here is the page flow
    1st page is selecting a row from emp table(Select and Edit).
    2nd page is to change the attributes of the selected emp row(Save and cancel button are provided).
    3rd page is a new dialog which popups in a new window asking for user confirmation of emp row changes(Yes and No buttons).
    First approach:
    On Clicking Yes in dialog window, it should commit the emp row, and return back to 1st page to see the changes made.
    Not sure, if ADF supports navigation to a different page, rather than previous page.
    Incase i try to redirect to 1st page in the listener, it will openup multiple windows.
    Any ideas as to how to redirect to 1st page from dialog window, without having multiple windows opened up ?
    Second approach:
    I tried to have commit operation done in the return listener of the second page(returnlistener configured for save button)
    Not sure how to make Commit operation available to a particular page.
    Here is the code for the same:
    public void returnFromDialog() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("Commit");
    Commit operation is not available in the second page(Edit page).
    Any ideas as to how to make/bind Commit to a particular page, so that it can accessed using operation binding.
    Regards,
    Arun

    Hi,
    for the commit operation: You can manually add the commit operation to the pageDef files. Just open the pageDef file in the Structure Window and choose Insert into binding --> Action from teh context menu. Then select the commit operation
    Regarding the navigation: You have to first close the dialog before you perform navigation. n JSF navigation can be through the navigation handler
    e.g.
    FacesContext.getCurrentInstance().getApplication().getNavigationHandler().handleNavigation(FacesContext.getCurrentInstance(),null,"outcome_string");
    (where the outcome string is the navigation case of where to go next)
    external context (redirect) or via the ViewRoot that can be accessed from the FacesContext.
    Frank

  • Error on commit operation

    HI all,
    Getting error on table commit operations. 11.6
    PK1 PK2 PK3 ----composite primary key attributes in table
    10 10 1
    10 12 1
    10 10 2
    23 12 1
    23 12 2
    Based on the first and second attributes , pk3 will genrating dynamically and stetting to table attribute .
    If the previous two columns(pk1 and pk2) values are same then the (pk3) will increment by one , plase refer table for info
    Addition of all records will happen in popup-dialog window , upon insertion of new records on table, when user tries to commit the table getting all PK3 values are loosing bcoz iterator executing dynamically
    Please let me know if any ways to achieve above request
    Upon commit ,: eror "Too many object tht matches primary Key [12,10,1]'
    thanks

    I would suggest to use a technical value as key (use a sequence) your current key as alternate key.define a unique constraint in the db which guarantees that the alternate key is unique. Then you can do you calculations without getting the pk violation as three pk it's just a number generated from a sequence.
    This way you can handle your use case a lot easier.
    Timo

  • Commit operations  in pipelined functions

    Hi forum,
    How to manage commit operations (eg: suppose I have 377 million records to load and I want to commit b/w any 1000 rows) fetched based on a pipelined function.How it is possible.?
    Thanks ,
    Aneesh A

    Everything you said is true, except possibly the bit about more undo being used via the
    loop, and from what I've seen of your other posts you may be right about that too.Well more undo is used.
    From the demonstration in the link I posted.
    The PL/SQL loop used 30 times more undo (rollback).
    So you would have to commit at least thirty times over a million rows just to stay at the amount of undo that would have been used overall if no attempt at periodic commits had been made. There is no avoiding using more undo overall.
    I'm all for the fewest commits possible - 1 is best. But its unpleasant to wait hours
    when rollback/undo fill up first for the process to proceed to the error point,
    then double the time for all the data to roll back.
    In situations like this - only - are the periodic commits useful.But without the code to allow intermediate commits the process was 20 times faster, and the rollback was 200 times faster.
    Not coincidentally, sites where periodic commits are needed are often the ones where the
    DBA group can't/won't increase the rollback segments/undo eliminating the best option.Agreed except that they are used as a result but rarely needed.

  • DataControl does not expose a Commit operation

    Hi all,
    I'm using ADF & JDeveloperStudio Edition Version 11.1.1.3.0 PS2.
    I'm trying to insert a new row in my database from an input screen, using a task flow.
    My task flow has:
    - Behaviour -> Transaction set to Always Begin New Transaction: to create a new transaction when the flow starts.
    - method activity to call the Create operation from my DataControl
    - view activity for data-entry screen.
    - view activity for read-only, confirm screen to display the entered data and provide a Confirm button to proceed with inserting the data to the database.
    - return activity: has Behaviour -> End Transaction set to Commit to complete the insertion to the database. NOTE: I did not drag the Commit operation from my DataControl to the command button that navigates to this return activity—I explain below.
    Problem:
    When I hit the Confirm button on the confirm screen I get an HTTP 404 Error (The server has not found anything matching the Request-URI.)
    Nothing displays on either the Messages or Running: IntegragedWebLogicServer; nothing appears in the DefaultServer.log.
    I'm following [this section|http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/web_form.htm#sthref1906] from the Fusion Developer's Guide. I have deviated from the instructions on point 6 ("Because you need to commit the new data, the application needs to execute the commit operation of the data control. To do this, you can add a button that navigates to a return activity that calls the commit operation.") because my DataControl does not have a Commit operation. I suspect this is the cause of my problem.
    My DataControl was generated from a Session Bean, which was created from an Entity EJB, which was in turn generated from my database table (I have SELECT and INSERT grants on the table. All this is correct, I believe.
    I've compared my DataControl to that from JDeveloper's Cue Cards tutorial "Build a Web Application with EJB, JPA and JSF"; that tutorial's DataControl does not have a Commit operation either, but the tutorial does not try to use task flows.
    Any ideas as to why
    - I'm getting the error when I try to navigate from the confirm page to the return activity responsible for committing the insertion to the database?
    - my DataControl does not exhibit a Commit operation?
    Thanks for your help.
    Regards,
    Ken.

    Hi Shay,
    Thanks for response.
    I've tried your suggestion to call the persist... transaction method.
    Here are my steps:
    - Started with a fresh, even simpler task flow with only two activities: a view activity to display an input form, and a method activity to call the persistMyEntity(...) transaction method.
    - Added method activity, and dropped persistMyEntity(...) from my data control onto it. (Data control created from Session Bean.)
    - persistMyEntity(...) takes one parameter, a MyEntity object: I need to identify this parameter object using EL. There is no such object existing in any binding context at this point.
    - Added managed bean, of type MyEntity to the task flow in page flow scope. Updated the EL for the persistMyEntity(...) parameter to refer to this managed bean in page flow scope - *#{pageFlowScope.myEntity}*.
    - Added a view activity to task flow, and created the *.jspx* for it.
    - Dropped input text components onto the page for each of the entity's attributes that I want to persist to the database.
    - Manually bound the value for each input text component to the corresponding attribute in the managed bean - *#{pageFlowScope.myEntity.myAttribute}*
    When I run my task flow, I get following exception: oracle.jbo.NoDefException: JBO-25058: Definition myAttribute of type Attribute is not found in myAttribute.
    I would have thought I could expand the persistMyEntity(...) node within the Data Control panel and drag its parameter onto the screen as an ADF Form, with ADF looking after binding; then drag the persistMyEntity(...) method onto the method activity. My gut tells me I shouldn't have to add a managed bean to the task flow, of type required by the persistMyEntity(...) method, then manually bind it to the input text fields of the screen. It just seems 'wrong'.
    Is my approach incorrect?
    Many thanks,
    Ken.

  • How to execute commit operation from an ADF button?

    Hi,
    I am using Jdeveloper 11.1.1.3.0. I have an application and need to customize the application by adding a form. I added the Form and I need to do a commit when they press the SAVE button in that page. the action listener for that SAVE button invokes a method and I don't want to change that code because it handles lots of other stuffs. I need to add the commit to the SAVE button. Is it possible to call the ${bindings.commit.execute} in the javascript when they press the SAVE button or using any other listener to invoke a method in the backing bean.
    Thanks
    SR

    You can add the binding to the commit operation to your page and then call this from the backing bean where your current save logic exist.
    See: http://blogs.oracle.com/shay/2010/04/doing_two_declarative_operatio.html

  • Oracle ADF - Commit operation issue.

    Hi,
    I am new to Oracle ADF. I am using Oracle jDeveloper 11.1.1.4.0
    and facing problem when I try to save a new record from within application.
    I have called a action on commit button and used auto generated code, here is the it -
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("Commit");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    I read that after execute statement framework calls doDML(int operation, TransactionEvent e) method in EOImpl and there we do insert/update/delete...etc,
    But when I debug my application it doesn't. Please correct me if I am wrong.
    Unable to understand what exactly the problem is?
    Appreciate your help.
    Thanks in advance.
    Madhav.

    Hi,
    Yes, I do have a break point in doDML() of EOImpl.java
    Also I have another break point in bean before it calls the EOImpl's doDML().
    I'll show you the action method in bean which get's call on click of commit button in .jspx,
        public String commitAction() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("Commit");
            Object result = operationBinding.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            return null;
        }In this method I put a break point at
    Object result = operationBinding.execute();from here control doesn't go to EOImpl class.
    Here is the .jspx code for commit button,
    <af:commandButton   text="Commit"
                                    disabled="#{!bindings.Commit.enabled}"
                                    id="cb1"
                                    action="#{CustomerProfileBean.commitAction}"/>Can I use both action and actionListener properties for same command button?
    Is this technically correct?
    Thanks,
    Madhav.
    Edited by: 877436 on Aug 4, 2011 11:49 PM

  • Commit operation button not working

    jdevloper 11.1.2.0
    version 64
    i drag and drop operation commit to my page and
    make disable proporty false
    but commit button just post my new value in page and not commit in database
    and this the code source
    <af:commandButton actionListener="#{bindings.Commit.execute}" text="Commit" id="cb7"
                                                      disabled="false" partialSubmit="true"/>
    and this source for page
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
        <af:document title="doctype.jsf" id="d1">
            <af:messages id="m1"/>
            <af:form id="f1">
                <af:pageTemplate viewId="/myTemplate.jsf" id="pt1">
                    <f:facet name="body">
                        <af:decorativeBox id="db1">
                            <f:facet name="center">
                                <af:table value="#{bindings.DocTypeView1.collectionModel}" var="row"
                                          rows="#{bindings.DocTypeView1.rangeSize}"
                                          emptyText="#{bindings.DocTypeView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                                          fetchSize="#{bindings.DocTypeView1.rangeSize}" rowBandingInterval="0"
                                          filterModel="#{bindings.DocTypeView1Query.queryDescriptor}"
                                          queryListener="#{bindings.DocTypeView1Query.processQuery}" filterVisible="true"
                                          varStatus="vs"
                                          selectedRowKeys="#{bindings.DocTypeView1.collectionModel.selectedRow}"
                                          selectionListener="#{bindings.DocTypeView1.collectionModel.makeCurrent}"
                                          rowSelection="single" id="t1" width="500" columnStretching="last"
                                          displayRow="first" allDetailsEnabled="true"
                                          partialTriggers="::cb1 ::cb2 ::cb3 ::cb4 ::cb5 ::cb6">
                                    <af:column sortProperty="#{bindings.DocTypeView1.hints.TypeId.name}"
                                               sortable="true" headerText="Type Id"
                                               id="c1" align="center">
                                        <af:inputText value="#{row.bindings.TypeId.inputValue}"
                                                      label="#{bindings.DocTypeView1.hints.TypeId.label}"
                                                      required="#{bindings.DocTypeView1.hints.TypeId.mandatory}"
                                                      columns="#{bindings.DocTypeView1.hints.TypeId.displayWidth}"
                                                      maximumLength="#{bindings.DocTypeView1.hints.TypeId.precision}"
                                                      shortDesc="#{bindings.DocTypeView1.hints.TypeId.tooltip}" id="it1">
                                            <f:validator binding="#{row.bindings.TypeId.validator}"/>
                                            <af:convertNumber groupingUsed="false"
                                                              pattern="#{bindings.DocTypeView1.hints.TypeId.format}"/>
                                        </af:inputText>
                                    </af:column>
                                    <af:column sortProperty="#{bindings.DocTypeView1.hints.TypeName.name}"
                                               sortable="true" headerText="Type Name"
                                               id="c2" align="left" rowHeader="false">
                                        <af:inputText value="#{row.bindings.TypeName.inputValue}"
                                                      label="#{bindings.DocTypeView1.hints.TypeName.label}"
                                                      required="#{bindings.DocTypeView1.hints.TypeName.mandatory}"
                                                      columns="#{bindings.DocTypeView1.hints.TypeName.displayWidth}"
                                                      maximumLength="#{bindings.DocTypeView1.hints.TypeName.precision}"
                                                      shortDesc="#{bindings.DocTypeView1.hints.TypeName.tooltip}" id="it2">
                                            <f:validator binding="#{row.bindings.TypeName.validator}"/>
                                        </af:inputText>
                                    </af:column>
                                </af:table>
                            </f:facet>
                            <f:facet name="top">
                                <af:panelGroupLayout layout="horizontal" id="pgl1">
                                    <af:commandButton actionListener="#{bindings.Commit.execute}" text="Commit" id="cb7"
                                                      disabled="false" partialSubmit="true"/>
                                    <af:commandButton actionListener="#{bindings.CreateInsert.execute}" text="CreateInsert"
                                                      disabled="#{!bindings.CreateInsert.enabled}" id="cb5"/>
                                    <af:commandButton actionListener="#{bindings.First.execute}" text="First"
                                                      disabled="#{!bindings.First.enabled}" partialSubmit="true" id="cb1"/>
                                    <af:commandButton actionListener="#{bindings.Previous.execute}" text="Previous"
                                                      disabled="#{!bindings.Previous.enabled}" partialSubmit="true"
                                                      id="cb2"/>
                                    <af:commandButton actionListener="#{bindings.Next.execute}" text="Next"
                                                      disabled="#{!bindings.Next.enabled}" partialSubmit="true" id="cb3"/>
                                    <af:commandButton actionListener="#{bindings.Last.execute}" text="Last"
                                                      disabled="#{!bindings.Last.enabled}" partialSubmit="true" id="cb4"/>
                                    <af:commandButton actionListener="#{bindings.Delete.execute}" text="Delete"
                                                      disabled="#{!bindings.Delete.enabled}" immediate="true" id="cb6"/>
                                </af:panelGroupLayout>
                            </f:facet>
                        </af:decorativeBox>
                    </f:facet>
                </af:pageTemplate>
            </af:form>
        </af:document>
    </f:view>

    see its my code
    i not know java well  its cant defined in variable bc
    and when i put it in above it cant know ValueBinding vb
    package view;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.binding.BindingContainer;
    import oracle.binding.OperationBinding;
    public class messageAfterCommit {
        public messageAfterCommit() {
        public BindingContainer getBindings() {
             return BindingContext.getCurrent().getCurrentBindingsEntry();
        public String msgAction() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("Commit");
            Object result = operationBinding.execute();
            if (!operationBinding.getErrors().isEmpty()) {
               // return null;
       // And here is getBindings() method:
                      FacesContext fc = FacesContext.getCurrentInstance();
                      ValueBinding vb = fc.getApplication().createValueBinding("#{bindings}");
                      DCBindingContainer bc = (DCBindingContainer) vb.getValue(fc);
             return bc;
           // return null;

  • Custom Commit operations in different pages

    Hi,
    I am trying to implement custom DBTransactionImpl class by following the below link -
    http://www.oracle.com/technology/products/jdev/tips/muench/dbtransimpl/index.html
    I achieved the required functionality while working with single Application module.
    But now my issue is -
    I have two modules, two jsp's in both i have commit functionalities. I want to have different implementation for these commits.
    so i created two dbtransactionimpl classes and two transaction factory classes, also mapped configurations to respective impl classes in bc4j.xcfg file.
    But when i am trying to commit, in both pages its using the same transactionimpl class.
    Waiting for some help..
    Thanks
    srikanth

    Thanks to Didier Laurent. I got the solution.
    ref Link : http://blogs.oracle.com/Didier/bc4j/

  • Is it possible to shutdown TestStand LabWindows/CVI operator interface programmatically?

    Hi,
    Like the title says, I'm trying to find a way to shutdown TestStand operator interface automatically after sequence execution is completed.
    Any suggestion is appreciated, thanks in advance.

    Thank you for your reply.
    I did a loop but it wouldn't work :s
    I managed to create an ActiveX button to exit test stand.
    I found an example within the TestStand Course I and II.
    static void ExitApplication(void)
     VBOOL canExitNow;
     TSUI_ApplicationMgrShutdown (AppManagerHandle, &errorInfo,&canExitNow);
     if (canExitNow)
      QuitUserInterface(0);
    // the ApplicationMgr control sends this event when it is ok to exit the application.
    HRESULT CVICALLBACK ApplicationMgr_OnExitApplication(CAObjHandle caServerObjHandle, void *caCallbackData)
     ExitApplication(); 
     return S_OK;
    void CreateTSEngineHandle ()
     GetObjHandleFromActiveXCtrl  (panelHandle, PANEL_APPLICATIONMGR,&AppManagerHandle);
     GetObjHandleFromActiveXCtrl  (panelHandle, PANEL_EXIT,    &AppExit   );
     TSUI__ApplicationMgrEventsRegOnExitApplication (AppManagerHandle, ApplicationMgr_OnExitApplication, NULL, 1, NULL);
     TSUI_ApplicationMgrConnectCommand (AppManagerHandle, &errorInfo, AppExit, TSUIConst_CommandKind_Exit, 0,
                TSUIConst_CommandConnection_NoOptions, NULL);
     TSUI_ApplicationMgrGetEngine (AppManagerHandle, &errorInfo,&EngineHandle);
     TSUI_ApplicationMgrStart     (AppManagerHandle, &errorInfo);
     TS_EngineGetGlobals(EngineHandle,NULL,&Globals);
    This way I click my QuitButton and it calls the the ActiveXExitButton witch calls the ExitApplication function.
    The ApplicationMgr control sends ApplicationMgr_OnExitApplication event when it is ok to exit the application.
    Hope this was clear enough and I hope this may be helpfull for someone else.
    I apreaciate all the help.
    Regards,
    Daniel Coelho
    Daniel Coelho
    VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
    Controlar - Electronica Industrial e Sistemas, Lda

Maybe you are looking for