ADF 11g How to prevent reinvokation method action after error

We have a page with an action binding that is invoked automaticaly on entering the page:
<executables>
<invokeAction id="invokeProcess" Binds="process"/>
If an error (exeption) occurs the invoke action will be called 5 times. This is that our underlying BPEL-Process is also invoked 5 times.
How can we prevent the resubmit after an exception occures?

How are you bringing this up for edit? Via a dialog?
Have you looked at "setCurrentRowWithKeyStr" operation in the page def? Our application uses dialogs for editing one row at a time, when the user clicked on the row via a command link, we call setCurrentRowWithKey to make sure the view object's iterator cursor is at the right location when this record is brought up for edit.

Similar Messages

  • How to Stop the method Action When an Exception Occur in other Method

    Hi All ,
    public void action( Event clientEvent) {
    startAction();
    JOptionPane.showMessageDialog(null, getDocumnetId());
    how to Stop the method action ( "action" ) if an exception occur in the method ("startAction")
    ( if the exception occur we doesn't need to show the JOption Message )

    Hi,
    try FacesContext.getCurrentInstance().renderResponse();
    Frank

  • ORACLE ADF 11g /JSF TO  serviet (Service method) not invoking

    Hi,
    ORACLE ADF 11g /JSF TO serviet (Service method) not invoking
    My project name is : ComplProject
    inside the project im having 1 jsp say x.jsp
    work environment : (oracleADF 11g) jdev11 and weblogic server 10.3
    in x.jsp im displaying 1 go link -> when ever we click on GO link it should go to ComplServlet.java
    i tried like,
    FacesContext.getCurrentInstance().getExternalContext().redirect("/servlet/ComplServlet");
    the "ComplServlet" is an URL pattern in web.xml which points to servlet.
    but not working
    i pointed to faces-config.xml also , not working
    i tried to forward like
    FacesContext context = FacesContext.getCurrentInstance();
    ServletContext sContext = (ServletContext)context.getExternalContext().getContext();
    ServletRequest request = (ServletRequest)context.getExternalContext().getRequest();
    System.out.println("third line...............");
    HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();
    response.sendRedirect("/servlet/ViewDocument");
    sContext.getRequestDispatcher("/servlet/ViewDocument").include(request, response);
    brief
    (from jsf page) after clicking on GO LINK i need to redirect or control should go to servlet ->service method
    thanks in advance
    regards,
    sandeep

    Hi,
    i tried like,
    FacesContext.getCurrentInstance().getExternalContext().redirect("/servlet/ComplServlet");
    the "ComplServlet" is an URL pattern in web.xml which points to servlet.
    but not workingUse like following.
        public HttpServletRequest getServletRequest() {
            return (HttpServletRequest)facesContext.getExternalContext().getRequest();
        public redirect(String url){
           getServletRequest().sendRedirect(getServletRequest().getContextPath() + "/servlet/ComplServlet");
        }If you are using golink as frank suggested then use it like this.
    <af:goLink text="ComplServlet" destination="/servlet/ComplServlet"/>no need of using context when using goLink,
    Regards,
    Santosh.

  • How to map the method action return value directly into screen using variables?

    Hi,
    My JDev version is 11.1.1.6.3.
    I have a 'MethodAction' defined in PageDef file, that goes to model layer and return String value. As this needs to be executed during initializing of pageDef, I have also added an 'InvokeAction' for that.
    <executables>
               <invokeAction id="invokeSayHelloId" Refresh="ifNeeded"
                                    Binds="sayHello"/>
               <variableIterator id="variables">
                    <variable Name="Name" Type="java.lang.String"/>
               </variableIterator>
    </executables>
    <bindings>
              <methodAction id="sayHello" InstanceName="HrAMDataControl.dataProvider"
                                     DataControl="HrAMDataControl" RequiresUpdateModel="true"
                                     Action="invokeMethod" MethodName="sayHello"
                                     IsViewObjectMethod="false"
                                     ReturnName="data.HrAMDataControl.methodResults.sayHello_HrAMDataControl_dataProvider_sayHello_result">
                                        <NamedData NDName="pName" NDValue="Michael John" NDType="java.lang.String"/>
             </methodAction>
    </bindings?
    Requirement:
    I want to map the return value of this method action directly into screen by making use of PageDef variables.
    Question:
    I. I need to know how to map this return value direcly as exprssion against PageDef variable.
    2. If Question 1 is achievable, assuming the method action returls List instead of String (I know well it returns 2 items), can I map the 1st Item against Variable 1 and 2nd Item against Variable 2 directly?
    Thanks in Advance.
    Ragu

    Thanks Frank, but If I directly map the MethodAction's result to UI, there are chances where it might get executed whenever I refresh the UIComponent (UIComponent to which the methodAction result is mapped. Isn't so??). Instead, If I invoke the MethodAction using InvokeAction, I can get the control on when it should get invoked (using RefreshCondition). If I assign the variable to UIComponent (Assume I've mapped the method action result to variable using expression), refreshing of UIComponent will not cause any performance issue I feel.
    Correct me If I am wrong.

  • ADF FACES: how to prevent navigation in the UPDATE_MODEL_VALUES phase

    I have some complex cross-field correlations to verify on data submitted. I can't do this in the PROCESS_VALIDATIONS phase, since all the model values are in consistent at this point depending on which component is being processed.
    So, I'm trying to perform the business logic tests in the UPDATE_MODEL_VALUES phase. This is all working well except for one thing. How do I prevent the view from changing in the case that cross-field issues are detected?
    The scenario is that the user has filled out the form and activates some control that would normally navigate the user away from the current view. I detect an inconsistency and need to place a message in the context and prevent the navigation. This is easy if I do this during the PROCESS_VALIDATIONS phase by just throwing a ValidatorException.
    I just can't figure out how to accomplish this in the UPDATE_MODEL_VALUES phase.
    Any suggestions?

    I spoke too soon. Maybe my case is more subtle. I have a page with a af:showOneTab. In one of the showDetailItems, I have this validation occuring. Thus, when the user clicks on one of the tabs, and the current page has a validation error on it, I want them to stay on the current page.
    Calling renderResponse doesn't seem to prevent the change (although a true ValidatorException thrown during the validation phase does).
    So, I'm still stuck with how to prevent the change in tabs when I detect the error in the UPDATE_MODEL_VALUES phase.
    Thanks.

  • Problem with method action after migrating from TP2 to TP4

    Hi,
    we are migrating our application (ADF Faces, ADF BC) from TP2 to TP4. We have encountered several problems.
    The biggest that we could not solve is as following:
    In our View Object's RowImpl.java classes we have method void refreshLOVAccessorQueries(). In a number of View Objects that method is placed in client interface. In pageDefs of jspx pages that are bound to that View Objects we have method action like
    <methodAction IterBinding="TeeCronTtVOIterator"
    id="refreshLOVAccessorQueriesCron"
    InstanceName="bindings.TeeCronTtVOIterator.currentRow"
    DataControl="TradingAppModuleDataControl"
    RequiresUpdateModel="true" Action="invokeMethod"
    MethodName="refreshLOVAccessorQueries"
    IsViewObjectMethod="false" IsLocalObjectReference="true"/>
    and invoke action like
    <invokeAction id="refreshCronLOVs" Binds="refreshLOVAccessorQueriesCron"
    Refresh="prepareModel"
    RefreshCondition="#{!requestContext.postback and empty bindings.exceptionList}"/>
    When we are accessing such a jspx page the application rases error:
    "Method bindings.TeeCronTtVOIterator.currentRow.refreshLOVAccessorQueries() not supported "
    In TP2 everything worked fine. Now in TP4 for some VO that refresh is OK and for others just mentioned error is thrown. Confusing is that all View Objects and their java classes are created in the same manner and they are almost identical, and this counts for pageDefs too.
    What could be the reason of all this?
    Second thing is that in adfc-config.xml in backing bean defs we have managed-property like:
    <managed-bean>
    <managed-bean-name>regionBacking</managed-bean-name>
    <managed-bean-class>app.view.backing.RegionBacking</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>bindings</property-name>
    <value>#{bindings}</value>
    </managed-property>
    </managed-bean>
    JDeveloper warn us about that with: ' EL token bindings" is unknown '. Why is that? It looks that everything connected with that managed property works fine.
    Another problem is not severe but unpleasant
    After migration to TP4 nothing (not one element) is visible (shown) in the design view.
    The structure of the pages is similar as in the StoreFrontDemo and it shows just fine in TP2.
    Thanks!!!

    Thanks Frank,
    but working from beginning is to much work so, we have solved it in another way.
    Regard to first problem we discovered that it is happening only when there is no Rows in iterator for which we are invoking action. In invoke action we have changed refresh property to default value and the problem is solved.
    Second thing is warning that has no other effect so we will ignore it.
    About third problem, when we create new working copy of application in JDeveloper without system11.1..... directory, JDev works fine and all jspx pages are shown in design view. After some work, due to undiscovered reason design view is lost... What could cause this?
    Maxa

  • How sync  iCal to Google agenda after error (302). Any other app to use while google fix it? (Lion 10.72)

    Hi, how are you syncing  iCal to Google agenda after error (302). Is there any other app to use while google fix it? (Lion 10.72)

    No, it´s not a Lion issue, it is a issue with ical. Google has stopped the hability to erase appointments from ical in order to correct a bug. Meanwhile I´m looking for alternatives to bypass this with another software. Do you have any idea?

  • ADF 11g: How to implement search form with automatic substring search

    We have ADF search form and result table on the same page. Say, VO that this search form is based upon is famous Employee table from HR schema. What we need is a logic when user enters partial employee first name ie: 'jo'...it should return 'john', johnny, joanne etc...
    just like if user would use wildcard %
    What worked in 10g ADF was something like this:
            AccessServiceImpl svc = (AccessServiceImpl)JSFUtils.EL("#{data.AccessService.dataProvider}");
            BirthViewNewImpl b = svc.getBirthViewNew();
            ViewCriteria vc = b.getViewCriteria();
            String staffId = JSFUtils.getFromSession("staffId").toString();
            String studyId = JSFUtils.getFromSession("studyId").toString();
            if (vc != null) {
                System.out.print("BR " + studyId + " " + staffId + " ");
                AttributeDef[] defs = vc.getViewObject().getAttributeDefs();
                Iterator criteriaRows = vc.iterator();
                while (criteriaRows.hasNext()) {
                    ViewCriteriaRow r = (ViewCriteriaRow)criteriaRows.next();
                    if (r != null) {
                        for (int j = 0, numAttrs = defs.length; j < numAttrs; j++) {
                             if (JboTypeMap.isCharType(defs[j].getSQLType())) {
                                 String val = (String)r.getAttribute(j);
                                 String col = defs[j].getColumnName();
                                 if (val != null) {
                                     System.out.print(col + "=" + val + " ");//just to see what is going on
                 System.out.println("");
            b.searchRecords();//method in VO that executes query
             * This is now very wrong.... Very artificial way to eliminate % from the UI
             if (vc != null) {
                 AttributeDef[] defs = vc.getViewObject().getAttributeDefs();
                 Iterator criteriaRows = vc.iterator();
                 while (criteriaRows.hasNext()) {
                     ViewCriteriaRow r = (ViewCriteriaRow)criteriaRows.next();
                     if (r != null) {
                         for (int j = 0, numAttrs = defs.length; j < numAttrs; j++) {
                             if (JboTypeMap.isCharType(defs[j].getSQLType())) {
                                 String val = (String)r.getAttribute(j);
                                 String col = defs[j].getColumnName();
                                 if (val != null) {
                                     val = val.substring(0,val.length()-1);//return to normal
                                       System.out.println("Column: " + col);               
                                       System.out.println("Value: " + val);               
                                       r.setAttribute(j,val);
            return null;The problem is for some reason this does not quite work in 11g.
    What is the best practice to achieve this functionality in 11g?

    Or use a catsearch index or a contains index in your query. The will preform much better for large datasets as it doesn't do a full table scan.
    Google for Oracle Text ( http://www.google.de/search?q=%27oracle+text%27+catsearch&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:de:official&client=firefox-a )
    Timo

  • ADF 11g + How to capture the value of a dynamically created input text box

    Hi All,
    I have a requirement where, on selection of the value in a drop down, the input text boxes need to get dynamically populated on the JSPX page. I'm able to bring this functionality, and it is working fine.
    But the challenge right now I'm facing is that, how to read/capture the value entered in those dynamic text boxes on submission of the page. Please help me in getting this resolved.
    Below is the code snippet I'm using for this.
    // Clearing the existing input fields in the Panel form
    while (pf100.getChildren().iterator().hasNext()) {
    pf100.getChildren().remove(pf100.getChildren().iterator().next());
    // Creating the new fields based on the number of IP addresses selected
    for (int i = 0; i < iIPAddress; i++) {
    RichInputText pcPreferredDomain = new RichInputText();
    pcPreferredDomain.setLabel("Preferred Domain / Hostname for Desktop PC/ Laptop - " +
    (i + 1));
    pcPreferredDomain.setColumns(40);
    pcPreferredDomain.setId("pcpfdomain" + (i + 1));
    pf100.getChildren().add(pcPreferredDomain);
    Thanks All in Advance,
    Thanks & Regards,
    Dharmathej M

    As per your method, you are creating the RichInputText components as local variables.
    What happens when you are creating them as class level variables in the managed bean, if you do so, you can refer to the values of the UI components in the actionListener/action code for the command button in the managed bean
    sample:
    public class ManagedBean{
    RichInputText [] pcPreferredDomain;
    public ManagedBean(){
    // Clearing the existing input fields in the Panel form
    while (pf100.getChildren().iterator().hasNext()) {
    pf100.getChildren().remove(pf100.getChildren().iterator().next());
    pcPreferredDomain = new RichInputText[iIPAddress];
    // Creating the new fields based on the number of IP addresses selected
    for (int i = 0; i < iIPAddress; i++) {
    pcPreferredDomain[i] = new RichInputText();
    pcPreferredDomain.setLabel("Preferred Domain / Hostname for Desktop PC/ Laptop - " +
    (i + 1));
    pcPreferredDomain.setColumns(40);
    pcPreferredDomain.setId("pcpfdomain" + (i + 1));
    pf100.getChildren().add(pcPreferredDomain);
    Thanks,
    Navaneeth

  • ADF 11g How to create the custom FilterableQueryDescriptor for adf table

    Can you please let me know on the following.
    1. I am dispalying the adf table using a List from the managed bean
    2. I wanted to filter the table using the filter model.
    3. i wanted to create the sub class of FilterableQueryDescriptor which i can specify. Not finding enough information on how to create and add the information in the setFilterCriteria
    Can you please provide some insight into this topci

    Hello there
    I have the same issue: chaging the background color of some column headers.
    My application is using a custom skinning and when i had headerClass property with a custom class defined in a separate css file, the page generated specified first the class from the skinning and then my new class definition. But my skinning is specifying a background color so the color is not overriden. Any idea?
    ADF code:
    <link type="text/css" rel="stylesheet" href="../../css/pivot.css" id="myStyles"/>
    <af:column headerText="#{level1.userObject.name}"
    headerClass="inputHeader"
    sortable="false" align="center" width="100"
    id="col_level1" >
    Generate HTML code:
    <th align="center" class="xuh inputHeader" afrroot="true" rowspan="2" afrleaf="true" dindex="6" id="pt1:tableId:col_level1" style="">
    <div class="x13t">AEKLF</div>
    </th>
    My CSS file:
    .inputHeader{
    background-color: Red;
    background-image: none;
    color: Black;
    font-weight: bold;
    Thanks for your help !

  • ADF 11g - How to do save-cascade?

    Hello,
    Suppose that I have entities PurchaseOrder (1) <-> (*) PurchaseItem, how do I create PurchaseOrder and related PurchaseItem in one transaction? (much like cascade=PERSIST in JPA).
    Any examples?
    Thanks before.
    Rgds,
    Rudi

    I know how to make master-detail relation. What I'm asking is how to save the master and the detail in the same database transaction?
    Like, create a new PurchaseOrder, then without persisting the transient PO, directly create some child Items. After that persist them all, in one transaction.
    Rgds,
    Rudi

  • How do I prevent stopping smart actions after updating my Xperia Arc S to ICS?

    The situation is that I've upgraded my Arc S to Android 4, but after that the smart actions does not work while the screen has a pattern lock!
    anyone can help?
    Thank you

    I'm might just sound stupid now but what smart actions are you referring to?
    Please elaborate.
     - Community Manager Sony Xperia Support Forum
    If you're new to our forums make sure that you have read our Discussion guidelines.
    If you want to get in touch with the local support team for your country please visit our contact page.

  • How to prevent accidentially mouse action to stop screensaver

    How can i prevend an accidentially mouse movement, caused by housekeeping, to stop the screensaver. It's for the Mac of my mother who lives in a house for elderly people, and i want to Mac to operate as quite as possible, not attracting to much attention. I use it for iChat with automatic call acception.

    Your right, however when the computer sleeps, iChat logs out. Then I have to use WakeOnLan to wake the Mac, which is not a problem for me, but for the rest of my family.
    I will start experimenting with a black screensaver, with sleeping the screen only, hiding the dock and setting brightness high when a chat is accepted and low when the chat is ended. That must do the trick.

  • ADF 11g + How to wrap the text in a goimagelink

    Hi All,
    I'm displaying some list of goimagelinks, for which the information is being retrieved from the database. Now to align the width in between the imagelinks properly, I need to wrap the text of the go image link. Any suggestions, will help me a lot.
    Thanks All in Advance. Below is the code snippet for the same.
    Thanks & Regards,
    Dharmathej M
    <af:panelFormLayout id="pfl6" rows="3" maxColumns="3"
    labelWidth="30"
    inlineStyle="text-align:justify;">
    <af:iterator id="i6"
    value="#{bindings.LP_Applications1.collectionModel}"
    var="appiter"
    rows="#{bindings.LP_Applications1.rangeSize}">
    <af:goImageLink text="#{appiter.bindings.AppName.inputValue}"
    id="gil2"
    icon="#{appiter.bindings.Icon.inputValue}"
    iconPosition="leading"
    inlineStyle="font-size:small; font-family:Verdana, Arial, Helvetica, sans-serif;"
    destination="#{appiter.bindings.Url.inputValue}"
    shortDesc="#{appiter.bindings.ShortDesc.inputValue}"
    targetFrame="#{appiter.bindings.ExtLink.inputValue == 'T' ? '_blank' : '_self' }"/>
    <af:spacer width="70" height="10"/>
    </af:iterator>
    </af:panelFormLayout>
    ################################################################

    Try the CSS <tt>display</tt> property in combination with some fixed width, for example:
    <af:goImageLink ... inlineStyle="display:inline-block; width:80px;">

  • How to prevent corruption of Photoshop after optimising Mac hard drive?

    I run CS3 on a MacPro, running OS 10.4.11. I defragment files, repair permissions & optimise the hard drive every month or so using TechTool Pro v.5.0.2. Every time, subsequent printing is completely skewed, usually with severe colour shifts. It is independent of the paper used. B&W is not affected. After a lot of sweat, including reinstalling printer drivers, checking my custom profiles, & extended consultation with the printer experts (here in New Zealand)  I have established that CS3 communication with my Epson 3800 is corrupted, by printing using the "Printer manages color" option in the printer driver – no shifts. The only way around that I've been able to find is a complete reinstall of CS3, a pain, to put it mildly. Has anyone else experienced this & been able to prevent it happening?

    Navarro Parker wrote:
    As a side question, does one really need to defragment drives under OS X?
    It depends.
    http://support.apple.com/kb/HT1375?viewlocale=en_US
    Those of us that work with large files can benefit from periodic defragging. OS X auto-defrags files under 20MB. How many of us have all of our files under 20MB?
    Adobe recommends defragging:
    http://kb2.adobe.com/cps/404/kb404895.html
    More discussion with lots of good links for more info:
    http://discussions.apple.com/thread.jspa?messageID=6902358
    I can't comment on TechTool Pro for defragging but I have not heard bad things about 'iDefrag'.
    http://www.coriolis-systems.com/iDefrag.php

Maybe you are looking for