Putting an attribute into the request/session/servletContext

Hello,
I would like to add an attribute into the request (or session or servletContext) from JSF. Is that possible? If so how? (I want the equivalent of request.addAttribute only the request object is not available in JSF).
Thanks in advance,
Julien.

you can use <f:param> in combination with the command link component or directly put it with FacesContext.getCurrentInstance().getExternalContext().getRequestParameterParm().put(..)

Similar Messages

  • Putting a HashMap in the portlet session

    I am trying to put a HashMap into a portlet session bean, so I am using this code
    HashMap sectype = getSessionBean(request).getAccess();
                   if (sectype == null){
                   Security security = new Security();
                   Vector secvec = security.findDistinctlevels(division, request.getUser().getID());
                   Iterator i = secvec.iterator();
                   while (i.hasNext()) {
                        sectype.put(i.next(),i);                                   
    getSessionBean(request).setAccess(sectype);
    it is falling over at the "if (sectype == null)" part. is there another way to test if the hashMap has been fullfilled by the session bean or I have to create one?

    "Falling over"?

  • How to get Requester Login information into the request dataset validator

    Friends,
    I need to check whether the requester is part of a group or not before submitting the request. If not I need to throw an error.
    Can you please let me know how to get Requester information.login into the request validator?

    Hi Thiago,
    I am getting the requester id from the requestData in the request data validator. Here is my full code for your reference.
    Bikash - I even tried with RoleManager service but still same error.
    public void validate(RequestData requestData)
    throws InvalidRequestDataException {
    tcUserOperationsIntf UserOppsIntf =Platform.getService(tcUserOperationsIntf.class);
    try
    tcResultSet result=UserOppsIntf.getSelfProfile();
    result.goToRow(0);
    String requesterID = result.getStringValue("Users.User ID");
    String userKey=result.getStringValue("Users.Key");
    System.out.println("Request Login:"+requesterID);
    if (isMemeber(getOIMGroupKey("testGroup"),userKey))
    System.out.println(requesterID+" is a Member");
    else
    System.out.println(requesterID+" is not a Member");
    String reason = "Note[REQUEST_SUBMISSION_ERROR].text:You are not authorized to submit this request.";
    throw new InvalidRequestDataException(reason);
    catch(Exception e) {
    e.printStackTrace();
    private String getOIMGroupKey(String GroupName) throws Exception
    String groupKey="";
    tcGroupOperationsIntf groupInstanceOps = Platform.getService(tcGroupOperationsIntf.class);
    HashMap searchFor = new HashMap();
    searchFor.put("Groups.Group Name", GroupName);
    tcResultSet results = groupInstanceOps.findGroups(searchFor);
    for (int i = 0; i < results.getRowCount(); i++) {
    results.goToRow(i);
    groupKey = Long.toString(results.getLongValue("Groups.Key"));
    System.out.println("GroupKey:"+groupKey);
    return groupKey;
    private boolean isMemeber(String groupKey,String userKey) throws Exception
    boolean member=false;
    try
    tcGroupOperationsIntf groupInstanceOps = Platform.getService(tcGroupOperationsIntf.class);
    long grpLong = Long.parseLong(groupKey.trim());
    tcResultSet grpResultSet = groupInstanceOps.getAllMembers(grpLong);
    for(int i=0;i<grpResultSet.getRowCount();i++)
    grpResultSet.goToRow(i);
    long usrKeygrp = grpResultSet.getLongValue("Users.Key");
    if (usrKeygrp==Long.valueOf(userKey))
    member=true;
    break;
    catch(Exception e) {
    e.printStackTrace();
    member=false;
    return member;
    }

  • How do I delete old email addresses from the pop up list that comes up when I put a letter into the "To" box. These addresses are not in my address book.

    How do I delete old email addresses from the pop-up list that comes up when I put a letter into the "To" box? They are not in my Address Book.  Wrong addresses get in the way and I sometimes select the wrong one.

    Edit the list the comes up when you go to the Window menu and select "Previous Recipients".
    charlie

  • How come F10 does not put my clip into the timeline ?

    How come F10 does not put my clip into the timeline ?
    When I pressed F10, the sound icon appears instead.
    Am I missing out something ?
    Thanks

    skalicki` wrote:
    Technically, to make the function keys work you don't need to change the second box to dash. I don't know why I gave that advice, but it isn't necessary. I guess I said that simply because that's what I have it set to.
    The reason there are two boxes is so that you can set Exposé to using both the function keys and the mouse. For example, if I have +All Windows+ set to F9 and Secondary Mouse Button, then it will show all open windows if I click F9 or right-click. That is why you actually don't need to have the second boxes for any of these set to dashes. You could set them to your mouse buttons, or if you wanted you could set the first box of any of these to any function key, as long as it isn't set to the same one as the key you want to use for your shortcuts within FCE.
    I hope this made sense, I realize that I might not have explained it very clearly.
    Message was edited by: skalicki`
    Thanks skalicki, I think I got it. You've been of great help !!

  • How can I put my bookmarks into the sequence I want, alphabetical or otherwise?

    How can I put my bookmarks into the sequence I want, alphabetical or otherwise?

    http://kb.mozillazine.org/Sorting_bookmarks_alphabetically <br />
    http://kb.mozillazine.org/Sorting_and_rearranging_bookmarks_-_Firefox

  • Windows Server 2008 R2 Remote Desktop - The requested session access is denied

    Hi, I have been using Windows Server 2008 R2 since it was released, and have 100 servers up and running. I configured Allow Remote Desktop on all of them and have been able to connect to them and manage them via RDP since then. I also have two servers configured as Remote Desktop Services.
    That was up until yesterday. Yesterday afternoon I started getting the The requested session access is denied. I managed all Terminal services via Group Policy and have three users entered.
    I am connecting to the servers via Windows XP SP3 and Windows 7. Both clients have been updated to the latest Remote Desktop Services client.
    I have been searching for the answer, and I am not finding it.
    I have also tried KB954369 without any success. 
    Thanks,
    Brian

    Ok, from my trials and tribulations and discussions with Microsoft I have identified the following;
    Assumptions;
    A. My terminal server is in domain widget
    B. All the users are in domain contoso
    1. I had the Terminal Server configurured with a specific Login, which would launch a specific application only and not give them any desktop functions. Wiht this configured this way, I get the error I wrote about.
    2. If I turn the specific login off, then I can login normally and perform the functions as Administrator that I need/want to do.
    3. Microsoft said to configure the Terminal Server with Single Sign-on. I did as instructed and went thru all the steps, however because my terminal server is in domain widget, the users get prompted twice each time for login. Once on the website, and then again as the application launches. Microsoft said that the users needed to Remote Desktop Client 7.x or the self-signed certificate that I have has to be included in the domain contoso certificate authority so that they will not be prompted for the second sign-on.
    4. Conclusions - I need to have a chat with our enterprise security team about including the self-signed certificate in the contoso certificate authority. I need to also work on my RDWeb website so that it meets our company standard look.
    Here are the links that Microsoft provided;
    http://technet.microsoft.com/en-us/library/cc772108(WS.10).aspx
    Enable RDC Client Single Sign-On for Remote Desktop Services
    http://technet.microsoft.com/en-us/library/cc742808.aspx
    Blogs -
    http://blogs.msdn.com/rds/archive/2007/04/19/how-to-enable-single-sign-on-for-my-terminal-server-connections.aspx
    http://blogs.msdn.com/rds/archive/2009/08/11/introducing-web-single-sign-on-for-remoteapp-and-desktop-connections.aspx
    http://blogs.msdn.com/rds/archive/2009/06/05/publishing-in-windows-server-2008-r2.aspx
    http://blogs.technet.com/pfe-ireland/archive/2008/09/05/windows-server-2008-terminal-services-presentation-virtualisation-and-windows-xp-clients.aspx
    I hope this help you in your troubleshooting.
    Brian

  • Manually putting a message in the request

    Hello,
    How do I put a message in the request (being in the action class), manually , so that the tag <h:messages displays it?
    Thanks, regards,
    Javo

    Got it:
    facesContext.addMessage("mess1", new FacesMessage("Hello World"));

  • Can i put photos back into the camera chip once they have been imported into my mac?

    Can i put photos back into the camera chip once they have been imported to my Mac?

    Export them
    File -> Export
    to a folder on the desktop. From there copy them back to your camera.
    Remember, the camera has a quite specific set up of folders, and you'll need to put the files back in the correct place for them to be viewable on the camera.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.

  • Im getting an error message when i put my iphone into the bose doc it says this

    im getting an error message when i put my iphone into the bose doc it says this accessory is not optimized for the iPhone

    Contact Bose Support.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • Every time i put a clip into the timeline it crashes and just has the color wheel i have to force quit the program.

    I just downloaded the trial to see if I wanted to buy instead of using Adobe Premiere.  Every time i put a clip into the timeline it crashes and just has the color wheel i have to force quit the program.  I tried deleting the program and reinstalling it. Please help. Here are my specs
    2.3 GHz Intel Core i5
    16 GB 1333 MHz DDR3
    Intel HD Graphics 3000 512 MB
    OS X 10.8.2

    Is this for FCP-X?
    Wrong forum, you need to post here:
    http://discussions.apple.com/community/professional_applications/final_cut_pro_x

  • I have a macbook.  Whenever I put a disk into the disk drives it keeps ejecting the disk after 2 secs.  How can I fix this?  Thanks

    have a macbook.  Whenever I put a disk into the disk drives it keeps ejecting the disk after 2 secs.  How can I fix this?  Thanks

    I am also having a similar issue. I used Adobe Lightroom and my whole display goes black. Even my laptop screen and the lights on the keyboard go black. I can still hear the fan running, so I assume it is just the display. This is my first Mac and I have had nothing but issues. I think I am going back to Windows after this.

  • After putting still photos into the time line the pop up all over my video when I burn a CD or load to YouTube

    After putting still photos into the time line the pop up all over my video when I burn a CD or load to YouTube.
    The video in FCPX looks fine, But when I load it the photos will play over top of each other or double play.

    Export your project as Quick Time Current Settings by choosing Export Media in the Share menu. See if the movie plays correctly in QT Player. If it does, upload that to Web.
    Russ

  • How do I put a logo into the address line of my browser?

    How do I put a logo into my site so that it shows up on the browser address line at the top of the page?

    Create a favicon.ico file and put it in the root folder, use this site to make one from an existing image file
    Flush your browser cache, it won't appear right away but will show after a few loads

  • Set request attributes from the request attributes

    Using struts chaining actions.
    When using chaining the requestAttributes are lost.
    Is there a way to get all the request attributes and set them back to the request again?
    if so how to do this?
    Thanks.

    Looks like nobody knows :(
    It seems odd that nobody's tried to get InputSelectLOV or DataHandler working with a Struts app...
    ... anyway, on to finding out why the thing's throwing my releasemode away. This really is very like swimming through treacle :(

Maybe you are looking for

  • CUOM error when trying to poll performance data from IPCC Express

    Hi Network Professionals, Using CUOM 2.1 SP1 I get an error when trying to access the Performance menu for a IPCC Express Server in the Service Level View. Error Message: Performance polling is not supported for the current capability. The server is

  • Adding a New Field to Ztable...Missing in SM30

    I added a new key field to a Z table. When I do an SM30, or the already created custom transaction to maintain te table the key field is not there. I even did an SE14 and did an "adjust" to the Ztable...No luck the key field is not there. However, wh

  • Bock a housebank in APP F110

    Hi, I want to block an houbank that already exist in App F110 for a particular co code. Same time it should be available for making manual payments. Can anybody suggest me the way by which i can block it only for APP. Regards, Leena Borker

  • Showing confirmed quantity as 0

    when iam creating the order ,in schedule line data is showing as confirmed quantity as 0 for a line item. May I know the reason. thanking you.

  • How do I set up a new ipad on an existing computer

    I'm trying to set up an iPad 2 on my PC with Windows 7. I already have an iTunes account personly but created a new one for this device. When I plug it in to the laptop iTunes does not see it. I've tried several things to get it to recognize it to no