How to get list of all JSF beans

How can one get a list of all JSF beans?
To get a particular JSF bean one does
   static public Object findJSFBean(String beanName)
      FacesContext fc = FacesContext.getCurrentInstance();
      if (fc== null) return null;
      ELContext elContext = fc.getELContext();
      Application app = fc.getApplication();
      ELResolver elResolver = app.getELResolver();
      Object result = elResolver.getValue(elContext, null, beanName);
      return result;
   }Edited by: sn72 on Sep 2, 2008 5:49 PM

sn72 wrote:
Several ways:
1) Store some key in the request scope indicating the "id" of the wizard.
2) Use a single session scoped bean which references all related session scoped beans so that you have a single main point of reference.
3) Consider conversation scope. Apache Orchestra and JBoss Seam have their solutions.1. Can you elaborate on this?On start of the wizard generate/assign some unique identifier which you pass to the next request everytime as a hidden parameter. Use this identifier to identify a separate 'wizard conversation scope'.
2. Yeah, this might work. But I'd need to have a common entry point (such as overriding doPost of the default faces servlet) to destroy the wizard bean whose pages have ended, which means hardcoding page names in my java code. Also, my wizard would have to register itself in this map. That's why this solution seems very much like what I was asking for originally -- that is, the session bean has a list of all wizard beans in it.Just destroying the session bean at its own ought to be sufficient. E.g. externalContext.getSessionMap().put("managedBeanName", null); destroys the session scoped bean associated with the specified managed bean name.
3. This is the ideal solution. Unfortunately, the documentation is not very good, and I could not find examples. Hopefully this will make its way into JSF 3.0.Can't help any much with this further.

Similar Messages

  • Better way how to get list of all classpath URLs in runtime

    Hello everyone,
    How to get list of all classpath items (URLs) in runtime from Java code?
    I am aware of solution based on System.getProperty("java.class.path"). Is there any alternative?
    This solution has several drawbacks. You have to parse String output. And I not sure if it contains ALL resources (JARs, class directories) loaded by ClassLoader or just reflects -cp arguments.
    Does system property "java.class.path" contain ALL loaded JARs?
    Does it contain items (JARs, class directories) loaded by bootstrap classpath?
    What about JARs loaded in runtime?
    Is the separator ":" always same on all operation systems?
    I was looking for some Java API based solution, method like List<URL> getAllClasspathItems()
    But there is nothing like this in ClassLoader, Class, Runtime or System classes.
    For curious, here is code I use.
    String classpath = System.getProperty("java.class.path");
    StringTokenizer st = new StringTokenizer(classpath, ":");
    while (st.hasMoreElements()) {
         System.out.println(st.nextElement());
    }

    For curious, here are output prints for all 3 methods:
    1) parsing system property
    2) tschodt
    3) overcast SystemClassLoader to URLClassLoader
    /home/espinosa/workspace/jboss_embedded_test1/target/test-classes
    /home/espinosa/workspace/jboss_embedded_test1/target/classes
    /opt/javalibs/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar
    /opt/javalibs/javax/jms/jms/1.1/jms-1.1.jar
    /opt/javalibs/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
    package com.sun.org.apache.xerces.internal.impl.validation, Java Platform API Specification, version 1.6
    package com.thoughtworks.qdox.directorywalker
    package com.sun.org.apache.xerces.internal.parsers, Java Platform API Specification, version 1.6
    package java.util.jar, Java Platform API Specification, version 1.6
    package org.testng.internal.thread
    package com.sun.org.apache.xerces.internal.util, Java Platform API Specification, version 1.6
    package java.net, Java Platform API Specification, version 1.6
    package sun.reflect.misc, Java Platform API Specification, version 1.6
    package esp.ejb.samples1.test
    package sun.security.provider, Java Platform API Specification, version 1.
    file:/home/espinosa/workspace/jboss_embedded_test1/target/test-classes/
    file:/home/espinosa/workspace/jboss_embedded_test1/target/classes/
    file:/opt/javalibs/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar
    file:/opt/javalibs/javax/jms/jms/1.1/jms-1.1.jar
    file:/opt/javalibs/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
    ...Interestingly, method 1 and 3 gives the same list, same order, same count, just format of item is a little bit different. The order is same as in Eclipse .classpath file.
    Method 2 (tschodt) give significantly more items! rougly 3x! Different order (somewhat random it seems to me). Some items contain extra information, like version and string "Java Platform API Specification".
    It prints not absolute paths but logical Java names.

  • How to get - List of all the ad hoc reports in BO 5.1?

    Hi All,
    I want list of all the ad hoc reports in BO 5.1.
    Name of ad hoc report and user would be ideal.
    How can i get? Does anybody know how to get the list?
    Please help me.
    Thanks in advance!
    Amol Mali

    Wrong forum. Please mnove or reporst to Legacy forum:
    SAP BusinessObjects BI Legacy Products
    Ludek

  • How to get list of all sp farm solutions using powershell?

    is there any powershell script can list down all solutions deployed on farm in txt or cvs file?

    Thanks. but this is showing all features. I need only our custom developed features
    Get-SPFeature >> c:\temp\feature.txt
    Let me know how to get?

  • How to get List of  all activated Info objects in sap BI production system

    Hi Experts,
             For my requirement  I need list of all activated info objects in sap bi production system.
    Can any body suggest any thing.

    Hi,
    Check in the following table, all the below tables are for InfoObejct related only
    RSDIOBJ -
    Directory of all InfoObjects
    RSDIOBJT------ Texts of InfoObjects
    RSDIOBJ------- Directory of all InfoObjects
    RSDIOBJT----- Texts of InfoObjects
    RSDATRNAV------ Navigation Attributes
    RSDATRNAVT----- Navigation Attributes
    RSDBCHATR------ Master Data Attributes
    RSDCHABAS------- Basic Characteristics (for Characteristics,Time Characteristics, and Units)
    RSDCHA----
    Characteristics Catalog
    RSDDPA -
    Data Package Characteristic
    RSDIOBJCMP----
    Dependencies of InfoObjects
    RSKYF----
    Key Figures
    RSDTIM----
    Time Characteristics
    RSDUNI -
    Units
    Thanks
    Reddy

  • How to get list of all customers

    Good Morning ,
      I want to find out 1) LIST OF CUSTOMERS
                               2) CONTRACTS.
    WHERE IS IT THAT I CAN VIEW ALL THE SALES ORDER  AND WHERE DO I CHECK IN FOR TEH CONTRACT ANY T CODE  , please guide me on this
    Regards

    You can find out the list of all customers in the following database tables.
    KNA1----General data
    KNB1----Company code data
    KNVV--Sales area data
    KNVP---Partner function data
    Sales orders and contracts can be found using the tables VBAK and VBAP. The status of the documents can be seen in VBUK, and VBUP
    Contracts can be displayed in VA43 (VA41, VA42 and VA43)
    Hope this helps.
    Reward if this helps.

  • How to get list of all class names in a package

    hi,
    how can i get all the names of classes in a specified package, for example, if i want to get all names of
    classes in package java.util through java application.

    hi,
    if u read my question with open eyes , i wrote " with java application" not with java API .

  • How to get list of all the dates between two dates

    Hi, Can anybody please help me ..
    I have two dates in string format ("dd/MM/yyyy).I need to get all the dates in between these two dates.How can I do thin in java
    Thanks in advance

    Look at classes Calendar and SimpleDateFormat.
    And get your abstraction straight: you don't have two dates. You have two Strings that represent a date. To use them, you have to convert them to Date objects first with SDF.

  • I want to get List of all active sessions in current system

    Hi experts
    How to get list of all active sessions in current system in any internal table along with details.
    A sample code wud be helpful
    Thanks in advance.

    try this code it might help u.
    Below report execution gets the active Session list to ABAP memory
    submit rsm04000_alv and return exporting list to memory.
    refresh: gt_listobj.
    Below FM get the List output from ABAP memory to gt_listobj in HEX
    call function 'LIST_FROM_MEMORY'
      tables
        listobject = gt_listobj
      exceptions
        not_found  = 1
        others     = 2.
    if sy-subrc <> 0. " Executed successfully ?
      message id sy-msgid type sy-msgty number sy-msgno
      with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    This FM converts ITAB gt_listobj from HEX to ASCII
    call function 'LIST_TO_ASCI'
      tables
        listasci           = it_list
        listobject         = gt_listobj
      exceptions
        empty_list         = 1
        list_index_invalid = 2
        others             = 3.
    if sy-subrc <> 0. " Executed successfully ?
      message id sy-msgid type sy-msgty number sy-msgno
      with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    This Shows the output in List format on screen
    call function 'REUSE_ALV_LIST_DISPLAY'
    exporting
       i_structure_name                  = 'line'
      tables
        t_outtab                          = it_list
    exceptions
       program_error                     = 1
       others                            = 2.
    if sy-subrc <> 0. " Executed successfully ?
    message id sy-msgid type sy-msgty number sy-msgno
             with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.

  • How to get list of fonts on current system(forms6i)

    Does anyone know how to get list of all available fonts on system. I want to add available fonts to list item (forms 6i) dinamicaly.

    depending on what exactly you want to know:
    System.getProperty("java.version")
    System.getProperty("java.vendor")
    System.getProperty("java.vm.version")
    System.getProperty("java.vm.vendor")
    System.getProperty("java.vm.name")
    Nick.

  • How to get list of queries .....

    how to get list of all queries on a particular cube, with descriptions?
    (meta data repository is not avilable)

    Hi..
    1. In the Bex you can fild the list of queries under a data target, by opening 'Queries'.
    In the dialog box that appears, select the Infoarea button which is in the left pane.
    You will get list of all Data targets. If you expand it you can find the queries built on those data target.
    2. If you want to get the list of queries from Tables, you have to link the following tables:
    RSZRANGE
    RSZELTXREF
    RSZELTTXT
    RSRREPDIR
    RSZSELECT
    RSZCOMPDIR
    Regards,
    Debjani..

  • How to get list of software installed in a system

    How to get list of softwares installed in a system?. should i use registry to get information or control panel?
    is there any package available for this? how should i start with/
    thanks

    How to get list of softwares installed in a system?.Using native code, if at all.
    should i use registry to get information or control panel?Linux has neither.
    is there any package available for this? how should i start with/ Learn the Windows API or Google for some native tool.

  • How to read list of all files in folder on application server?

    How to read list of all files in folder on application server?

    Hi,
    First get the files in application server using the following function module.
        CALL FUNCTION 'RZL_READ_DIR_LOCAL'
          EXPORTING
            name     = loc_fdir
          TABLES
            file_tbl = int_filedir.
    Here loc_fdir contains the application server path.
    int_filedir contains all the file names in that particular path.
    Now loop at int_filedir.
    OPEN DATASET int_filedir-name FOR INPUT IN TEXT MODE ENCODING  DEFAULT MESSAGE wf_mess.
    MESSAGE wf_mess.
        IF sy-subrc = 0.
          DO.
            READ DATASET pa_sfile INTO wf_string.
            IF sy-subrc <> 0.
              EXIT.
    endif.
    close datset int_filedir-name.
    endloop.

  • How to get list of drives present in local file system?

    Hi all,
    I want to show all drives and their contents using JTree.
    Does anybody know how to get list of drives present in local file system?

    Thank you!
    I have new question.
    I want to disply size and file type. Can you give ur suggestion in order to do that?
    I want to provide following using JTree
    + root <Dir> 50KB
    - file1 <txt> 10KB
    - file2 <bmp> 20KB
    + root2 <Dir> 200KB
    -file1 <jpeg> 50KB
    Is this possible?
    Plz reply..........
    bye

  • How to get list of tables used in packages

    Dear All
    Can you pls tell me how to get list of tables used in packages
    Regards

    select referenced_name
      from user_dependencies
    where name = 'your_package'
       and referenced_type = 'TABLE'Regards,
    Rob.

Maybe you are looking for