Get the current name of the page without the aid of a bean

Hello, everyone!

If I would get the current name of the page to a page, I'd do something like this:
#{bean.currentPageName}
@SessionScoped
@Named
public class Bean
{
    public String getCurrentPageName()
    {
        return FacesContext.getCurrentInstance().getViewRoot().getViewId();
    }
}
But my question is: is it possible to get the name of the current page directly from the xhtml page without using a bean? Is it something related to it or information available to the page itself? If so, how can I access it?

Thank you in advance.

Marcos

Use the same semantics in the page:

#{facesContext.viewRoot.viewId}

Tags: Java

Similar Questions

  • Get the Application via Backing Bean ADFBC model

    I'm trying to get an instance of an Application model via a backing bean and it will return null; I see the error message:

    * < InstantiateDataControl > [1097] INFO: search mDCRefMap has failed. The cpx has an entry dataControlUsages 'dc '? *

    I can drag a VO on my jsff page and that seems to work fine but when I want to get the app module and manipulate a VO in the code, I get the above.

    I tried both approaches, and they produce the same error message and null data control.
    1.
    String dcFrameName = BindingContext.getCurrent () .getCurrentDataControlFrame ();
    DataControlFrame dcframe is BindingContext.getCurrent () .findDataControlFrame (dcFrameName);.
    DataControl dc = dcframe.findDataControl("NavModuleAMDataControl");

    ApplicationModule am = ((DCDataControl) dc) .getApplicationModule ();
    am back;

    2 return (ApplicationModule) JSFUtils.resolveExpression ("#{data." + name + ".dataProvider"});


    Anyone seen this before?

    See the section "9.10.3 How to access an Application Client Module Interface in a Web Application from merger" of the Guide of Fusion JDev 11.1.2.0.0:

    http://download.Oracle.com/docs/CD/E16162_01/Web.1112/e16182/bcservices.htm#sthref356

    DMI

  • How to get the value of the cell in a bean of a table of the adf in the screen at the click of the button.

    Hello

    I have an editable table in my screen. When the user enters text on any cell in the column, I would like to get the text entered my beans for this cell when the button is clicked.

    And if you use BC?

    Quite simply, take table iterator form pageDef and get the appropriate attribute of line current value...

  • How can I get the name of the current page and the number?

    Hello world!

    Anyone know how to get the name of the current page and the number? What variable I should he request?

    Thanks in advance!

    The question of the application defined by the system: APP_PAGE_ID is the page number. For the name of the page, you will need to query the view of Apex with something like this:

    Select PAGE_NAME
    of APEX_APPLICATION_PAGES
    where PAGE_ID =: APP_PAGE_ID

    Good luck

    Stew

    PS Feel free to mark this reply as being correct, so it is.

  • 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.

  • Getting the name of the Page to display dynamic Breading

    I know you can reference &. APP_PAGE_ID to get the current Page of your application number. Is there something similar to use to retrieve the name of the Page?

    I'm building on measurement of bread crumbs, I attribute to each user a different homepage and tabset upon entry to the application, but many reports can be reference by users with different home tabs. As the APEX seems to reject several entries of breadcrumb for a given page, I developed a routine of PL/SQL to generate a simple breadcrumb area. The last piece is to display the name of the page. Thanks in advance.

    Use the APP_PAGE_ID value to query the APEX_APPLICATION_PAGES view for more information of the page, as the title of the page.

  • 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.

  • Get the current name of the Run Script

    Hello

    I'm looking for the name of the current script that runs in DIadem.

    So I would like to call a script, and then everything is running I would record the name of the script (file name on disk) a text box on a report that I am generating.

    I know how to pass values to the report that I am not sure to get the name of the script that runs underway.

    Thank you

    Hi Tim

    You can use the CurrentScriptName and CurrentScriptPath variables.

    I hope this helps.

    Winfried

  • Get the name of the current stage of MainSequence in parallel sequence

    Hello

    I starts a sequence in parallel of the MainSequence by "use new run." This parallel sequence is constantly in querying CPU performance data for my USE and records 'on the fly' an Excel file while the MainSequence turns the test scenario.

    To get a clear reference of the performance of the CPU DUT to test steps, I need to somehow get the name of the step of the test step currently performed in the MainSequence for saving it and the CPU performance data.

    Is it possible to identify the current stage of the main sequence in the parallel sequence (for example, property)?

    Thanks in advance,

    MRet

    Rette01 wrote:

    Hi Doug,.

    Finally, we have updated to TestStand 2013 and try to use your example.

    We have some problems to get the referral of wire, which is replaced by "threadToMonitor" in the expression you have posted, as far as I understand.

    The thread to monitor is the MainSequence. So, how can I get a reference to the MainSequence?

    Kind regards

    Rette01

    Pass RunState.Thread as a parameter to the call of the sequence. The parameter must be specified as an object reference variable.

    -Doug

  • How to get the name or id of the screen currently displayed?

    I use UiApplication.getUiApplication () .getActiveScreen () to get the current active form. Is there a way to get the name of the current screen?

    You can extend the screen class and implement a getName() method. This will allow you to ask your screens for their name.

  • Carolina sign, but continue to get the error 'Windows command summary page is not currently available. Please try again later. »

    I want to sign Carolina but now get the error 'Windows command summary page is not currently available. Please try again later. »

    Inder PreetSingh Hi,

    Thank you for writing to Microsoft Communities.

    If you experience this problem with the order summary page and billing issue, please contact a customer support agent to:

    http://www.microsoftstore.com/store/msstore/HTML/pbPage.Help_Site_Contact_Us

    Please report if you are still having the problem. I will be happy to provide you with the additional options that you can use to get the problem resolved.

  • get the name of the current workspace

    Hello
    is there a way to get the name of the current workspace?

    THX

    N °

    According to the Getter in the SDK plugin, it seems that you can get a list of workspaces, but NOT the name of the current workspace.

  • How can I get the user name of the current user? Not the name of the user, but the user name is connected to.

    Anyone know how I can get the username of the current user? Not the name of the user, but the user name is connected to.

    Thank you!

    Only two variables that Captivate allows to work with are cpQuizInfoStudentName and cpQuizInfoStudentID, but the latter is only really designed to be used for the internal information server, not a typical SCORM LMS solution.

    Sounds to me like you may need to get hands on with the services of a JavaScript programmer.

  • I get a Script Error failed. I think it is because the domain name is on page 1 and the field with the calculation is on page 2.

    I get a Script Error failed. I think it is because the domain name is on page 1 and the field with the calculation is on page 2.

    The formula is just + Cash.  I don't know how to tell him to look on Page 1.  If I use the same domain on Page 1, the formula works so I know that this is not something in the name of the field.

    It received NO response

    Page1.cash should do it. If not, you can use CTRL + click to enter its name in your script.

    1. Select the field that you add the script.
    2. Scroll the design view until you can see the object whose name you need. (Is not necessary if the object is already in mode)
    3. Click inside the script window to place the cursor where you want the name of the other object.
    4. Hold down the CTRL key while clicking the object whose name you need.
  • Is it possible to get the name of the folder that contains the current document?

    Hi all!


    I know how to get the name of the active document


    app.activeDocument.name;


    but I was wondering if you could also get the name of the folder that contains the current document. Not sure if this is possible or not, so I thought I'd ask, if so it save me a lot of time.


    Thanks in advance!

    Hi djbgraphicdesign,

    does this work for you?

    if (app.activeDocument.saved){
    alert(app.activeDocument.path.name);
    }
    

    Have fun

Maybe you are looking for

  • Help needed interview about a series of Satellite Pro S500-C11

    Hello to all readers, Computer problem laptop Satellite Pro S500-C11 series. My wife, age 82, died last month. I have his cell phone in front of me with an apparent hardware failure. If I touch the bottom left of the laptop open, while entering text,

  • Locked bootloader - it will be unlocked?

    Hi Motorola, Everyone knows updated in a Motorola phone is very slow! This leaves users with power with no other option, but to go for custom ROMs. Locked bootloader even there always is a very big problem! Motorcycle has long promised return unlock

  • printer online? 7250

    I can't understand how to get my printer a photosmart C7250 to go online, once it highlights the iam line in mode wireless through my home network

  • ActionItem and SystemToast

    Hi guys,. I wonder, how to make an application (one on the top) with actionItem menu which shows SystemToast on triggered (in C++).  (Not much in C++, be so kind So far, I've done this, but I don't know what I'm missing? In main.cpp: void App::showTo

  • EX90 - copy favorites between units

    Hello I have several EX90s and would like to copy the Favorites between several units. Anyone know where favorites are stored? they aren't xconf, currently logged in as root, and looking for a text or xml file. Thank you