CreateInsert: table auto refresh, bug or feature?

I noticed something strange.
I have a table that is linked to a domain controller. I also have a button with custom code. In this code, I run the CreateInsert and open a popup.
It works very well.

I noticed that a blank line gets my table as soon as I press the createInsert button, however there are no partialTrigger from my table to the button. Is this a normal behavior or a bug?

This is the code of my table:
<af:table value="#{bindings.User.collectionModel}" var="row"
              rows="#{bindings.User.rangeSize}"
              emptyText="#{bindings.User.viewable ? 'No data to display.' : 'Access Denied.'}"
              fetchSize="#{bindings.User.rangeSize}" rowBandingInterval="0"
              filterModel="#{bindings.UserQuery.queryDescriptor}"
              queryListener="#{bindings.UserQuery.processQuery}"
              filterVisible="true" varStatus="vs"
              selectedRowKeys="#{bindings.User.collectionModel.selectedRow}"
              selectionListener="#{bindings.User.collectionModel.makeCurrent}"
              rowSelection="single" id="t1" width="850px"
              autoHeightRows="10" contentDelivery="immediate">
It's the actionListener for my button:
    public void createUser(ActionEvent e) {
      BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
      OperationBinding createInsert = (OperationBinding) bindings.get("CreateInsert");
      createInsert.execute();
      
      FacesContext facesContext = FacesContext.getCurrentInstance();
      ExtendedRenderKitService service = Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
      service.addScript(facesContext,"AdfPage.PAGE.findComponent('"+popup.getClientId(facesContext) + "').show();");
    }
My button has the partialSubmit = "true" so I don't see why the table is notified and adds the empty line.
I want to just open the popup and show the field in the record.

Published by: Yannick Ongena Sep 23, 2010 10:50

Hi Yannick,

Seems you and debugger do the same popup and Create/Insert button

Edit: Ah, I just noticed that you say that you see the line in the table immediately... not sure that one (I see the line after rejecting the popup). I am downloading of clusters of JDev extensions right now, so I can't test my approach immediately, but I'll do it soon.

Note: I recommend that you use the API server to display the popup rather than injecting JavaScript - see my sample code to this other thread - this method to display a popup is the way documented to do so in an actionlistener.

John

Tags: Java

Similar Questions

  • APEX 4 Auto-refresh in a table

    Hi guys!

    I'm doing my presentation tabular auto refresh every 5 sec. I managed to achieve this for a classic report using

    var must = function() {}

    apex.jQuery('#P105_MISSED_APPTS').trigger ('apexrefresh');

    setTimeout ("has ()", 5000);

    }

    but it does not work for a tabular presentation. I found this http://stackoverflow.com/questions/5583522/apex-tabular-form-automatically-refresh and the solution would be to "select the partial updating of the tabular form '... But I am unable to find this option in the Apex 4.2.3

    No work around for this?

    Thank you very much!

    Mithandir wrote:

    I found this http://stackoverflow.com/questions/5583522/apex-tabular-form-automatically-refresh and the solution would be to "select the partial updating of the tabular form '... But I am unable to find this option in the Apex 4.2.3

    No work around for this?

    go to right click on the region in a table > change attributes report > layout and pagination

    in what allow partial Page Refresh which is fixed to Yes.

    I hope this helps...

    Leave.

  • Auto refresh without pressing on enter

    I want to know if West a way to make an auto refresh for every word typed in the text field...
    Im trying to do a search in a table..., I create a fild of text to search for the name or words typed in the fild... but I have to press ENTER to select... There's a way to Auto search for each word? without pressing on enter or click a button?

    tnks a lot and sry for my English

    Here's an example - its slow as hell because his polling object, but basically, it's just based on the region draw Carl Backstrom demo. It went directly from the Oracle Application Express Pro book.

    http://Apex.Oracle.com/pls/OTN/f?p=20569:1

    Here's the relevant part:
    JS

    
    

    The region where the report has this in the source:


    The textfield object has this part objects the form element:

    onkeyup="AjaxReportRefresh(this);"
    

    Then the report page 14 essentially what the query:

    select object_type, object_name, status
      from all_objects
    where instr(upper(object_name), upper(nvl(:P14_SEARCH, object_name))) > 0 and
    rownum <= 30
    

    Sorry I don't have time to explain it better - but look at the examples from the region, and it of really the same idea, just to extend.

  • How to activate the Explorer to auto-refresh in Windows 7

    I would like to allow Explorer to auto-refresh in Windows 7.

    To my knowledge, auto-refresh depends on the site you visit, not IE itself. You can try to search for AutoRefresher tools/plugins for IE in the web.

  • OAF Page works only with the manuscript of java for the auto refresh

    Hi gurus,

    I have a problem with deployment of the page.

    I created a custom page and I have written a java script to make and auto refresh page.

    Please find the code I wrote to processRequest below

    OABodyBean rtBodyBean;

    rtBodyBean = pageContext.getRootWebBean ((OABodyBean));

    JavaS string = "javascript:setTimeout ('window.location.reload ()', 11000);

    / * This method is called to call java script function each time that for

    * refresh the page every 11 seconds * /.

    rtBodyBean .setOnLoad (javaS);

    When I run the page of Jdeveloper's get updated. but once I've deployed the page, and start it from the applications it is not refreshing.

    I tested the page of mozilla and it works fine but when I run IE it is not refreshing.

    Help, please

    Hi guys the problem is resolved.

    The problem was that I was using the old version of Jdeveloper which created oa_html with the older version files and the internet explore search the latest files from version of.js.

    and the code has been changed as below.

    Create a timer

    OABodyBean bodyBean = pageContext.getRootWebBean ((OABodyBean));

    JavaS string = 'JavaScript:setTimeout('window.location=window.location',11000);';

    bodyBean.setOnLoad (javaS);

    end timer

    OALinkBean linkBean;

    linkBean = (OALinkBean) webBean.findIndexedChildRecursive ("PayslipFile"); / * The ID of the column * /.

    BindValue OADataBoundValueViewObject;

    bindValue = new OADataBoundValueViewObject (linkBean, 'Url'); / * VO attribute * /.

    OALinkBean _temp = linkBean;

    / * - Required placeholder for the url column added by vo Extention *.

    linkBean.setAttributeValue (OALinkBean.DESTINATION_ATTR, bindValue);

    OAApplicationModule am;

    AM = pageContext.getApplicationModule (webBean);

    OAViewObject vo;

    VO = (OAViewObject) am.findViewObject ("ViewPayslipVO1");

    vo.clearCache ();

    vo.executeQuery ();

  • ConditionalIndex: bug or feature?

    Let's imagine that we have ConditionalIndex with filter on the fields X and Y, and this index was built by the extractor, which returns the value of a Z field, so I'm expecting that the behavior is something like this:

    public void onUpdate() {
        if (filter.evaluate(entry)) {
            Object value = extractor.extract(entry);
            index.update(entry.getKey(), value);
        }
    }
    
    public void onInsert() {
         // the same behaviour as for on Update()
    }
    
    

    But in fact index is not updated in the following cases:

    (1) cached entry. Given that the fields X and there are no filter, index will not be updated

    (2) updated entry in the cache (no matter by put () or EntryProcessor). Now X and meeting filter, index BUT will not be updated because the field Z (indexed field) has not been changed

    Is this a bug or feature?

    We use 3.7.1.5 consistency

    Hi Alexey

    I'd say it's a bug. I tested it with the test below which fails to 3.7.1.7 and it looks like it is still divided into 12.1.2.

    import com.tangosol.io.pof.ConfigurablePofContext;
    import com.tangosol.io.pof.annotation.Portable;
    import com.tangosol.io.pof.annotation.PortableProperty;
    import com.tangosol.net.BackingMapManagerContext;
    import com.tangosol.net.cache.BackingMapBinaryEntry;
    import com.tangosol.run.xml.XmlElement;
    import com.tangosol.run.xml.XmlHelper;
    import com.tangosol.util.Binary;
    import com.tangosol.util.ConditionalIndex;
    import com.tangosol.util.ExternalizableHelper;
    import com.tangosol.util.Filter;
    import com.tangosol.util.MapTrigger;
    import com.tangosol.util.extractor.PofExtractor;
    import com.tangosol.util.filter.AndFilter;
    import com.tangosol.util.filter.EqualsFilter;
    import org.junit.Before;
    import org.junit.Test;
    
    import static org.hamcrest.CoreMatchers.is;
    import static org.junit.Assert.assertThat;
    
    public class ConditionalIndexTest {
    
        private ConfigurablePofContext serializer;
    
        @Before
        public void setup() {
            XmlElement pofXML = XmlHelper.loadXml("" +
                    "\n" +
                    "     \n" +
                    "  \n" +
                    "    coherence-pof-config.xml\n" +
                    "    \n" +
                    "      1000\n" +
                    "      " + MyDomainClass.class.getName() + "\n" +
                    "    \n" +
                    "  \n" +
                    "");
    
            serializer = new ConfigurablePofContext(pofXML);
        }
    
        @Test
        public void shouldNotAddNonMatchingEntryOnInsert() throws Exception {
            String key = "Key-1";
            MyDomainClass domainObject = new MyDomainClass("X_1", "Y_1", "Z_1");
            Binary binaryKey = ExternalizableHelper.toBinary(key, serializer);
            Binary binaryValue = ExternalizableHelper.toBinary(domainObject, serializer);
            BinaryEntryStub entry = new BinaryEntryStub(binaryKey, binaryValue, null, null);
    
            Filter filter = new AndFilter(
                    new EqualsFilter(new PofExtractor(String.class, 1), "X_2"),
                    new EqualsFilter(new PofExtractor(String.class, 2), "Y_2")
            );
    
            PofExtractor extractor = new PofExtractor(String.class, 3);
    
            ConditionalIndex index = new ConditionalIndex(filter, extractor, false, null, true, null);
            index.insert(entry);
            assertThat(index.getIndexContents().isEmpty(), is(true));
            assertThat(index.isPartial(), is(true));
        }
    
        @Test
        public void shouldAddMatchingEntryIndexOnUpdateWhenExtractedFieldHasNotChanged() throws Exception {
            String key = "Key-1";
            Binary binaryKey = ExternalizableHelper.toBinary(key, serializer);
    
            MyDomainClass domainObjectOriginal = new MyDomainClass("X_1", "Y_1", "Z_1");
            Binary binaryValueOriginal = ExternalizableHelper.toBinary(domainObjectOriginal, serializer);
            BinaryEntryStub entryInsert = new BinaryEntryStub(binaryKey, binaryValueOriginal, null, null);
    
            MyDomainClass domainObjectUpdate = new MyDomainClass("X_2", "Y_2", "Z_1");
            Binary binaryValueUpdate = ExternalizableHelper.toBinary(domainObjectUpdate, serializer);
            BinaryEntryStub entryUpdate = new BinaryEntryStub(binaryKey, binaryValueUpdate, binaryValueOriginal, null);
    
            Filter filter = new AndFilter(
                    new EqualsFilter(new PofExtractor(String.class, 1), "X_2"),
                    new EqualsFilter(new PofExtractor(String.class, 2), "Y_2")
            );
    
            PofExtractor extractor = new PofExtractor(String.class, 3);
    
            ConditionalIndex index = new ConditionalIndex(filter, extractor, false, null, true, null);
            index.insert(entryInsert);
            index.update(entryUpdate);
    
            assertThat(index.getIndexContents().isEmpty(), is(false));
            assertThat((String) index.get(binaryKey), is("Z_1"));
        }
    
        @Test
        public void shouldAddMatchingEntryIndexOnUpdateWhenExtractedFieldHasChanged() throws Exception {
            String key = "Key-1";
            Binary binaryKey = ExternalizableHelper.toBinary(key, serializer);
    
            MyDomainClass domainObjectOriginal = new MyDomainClass("X_1", "Y_1", "Z_1");
            Binary binaryValueOriginal = ExternalizableHelper.toBinary(domainObjectOriginal, serializer);
            BinaryEntryStub entryInsert = new BinaryEntryStub(binaryKey, binaryValueOriginal, null, null);
    
            MyDomainClass domainObjectUpdate = new MyDomainClass("X_2", "Y_2", "Z_2");
            Binary binaryValueUpdate = ExternalizableHelper.toBinary(domainObjectUpdate, serializer);
            BinaryEntryStub entryUpdate = new BinaryEntryStub(binaryKey, binaryValueUpdate, binaryValueOriginal, null);
    
            Filter filter = new AndFilter(
                    new EqualsFilter(new PofExtractor(String.class, 1), "X_2"),
                    new EqualsFilter(new PofExtractor(String.class, 2), "Y_2")
            );
    
            PofExtractor extractor = new PofExtractor(String.class, 3);
    
            ConditionalIndex index = new ConditionalIndex(filter, extractor, false, null, true, null);
            index.insert(entryInsert);
            index.update(entryUpdate);
    
            assertThat(index.getIndexContents().isEmpty(), is(false));
            assertThat((String) index.get(binaryKey), is("Z_2"));
        }
    
        @Portable
        public static class MyDomainClass {
            @PortableProperty(value = 1)
            private String fieldX;
            @PortableProperty(value = 2)
            private String fieldY;
            @PortableProperty(value = 3)
            private String fieldZ;
    
            public MyDomainClass() {
            }
    
            public MyDomainClass(String fieldX, String fieldY, String fieldZ) {
                this.fieldX = fieldX;
                this.fieldY = fieldY;
                this.fieldZ = fieldZ;
            }
        }
    
        private class BinaryEntryStub extends BackingMapBinaryEntry implements MapTrigger.Entry {
    
            private BinaryEntryStub(Binary binKey, Binary binValue, Binary binValueOrig, BackingMapManagerContext ctx) {
                super(binKey, binValue, binValueOrig, ctx);
            }
    
            @Override
            public boolean isOriginalPresent() {
                return getOriginalBinaryValue() != null;
            }
        }
    
    }
    
    }
    }
    

    JK

  • Bug or feature limitation: cannot pin header on version site telephone

    Hello

    Check out this file. Watch it in phone mode. Listen to samples and note that I can't pin the header/NAV.

    Bug or feature limitation?

    Dropbox - MicrositeRedesign04.muse.zip

    Dave

    Setting to 1 it will scroll the scrolling speed. You want it to be 0, so it does not scroll at all.

  • Auto refresh page by click on checkbox

    Greetings!

    I created checkbox on a regional report and I want to when you click on the check box the page goes to State autorefresh (means page auto refresh after 15 seconds). is it possible to do?

    Please drivers

    Attributes page, Javascript, function and declaration of global variables

    var gtReloadPage;
    

    "autorefresh" dynamic action


    • 2 real actions:

      • Run the PLSQL code

        null;
        

        Page items to submit: P1_CHECK_BOX

      • Fire on loading the page: CHECKED

      • Execute javascript code

        alert('ok - setting timeout');
        gtReloadPage = setTimeout("location.reload(true);",8000);
        

      • Fire on loading the page: CHECKED



    • 2 false actions:

      • Run the PLSQL code

        null;
        

        Page items to submit: P1_CHECK_BOX

      • Fire on loading the page: UNCHECKED

      • Execute javascript code

        clearTimeout(gtReloadPage);
        alert("Timeout has been removed!");
        

      • Fire on loading the page: UNCHECKED


    By checking that its value is stored in session state, so that when the recharge page (which is not a shipment) the check box will be activated. The time-out period is stored in a global variable gtReloadPage.
    When the check box is clear, session state is saved again and the timeout is disabled.

  • Auto refreshing Tree control

    Hello

    I need to reload the tree control every 1 minute.

    Reloading is done using the HttpService result

    Can someone give me a sample code for auto-refresh?

    Timer installation code might look like this (in an init() function):

       import flash.utils.Timer;   import flash.events.TimerEvent;
    
       // create a timer which fires every minute (60 * 1000 ms)   var timer:Timer = new Timer( 60*1000 );
    
       // add a listener to the timer   timer.addEventListener( TimerEvent.TIMER, refreshTree );
    
       // start the timer   timer.start();
    

    Then your method refreshTree() could hit the service to get the new XML.

    Let me know if that helps...

    Ben Edwards

  • Search for the auto refresh view

    Hello

    I need help. I want to be able to search auto-refresh view after 5 minutes keeping the search criteria. Is there a solution for this one?

    Hello

    Make use of component af:poll...

    http://download.Oracle.com/docs/CD/E12839_01/apirefs.1111/e12419/tagdoc/af_poll.html

    Kind regards
    Suganth.G

  • Bugs or features of NoSQL create table

    Hi, I used the runadmin CLI command to create a pattern with several tables and child tables (create table), reflecting our logistics OAGIS model BO.

    The following clothe are bugs in runadmin, I think:

    * children tables have a key with the same name as the name of the key of one of their parents? Why?

    adding a few records (add-registration-field) of the same structure (structure to address typical e.g.a) only works for the first, for example postalAddress. When you add an invoiceAddress of the same type, the error "Unknown Exception: class org.apache.avro.SchemaParseException ' appears at the output. Children tables for that aid works. With the help of several records from a same simple structure works, and I think that the error occurs when the records have a field with the same name as the key of the table.

    * In addition, I miss a feature like - AutoNumber to use keys by default. It is available or planned or displaced in the application layer?

    Hello

    Some good questions.

    | * children tables have a key with the same name as the name of the key of one of their parents? Why?

    As you are suggesting this restriction exists only for the fields that are part of the primary key.  A key field in a child table may have the same name as a key field in the parent.  This restriction makes a number of simpler and more efficient internal implementation details.  Do you have a use case where it is annoying?

    | adding a few records (add-registration-field) of the same structure (structure to address typical e.g.a) only works for the first, for example postalAddress. When you add an invoiceAddress of the same type, the error "Unknown Exception: class org.apache.avro.SchemaParseException ' appears at the output. Children tables for that aid works. With the help of several records from a same simple structure works, and I think that the error occurs when the records have a field with the same name as the key of the table.

    A specific example of this behavior would be helpful.  It may be a bug.

    | * In addition, I miss a feature like - AutoNumber to use keys by default. It is available or planned or displaced in the application layer?

    It is the responsibility of the application.

    Kind regards

    George

  • Auto refreshing display objects when the new line in the table inserted on another computer

    Greetings,

    I'm using an application of ADF JDeveloper 11.1.2.4.0 its been used by 2 separate computers.

    It's the same application, but I shared with security ADF for the person (Secretary) will see the half view of the application

    and the other person (doctor), the other half seen. Basically, I put adf username expression (rendering) for each display mode

    the specific menu, buttons, tabs, etc.

    My problem is, say the Secretary, creates a doctor's appointment, rather than re - run display objects

    every X minutes on the advice of the doctor, is there a way to notify the application that the new data are inserted into the database and must be re/refresh-execute?

    I have about 100 objects from view and I don't want to discount/re-execute all objects from view because I don't know on what table a new record its been inserted.

    Appointment is just one example, there are many paintings that both views are connected to.

    Hello

    Here is the solution to your needs: http://matthiaswessendorf.wordpress.com/2010/01/22/flexible-active-data-service/.

    Instead of the pop-up window in the sample you would be re - run the table of appointment. Now all you need is a mechanism that informs the change, which may be a trigger in the database or application that updates the new appointment

    Frank

  • Partial auto-refresh of an af:table required after a change

    Hi all

    I'm doing a "reset" button in some data that I can change into my project. The problem is, when I enter a value in an inputText field, press my reset button, the display of the label correctly, but the af data: table are updated to an incorrect value. It's as if it were an auto-commit to the database.

    There's my code:

    variables
    private String nameEmp; Save the name in another function
    Private RichInputText nameEmployee;

    the button:
    + < af:commandButton actionListener = "#{EmployeeOperations.resetFields}" +.
    text = "Reset".
    ID = "cb10".
    + Binding = "#{EmployeeOperations.buttonReset}" +.
    + disabled = "true" / > +.

    * Reset earpiece button: *.
    + ' public void resetFields (ActionEvent actionEvent) {+
    + reset(); +
    +}+

    * the function reset: *.
    + ' public void reset() {+
    + nameEmployee.setValue (nameEmp); +
    + AdfFacesContext.getCurrentInstance () .addPartialTarget (nameEmployee); +
    +}+

    * Af: table *.
    + < af:table lines = ' #{bindings. " EmployeeCreation1.rangeSize} ' + '.
    + fetchSize = "#{bindings." EmployeeCreation1.rangeSize} ' + '.
    + emptyText = "#{bindings." EmployeeCreation1.viewable? "{'No data to display.': 'Access Denied.'}". +
    + var = 'row' rowBandingInterval = '0 ' +.
    + value = "#{bindings." EmployeeCreation1.collectionModel} ' + '.
    + selectedRowKeys = ' #{bindings. " EmployeeCreation1.collectionModel.selectedRow} ' + '.
    + rowSelection = "single" id = "t1" +
    ' + partialTriggers =": cb2: cb3: cb5: cb4: cb7: cb8: cb1 +.
    + styleClass = "AFStretchWidth" +.
    + inlineStyle = "height: 120.0px +;
    + selectionListener = "#{EmployeeOperations.selectRow}" +.
    + binding = "#{EmployeeOperations.queryTable}" > +.
    + < af:forEach elements = "#{bindings." EmployeeCreation1.attributeDefs} ' + '.
    + var = 'def' > +.
    + < af:column headerText = "#{bindings." EmployeeCreation1.labels [def.name]} ' + '.
    + sortable = "true" sortProperty = "#{def.name}" +.
    + id = "c1" > +.
    + < af:outputText value = "#{row [def.name]}" id = "ot1" / > + "
    + < / af:column > +.
    + < / af:forEach > +.
    + < / af:table > +.

    There are the complete problem explained in pictures:

    http://S7.PostImage.org/ve4gifv97/Sans_titre.PNG

    If you need more code, I can add a little, I only wrote that I thought essential.

    I use Jdev 11.1.1.6

    Thanks ;)

    Hi, Maxim,.

    You'll have better luck posting in the forum JDeveloper & ADF.

    In any case, I would try to explain what is happening with your code. When the user clicks on the Reset, the current value in the text box becomes defined the variable binding. Your code only resets the value of the text box, but not the value of the binding variable itself. The table gets updated with the current value on the binding variable.

    See if the "" matches your use case. Alternatively, the best way to code this would be to get the current row of the view object and reset the value of the attribute on the VO.

    --
    BK

  • Name of the table (Bug or feature)?

    Hello

    I have a table named containers. I would like to increase the abscissa, if the name does not appear in the

    table. To do this, I use PropertyObject members.

    This works well if you use strings without 2 or more "------" (backslash).

    So what is the reason.

    I used. T4.5 and 4.2

    Concerning

    Jürgen

    The backslashes to escape apply only to string literals in expressions. In all other cases they are not. If you take a string also and try to convert it into a literal string to an expression, you must escape (i.e. all backslashes must be preceded by an another backslash, and all quotes must be preceded by a backslash, and potentially carriage returns and line breaks and tabs must also be escaped). In addition, there is a function in the engine that will do this for you, Engine.Utility.Escape ().

    Hope this helps to clear things up,

    -Doug

  • Clear recent history + cookies clears all cookies, including those on the list of exceptions - bug or feature?

    I have several sites on the list of the persons authorized to keep the cookies always (options, privacy, cookies, exceptions). When I use "clear recent history" and check the cookies, the cookies are deleted, including those on the allowed list. Maybe it's a feature rather than a bug, but I much prefer it if cookies excepted were excluded.

    This is how it works. Using clear recent history clears all specified cookies and does not exclude cookies that have an exception permit. If you want to keep a few cookies then you should avoid using CRH to clear the cookies and delete unwanted cookies in the Cookie Manager or they expire when you close Firefox. In this way you keep the cookies with an exception permit.

Maybe you are looking for

  • Soundtrack of the film only partially downloaded from iTunes.

    I downloaded the movie Deadpool to iTunes and when I watched it, the noise stopped completely around the label of 27 minutes. I went Apple chat and they arranged for me to download the film to new kms without extra charge, but it's the same thing. Th

  • Dirty LCD

    can someone tell me the best way to clean the lcd screen...

  • Equium A110-252 - can I update the graphics card?

    Hello I can't play my new Sims 3 on my Toshiba Satellite A110-252. Went to PC world who told me that I need a new laptop computer because the graphics card I can't deal with my new game and the card is not extensible. Anyon know if this is correct? I

  • Undo the deletion of images?

    I accidentally deleted a large number of photos on my microSD with this phone. These pictures were very, very important to me and I was wondering if there is any way to recover them? One of them will exercise again my wallpaper, which leads me to bel

  • 403 cannot access my professional window xp updates

    I can't get my updates, because when I run the update, it doesn't return 403 no access