How to get an session BackingBean out of the FacesContext

Hi,
I want to make my appliction userdependent (each user only see's his own data).
There fore I created a UserBackingBean with a session scope.
An attribute of my other backingbeans is the User object. In my UserBackingBean I want to create a static method that returns the current user. Only I don't know how to get the UserBackingBean from a FacesContext.
Please help?
Romano

... and if you decide there MAY be several users logged in simultaneously, you can get the user associated with the current session by doing :
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
Map sessionMap = externalContext.getSessionMap();
UserBackingBean userBackingBean = (UserBackingBean)sessionMap.get("userBackingBean");assuming you labeled your UserBackingBean managed bean "userBackingBean" in your faces-config.xml

Similar Messages

  • How to get Portal Session Time out values of CRM system

    Hi,
    I had a requirements to pass the Portal session Time out value to the External Configurator. How can I get that value. Is there any Function Module to get this value.
    If you go to SMICM and select services, we see HTTP details. I need to get the Time out value what its showing there. How can I get that value. Is there any FM to get that value or Is there any existing code.
    Please let me know if you need any further information.
    Thanks.

    Hi
    The session time out value for CRM WEBUI is controled by parameter RDISP/PLUGIN_AUTO_LOGOUT.
    Its value is got by BSP.
    Please check in SE80 BSP application CRMCMP_IC_FRAME view hideenview.htm.
    If you want to know the session time out value for portal, I am afraid that you need to raise questions in EP's forum.
    Best regards,
    Maggie

  • How to get Portal Session Time out values.

    Hi,
    I had a requirements to pass the Portal session Time out value to the External Configurator. How can I get that value. Is there any Function Module to get this value.

    Hi
    The session time out value for CRM WEBUI is controled by parameter RDISP/PLUGIN_AUTO_LOGOUT.
    Its value is got by BSP.
    Please check in SE80 BSP application CRMCMP_IC_FRAME view hideenview.htm.
    If you want to know the session time out value for portal, I am afraid that you need to raise questions in EP's forum.
    Best regards,
    Maggie

  • How to get a Connection Matrix out of the FireSight?

    Hi All,
    did someone have a useful hint how i can get a usefull connection matrix out of the FireSight Management to create a Ruleset for the ASA, which is at the moment on pemit any .... Focus should be a list of source and destination IP with port and maybe a counter - did some investigation on the connection events - but it is too much information and too much same events - and i have only events from the last 2 days ... i would like to get the result maybe from one or two weeks - is there a way to do this?
    Thank You in advance
    Helmut

    You can generate reports based on connection events and connection workflows.  You could create a custom workflow with something like Initiator IP, Responder, IP, dst port, count.  That would give you the count of connections between a src/dst IP on a given dst port.  
    As for connection history that's a tough one depending on the amount of traffic going through your device.  The default connection limit is 1M connections.  You can raise that in the System Policy database setting but be careful as bumping this up too high can cause it to take a long time to process connection event queries.  A week is really all we can ever hope for and even that is often too long (too many connections).

  • How to get a mini disc out of the drive?

    Hi all. I have just made the stupid mistake of putting a mini disc inside my G4 and i cant get it out by ejecting. It is not even detected by the system. People have recomended restarting the system and holding down the mouse button, but that did not help. Others have recomended sliding a business card into the slot, however I'm reluctant to try that due to fear of damaging my system. Is there any safe way to professionally remove this disc? Any help is much appreciated.

    The absolute safe pro way is to pull the drive and open the top. Sorry a pain I know.
    There are other ways, some more dangerous than others
    http://forums.macrumors.com/archive/index.php/t-200014.html
    Richard

  • I bought an iphone of my friend and used my blackberry sim in it, it say i have signal on 3g but imessage and twitter does not work when not connected to wifi, and i dont know how to get it to work out of the house?

    The phone is not stolen but it does not work out side of the house

    if it doesnt match that means your iPhone is not provisioned for the carrier you are trying to use. Your iPhone would need to be unlocked in order to use on other carriers. You will need to contact your carrier to see if this iPhone is unlocked py providing them the IMEI. If the iPhone is not unlocked you will need to contact the carrier that the iPhone is locked to to see if they will unlock the device to use on another carrier.

  • HOW TO GET A REVERSED RECEIPT OUT OF THE AVAILABLE FOR RECONCILIATION

    Hi All,
    We have reversed 3 receipts in Ar as it gave error while posting. Now we are getting these entries in Bank reconciliation report.
    Please suggest.
    Thanks in Advance,
    Ajit

    Hello Ajit,
    Remember there are different types of Receipt Reversal. The two you're probably interested in are:
    Reverse Payment; and
    Non-sufficient Funds
    You would use 'Non-sufficient Funds' in situations where both a credit and debit appear on the bank statement - e.g. A customer cheque that bouces due to insufficient funds. This will be available for reconciliation to a bank statement debit item.
    You would use 'Reverse Payment' when the original receipt was entered in error. This will not be available for reconciliation to a bank statement debit item.
    If you have reconciled a credit to a receipt which you later realise was entered in error it is important that you unreconcile the credit before reversing the receipt with 'Reverse Payment' (as the money has been incorrectly reconciled - and you'll be left with an accounting headache if you don't).
    Regards,
    - Matt Symes
    inKlein Consulting Ltd

  • How to get this report format out ?

    Hello all experts,
    Sample table creations like the following. Note checkno under xcheck table is not unique. Have tried pivotting the xcheck table then link pivoted xcechk with xcert using certno and invno but this willl end up getting duplicate records. Can u please help ? Basically I am stuck at how to get that vendor name out on the report
    create table xcert(
    certseq number primary key,
    certno varchar2(5) not null,
    vendor varchar2(25));
    create table xcheck(
    checkseq number primary key,
    checkno varchar2(8) not null,
    invno varchar2(100);
    Xcert Data
    certseq certno     vendor
    1     C1001     BP GAS
    2     C1002     BUG PEST CONTROL
    3     C1003     BP GAS
    4     C1004     BP GAS
    5     C1005     WILLIES BESTxcheck Data
    checkseq     checkno          invno
    1          EF500001     C1001,C1003,C1004
    2          EF500002     C1002
    3          EF500002     C1005Looking for a following report format
    checkno          invno               vendor
    EF500001     C1001,C1003,C1004     BP GAS
    EF500002     C1002               BUG PEST CONTROL
    EF500002     C1005               WILLIES BEST      Thank you
    Munshar

    Hi, Munshar,
    MunSharmi wrote:
    Frank,
    "I don't see why you would need another column. What would you need to store, or retrieve, that a table like this wouldn't allow?
    Notice my orignal xcheck table data plus a check date column
    {code}
    checkseq     checkno          invno               checkdate
    1          EF500001     C1001,C1003,C1004     11/01/2010
    2          EF500002     C1002               12/10/2010          
    3          EF500002     C1005               01/01/2011
    {code}Sure, if you have other data that you haven't mentioned yet, then you need other columns, and maybe even other tables, to store that data.
    Talking about this would be a lot easier if you described what you were trying to model in these tables, and what the different entities are.
    after nomalization
    {code}
    seq(PK)     checkseq     checkno          invno               checkdate
    1     1          EF500001     C1001               11/01/2010
    2     1          EF500001     C1003               11/01/2010
    3     1          EF500001     C1004               11/01/2010
    4     2          EF500002     C1002               12/10/2010          
    5     3          EF500002     C1005               01/01/2011
    {code}What do checkseq and checkdate represent? What is the realtionship between them? If there is another row with checkseq=3, will it necessarily have checkdate=01/01/2011? If there is another row with checkdate=01/01/2011, will it necessarily have checkseq=3?
    Shouldn't I need to have the extra seq(PK), then use check seq to group the data report to meet users' target format ? Please adviseIt depends on what your entities are. If you explain that, then perhaps I can give some advice about how to model them.
    In general, every type of entity requires a separate table. It looks like xcert represents one kind of entity, uniquely identified by certno. I assume there is some other kind of entity, uniquely identified by checkno, and that you have a table for that which you haven't needed to show in this thread.
    Are you saying that there's some other entity, that is uniquely identified by checkseq? If so, it probably needs a table of it's own.
    Every table should have a primary key. I had assumed that checkseq only served as the primary key of the xcheck table. If it serves some other purpose, then yes, you would need another column.
    Many-to-many relationships usually require a separate table. I was guessing that xcheck was intended to record a many-to-many realtionship between xcert and some other table. Guessing is not always the best way to solve problems. I think it would be better if you explained what you want to do, rather than have me guess at it.
    So far, what you've shown is analagous to an order entry system. One kind of entity is customer, another is supplier. Say you're running a company that sells products from many suppliers to many customers. There is a many-to-many relationship between customers and suppliers. Any customer may buy from many suppliers; any supllier may sell to many cutomers. You may have an orders table that keeps track of that many-to-many relationship. You may also have another entity, salesman, that also has many-to-many relationships with customers and suppliers. Depending on what exactly you consider an "order", there are lots of different ways to model this. Can a single order involve many customers? Can a single order involve many suppliers? Can a single order involve many salesmen? If an order always involves one customer buying from one supplier using one salesman, then you may only need four tables. If the situation is more complicated, then you may need more tables.

  • How to get transacted session in direct mode with jmsra adapter

    Hi,
    I use MQ 4.4u1 release with GF in EMBEDDED mode. I configured several connection factories with NoTransaction/LocalTransaction/XATransaction support. In my app I get a connection factory from JNDI tree, create connection/session/producer and send several messages to queue. Everything works fine when I don't use transactions. But, when I want to send messages in one transaction, the connection always provided to me non-transacted session. The session created via
    Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
    request. I check the session transacted state and acknowledge mode right after i get it:
    log.fine("Session: " + session + "; transacted: " + session.getTransacted() + "; ackMode: " + session.getAcknowledgeMode());
    The log shows me that the session is not transacted and ackMode is 0 (DUPS_OK_ACKNOWLEDGE). If I try to commit the session after messages were sent I get the correct exception:
    javax.jms.IllegalStateException: MQJMSRA_DS4001: commit():Illegal for a non-transacted Session:sessionId=3361979872663370240
    Does anyone know how to get transactional session in direct mode?
    Thanks, Denis.

    I mentioned LOCAL because I misread your post and thought you were suggesting that LOCAL mode behaved differently.
    If you want to send messages in a transaction from within a Servlet then I think you're expected to use a UserTransaction: Here's an example that worked for me:
            Connection connection = outboundConnectionFactory.createConnection();
            Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
            userTransaction.begin();
            MessageProducer producer = session.createProducer(outboundQueue);
            int numberOfMessages = 10;
            for (int i = 0; i<numberOfMessages; i++) {
                Message message = session.createTextMessage("Hello world");
                producer.send(message);
            userTransaction.commit();
            connection.close();I obtained the UserTransaction with this resource declaration:
        @Resource(name = "java:comp/UserTransaction")
        private UserTransaction userTransaction;The EJB spec explicitly states that local transactions aren't supported in EJBs; I haven't found such an explicit statement for Servlets but suspect that JMSRA is taking the same approach.
    As for imq.jmsra.direct.disableCM property - this appears to disable connection pooling and from your post changes other behaviour as well. How did you find out about it (other than by examining the code)? As far as I can see this is not a documented feature and is not necessarily tested or supported.

  • I am trying to buy songs on itunes and half way through the terms and conditions come up, I accept them and press return and then I get a 'session timed out' notice and the sale hasn't gone through - tried loads of times / updating software, any answers?

    I am trying to buy songs on itunes and half way through the terms and conditions come up, I accept them and press return and then I get a 'session timed out' notice and the sale hasn't gone through - tried loads of times / updating software, any answers?

    I am trying to buy songs on itunes and half way through the terms and conditions come up, I accept them and press return and then I get a 'session timed out' notice and the sale hasn't gone through - tried loads of times / updating software, any answers?

  • How to get HTTP session in Applcation Module IMPL file

    Hi Guys,
    Can any one tell me how to get HTTP session in Applcation Module IMPL file ?
    thnks

    You can, but that's not a best practice.
    Re: How to reach HttpContext from model Project

  • How can I get a stripped screw out of the bottom of my iPhone?? I need help, How can I get a stripped screw out of the bottom of my iPhone?? I need help

    How can I get a stripped screw out of the bottom of my iPhone?? I need help, How can I get a stripped screw out of the bottom of my iPhone?? I need help

    Try asking at ifixit.com. The iPhone is not considered user servicable. You're not going to get much help on an Apple sponsored forum.

  • How do I get  camera memory card out of the DVD slot?

    How do I get  camera memory card out of the DVD slot?

    Well, for one thing it shouldn't be in the DVD slot. You can try turning the computer on it's side and see if you can coax it out, but otherwise you will need to take it in for service because the computer has to be disassembled.

  • How do I get my sd card out of the cd slot.. I have tried the method shown on youtube and it is not working

    How do i get my sd card out of the cd slot.. I have tried the method shown on youtube and it's not working

    Shut down the machine, turn it on it's side and shake it out. If you still can't get it try another solution on YouTube, there are many shown. We Have no idea which one you tried. If you still can't get it out take the machien into your local Apple Store or AASP and they will help you.

  • Why do I get a session timed out message?

    Why do I get a session timed out message in iTunes when I try to redeem a gift card?

    I had similar problem. My old Mac (also OS X (10.4.11) was out of sync. The reset clock strategy I read about elsewhere did not work for me. But, selecting Manage > Change Country (at the bottom of itunes window) and selecting (reselecting?) my country did correct the problem.

Maybe you are looking for

  • Tips for printing photos with HP ePrint

    Hello,  I will be giving you guys a couple of tips on how to print photos with HP ePrint. These are general tips to make it a little more easier to use HP ePrint.   #1: Have 4" x 6" photo paper preloaded in your printer The first step in getting qual

  • Audio CD stuck in SuperDrive - Startup will not complete - Can't eject CD

    Disclaimer: I'm troubleshooting this problem for my sister long distance. She has my old iMac 17" Flat Panel G4 with Tiger loaded, SuperDrive, all that. She was loading music to iTunes and put in a homemade audio CD which caused the system to freeze.

  • Facing problem in updating 9810

    i have 9810 model 7.0 version with network provider gsm tata docomo and i have download latest verion of blackberry desktop software and trying to update my device from 7.0 to 7.1 but it is showing no updates found. kindly help me for updating it.

  • Change Color of Line Object

    aLine.border.edge.color.value ="207,29,3"; This doesnt work.. any suggestions?

  • CAN CINEMA DISPLAY BE USED WITH LATEST MACBOOK PRO?

    I'm considering buying the newest 15" macbook pro and using it formy desktop and mobile computer. I use a 27" cinema display. My"computer guy" said that the current macbook pro i have (the modelbefore this latest one) could not handle being plugged i