How to access programmatically requestScope objects

Hi all

in the backup of a page bean, I put a few attributes of the request by using the following code:

FacesContext context = FacesContext.getCurrentInstance ();
HttpServletRequest request = (HttpServletRequest) () .getRequest () context.getExternalContext;
request.setAttribute (< key string >, < MyCustomObject >);

and then I navigate to another page. In this page I fill in some text fields using EL expressions, like #{requestScope. < key string >. < MyCustomObject property >}.
However, when inside the bean of support of this page, I try to access it programmatically using requestScope:

FacesContext context = FacesContext.getCurrentInstance ();
< MyCustomObjectClass > var = < MyCustomObjectClass > context.getExternalContext () .getRequestMap () .get (< key > string);

I get the return code null value.
What can I did wrong that my code does not return the objects I cross the requestScope while the work of EL expressions?

Hello

Set the value to the scope of the application could be the problem (new application could have been created at the point where you call the method to retrieve the value). Try to set the value in the session scope and see.

Jean Lou

Tags: Java

Similar Questions

  • C# how to access bookmark OLE object

    I want to access a specific brand, and then select all the text up to the next book mark in a c# program

    I see that there is a brand book in OLE object, but I'm not able to create the object because the manufacturer is made private,

    How to get a book object mark in this case, I have Acrobat 8.0 professional edition

    I see that no other class can return a book object mark, am I missing something here.

    Otherwise it doenst make sense for Adobe to expose this class

    CAcroPDBookmark pdBookmark = new AcroPDBookmarkClass(); fails because of the following error

    Form1.cs (101): 'Acrobat.AcroPDBookmarkClass.AcroPDBookmarkClass ()' is inaccessible due to its protection level

    I'm sort of strcuk for a few days, all explored internet with a chance

    Any help greatly appreciated

    -I HAVE G

    A bookmark can make reference to many things in a PDF document only one who is a

    a specific part of a page in a document.   Thus, the notion of

    "make all the text between two bookmarks" really makes no sense in

    many cases.

    However, if you really need to do something like that, for cases

    where it would be - this is impossible with c# and Acrobat.  Only a custom

    plugin written in C/C++ has access to parts of the PDF encessary.

  • Using Windows Live Mail. Screen reads, "some items can be hidden because a view is applied. How to access the hidden objects?

    Using Windows Live Mail.  My incoming screen is empty.  There is a message stating: "some items can be hidden because a view is applied.  How can I check to see if there are objects hidden and, if so, what they are?

    It depends on what version of the program that you use, but the key word is seen. In all versions, there are display orders; in 2009, WLMail, they are in the menu display . WLMail 2011, they tape everything what they own. In all versions, press Alt + V to display the available commands. Search, display or hide the options (to hide messages you have already read, for example) or a filter (for filtering messages read, for example).

    Windows Live Mail has its own support at the Windows Live Solution Centerforums. Please address any other question you may have on one of the forums on the right side of this page. You are probably asked to give your version of WLMail and Windows so that the answer may be more accurate.

    • In WLMail to find your version of the software, a press on ALT - H. If it doesn't show you the version and the build number, press on escape to two times, and then Alt - F B.
    • To find your version of Windows, type winver in the start search box and press enter.

    Noel

  • How to access the textfield object that works like a footer?

    Hello

    I need to use an editfield of looking like a footer that will float when the user scrolls the data.

    I put a footer, but now I don't know how can I access that.

    suggestions please!

    Here is my code.

    VFM VerticalFieldManager = new VerticalFieldManager (Manager.USE_ALL_WIDTH);

    searchField = new EditField("Search:","",4,EditField.FILTER_DEFAULT);

    VFM. Add (searchField);

    this.setStatus (vfm);

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=28311&query.ID=72...

    Means of access, you must get the entered value? searchField.getText () does not work?

  • How to access the data object of Perl thread


    I am trying to import the OVF. I got like a lease and start download VMDK. I see the data passing by, but connection times out because I need to call HttpNfcLeaseProgress periodically since a thread separate to keep the connection open. The problem is that I can't find a way to share the data of HttpNfcLease corded Perl object, so that the thread can call the HttpNfcLeaseProgress method. I tried to share the fields type and the value of the MOR HttpNfcLease and build a new MOR in the thread and to call get_view, but I get a segmentation fault. Any help or examples on how to proceed would be greatly appreciated!

    It's COW with a fork.  So if your child's name in the API, this will impact the parent API session.

    You want to be sure that you disable the global VIM.  You can initialize a new VIM session using the same id of session of the parent to the child.  So two sockets.  Just be sure you don't disconnect until you're done with it.  You can change the behavior on VIM goes out of scope (UNDEF) with "unset_logout_on_disconnect()" on the VIM object, so it will not close the session if a child or parent is destroyed.  So make sure that you call logout on your own.

  • How to access the child object of a movieclip

    Hi, I made the pictures dynamically and I access Bastien is child movieclip

    var totalThumbs:Array = new Array()

    var ThumbMC:MovieClip()

    var childThumb:MovieClip()

    var xpos:Number = 10

    for (var i: Number = 0; i < 10; i ++) {}

    ThumbMC = new thumbOb() //thumbOb is the movieclip in the library class

    addChild (ThumbMC)

    ThumbMC.x = xpos

    childThumb = new animationclip() //animationclip is the movieclip in the library class

    ThumbMC.addChild (childThumb)

    ThumbMC.addEventListener (MouseEvent.Click, thumbClick)

    XPos += 100

    }

    function thumbClick(event:MouseEvent):void {}

    event.target.childThumb.gotoAndPlay ("clicked") < < THIS ERROR SHOWING

    }

    There are a number of errors in what you show so I have to imagine that you are not in strict mode minimum of coding.  You should avoid using event.target and event.currentTarget are using, otherwise you are likely to find the target, it's not what you expect it to be.  currentTarget is always linked to the object that has the assigned listening port, not children of that object (using target may end up doing).

    When you add dynamically content, targeting usual syntax parent.child does not work.  You start to use other means of access to the child.  One way is to store the child in another reference (like a table) and directly target.  Another way would be to use the getChildByName() method... Here is an example of using this approach...

    var xpos:Number = 10;

    for (var i: Number = 0; i<10;>
       
    var ThumbMC = new thumbOb();  thumbOb is the class movieclip in the library
    ThumbMC.num = i;
    addChild (ThumbMC)
    ThumbMC.x = xpos
       
    var childThumb = new animationclip() //animationclip is the movieclip in the library class
    childThumb.name = "childThumb" + String (i)";
    ThumbMC.addChild (childThumb)
       
    ThumbMC.addEventListener (MouseEvent.CLICK, thumbClick)
    XPos += 100
    }

    function thumbClick(event:MouseEvent):void {}
    var childThumb is MovieClip (event.currentTarget) .getChildByName ("childThumb" + String (event.currentTarget.num));.
    childThumb.gotoAndPlay ("clicked");
    }

  • How to access EntityImpl ViewObjectImpl object?

    Hello
    We need to write customized for our EO and VO IMPL classes. Is there anyway that an EntityImpl object may have access to inside the method executeQueryForCollection of the ViewObjectImpl?


    Thank you

    You can either get the entitydefimpls of the ViewObjectImpl, or more likely what you want to do is that you can get to the EntityImpl of the ViewRowImpl calling getEntities(). JavaDocs [url http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e10653/oracle/jbo/server/ViewRowImpl.html] here

    John

  • Can someone point out code examples on how to access the windows registry?

    I'm new to the Acrobat SDK/Visual C++ and would like to know how to access the windows registry to view the identity of the current user of the reader.

    I know it's at the following registry location:

    HKEY_CURRENT_USER\Software\Adobe\Adobe Reader\9.0\Identity

    I don't know how to access programmatically by using Visual C++.

    Thank you

    Gregory

    There is nothing special a plugin regarding the registry - standard OS calls work fine.

  • How to access objects collection

    How to access the collections of objects for example ReportSections report? I can access ReportSection, but not his collection...

    Reference: http://www.ni.com/pdf/manuals/372844e.pdf

    Maybe you don't understand exactly what section of the report is. According to the help:

    Use this class objects to store, update and transfer reports. You typically use the ReportSection objects to avoid creating copies of a report that the report is transferred between the generator of reports, process, Report and ReportView control object models. You can create a new ReportSection object by calling the Report.NewReportSection method. ReportSection objects can contain other ReportSection objects.

    As a general rule, a process template creates and updates the ReportSection object and assigns to the report object by setting the Report.ReportSection property.

    It has a sub-property called ReportSubsections , which specifies a reference to the ReportSections object, which is a collection that contains a list of child ReportSection objects to the current object. Looking at this object, it's a list of items that you can index through to get each.

  • How to access info child movieclip to an object in a table?

    Hello

    I created a whole bunch of clips dynamically.

    I gave a name based on a variable number to each item:

    MC. Name = "mc" + i;

    I also use addChild to add some dynamic text fields to each movieClip and named myText1 myText2.

    Then I push each movieClip object in a table:

    myArray.push (mc);

    When I have the movieClips addChild, they display fine, complete with each textField.  And if I use the following loop to find the name of each element of the array, I get:

    for (var i = 0; i < myArray.length; i ++)

    {

    trace (myArray [i]. (Name)

    }

    output:

    MC1

    MC2

    MC3

    MC4

    etc.

    What I want now is to be able to access text fields in each movieclip in the table.  However, I get errors when I try in different ways.  For example:

    for (var i = 0; i < myArray.length; i ++)

    {

    trace (myArray [i].myText1.Text);

    }

    gives error: a term is undefined and has no properties.

    How to access the values and the content of the children of the movieClip objects that are stored in the tables?

    Thank you

    Shaun

    For some reason, dynamically added children cannot be targeted like that.  If you have added the textfields dynamically, you may need to use the getChildByName() target.  It depends in part on how you created and whether or not you have direct access to them.  Aside from that, you can also assign the textfields to the variables that you create for the mc and target those who by their names of variables.

    These two approaches demos the following:

    var mc:MovieClip = new MovieClip();
    addChild (mc);

    var tf:TextField = new TextField();
    TF. Text = "this is the text";
    mc.addChild (tf);

    first way

    TF. Name = "tfield."
    trace (TextField (MC.getChildByName ("TField")). (Text);

    second way

    MC.tfid = tf;
    trace (MC.tfid.Text);

    You can also store the textfields in the tables are created and they have direct access to them with the need to target the mc... the index must be the same as the one you use for the mc anyway.

  • access the document object in the framework

    access the document object in the framework
    ------------------------------------------------
    Hi, MVP!

    There are 2 frames, frame1 and frame2, in my web page. I want to access the document using vb frame1 object and the web browser. How can I write codes front right to do?

    Thank you

    Hi Stanley.K,

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums, since it relates to coding in Visual Basic Application Script. It should be better in Visual Basic on MSDN Forums.

    Please post your question in the MSDN Forums by visiting the following link:

    http://social.msdn.Microsoft.com/forums/en-us/vbgeneral/threads

  • VM simulator - how to access the file system.

    I was wondering if anyone knows how to access the file vmware playbook simulator system.

    I don't want access programmatically, I covered, for access to the file system to copy files to the Simulator in shared directories.

    When you connect a playbook on the USB, it shows up as a drive, and I would like access to the same playbook vm dir structure to copy files for testing. for example if your s app access the pictures on the camera, I would like to copy some images for the test. Any ideas?

    TIA - dave

    Search the forum for more information on using 'ssh' to access the Simulator and more specifically help 'scp' or 'sftp' to transfer files to. You will do this in the files under/accounts/1000/shared, and if you're on Windows you will probably be to install PuTTY to do this. Feel free to ask for help more once you have dug through it all.

  • Screen reader accessibility for noninteractive objects

    I work at 8 Cp and try to do a course entirely compatible Section 508. I tested with the Window-Eyes screen reader. The screen reader can access the reading and fine TOC bar buttons, and it usually recognizes interactive elements on the screen. However, most of the time, the screen reader is not recognizing the legends or the intelligent forms with text on screen. Many slides are just text and a button transparent text to pause the screen, therefore, that I need the screen reader to read the content of the course. According to the documentation, I shouldn't copy the text in the name of accessibility for each object, although I tried in a few places without success. The accessibility feature looks so flaky. From time to time, I can get something to work, but not completely, or I can't repeat.

    I was able to get the screen reader to read the text if I remove all the interactive elements, including the reading and TOC bar. In other words, if I have a class 1-slide, Captivate accessibility works. As soon as I try to give people an option to move to the next slide with a control button or the play bar, it stops working.

    Yes, accessibility is enabled. I tried to hide the rectangle around the objects in HTML5. I tried editing both SWF and HTML5. I tried to text buttons transparent instead click on the boxes, which seemed to make a small difference. I tried different shortcuts and ensured that I never use the same shortcut twice on a single slide.

    How access a screen reader text within Captivate content? The documentation says you can access it with arrows, but it does not work. People do in the real world in order to make it accessible when the program does not work the way that the documentation says it should? I know from reading other threads that some organizations have given up and just went to provide text alternatives.

    I am open to any suggestion.

    My suggestion is that do you what others have already done.  Try to make Captivate content "fully Section 508 compliant" is not a realistic goal.

    As you noted, screen readers prefer to pay attention to the interactive objects.  If you must use interactive objects even for text objects that does not need to be buttons.  (You can set their action IT success to no Action so that they just sit and do nothing.)

    But you're still going to have problems at some point and these questions will be showstoppers.

    So, save yourself a lot of hassle and invoke the clause to exhaust all of the Section 508 and W3C accessibility documents which allows you to offer a "text alternative".  Create an accessible MS Word or PDF document that contains the same content.  You're going to do in a short time it would take you to try in VAIN to get e-learning content of Captivate to satisfy all the rules of Section 508.

    Probably NOT what you wanted to hear, but I really think someone needs to say this.

  • Flash CC: access a specific object on the stage

    I'm writing the javaScript code to execute with Flash CC.

    How can I access a specific object on the stage? It has a name (square_sym), but I can not read the code. What should I do?

    TIA

    He needs an instance name.

    If there is not a button or a movieclip, right click on the object > click on convert to symbol > select movieclip > ok > in the properties panel, enter an instance name, for example square_mc.

    then on the timeline that contains the button or movieclip you can use:

    This.square_mc to reference the movieclip.  other chronologies, there are also pointers to reference the movieclip

  • How to access a nested h AM roots

    Hello

    I have a Module of Application root, and 2 nested Apllication Modules:

    RootAM
    | _NestedAM1
    | _NestedAM2

    In a view object executeQuery() method, published on NestedAM1, I want to call a public method published in NestedAM2.

    I try to do something like this:
        @Override
        public void executeQuery() {
            BasicApplicationModuleImpl rootAm = (BasicApplicationModuleImpl)this.getRootApplicationModule();
            NestedAM2Impl nestedAm2 = (NestedAM2Impl)rootAm.findApplicationModule("NestedAM2");
            
            String lanCode = (String)nestedAm2.myMethod();
            this.setutiLanCode_BV(lanCode);
            
            super.executeQuery();
        }
    But 'this.getRootApplicationModule ()' give me NestedAM1 and not RootAM. So I don't know how to access the NestedAM2 application module.

    Do you know how I can do this?

    Thank you.

    First of all, a few comments:

    (1) you are defeating the spirit of the AMs nested If VO in a nested AM depends on something in a root AM
    (2) even worse, you are really defeating the spirit of the nested AMs if VO in a nested AM depends on something in a nested siblings AM
    (3) you are beating the separation of concerns if VO is based on a method in an AM at all

    So, I'd be looking to change my approach, if I were you.

    That said, I did it in 11.1.2.2 (you don't mention a version, then I went at latest).

    (1) created a simple VO based on "select user to twice.
    (2) overrode executeQueryForCollection as follows:

      protected void executeQueryForCollection(Object object, Object[] object2, int i)
      {
        ApplicationModuleImpl i1 = this.getRootApplicationModule();
        ApplicationModuleImpl i2 = i1.getRootApplicationModule();
    
        _LOG.severe(i1.getName());
        _LOG.severe(i2.getName());
        super.executeQueryForCollection(object, object2, i);
      }
    

    (3) created an AM called "IAmNested" and added the VO above to the data model
    (4) created an AM called "IAmRoot" and added to the data model IAmNested
    (5) ran the IAmRoot AM (also tested with a JSF page)
    (6) a noted two messages in the window of the newspaper, who were both "SEVERE: IAmRoot.

    So, in short, I don't see the behavior you report. Maybe you are actually using AOS nested root AM in this case?

    John

Maybe you are looking for

  • I'm trying to get an e-mail from a zipped file mail folder

    Hello I copied and pasted the local_folders of the ...\appdata\Roaming\thunderbird\profiles\ < profile_name.default > \Mail folder profile in a different directory for backup purposes. I changed the account setting - directory local to point to the n

  • Windows 8.1 drivers ATI Radeon 8750M

    I installed windows 8.1 on my G1 450 Probook and I couldn't find any drivers ATI Radeon 8750 M to her. Windows drivers 8 do not work correctly in windows 8.1. I found another read-only topic with the same name (and post) and a solution very promising

  • PDF file size

    I have a HP Officejet 6500 E710n-z (network) that I use at home to scan to a PDF file, and I know exactly how to move the cursor from the 'Smaller' in 'best quality '. However, the size of PDF files are far too large when the picture quality is accep

  • Windows 7 to automatically connect to the network after the standby or Hibernate mode

    This just started two days ago after an automatic update Windows 7.  Whenever I wake up my laptop, I have to manually connect to the wireless network.  He used to connect on its own.  Not changed anything with the network or router.  I have the conne

  • How to select witho9ut copying

    For everythingn that Microsoft made, can they really make a software that does not increase your workload. Apparenttly, there is this little wiggle where you can't move more than four whatevers and all your files, you are dealing with are copied. Whe