Understand the iterator binding relationship of the current page

Dear all

in my quest to understand the behavior of the ADF framework, I sometimes do some experimentation. When a result is unlike what I think, it suggests that there is something wrong with the understanding

I belong to those who can not work if I do not receive an overview comprehesive of what I am working with (ADF)

Here's a simple experiment that I could use some help to understand

I created a simple application based on ADF BC and JSF (10.1.2)

The model is simple EO based on the EMP table and updatable VO based on the entity

I slipped and fell to the control of data collection in a page as a Table with record selector

I created a button with the following code

Public Sub commandButton_action(ActionEvent a)
{
Am is AppModule_rs (AppModule_rs) ADFFacesHelper.getAppplicationModule ("AppModule_rsDataControl");. / / This just a helper class to get AM name DC
ViewObject vo1 = am.findViewObject("EmpView1");
VO1. Next();
VO1. Next();
System.out.println (VO1. GetCurrentRow(). GetAttribute ("empno")); -Read the valur of the iterator of VO
DCIteratorBinding bd = ADFFacesHelper.getIteratorBinding ("EmpView1Iterator");
System.out.println (BD. GetCurrentRow(). GetAttribute ("empno")); -Read the value of the iterator binding
}

Just simple code for in-house advance lines of two pointer line and then see how this is reflected in the page. This test is just for me to understand how the iterator binding refers to the actual set of rows.

Scenario (1)

-Run the page, the first line on the page is selected - planned, VO rowselector points on the first line
-Click on the commandbutton control, the code above is executed
-the rowselector forward twice and should point to the third row on VO
-on the page of the third row must be selected
RESULT: Match perfect and both command Print print the same value
-Press and hold the control button, line guard page selector advances two lines at a time... which is good

Scenario (2)

-Run the page, the first line on the page is selected - planned, VO rowselector points on the first line
-use the mouse and select the fourth row on the screen (not pressed) - VO is always level 1, screen on set, iterator binding binds to the rowset VO is always the first row referenes
-Press the button
-the page maintains its fourth selected line, while the System.out.println (vo1.getCurrentRow ().getAttribute("Empno")); prints the 7521 value which is the third - row
-I don't feel happy, the current iterator of VO is on the third row, visually, it's fourth, which means that the selection of the user on the Web page did not consider. And this goes against my intiution


-Press again, I find that line of page selector is the sixth line (4 + 2), therefore the iterator to all VO lines (synchornized times)

Scenario (3)

Run the page, the first line on the page is selected - planned, VO rowselector points on the first line
-use the mouse and select the fourth row on the screen (not pressed) - VO is always level 1, screen on set, iterator binding binds to the rowset VO is always the first row referenes
-Press the button SUBMIT - 4th place is always selected as expected
-Now press the order button, you will see that line on the screen selector forward two rows and print indicates that the VO has also progressed to the same value
-Se TRANSLATE only after pressing send, the frame cought his breath and synchronized things

Coming background FORMS, things of this nature never would have happened with Disk Manager.

I tried to project what has happened to the lifecycle ADF to try to understand how the interaction of the user affects the selection of lines, but was unable to reach a unified solution. What follows as an attempt for scenario (2)

The user moves the selection to the fourth line
The command button is pressed.
Life cycle JSF begins with the RESTORATION of the VIEW.
Apply request values (I guess the lines selection made by the user to become an integral part of request values?)
Prepare the model (this is a post (postback), property of refreshment has ifNeeded, Binidng is created again and VO is always first in the poinitng)
Validation process (no validation as no data entry)
Model update (don't know if at this point the update of the line VO iterator? if so it should point to the fourth line)-doesn't seem to be the case
Invoke the application, the listener of the action is executed and the VO is forced to move twice under the command button code
Prepare the Render: it is a step where the link needs to be updated and reflect the currernt VO (rank 6) line
Render: The page where the sixth line is selected

where I am wrong! appreciate your comments

It's what makes the difficult framework, if it is not clearly documented so the flow is very well understood by developers in one day, the developer must spend days and days debugging problems. This sure beats the idea of using frames to increase productivity

I have

Quick question - is the button that you add code to the same area (the "select and" area) as the button submit table?
I'm guessing that it isn't and that the explanation is that just by clicking on a specific record in the table is not actually indicate to the controller layer is a selected line.
The Send button did this update.
One solution might be to set the autosubmit to the selected component to be true.

Tags: Java

Similar Questions

  • How can I add reload the current Page in the toolbar Firefox 9?

    Once I have use customize toolbar, reload the current Page is not an option. I got this feature in previous versions of Firefox, and on another computer where Firefox has been updated to 9 the rest feature but I can't understand how to add to this new computer.

    Firefox 4 and later versions use a combined Stop/Reload/Go button that is placed at the right end of the address bar.

    During the process of loading page it shows as a stop button and once the charging button is replaced by a reload button.

    If you type in the address bar this button would then become a button go.

    Click the Reload button to duplicate the current tab in a new tab.

  • Get the index of the current page?

    Hello, I can't understand, how to get the index of the current Page in a document. I can't use "activePage.name" as the name cannot show the actual number of the current page. In the forums, I found the following function for javascripts indexOf() function.

    If (!.) Array.prototype.indexOf) {}

    Array.prototype.indexOf = function (searchElement / *, fromIndex * /) {}

    "use strict";

    If (this == null) {}

    throw new TypeError();

    }

    var t = Object (this);

    var len = Extremity > > > 0;

    If (len = 0) {}

    Returns - 1;

    }

    var n = 0;

    If (arguments.length > 0) {}

    n = Number (arguments [1]);

    If (n! = n) {/ / shortcut to check if it is NaN}

    n = 0;

    } Else if (n! = 0 & & n! = Infinity & & n! = - infinite) {}

    n = (n > 0 |-1) * Math.floor (Math.abs (n));

    }

    }

    If (n > = len) {}

    Returns - 1;

    }

    var k = n > = 0? n: Math.max (len - Math.abs (n), 0);

    for (; k < len; k ++) {}

    If (k t & & t [k] = searchElement) {}

    return k;

    }

    }

    Returns - 1;

    }

    }

    With that, I then wrote the following code:

    myDocument var = app.activeDocument;

    myPages var = myDocument.pages;

    var number = myPages.indexOf(myDocument.layoutWindows[0].activePage);

    Unfortunately, it does not work. When I warn "myPages" I can see, I get the pages object. I know somehow get just the array with the values of the present?

    Thank you in advance! Appreciate any help!

    app.activeWindow [0].activePage.documentOffset

    Of course, documentOffset, no index. Thank you for noticing.

  • Need a way to clear a form on the current page and not the entire form...

    IM new to Adobe Acrobat and worked on the conversion of some of our OmnForm 5.0 form PDF file, I've created a form that contains a button to clear the form.  It works very well!  Now, I created a template in the PDF of the current page and then created a button to spawn a new page of the model.  Creating the page works as well.  The only problem I have is that the clear form button clears the entire form.  I need the key to erase only the current page.

    I'm a relative newbie when it comes to script.  I can understand generally simple scripts when I see them, but to create new groupings still isn't my forte. HE's researching the resetForm method, but it seems that there is no option to move the current page to him? (As I said I am relatively new to java scripts).  If anyone has the directions on how to do it I would be very happy.

    You can use the code that I posted here: http://forums.adobe.com/message/4234483

  • JavaScript Cancel... stay on the current page.

    Hi all..

    Please help with this question.
    I have a page where there are 2 buttons, I don't want users
    leaving the page by clicking one of the links of the breadcrumbs or tabs.
    I want to show a confirmation message.

    I created a dynamic action with an event "' Unload' ' with the following code
    var req = $v('p_request');
    if (req == 'CANCEL' || req == 'GET_NEXT_DOC_ID')
      {
       alert('ok');
      }
    else
      {
    
       var r=confirm("Are you sure you want to navigate away from this page?");
        if (r==true)
        {
        // They need to go the page that they clicked
        }
       else
        {
        // They need to stay on the current page.
         }
    
      }
    Please let me know, how can I do this.

    Thank you

    Kumar,

    Unfortunately, the unload event means the page closes and there is nothing you can do to change that. However, there is a beforeunload event that allows you to order or not actually leaving the page. In order to use it you need to change your action Dynamics event page load and bind the beforeunload event to the window yourself. Also, in the other post I was referring to obtain the request on behalf of the entry and not the ID. The reference ID is much better, my apologies.

    $(window).bind('beforeunload', function(event){
      var req = $v('pRequest');
    
      if(req === 'CANCEL' || req === 'GET_NEXT_DOC_ID'){
      }else{
          return 'Are you sure you want to navigate away from this page?';
      }
    });
    

    beforeUnload works slightly differently from other events because it can be abused by the person who is to create the Web page. For this reason, all you can do is return a message if you want the user to confirm to leave the page or return nothing to let the user to leave the page. Each browser handles this event in a slightly different way, but the end result will be the user see the message that you return.

    Good luck
    Janet Tyson

  • name of the current page

    Is it possible to access the name or title of the current page? I can use APP_PAGE_ID to the page number, but can't find anything similar for the descriptive fields.

    The reason why I want to get this information is to build my own breadcrumb mechanism. At the top, you need to bind a specific page to a specific parent, even if your app, like mine, allows access to various pages of several other pages. I will store and display the route, the user has actually had to go to a page, rather than its theoretical position according to a hierarchical structure. And if I have this feature, users could stop hitting the back button of the browser darn.

    :)

    Hello

    If you have the Id of the Page, then you can get the name of the Page
    for example

    Select page_name in APEX_APPLICATION_PAGES
    where application_id =...
    and page_id =...

    concerning

    MDK.

  • I want the main tone of take me to the top of the current page, the end key to take me down.

    He was the original key took me to the top of the current page, the end key down. Recently it stopped doing this on the pages of some, not all, sometimes, behavior is used, then stops again. It seems that they take me at the beginning and at the end of the current line instead. "always use the cursor keys to navigate within pages" is always on.

    This seems to solve this - although it was variable. I don't know why I'd start inadvertently, the F7 key substitution - I'm not knocking the other F keys inadvertently. I misinterpreted always "use the cursor keys to navigate through the pages" to designate the behavior I wanted. Change of browsewithcaret turned it off.

  • I can not open a new tab anyway... by clicking on the button new tab bar tabs, or ctrl/T or file/new tab, or by clicking on the link on the current page.

    On Windows7 Home Premium Edition, I can't get a new tab to open no matter what I try. Occasionally, if I click on a link on the current page, a second tab opens, but 99% of the time I'm stuck using the first tab for everything and using the back button. I tried ctrl/T, tab file/new, right mouse click / New tab and the new button tab in the tab to the right of the current tab bar.

    Uninstall the Ask Toolbar. It can cause this problem.

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

    Not related to your question, but...

    You may need to update some plug-ins. Check your plug-ins and update if necessary:

  • Hi, whenever I hit the home button on the current page go to my home page AND also opens another tab - I just want to go to my home page without having to open another tab that I then have to close. Any ideas?

    I was just in Firefox 4. Now, whenever I hit the home the current page button goes to my homepage (which is what I want), BUT it also opens another tab - I just want to go to my home page without having to open another tab that I then have to close. Any ideas?

    Gotcha. Go to your desired homepage and close all the tabs you want to NOT open when you click the home button. Then, you have several ways to update the home page setting as described in the article.

  • URL address box does not display the current page.

    With the 4.0.1 update, the URL address box does not display the current page.

    All that shows is the text: «Go to web site»

    To now see the url of the current page, you need to make a right click the empty space is the address box and press the button "esc".

    Is there a way to display the url of the current page?

    This problem may be caused by an extension that is not working properly.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • When I open a new tab, I stay on the current page, even though I have changed my preferences to focus on the new tab.

    When I open a new tab, I stay on the current page, even though I have changed my preferences to focus on the new tab.

    You have this problem when running in Firefox SafeMode?
    http://support.Mozilla.com/en-us/KB/safe+mode
    Do not choose anything at the moment, just use 'continue in safe mode.

    If this is not the case, see this:
    http://support.Mozilla.com/en-us/KB/troubleshooting+extensions+and+theme...

    You probably have an installed extension that has a conflict with another extension.

  • New windows in Firefox 3.6.3 ctrl-N to go to the home page. How to start on the current page?

    Prior to my upgrade to Firefox 3.6.3, there is an extension (addin) which allowed the new Windows Ctrl-N, and they began to the current page. The extension is not valid after the upgrade, it seems that 3.6.3 has an ability to Ctrl-N, but new pages begin now, always, to the "start" page

    New page 3.6.3' s is configurable from the current page feature?
    Thank you

    This has happened

    Each time Firefox opened

    Is with my upgrade online to version 3.6.3

    I use this extension to load the current page in a new window.
    Clone of extension of the window - will also Clone a tab:
    http://www.Pikey.me.UK/Mozilla/?addon=CW

  • stay on the current page. When the user presses ESCAP.

    int

    if (type1 is Dialog.OK)

    {

    intask (Dialog.D_YES_NO, "Please confirm");

        if (type is Dialog.YES)

    {

    perform your task if yes

    ClearAll();

    Login_Screen.disconnect ();

    UiApplication.getUiApplication () .pushScreen (new L_Screen());

    }

    }

    if (type1 is Dialog.CANCEL)

    {

    What should the code because I want to stay on the page current user //press whe cancel but

    }

    Type1 = Dialog.ask (Dialog.D_OK_CANCEL, "Do you want to disconnect now?");

    Hello friends,

    I do the page to disconnect. I want to give confurmation beform logout. Everthing is working. but

    Aler dialogue ask first you want to disconnect or not?

    If he says cancle I want to stay on the current page. but still he go on the back. When your press esce I check everything.

    Please tell me what is the code to stay on the current page when the user press cancle alser dialogue?

    That's what I understood.

    I don't think you understood what I was saying. so here's an example of code:

        protected boolean keyChar(char character, int status, int time) {
            switch (character) {
                case Characters.ESCAPE:
                    confirmClose();
                    return true;
                default:
                    return super.keyChar(character, status, time);
            }
    
        }
    
        private void confirmClose() {
            int resp = Dialog.ask(Dialog.D_YES_NO,"Do you really want to Quit",Dialog.NO);
            if ( resp == Dialog.YES ) {
                resp = Dialog.ask(Dialog.D_YES_NO,"Do you really, really want to Quit",Dialog.YES);
                if ( resp == Dialog.YES ) {
                    // Close the screen as you currently do it
                }
            }
        }
    

    If you don't mind asking me, please use English. for example, the letter "y" is, is not the question why.  I recommend this spell check you your messages also, don't forget that a lot of people who use these forums are not native English speakers, so we use English must be as clear as possible.

  • Enkitec Toolbar... Stop the menu items of the current page of derivative

    XE Summit 4.2 11.2

    Hi all.  Question today: I am using the Enkitec toolbar in my application. and everything works fine... except...

    Ive changed the application so the I have a series of reports that point to the same page to run a number of interactive reports with different settings...   They are grouped into a number of items in the submenu.

    However, the Enkitec menu is highlighting the current page. Like all items in menu 4 are all active page (or URL active), he sets them all to the same color blue., so instead of a list of menu with all the white background, I get a menu list when they are all blue...

    So Im trying to either disable the 'select the menu for the active page item' (easier) or somehow allow him to recognize that its actually a variant of the same page... (the settings are different...)

    Ive tried overiding the CSS with what I think is correct according to the how to on the web site Enkitec, but without success...

    If anyone could offer advice, Id be grateful...

    Kind regards

    Richard

    Hi Richard,

    Are you sure that's not because of the condition of the sub components?

    I'm sure you check 'in progress' through the list.

    Thank you

    -Jorge

  • How to clear a single block of the current page in the OPS

    Hi all

    How to erase a single block of the current page in the OPS. I used the CLEAR key.


    Thank you

    Hello

    I found the solution I wrote it in the button DELETE. I wrote the remove with vo1.setMaxFetchSize method (1);

    and remove called AOS

    Thank you

  • The previous/next Page number is showing that the current page number

    I'm trying pages numbers with previous Page number and the current Page number, then it is and shows that reason 002-003, but for some they are both appearing as the number of courses, so 003-003. The same thing happens if I try to insert the next Page number.

    I have this set up in the master page in a document issued in March and it works great - when I add new pages they are automatically numbered correctly. However, in a new document, or if I add a new text box to my old document, the Page number previous shows that the current Page number.

    Any idea of what is the cause? I use the latest InDesign on a Mac with os x 10.11.12. My colleague is having the same problem on his Windows PC.

    I am waiting to start a conversation with Technical Support, so I'll post the results.

    Hey Willi

    Thanks for your reply, we are both halfway there, it isn't fair for the lines break...

    I just checked my old document and there was a block of empty text hidden under something else on the previous page, which is linked to the image on the next page that holds page numbers. I need to insert a Page break at the beginning of the first text box to force the numbers on the following page. Now my second text box displays the previous and current page numbers.

    Problem solved!

Maybe you are looking for

  • Why the App tab disappears after the manhine with CCleaner cleaning?

    I had App Tabs like yahoo, gmail, facebook, etc. But, after having cleaned my machine with CCleaner, I found, all of them disappeared. So, is it a current solution for this? CCleaner is a good software. Many users use it to clean their machine. So, w

  • 1105ee driver HP DV6 problem

    Hello! I have a HP DV6 1105ee Notebook PC. I had Windows Vista installed on it, but I changed to Windows 8 (32-bit). After Installation, one of the pilot is missing. It is the Base system device. The material is as follows: PCI\VEN_197B & DEV_2382 &

  • Help, please! IN THE COURSE OF RUNNING OLD GAME ON XP!

    IV ' E INSTALLED THE DRIVE DUNE 2000, NO PROBLEM. BUT WHEN I TRY TO START THE 1ST MISSION AN ERROR POP UP. DUNE2000. DAT. DON'T NO HOW TO FIX THIS. I PLAY THIS GAME A COUPLE OF YEARS WITH THE SAME COMP. AND XP.  I JUST GOT OUT OF THE HOSPITAL, I'LL B

  • Windows 7 Disk Defragmenter stops at 51%

    whenever I try to run disk defrag it just goes right to 51% and stops

  • U2414H monitor has stopped working.

    Hello, I have a U2414H monitor, and while playing wow the computer kept jumping on the desk to do some updates. All of a sudden the screen went black and I noticed that the power had disappeared. I changed the power cable to one, I knew that worked,