Get Binding and Iterator from UIComponent

I have a pageTemplate with a reusable menu which contains: navigation buttons (previous, next, ... records), commit and rollback operations, and create/Delete Record.
My pages could contain components which have more than one IteratorBinding, for example a couple of tables master/detail.
My first idea was this:
I have to add for each BindingIterator, all record actions with the same pattern name: <operationName><IteratorName>, then I could execute the correct operation in the actionListener for each button with a simple search on the pageTemplateBean.
    public void onFirstClicked(ActionEvent actionEvent) {
        BindingContext bctx = BindingContext.getCurrent();
        DCBindingContainer bindings = (DCBindingContainer)bctx.getCurrentBindingsEntry();
        String iteratorName = (String) JSFUtils.resolveExpression("#{viewScope.focusComponentIteratorName}");
        String operationName = "First"+iteratorName;
        OperationBinding oper = (OperationBinding)bindings.get(operationName);
        oper.execute();
For this, I have to Know which is the last UIComponent which had the focus and get its Binding Iterator.
I have added a ClientListener and ServerListener programmatically for get the UIComponent which has the focus in each moment. (pageLoad with f:event JSF2).
JavaScript code in PageTemplate:
<af:resource type="javascript">
      function clientFocusMethodCall(event) {
          component = event.getSource();
          AdfCustomEvent.queue(component, "focusComponentEvent", null, true);         
          event.cancel();
    </af:resource>
Create ClientListener and ServerListener programmatically:
    private void addFocusListenerComponent(UIComponent c) {
        ClientListenerSet cls = new ClientListenerSet();
        cls.addListener("focus","clientFocusMethodCall");
        cls.addCustomServerListener("focusComponentEvent", JSFUtils.getClientMethodExpression("#{pageFragmentTemplateBean.handleFocusComponentRequest}"));
        //----------------------- INPUT --------------------
        if (c instanceof RichInputText) {            
            RichInputText it = (RichInputText)c;
            it.setClientComponent(true);           
            it.setClientListeners(cls);
        } else if(c instanceof RichSelectOneChoice) {
            RichSelectOneChoice it = (RichSelectOneChoice)c;
            it.setClientComponent(true);
            it.setClientListeners(cls);
After that, I have this Event, which is launched after every focus event.
public void handleFocusComponentRequest(ClientEvent event){     
        System.out.println("handleFocusComponentRequest "+event.getComponent().getClientId());
        System.out.println("---"+event.getParameters().get("payload")); 
        UIComponent c = event.getComponent();       
The next step is get the AttributeBinding and IteratorBinding and save them in ViewScope variables, but I dont Know how get it.
PS: Commit and Rollback operations are easier since the are common to the ApplicationModule.
jdeveloper 12c, 12.1.2.0.0

Hi Frank.
I had found the second strategy but I didn't know how can update references at runtime.
My application has a MDI Desktop, in that I could have few programs opened at same time.
Each programa had a unique menu with the navigation and record operations buttons.
Now I will explain my issue with and example:
In a region, rendered a PageFragment where is showing a Master Detail tables. For this I'll have exposed a Previous Record operation for the Master and the Detail (and the others buttons too).
When a inputText from Master take the focus, the "previous" button have to reference to the Previous Operatiron of Master Iterator. Same situation when focus is in a inputText of detail Iterator.
Then the previous button have to dynamically change the operation reference after each focus action.
I think I am really close to the resolution, but I dont Know how can I get the Iterator binding for each UIComponent rendered in the page.
Thanks in advance.

Similar Messages

  • How can I get pictures and music from an ipod touch to an iphone

    how can I get music and pictures from an ipod touch to a iphone 4s, tried alot of things but not having any luck

    Use this to get the items in your iTunes library and then sync to the other device
    Recovering your iTunes library from your iPod or iOS device: Apple Support Communities

  • PSE 8 Organizer: Bug in "Get Photos and Videos from Files and Folders"

    In PSE8 Organizer, I have a weird bug that occurs when I am using Get Photos and Videos from Files and Folders on certain folders on my hard drive. If the "Files of Type" filter is left as the default ("Media files (photos, audio, video)"), whenever I click on a file in the file browser, three or four files or folders seem to disappear from the folder. I can keep clicking on different items until every file and folder has apparently vanished from the folder. Looking in Windows Explorer, the files and folders are still there, and if I switch the "Files of Type" filter to "All Files", everything reappears and the behavior no longer occurs.
    I'm not sure why only certain folders show this behavior. It may have something to do with the types of files or folders in the folder I'm looking at, but I'm not sure.
    Has anyone else seen this happen?

    Are you on Win 7? If the files in the Get Photos dialog disappear after you select them,confirm if the names of selected files/folders is shown under the File name . If yes, you can import these files by clicking Open. You should find the issue addressed in E9.
    Thanks

  • Someone is using faebook to run java script to get data and email from me in windows 8

    someone is using faebook to run java script  to get  data  and  email  from  me in  windows  8

    Is this a developer question?
    Jeff Sanders (MSFT)
    @jsandersrocks - Windows Store Developer Solutions
    @WSDevSol
    Getting Started With Windows Azure Mobile Services development?
    Click here
    Getting Started With Windows Phone or Store app development?
    Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

  • How can I get contacts and calendar from outlook on my desktop to my new ipad 4

    How can I get contacts and calendar from outlook on my desktop to my new ipad 4

    Move the cursor over the icon and click the X that appears.

  • HT4623 I just download in settlings (general) and did not get contacts and pictures from iphone.  How do I do that?

    I am trying to down load my new ipad and used general settings and download as directed, but did not get contacts and pictures from iphone.  What do I need to do?

    I do not know how you "down load my new ipad ". You purchase an iPad. Maybe this will help:
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device

  • Any F.Module is there to get  'Month and day '  from the given input number

    Hi experts,
        I am working on Inventory withdrawl report and in the selection screen, If i enter the CHARG (Batch number) then  I need to display the posting date by default in the next selection input based on the Batch number.
    In the selection screen :
    Batch : 7111WF0211.
    Posting Date :  (I need to display by default based on batch number).
    My requirement is,  in the above Batch first digit '7' is the year.
    And  from 2nd to 4th digit. i.e., 111. I need to find out month and day from 111.
    I mean from  1 to 365 days, In which day and which month '111' will come ?
    Please send me the code or suitable Function Module. Your help will be appreciated.
    Thanks,
    Ranji.

    Use FM ADD_TIME_TO_DATE
    Do this
    days = batch+1(3).
    days = days - 1.
    Call Function 'ADD_TIME_TO_DATE'
    exporting
    i_idate = '01.01.2008'
    i_time = days
    i_iprkz = 'D'
    importing
    o_idate = date_p_d
    You will get the date in date_p_d.
    But what about Leap years? IS the first number the year?
    IF so pass in i_idate the first of january of that year so you get the correct day depending if it is a leap year or not
    Edited by: Ramiro Escamilla on Feb 26, 2008 9:56 PM

  • How do I get music and movies from iPod to my computer?

    Hi How can I put all of my music and movies that are on my iPod onto my computer? They were all on my computer before but became erased. Thanks!

    If you have any iTunes Music Store purchases the transfer of purchased content from the iPod to authorised computers was introduced with iTunes 7. A paragraph on it has been added to this article: Transfer iTunes Store purchases using iPod
    The transfer of content from other sources such as songs imported from CD is designed by default to be one way from iTunes to iPod. However there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod. You'll find that they have varying degrees of functionality and some will transfer movies, videos, photos, podcasts and games as well. Have a look at the web pages and documentation, this is just a small selection of what's available, they are generally quite straightforward. You can also read reviews of some of them here: Wired News - Rescue Your Stranded Tunes
    TuneJack Windows Only
    iPod2PC Windows Only
    iGadget Windows Only
    iDump Windows Only
    iRepo Windows Only
    iPodRip Mac & Windows
    YamiPod Mac and Windows Versions
    Music Rescue Mac & Windows
    iPodCopy Mac and Windows Versions
    There is also a manual method of accessing the iPod's hard drive and copying songs back to iTunes on Windows or a Mac. The procedure is a bit involved and won't recover playlists but if you're interested it's available at this link: Two-way Street: Moving Music Off the iPod
    If your iPod is set to update automatically you need to take care connecting to an empty iTunes. You can use a keyboard command to prevent your iPod auto-syncing with iTunes. While connecting the iPod to the computer on Windows with iTunes 7 installed hold down the Control and Alt keys (or Shift + Ctrl keys in older versions). This will stop the iPod from auto-syncing with iTunes and the iPod will appear in the source list. Wait until you are sure the iPod has mounted, and that it will not auto sync and then you can let the keys go. This may take between 20 to 30 seconds depending on your computer: iTunes 7 Keyboard Shortcuts for Windows
    Your iPod should appear in the iTunes source list from where you can change the update setting to manual and use your iPod without the risk of accidentally erasing it. Also when using most of the utilities listed below your iPod needs to be enabled for disc use, changing to manual update will do this by default. Check the "manually manage music and videos" box in Summary then press the Apply button: Managing content manually on iPod
    Whichever of these retrieval methods you choose, keep your iPod in manual mode until you have reloaded your iTunes and you are happy with your playlists etc then it will be safe to return it auto-sync. I would also advise that you get yourself an external hard drive and back your stuff up, relying on an iPod as your sole backup is not a good idea and external drives are comparatively inexpensive these days, you can get loads of storage for a reasonable outlay.

  • Get colors and text from Legend or chart?

    It seems to be impossible ( or at least I cannot find a way to ) to wrap the labels in the Legend control.
    so I will have to write my own legend control that can do this.
    In order to create a Legend control I will need to get a array of the colors used in the Chart ( or legend) and apply these to the new legend control. Can anyone advise how I can do this?
    thanks

    Hi Natasha
    I have tried:
    for each(var item in myChart.series.legendData ){
    trace("series item is : " + item);
    And
    for each(var item in myChart.series.items){
    trace("series item is : " + item);
    UPDATE: I have also tried:
    trace ("legendData is : " + myChart.series[0].legendData); 
    trace("items is : " + myChart.series[0].items);
    for each(var item:Array in myChart.series[0].legendData){ 
    trace("series item is : "+ item);
    And again the trace statement in the for each loop is never reached, and the other trace statements are empty (besides the initial string), yet I can see in the variables window of Eclipse that there should be data.
    And I have a breakpoint on the trace statement, yet in both cases the breakpoint is never reached. I am not getting any error message.
    Also, when editing, when I put the '.' after myChart.series I do not get either legendData or items in the 'intellisense', just methods. Perhaps the intellisense is very limited.
    Anyway, can you advise on another way to get the colors and labels from a chart so I can create my own legend, which can wrap the labels?
    Many thanks

  • Getting Tag and value from the selected Xml element value

    Hi All,
    I have an xml file which i import to the Indesign CS3 .From the structure view , i drag and drop the root node on to the page. Now i select an xml value from the page. Now i need to get the element tag and value from the selected value.
    For example
    File Name : sample1.xml
    <Root>
    <employeeName> A</employeeName>
    <employeeEmail>[email protected]</employeeEmail>
    </Root>
    Now i import this sample.xml in my indesign CS3 and from the structure view i drag the Root  tag and drop it on the page.Now the values of the element tag are displayed.
    Now i select "[email protected]" from the page and i have a menu "Get Selected XML" on clicking which  i should get element tag with value.(i.e <employeeEmail>[email protected]</employeeEmail>)
    How to go about it.?
    Thanks
    Sakthi

    Hi Steve,
    If you haven't already done so, I recommend posting this question in the LivCycle Forms forum.
    Jared

  • Get month and year from date type

    Hi all,
    I need to get the month and year from the date type.
    For example select to_date('2011-01-17', 'yyyy-mm-dd') from dual;Result needed:
    01-2011Any ideas?
    thanks in advance,
    Bahchevanov.

    Hello Bahchevanov,
    if you need the date to compute something, then you can
    TRUNC(SYSDATE,'mm')This will give you a date with the days removed -> 01.01.2011
    Regards
    Marcus

  • NI Session Manager gets slower and slower from call to call!

    I have the following problem with NI-Session-Manager:
    I use Session Manager a lot on my test systems. Now that I have a test system running that makes many Session Manager Calls I noticed that after a while the system gets slower and slower. I�ve attached a Sequence File, which demonstrates this problem.
    This sequence file is based on the LV Session Manager Example, which ships with TestStand.
    Instructions: In the UI-Msg Field of the Sequence Editor you will see how long the actual run took to execute. Every run makes 500 calls to Session Manager. You will notice that every run takes a little bit longer than the previous. After 100 runs the difference is significant.
    Although my example uses a COM
    port to demonstrate the problem this problem is really related to Session Manager because the same happens if I use an IVI-Instrument (i.e. NI-DMM, NI-Switch, �)
    Any help appreciated!
    Regards
    Herbert
    Herbert Koltschik
    Sagem Communication Austria
    [email protected]
    Attachments:
    sessionmgr_-_slow_down_problem.zip ‏63 KB

    Herbert -
    Thanks for the feedback. I will look into item (1).
    The design of the session manager was to solve the problem of only having to share an instrument within a multithread application. If the session already exists, than you get the same session and thus the same handle, and the instrument is only initialize once and closed after the session no longer exists.
    In the case of a C++ based program you would have to add the session as a member variable that has a specific lifetime. When the object is release, so will the session.
    In the case of an application like TestStand, you just attach the session to the execution. Once the execution goes away, the session may go away if no other execution is using it.
    In the case of L
    abVIEW being called from TestStand, you are using VIs as subroutines, so either the application (TestStand) must manage the lifetime of the session, or the VI subroutine must deligate the lifetime control to a "global" VI. The item you attach to the global could be the refnum itself or the SMgr session. One way of doing this would be to create a VI that serves the refnum to you but internally manages the lifetime of the ActiveX references to the Session Manager sessions. This would be a simple vector of names and their sessions. When called the VI would lookup and return a refnum from an existing session or create a new session and return a refnum for it.
    Scott Richardson
    Scott Richardson
    National Instruments

  • How do I get photos and songs from old iphone to new iphone?

    I have no idea how to transfer all of my photos and songs from my 3g to my new 5s...can someone tell me in plain simple english...I am no expert! Please?

    YOu should backup your 3G and then use that backup on your new phone http://support.apple.com/kb/HT1766
    your songs should already be in yoru itunes media library, sync your phone to get the songs.

  • Get playcount and ratings from ipod when pc library doesn't match ipod

    After updating iTunes, the library on my PC was erased.
    So I imported an exportfile 15 months old to the new library and added all songs in my "recently added" (of past 15 mths) on my iPod.
    So far so good.
    The problem is that this new library doesn't match the one on my iPod, though they are the same. The only difference: all ratings and stats that are on my iPod but aren't on my PC.
    Is there any way to get the "library identifier" on my PC and iPod to match again, so my stats and ratings are updated to my PC?
    Cheers,

    Which model of iPod do you have? I have a 160GB Classic (this forum) which _does not_ show Podcasts under the Music folder, and apparently does not have an option to do so. However, I also have a 5th generation 30GB video iPod, which does show Podcasts under the Music folder. Straight away, you'll notice that different modles behave differently, so we need to know.
    So, that's the first thing to sort out.
    Then, on your manual recordings, did you add all the relevant artist information to the file (i.e. the MP3 tags) when you created them? If not, that will be why they only show up in songs, (but there may be another cause too!). You can fill in any missing information by highlighting the song and clicking on *File/Get Info* and adding the info then.
    In the long term, the probably answer to your manual files is to give them their own genre and then search for them that way.

  • Get Modulus and exp from public key

    Hi friends,
    I'm extracting the public key from the X.509 certificate .Is there
    any way i can extract modulus and exponent from the public
    key. i'm using bouncy castle api . Any suggestions are greatly appreciated.
    //Generate Certificate
    //Extract public key
    PublicKey merchKey = cert.getPublicKey();
    //Pls suggest the way to extract mod and exp from public key
    Regards
    Jag

    PublicKey merchKey = cert.getPublicKey();
    RSAPublicKey rsaPub = (RSAPublicKey) merchKey;
    BigInteger modulus = rsaPub.getModulus();
    BigInteger exponent = rsaPub.getPublicExponent();

Maybe you are looking for