Is there any method to get page name in managed bean? jsf2.0

Please help. Want to get page name in managed bean (application scoped). Page invoke bean through actionListener method.
Thanks in advance.

So, two solutions:
FacesContext.getCurrentInstance().getViewRoot().getViewId() - actual page
FacesContext.getCurrentInstance().getExternalContext().getRequestHeaderMap().get("referer") - url in browser

Similar Messages

  • Is there any method which reflects the names of classes of java?

    is there any method with which dynamically we can get all the packages's name along with their classes of java(specially core classes of java)?if not how can we do that?

    The resource from which the Java VM loads the classes is considered to be implementation dependent. It may be class files or jar files contained in a file system hierarchy, or some kind of remote database. The now defunct Microsoft VM used a database repository that was able to reside on a remote class server within a network domain.
    Unfortunately, Sun did not design a class resource service interface with a "list resources" function, only a "get resource" function. You can get the class resource for any named class, but you cannot list packages or classes within a package or at the root level.
    This is further complicated by the fact that there is no such thing as an "installed package" as Java does not define any package installation system. The packages available to any runtime instance of the JVM is defined by the classpath properties passed from the OS. Different JVM instances can have completely different sets of available packages because they were passed different classpath values by the OS.
    If you know the class resource of the runtime environment, then you could create a subclass of the sun.misc.URLClassPath class and add to it methods that will list packages and classes found within a package using the interface of that known class resource.
    Most runtime environments use a standard hierarchical file system to hold jar and class files. A subclass of sun.misc.URLClassPath could use the java.io.File class to traverse the file system classpath paths in search of package directories and class files (Watch out for recursive directory links).
    The root packages can be obtained from the three levels of classpath paths in the System properties used by the JVM:     "sun.boot.class.path"
         "java.ext.dirs"
         "java.class.path"The collection of file system paths obtained from these properties would be searched for the names of the root level package directory names. Just remember that this will only work in a runtime environment that only uses this kind of class resource. If you run this where some other resource is also used, you will not see all of the packages available to that JVM.
    One note of caution: A single directory can hold package directories, jar files, and class files that belong to a specific package, but the package may include other package directories, jar files, and class files that are contained in other directories. Pieces of a single package may be strewn throughout the file system. The only way to find them all is to scan all of the classpath paths for that same package name. The directory does not define the package, it only provides more content for that package.
    I hope you find this of some use.

  • Is there any function to get the name of the days?

    Hi,
    I'm using oracle 10.2.0.1.0
    Is there any function to get the days of the week?
    like i need to get sunday,monday,tuesday.....saturday.
    I know i can use union and select the name from dual one by one.
    But just want to know whether there is any other way.
    I need to show the 7 days in a poplist in my form, thats the requirement
    Thanks

    David_Aldridge wrote:
    BluShadow wrote:
    Note: you may want to include "fm" in the format mask, otherwise the name of the day is padded with spaces:
    SQL> ed
    Wrote file afiedt.buf
    1  select replace(to_char(dt,'Day'),' ','*') as fmt1
    2        ,length(to_char(dt,'Day')) as length_fmt1
    3        ,replace(to_char(dt,'fmDay'),' ','*') as fmt2
    4        ,length(to_char(dt,'fmDay')) as length_fmt2
    5  from (select TRUNC(SYSDATE ,'DAY')+Level-1 dt
    6        from   dual
    7        connect by Level<8
    8*      )
    SQL> /
    FMT1      LENGTH_FMT1 FMT2      LENGTH_FMT2
    Monday***           9 Monday              6
    Tuesday**           9 Tuesday             7
    Wednesday           9 Wednesday           9
    Thursday*           9 Thursday            8
    Friday***           9 Friday              6
    Saturday*           9 Saturday            8
    Sunday***           9 Sunday              6
    7 rows selected.
    SQL>
    I think you should use a pl/sql function for this.
    Nah ... just joking.
    I'd be tempted to just use a union all statement to return the seven literals. People will look at it and know exactly what it does.Yeah, agreed, I was just demonstrating that the format mask of a to_char(..., 'Day') pads with spaces, which seems to have been missed in the above answers. ;)

  • Is there any way to get Pages 4 back.

    Pages 5.2 is so user unfriendly.  The first problem is just getting it to open a document.  I click to open and get a message that I need the latest version of Pages to access that document.  I already have the latest, so I go to the application itself, open that and then can open the document I need to work on.  Also, when I save a newsletter to pdf to e-mail to members, the print on the first half of the first page is shaded.  I've tried exporting to pdf, printing as pdf, and it's all the same.  It doesn't do that using other apps, e.g., Word, so I don't think it's an Adobe problem.  Any thoughts on either of these problems or how to get the older version back?  Also placing an image is very difficult.  It happens with sheer luck.

    If Pages ’09 v4.3 was installed when you updated to Pages v5+, the installation process moved the older Pages application into /Applications/iWork '09 folder. Use that.
    There are reported issues with PDF and Word document exports from Pages v5+ (including v5.2). Sounds like you found them.
    The Pages v5+ document format, though it still bears the .pages extension, is entirely incompatible with prior Pages documents. As Pages v5+ lacks over 100 features/functionality of its v4.3 antecedent, older documents opened in Pages v5 may be selectively stripped of content if not supported in Pages v5+.
    With both applications installed on your machine, a double-click on any .pages document (old or new) will summon Pages v5.2 to open it. You will need to right-click (two finger tap) to select Open With > Pages (4.3) from the contextual menu, or launch Pages ’09 and use the open file browser.
    In Pages v5+, placing an image is easier if you have selected the Format > Arrange > Move with Text > Automatic. Text will automatically flow around your image. While you have this tab open, drag from the lower-right grip to the upper-left and you will observe a yellow proportional guide line. While you are changing the scale, also notice the Size and Position values change on the Arrange panel. You can change these directly if you prefer.

  • Is there any way to get the canvases names on the form

    i have a form in Orcle 6i
    i want when the form load i get the names of the Canvases on the Form automatically
    to change their visual attribute
    is there any way to get the name of the canvases on the form automatically
    Thanks in advance

    The amount of time to evaluate each item in a Form is a lot less than you think. You are dealing with milliseconds. Worse case scenario, you might add 1 second to your form load time.
    I think Francois's suggestion is the best solution, but if this is still too much time, you might concider creating strategic When-New-Item-Instance triggers on an item in each of your canvases that would perform what you want to do.
    This will most likely cause problems of its own, but it is an alternative.
    Food to get the thought process flowing... :-)
    Craig...

  • How to get page name in JDeveloper

    Hi,
    Is there any way to get the Name of the page we are in in OAF JDeveloper.
    We have a requiremnt where we need to develop a custom region in Jdeveloper and add this to multiple oracle std pages.
    Basing on page, we need to query the custom region with different parameters.
    Developed a stand alone region in Jdev and added this region to Oracle Std pages using personalization.
    Can some one please tell how to know the page contexts page name.
    Thanks in Advance.
    Kishore

    Abdul,
    To test your suggestion, Created a test page TestPG.
    Through Personailzation, Added a hidden Item(Rendered flase) with default value and the custom region CertRN to TestPG.
    Tried to get the value of hidden item in CO of CertRN and got null pointer exception. Looks like regions co is not getting handle of Test page.
    This the code I added in CertRN controller.
    OAMessageTextInputBean pgItm = (OAMessageTextInputBean)webBean.findChildRecursive("PName");
    String pgitm = (String)pgItm.getValue(pageContext);
    Am I doing anything wrong.
    Regards
    Kishore

  • How to find JSFF name in managed bean

    Hi Gurus,
    I am new in adf and using 11.1.2.3. How i can find the name of jsff page name in managed bean.  For example if i have abc.jsf contains a fragment xyz.jsff. i want when i click on button in jsff page, a pop shows me the name it is xyz.jsff.
    Thanks,

    Hi,
    to get the page name,FacesContext.getCurrentInstance().getViewRoot().getViewId() (returns abc.jsf). If you expose the page fragment through an ADF region, then the call is
    ControllerContext.getInstance().getCurrentViewPort().getViewId() (returns xyz if the view activity has the same name as the physical file xyz.jsff)
    Frank

  • When using an external (ergonomic mouse) is there any way to get the wheel to scroll one full page at a time?

    When using an external (ergonomic mouse) is there any way to get the wheel to scroll one full page at a time? Much appreciated.

    I can't use the keyboard to scroll. I need to keep my hand on the mouse, otherwise I'd never get anything done. Since I have no problem getting Firefox to scroll one page at a time, and I'm constantly jumping between 3 browsers, it would be nice to be able to scroll a full page at a time in Safari, just like I can in Firefox. Thanks.

  • I deleted contents from pages school report by accident. is there any way to get it back. I reopened the file and it is blank, I deleted the contents from a school report by accident. is there any way to get it back. I reopened the file and it is blank

    I opened a file to print and by accident highlighted and deleted the content. Then in a panic I closed the file and now when I open it is blank. Is there any way to get it back.  I have looked and can not see anyway. I dont have anything in my backup?

    I'm not sure about older versions, but in Pages 3.x (OS X 10.9.x) select File > Revert To > Browse All Versions.  Hopefully there will be an earlier version that you can "revert to".

  • Is there any class to get the head, title, anchors of any page?

    hi, i am study at computer science and i have a senior project that is related to Focused Crawler.
    1 ) So, i have an issue. I have to get head,title,metas, anchors of any page. But, i don't want to recode it, may be there any classes that performs my willings. For example:
    URL a = new URL(....)
    string1 = a.getHeadComponent();
    string2 = a.getTitleComponent();
    string3 = a.getMetas();
    string4 = a.getAnchors();
    As i written above, is there any code to get these components without extra codding?
    2 ) Is it possible to modulate download speed while downloading a page by using URL class of java?
    Thanks for responses.

    fuatsungur wrote:
    hi, i am study at computer science and i have a senior project that is related to Focused Crawler.
    1 ) So, i have an issue. I have to get head,title,metas, anchors of any page. But, i don't want to recode it, may be there any classes that performs my willings. For example:
    URL a = new URL(....)
    string1 = a.getHeadComponent();
    string2 = a.getTitleComponent();
    string3 = a.getMetas();
    string4 = a.getAnchors();
    As i written above, is there any code to get these components without extra codding? No.
    You have to open a connection. Get the input stream. Read the input stream. Parse the content.
    There are HTML parsers out there.
    >
    2 ) Is it possible to modulate download speed while downloading a page by using URL class of java?
    By using URLConnection? No.
    If you use raw sockets then increase speed maybe. But "modulate" not really either way.

  • I deleted a document from pages on my ipad. Is there any way to get it back?

    I deleted a document from pages on my ipad. Is there any way to get it back?

    You can restore from iTune or iCloud backup if you have one.

  • HT201406 I accidentally deleted one of my pages in the "Notes" AP.  Is there any way to get it back?

    I deleted one of my pages in the NOTES AP.  Is there any way to get it back?

    If you have a backup that contained what you deleted then restore from that backup.  Data you added since the backup was created will be lost

  • My computer broke and I got it fixed. It doesn't say that the hard-drive was replaced, but I can tell my data is gone, including Pages that I bought. Is there any way of getting that without paying for it again?

    My computer broke and I got it fixed. It doesn't say that the hard-drive was replaced, but I can tell my data is gone, including Pages that I bought. Is there any way of getting that without paying for it again?

    Or if you purchased Pages as part of iWork on a disk, reinstall from the same disk.
    Best of luck.

  • Is there any way to get the apple stock photos as wallpaper? From the iPhone features page?

    I want this picture.
    http://www.apple.com/iphone/features/
    The picture on the black phone next to the 4 inch retina display section. Is there any way to get it? Is it a default photo or wallpaper of iPhone 5?

    It has always been very basic to always maintain a backup copy of your computer/files/docs/pics/music/etc, for just such an occasion.
    Use your backup copy to put everything back.
    If for some reason you have failed to maintain a backup ( not good), then you can transfer itunes purchases from an ipod:  File>Transfer Purchases
    Once the music is in itunes on your computer, then you can sync to your iphone.

  • Is there any way to get the appStore link for my application

    Hi everyone , i am developing an app which has a feature of sharing its appstore link with the friends through mail,so that they can see my appplication in appstore and buy it directly on click of a button. For that i need to use the app store link of my application for sending it . is there any way to get that and using it dynamically in my app immediately after releasing it.

    Your best bet would be to create a web page of your own for the app. Design that page so that it uses 'META REFRESH' to redirect the visitor straight to the App Store link.
    That way you can hard-wire your own web page address into your app.
    This has the advantage that it can work well even before you've noticed that your app has arrived on the App Store. Create a real web page, describing the app and telling people to search for it in the App Store by name - then replace it with the auto-redirect page when you've discovered your application's App Store address.

Maybe you are looking for

  • There's got to be a better way to do this (RAM preview frustration)

    I loaded a 1:20 second Full HD clip into after effects. I need to edit the video based on certain sounds in the video and see if I'm matching them up correctly by previewing it with sound. The problem is i'm getting frustrated due to After effects no

  • Handling special characters through proxy

    Hi Gurus, we hvae a scenario sap to file, sending material information from SAP through outbound prpxy and palcing that detaisl in FTP loation using file adapter. Here probelm is one of the fields desc and text we are passing material Description and

  • Downloading earlier versions of Elements

    Where can I download (buy) earlier versions of Photoshop Elements? I am running an iMac with OS 10.6.8. I used to have Elements 6.0 when I was running Tiger, but have recently upgraded to Snow Leopard. My iMac cannot handle Lion or higher.

  • No sound devise installed -HP M7567 c

    Hi I have an HP PavilionM7567c. I upgraded my op system Win 7 Ultimate over two years ago no problems great ! Now all the sudden I have no sound ! when i check it all it says is no sound devise installed. but when i go into properties theres no sound

  • Why can't I browse utilities in Itunes 11

    In itunes 11.1.2 (Mavericks) It is no longer possible to browse Apps -- Utilities. It displays a line of "hot new apps" and when you click "show all" -- that is all it shows you. The bottome of the screen shows only a couple of collections and about