Set initial focus point in the middle of several models, the flow of tasks and fragments.

Hi guys,.

With the help of JDev 11.1.1.4.

I've got the fragments of the page for which I would like to set the initial focus. The problem is that, often, these pages of .jsff are nested in page templates, model train, dynamic regions, etc. AFAIK, the original goal of a component is on the document. The trick is to find what all the prefixes are before the .jsff component.
pt1:dynamicRegion:3:pt1:t1:0:it1
Y at - it an easy way to understand all of the prefixes before that: it1, which can often be radically different?

The easiest way would be to set the initial focus to say "defaultFocus" and have each .jsff has a component id called "defaultFocus? Feels like cheating, but any other way I can think seems much too complicated.

Thank you
Will be

The method we use is mainly programmed by: Marianne Horsch.

Once again, 1 page:



In the body of this page is a dynamic region, that's all that is never updated.

Bean, not all record deleted etc.:

  private static final String DEFAULT_COMMAND_ATTRIBUTE = "defaultCommand";
  private static final String INITIAL_FOCUS_ATTRIBUTE = "initialFocus";

  private String defaultCommand;
  private String initialFocus;

  public BolsysPageBean() {
    super();
    initPage();
  }

  public final void initPage() {

    List childrenList = getPageChildrenList();
    if (!childrenList.isEmpty()) {
      UIComponent defaultCommandComponent =
        UIComponentUtils.findComponentWithAttribute(childrenList, DEFAULT_COMMAND_ATTRIBUTE);
      if (defaultCommandComponent != null) {
        defaultCommand = defaultCommandComponent.getClientId(FacesContext.getCurrentInstance());
      }
      UIComponent initialFocusComponent =
        UIComponentUtils.findComponentWithAttribute(childrenList, INITIAL_FOCUS_ATTRIBUTE);
      if (initialFocusComponent != null) {
        initialFocus = initialFocusComponent.getClientId(FacesContext.getCurrentInstance());
      }
    }
  }

  private List getPageChildrenList() {
    UIViewRoot root = FacesContext.getCurrentInstance().getViewRoot();
    if (FacesContext.getCurrentInstance() != null && FacesContext.getCurrentInstance().getViewRoot() != null) {
      return UIComponentUtils.getAllChildComponents(root);
    }
    return Collections.emptyList();
  }

  public String getDefaultCommand() {
    return defaultCommand;
  }

  public String getInitialFocus() {
    return initialFocus;
  }

Util code:

  public static List getAllChildComponents(UIComponent root) {
    List list = new ArrayList();
    if (root.getFacetCount() > 0) {
      Map facetMap = root.getFacets();

      for (Map.Entry entry : facetMap.entrySet()) {
        UIComponent facetComponent = entry.getValue();
        list.add(facetComponent);
        if (facetComponent.getChildCount() > 0 || facetComponent.getFacetCount() > 0) {
          list.addAll(getAllChildComponents(facetComponent));
        }
      }
    }
    list.addAll(getOwnChildren(root));

    return list;
  }

  private static List getOwnChildren(UIComponent root) {
    List list = new ArrayList();
    if (root.getChildCount() > 0) {
      for (UIComponent child : root.getChildren()) {
        list.add(child);
        if (child.getChildCount() > 0 || child.getFacetCount() > 0) {
          list.addAll(getAllChildComponents(child));
        }
      }
    }
    return list;
  }  

Dynamic region is based on a bean of support as well.
As I said before, when you want good use beans ():

-Anton

Tags: Java

Similar Questions

  • How can I get the "network" icon in the taskbar? The box of 'network' in the bar of tasks and Start Menu Properties; Notification area; System icons, will not respond to what it is.

    How can I get the "network" icon in the taskbar? The box of 'network' in the bar of tasks and Start Menu Properties; Notification area; System icons, will not respond to what it is.

    Use this tutorial:

    http://www.Vistax64.com/tutorials/106787-notification-area-system-icons.html

    Go to method 3.

    3. for the network icon.

    (B) to activate the icon network - Enable_Network.reg< click="" to="">

    * Don't forget to restart to complete the procedure. ***

  • The Task Manager, update the list of tasks and processes, but removes them from the list, the next second.

    It was fine a few days ago, the list of tasks and processes will not be updated until I open/close something. Now, it refreshes the list every second. I tried to change the speed of update, but makes no difference. An answer by tomorrow would be the best.

    More information:
    Windows 7 x 64
    Home Premium Service Pack 1
    Using AVG anti-virus

    Hello

    Thank you for your response.

    Keep the computer in a clean boot and check the status of the issue.

    How to perform a clean boot for a problem in Windows Vista, Windows 7 or Windows 8.

    http://support.Microsoft.com/kb/929135

    Note: please go through the section: How to reset the computer to start as usual after a clean boot troubleshooting section of Kb to start the computer to a normal startup after you fix the problem.

    I would like to aslso season allows you to check the status of the question in a new user account.

    Create a user account:
    http://Windows.Microsoft.com/en-us/Windows7/create-a-user-account

    If it works in a new user account, then you will need to fix the corrupted user profile. You can visit this link for the steps:

    http://Windows.Microsoft.com/en-us/Windows7/fix-a-corrupted-user-profile

    I hope this helps.

  • What is the difference between task and Service?

    What is the difference between task and Service? When we use the task and that we should use the Service? Thank you ~ ~

    See the StackOverflow question:

    Task vs. Service

    You may also interest somewhat related:

    Difference between javafx.concurrent and Platform.runLater

  • Where is the initial focus point in a stereo vision system?

    Hello, everyone

    I use the LabVIEW Vision stereo. After I calibrate my stereo vision system, I want to check the accuracy of my system. I can't depth of each point in my photo, but where is my axis point of the initial Z?

    In the most recent NOR Vision Concepts allow, it is written that NI Vision makes 3D information with regard to the rectified left image as the new optical Center will be held at (0, 0, Z) position. Is the point the original Z axis on the CCD of the camera on the left or the optical centre of the lens of my camera left?

    If anyone can help me?

    Hello

    I would say that the origin of the coordinate system is at the center of perspective, which is the center of the camera's projection.

    So, Yes, the optical centre of the lens of the camera on the left. It seems more logical to me...

    Best regards

    K

  • Window program hangs when setting clip/exit points on the timeline

    Since the CC 2015 update, I experience a lag very heavy/lock up while adjusting the clamp/exit points in the timeline. What is happening because of the window of the program trying to cross to a clip in/out. The tool slide etc work fine showed a similar screen. It only crashes when I try to adjust the length of the clip and it freezes the program window and then crashes me to do something for a few minutes after I published the adjustment.

    I would like to know if there is a setting that will allow me to disable this feature available? In this State, not only it is completely useless, he effectively kills my productivity because of the constantly waiting for first to catch up and I would like to continue editing.

    Here are a few dumpsters screen showing available to program window that is problem. The left is using the tool to slide, with no problems, the right is just to adjust the length of the clip. Once I have let go of this edition, the freezing of the program window will remain there for even 2 minutes before finally turning to simple view of standards and allow me to continue.

    PP CC 2015 Issue.jpg

    Hello

    Click the timeline (wrench top left of Panel) display settings button in the timeline panel and uncheck 'preview Composite to the 'Trim' course.

    Check if that helps.

    Vinay

  • Set an out point of the clip on the current image in the timeline?

    So here's a scenario: I'm in the timeline and I get to the image I want to be the out point of the clip. Is there a single shortcut keyboard/etc who will succeed?

    I realize I can do this: move one image to the front and then use the cursor to GUI the end point to the thread... but quite frankly, it's boring, but also slow.


    I am a user of FCP7 who is accustomed to the setting of the read head on the desired image to an exit point, then double click on the clip, it opens in the Viewer window clip on THE SAME CHASSIS OF THE TIMELINE, and then I press the shortcut key to point. If a double-click + a unique key. I'd do this hundreds of times a day. Is there a way to first open a clip in the source window (by double clicking on since the timeline) on the same frame as the head of reading the script? This will be possible that the first time that you open the clip in the source of the timeline window, but it will be "remember" the framework that you left on ypu reboot first... even closing tab of the element in the source window will not change. I realize that there are "gangs and the program source" but which must be addressed by individual video sequence.

    A bit it boggles my mind that it was placed on the default mode, the source window works.

    Or y at - it a keyboard shortcut to make playback of the source head jumps to the corresponding timeline playhead frame?

    double clicking and opening on the same frame are CS2 and earlier versions and CC14 only.

    Try to hit W (ripple trim next edition to the read head) the opisit is Q.

  • Can you set a restore point from the system on a disk?

    Can you put a "System Restore" point on a disc? a disc re writable DVD, for example.

    To make it clearer:

    I want to do a restore point for my "C:" drive, but I want it on an external drive as a drive re writable DVD that can be put in the drive "D:" or, Alternatively, a flash drive.

    Is this possible?

    Any help is appreciated thanks :)

    A restore of the system (System Volume Information) file must be on the disk/partition that it protects. Each drive/partition will have its own System Volume Information folder for the recovery of the partition/drive specific. It's the way is designed the o/s, so not impossible to return c to another drive.

    Sorry, but that's the way it works and cannot be changed.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Point set Label above point on the form?

    My apologies if this has been listed here. I could not find with the research I've done.

    In my data entry form, I want to put the labels of items entrable top of the fields. I looked at the label (optionally with help) model, but it looks like that just the label itself handles. I don't see a way to get to the #BODY # of the region (region without buttons or title) do it either.

    Are we stuck with having always our labels in column to the left of the items in a form?

    I hope not and knowing a minimum necessary?

    Thank you

    Stew

    For the element, set Begin on the new line = YES and start the new field = Yes

    Then to the label set "Horizonal/Vertical Alignment" 'at the top'.

    (It's in v4.0.1.)

  • Switch the setting to a page of the window parent child and store session values in the parent window

    Hello

    I have two pages of the apex. I open a page of the child using javascript in the parent page.

    Parent window has the following articles.  P1_Text1, P1_text2, P1_text3. The setting is 'Change only when the session state is null', static assignment.

    In the child window: I have two buttons 'Confirm' and 'close '.

    When I press "confirm", it sets the value of a page element parent in a process of PL/SQL.

    BEGIN

    / * some calculations

    followed by an assignment statement * /.

    : P1_Text1: = final_value;

    END;

    "Close" button in the child window. as a result of javascript that are associated with:

    JavaScript:

    Window.opener.Location.href = window.opener.location.href;

    Window.Close ();


    When I press the close button, the parent window gets updated and P1_Text1 is responsible for the requirements.  Everything is going well so far.


    But the problem is with other elements of the parent page. They become null.


    How to store the values of the elements of the page of the parent window?



    Kind regards

    Archana








    archana2 wrote:

    But the problem is with other elements of the parent page. They become null.

    How to store the values of the elements of the page of the parent window?

    Problem: You're not 'save' the other page elements.

    Solution: Before you open the child window, you need to "introduce" the values desired registered on the server.

    This is best done with a dynamic Action that uses a PL/SQL code block.  The key is to include all the items you want to store the property in the "Page" referred to submit

    PL/SQL code is a code simple no - ops

    begin
      null;
    end;
    

    For you, it seems that the 'child window open"should be action 2 of this dynamic Action.

    MK

  • My computer started randomly closing overnight - then the left on download. Internet points out the unexpected stop down and gives me a link dead at error number: 0x8DDD0002 - I'M the only user/administrator

    I've been downloading for years, but the last 3 - 4 times when I let the computer do its things while I'm in bed, I come down in the morning and the computer restarted itself and I get the Vista - computer has recovered from an unexpected stop, then he gives me the windows update link, which tells me that I must be an administrator to apply updates!  I AM she!  only one user on this computer, checked my settings and its fine!

    Someone has any ideas why this started all of a sudden the most stupid and frustrating now!

    Thanks in advance people :D

    "computer has recovered from an unexpected shutdown, then he gives me the windows Update link.

    Most of the time, it restarts itself during the update process.

    Change it to no automatic installation, which is what I was hoping you would do to dismiss this case.

    That's what brought me to update problems.

    See you soon.

    Mick Murphy - Microsoft partner

  • Stop the flow of task by program activity

    Hi all

    I use 11 GR 1 material ADF Faces

    I made a method I call whenever an exception is thrown in the controlled beans. It is a way to show all runtime exceptions in a dialog without forwarding to a default error page. I use FacesMessages to show the errors of the dialog box.

    But I have a problem/question. If I press a button with ActionListener and Action, and an exception is thrown in the method executed by the ActionListener, how can I do to stop the implementation of the Action? This is because the popup informing them that an error has been produced, is raised me in the next page, called by the Action.

    Here is the code:

    1. press on a button that executes this method raised a NullPointerException:

    * public void doNullPoiner3 (ActionEvent actionEvent) {*}
    try {}
    System.out.println ("put a message with id");
    String s = null;
    System.out.println (s.Substring (0));
    } catch (Throwable e) {}
    CustomExceptionHandler.reportTechnicalException (th, "it1");
    }
    *}*

    2. the code of reportTechnicalException()

    * public static void reportTechnicalException (Throwable th String idField) {*}

    retry the custom messages (overview and detail)
    ...
    Show the error
    addFacesErrorMessage (summary, detail, idField, FacesMessage.SEVERITY_ERROR);

    *}*

    * private static void addFacesErrorMessage (String summary, String msg, String stId, gravity javax.faces.application.FacesMessage.Severity) {*}

    FacesContext ctx = getFacesContext();

    FacesMessage fm = new FacesMessage (severity, summary, msg);
    String stViewComponentId = (stId! = null & & findComponent (stId))? stId:null;

    ctx.addMessage (stViewComponentId, fm);

    *}*

    Please, can you help me? I only want to stop the execution of the workflow if it exists.

    Thank you in advance,
    XAVI.

    Hello

    Having the action listener throw an AbortProcessingException. This is an exception of reserved JSF that prevent the propagation of the event without killing the application.

    ~ Simon

  • If I let the the mouse pointer over the taskbar, it freezes and I can't move.

    original title: freezing of funds...

    If I left click on the desktop and then click on the task bar when I got on my pc and leave the pointer from there in the taskbar until the next time I use my computer, it works well. If I let the pointer anywhere on the desktop when I finished work and the mouse pointer will freeze right where he is and I have to restart maually in order to release it. I never met this case in the 20 more years that I have been using a pc.

    I downloaded and ran spybot search and destroy program majorgeeks.com and it fixed my problem of gel. I don't know what he did to take care of it, but it does the trick.

  • point to the existing pdf file and print to the specified printer (no default)

    Yes, several messages on the creation of pdf files, but have not found help send a pdf file to a folder on a default printer.

    Suggestions?

    have you tried using ActiveX?

  • problem on the flow of tasks of adf and dynamic region

    JDeveloper 11.1.1.5

    I created a page jspx for making fun of the home page.

    In the facet of the beginning, there are 2 Ref order link in the region (for the 2 workflow)
    In the facet of the Center, there is a dynamic region. Once you click on the order link, the region will be changed.

    The problem is:

    the workflow has 3 displays (View1-> 2-> the View3), if I run mode 2, when I click on the link even in the facet of the beginning, it does not refer to the View1.

    I want the page back to View1 when I click the link, how can I apply?

    Hello

    You must reload the region to start again. To do this, you can assign to the refreshCondition for connection of the region, in such a way that when it is resolved to true, the region will be reset. No doubt, you can add a parameter to the region and set its value through setActionListener for the click on the link.

    Check this: http://docs.oracle.com/cd/E21764_01/web.1111/b31974/taskflows_regions.htm#CHDEIFBB

    Arun-

Maybe you are looking for

  • the body of an email does not send

    When I send an e-mail, I get this as shown in the image to the Clipboard. Of course if I say 'ok' the email sends without 'body '.I work with win xp if it is useful and thunderbird 38.3.0Thank you

  • Fuze MSC mode strange question

    I bought my girlfriend a rocket of Black 4 GB a month ago, but we still had a problem. When in mass storage Mode, you can not see all files, folders appear empty. I asumed it was some protection against copying or the bug, but updated to the new firm

  • "Serial number Not Found" message

    Hello I had HP DV6 1386ET for 3 years. I saw the message "Serial number Not Found" for about 2 months. I didn't like the message until I formatted the computer (yesterday). When I bought the computer, Microsoft Windows 7 Home Premium has been loaded

  • I think XP has better functionality and usefulness than Windows Vista. Is this good?

    is vista fail? Overall, Windows XP has been easier to work with, understand and had everything necessary to be functional.  This makes Vista seems like a front more than anything, since it is less useful than XP.

  • HP officejet 8610: increase the size of font printer 8610

    HOW can I increase the font size of PRINTER 8610? On all printing, including ctrl 'P', the printer policy is too small. Windows 10, x 64. Connected wireless