Variable of Bean Value to be used in many pages.

Hi all,
My situation is as follow: I have a page PG1 and when it is rendered I'd like to keep a value in something that I could use in PG2 that calls the PG3 and so on. I tried to use session values with pageContext.putSessionValueDirect("vSession",sessionValue) created in the PG1s Controller but when I tried to catch the value in the PG2 Controllers with pageContext.getSessionValue("vSession") it returns null. The way I'm calling PG2 from PG1 is through Destination URL.
I can resolve my problem passing the value in the URL but it doesnt seem the best way of keeping a value during all navigation.
Any suggestions?!?!?!
Thanks

Hi,
There are many ways that you can achieve this requirement. I would not prefer to use the Transaction and Session to hold values, except for the following cases.
- Session: Until you need to persist the value between two applications within the same session. i.e. holding the value till you move back to the originating application from the application you've navigated to.
- Transaction: Until the server needs to get hold of a value from the client. Or ever within the server objects.
For you requirement, I would suggest you to go ahead for the Properties View Object, you can get more details on this in the OAF Guide. Please note that this would work only if the AM is retained across the pages.
HTH.
Srinath.

Similar Messages

  • Region used in many pages

    Hello All,
    There are many pages in my application that uses the same region, is there any way to create a single region and use it on every page?
    Thanks

    Hello,
    create the region on page zero.
    Regards,
    Dirk

  • How to clear the Managed Bean Values prior to load a JSF page

    Hello.
    I have a jsf page that contains fields that need to be cleared BEFORE the page is loaded.
    My managed bean where the fields are linked (I�m using the value attribute) is in the SESSION scope because I need to control they values across a popup window and if I use request scope, my vectors that load objects like dataTable are cleared when I post the form.
    My question is :
    How I CLEAR all the values in the managed bean BEFORE the page is loaded ???
    In the WebForms (Microsoft .NET) I have an method on the codebehind called Page_Load where I put my initialization code for my page.
    Thanks in advance.
    Rog�rio

    Rog�rio,
    You can do this with a PhaseListener. Just regiser a new listener for the RESTORE_VIEW phase, and implement the beforePhase method; you can do this in the backing bean's constructor, or somewhere elase. This is pretty much the same as the Page_Load event handler in .NET.
    Kito D. Mann
    Author, JSF in Action
    http://www.jsfcentral.com - JSF news, info, and FAQ
    Hello.
    I have a jsf page that contains fields that need to be
    cleared BEFORE the page is loaded.
    My managed bean where the fields are linked (I�m using
    the value attribute) is in the SESSION scope because I
    need to control they values across a popup window and
    if I use request scope, my vectors that load objects
    like dataTable are cleared when I post the form.
    My question is :
    How I CLEAR all the values in the managed bean BEFORE
    the page is loaded ???
    In the WebForms (Microsoft .NET) I have an method on
    the codebehind called Page_Load where I put my
    initialization code for my page.
    Thanks in advance.
    Rog�rio

  • How to assign bean value to a local variable in JSP using struts.

    Hi everybody!
    I've a problem that puzzled me on how to assign a bean value to a local variable like String in JSP using struts.
    we can have someting like this to display the value
    <bean:write name="detailService" property="status" />or
    <bean:define id="theStatus" name="detailService" property="status"/>
         This is country: <%=theStatus%>but an error occured when I tried like this:
    String currentStatus = "<bean:define id="theStatus" name="detailService" property="status"/>";
    or
    String currentStatus = "<bean:write name="detailService" property="status" />";Is there a way to do this?.....
    Any help pretty much appreciated

    Java != JSP.
    The <bean:define> and <bean:write> tags are custom tags meant to appear in the HTML section of a JSP file, as opposed to the scriptlet section. They actually get turned into java code as part of the translation process.
    The <bean:write> tag naturally just writes out what you tell it to.
    The <bean:define> tag defines a local variable, and gives it a value.
    this should do it.
    <bean:define id="theStatus" name="detailService" property="status" type="java.lang.String"/>
    <%
      String currentStatus = theStatus;
    %>With the advent of JSTL, you shouldn't really need to use scriptlet code anymore. Personally I am for 0% scriptlet code in any jsp I write.

  • Using a variable as a value in jsp:param

    I was wondering, I have a String variable, vid_1, and want to use a jsp:include and pass that in as one of the parameters. How can I do this? I have to do some testing to make sure vid_1 is valid and set a default if not. It contains a number referring to which video needs to be displayed.
    Is there anyway I can get this value to be used in jsp:param value?
    John

    RahulSharna wrote:
    Well,First thing you haven't pharsed your question properly.
    Anyways as per my understading.
    The first thing is make use of in this case as your defined requirement states you need to make use of variables of both the JSP's which need compile time include not at the runtime.use of
    <%@ include file="url" %>would be more appropriate as you want to use the variable of parent jsp to the child one.
    Anyways if you are thinking to apply a solution using <jsp:include/>
    <jsp:include page="url">
    <jsp:param name="paramName" value="<%=stringVariable>"/>
    </jsp:include>and extract the paramName's corresponding value as a request parameter in other JSP.
    Hope that might answer your question :)
    REGARDS,
    RaHuLRaHul,
    Thanks for the reply. The second example you gave is what I was trying to do. I thought I did exactly what you have there and it was not working. I will check it over again and post back on here when I have a chance.
    For now I was trying to use c:set to save the variable in the request and then using the EL expression ${requestScope.variable} to put it in the <jsp:param> element. I had some things working and others not when I quit. Hopefully tomorrow I can give you a full report and we can get this worked out.
    Maybe my problem is something else? Look at this post of mine:
    http://forum.java.sun.com/thread.jspa?threadID=5236252&tstart=10
    Thanks so much for the help.
    John

  • Report script - using substitution variable with multiple values

    Hi All,
    Substitution variable with multiple values is not working correctly with Report scripts. Can you please let me know what is the syntax to assign multiple values to a sub variable using maxl:
    alter database samp.samp set variable 'ExtractQuarter' 'Q1,Q2,Q3,Q4';
    alter database Samp.Samp set variable 'ExtractQuarter' 'Q1:Q4';
    I tried both of the above but they are errored out with the below error:
    Error: 1001005 - Unknown Member [Q1:Q4] in Report.
    my requirement is different for both Actual and forecast data extract so i would like to make use of this variable to extract whole year data for Forecast and current quarter data for Actual with out duplicating the report scripts for both processes.
    Thanks,
    PRaveen

    Hi,
    Please refer following thread,
    range of months in report script?
    Hope it helps.
    Regards

  • Variable multiple single value filled with customer exit used in FOX form.

    Hi guys, I definitly need your help in the following scenario:
    I have variable (multiple single value) filled in a customer exit and use it in web template. There it is used in the drop down box for selecting a special date in the analysis item. And there comes the first question:Why the results from the customer exit are written in the way "date1; date2; date3" in one line? They should appear line by line in rows. How can I influence that? I tried both data binding types, "variable" and "characteristic".
    Now a button raises a planning function with a fox formula which should write the selected date (from the drop down box) in a customer table using "call function".
    I always get the error, that I need to restrict the variable to "single value". Why do I have to do that and if necessary how can I do that? Other planning functions without the fox formula also work properly with using the selection from the drop down box.
    I appreciate you help.
    Kind regards, Anja.

    Hi Vamsi.,
    Try this code.
    WHEN 'PREVIOUS_YEAR_1'.
    IF I_STEP = 2. "after the popup of user entry
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZCURRENT_YEAR_PERIOD'.
    break-point.
    IF SY-SUBRC EQ 0.
    WA_YEAR = LOC_VAR_RANGE-LOW+0(4). "Year
    WA_MONTH = LOC_VAR_RANGE-LOW+5(3). "Period
    WA_YEAR = WA_YEAR - 1.
    CONCATENATE WA_YEAR wa_month INTO WA_FISC_PERD .
    CONCATENATE WA_YEAR WA_MONTH1 INTO L_S_RANGE-HIGH .
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    ENDIF.
    ENDLOOP.
    endif.
    Assing points if it helps you.
    -- Selva

  • Using bean value in NLS text entry

    Hi all,
    Is there a way I can use the JHeadstart NLS function like
    title="#{nls['HOME_PAGE_TITLE']}"
    and include a bean value in the title
    eg " Welcome #{jhsUser.userId} to my wonderful application".
    I use JHS_TRANSLATIONS to store my text - if I enter the value as above, the jhsUser expression does not get rendered
    Cheers,
    Brent

    Just after posting this message I saw that the exact same thing had been done in the page I had just generated !
    So, the answer is to use this
    text="#{nls['HOME_WELCOME_MSG: #{jhsUser.displayName}']}"Is there a way to inject this in through the JHeadstart application definition ? If I place the value in the Display Title property it further wraps the text with extra nls and {}.
    Is my only option to create a custom template for grouTemplate.vm ?
    Cheers,
    Brent

  • Portal devt - getting the bean value

    hi,
    i am trying to send my bean value as url but some how i am not able to get that value.  can somebody help me plese.
    my statement:
         srcUrl="http://multirater.standardbank.co.za/reportsdev/showlist.asp?per=<%=bwReportsBean.getGuid()%>" 
    here I wanted to use      bwReportsBean.getGuid() as value.  but it is giving error if i use per=.  your help will be highly appreicated.
    my full statement is:
    <hbj:isolatedHtmlContainer
              id="isohtmlCont" 
              width="100%" 
              height="600"            
              scrolling="AUTO" 
              bordered="false"          srcUrl="http://multirater.standardbank.co.za/reportsdev/showlist.asp? per=<%=bwReportsBean.getGuid()%>"            />     
    thanks a lot.

    Hello kata,
    Why dont you declare a variable and then pouplate the bean's value into the variable and then use the varialbe in the url.
    Pradeep

  • Getting bean value in portal devmt

    hi,
    i am trying to send my bean value as url but some how i am not able to get that value. can somebody help me plese.
    my statement:
    srcUrl="http://myurl.com/reportsdev/showlist.asp?per=<%=bwReportsBean.getGuid()%>"
    here I wanted to use bwReportsBean.getGuid() as value. but it is giving error if i use per=. your help will be highly appreicated.
    my full statement is:
    <hbj:isolatedHtmlContainer
    id="isohtmlCont"
    width="100%"
    height="600"
    scrolling="AUTO"
    bordered="false" srcUrl="http://myurl.com/reportsdev/showlist.asp? per=<%=bwReportsBean.getGuid()%>" />
    thanks a lot.

    i used a variable and added the string and the dynamic content and used this varialbe. eg:
    <%
    String myurlq = "http://myurl.co.za/reportsdev/showlist.asp?per=" + bwReportsBean.getGuid();       %>
    then
    <hbj:isolatedHtmlContainer
              id="isohtmlCont" 
              width="100%" 
              height="600" 
              srcUrl="<%=myurlq%>" 
              scrolling="AUTO" 
              bordered="false" 
              />

  • Null values returned when using request.getParameters(

    I have a html form which allows the user to choose options and select a file to upload. When I use method=Post I get null values returned. When I use method=Get I get my parameter values fine.. but I get an error.
    "Posted content type isn't multipart/form-data"
    I would like to know why I am getting null values returned when using Post. I am using the following to get the values from the name=value passed to the servlet.
    String strIndustry = request.getParameter("frmIndustry");
              String strCompany = request.getParameter("frmCompany");
              String strCollabType = request.getParameter("frmCollaboration");
    I have another form where the user can search information in a database that works just fine w/ either Get or Post
    Or perhaps I am using oreilly MultipartRequest incorrectly??? but I copied it directly from another discussion.. ???
    any thoughts
    Thanks

    taybon:
    you could do it like this. in this case, you submit your form with the parameters (industry, company, collaboration), and upload your file at the same time. and in the target servlet, you can build your MultipartRequest object like this:
    MultipartRequest multi = new MultipartRequest(request, temp_location, 50 * 1024);where variable temp_location stands for a temporatory diretory for file uploading.
    and then you get your parameters, so you can build the directory with them. and after that, you can move your file to that directory using File.renameTo();
    but as i've suggested in my previous posting, i just recommend you upload your file in a separate form. and then you can perform an oridianry doPost form submit with those parameters. or you may have problems with the file uploading. (this is just my personal experiences with Multipart).
    there is one other thing i'd like to mention, file.renameTo() won't work if you need to move files to a network drive in windows. it won't work if you move files across file systems in unix.
    Song xiaofei
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support

  • How can I set a variable number of values in a SQL IN clause?

    Hi,
    How can I set a variable number of values in a SQL IN clause without having to change the text of the SQL statement each time?
    I read the link http://radio.weblogs.com/0118231/2003/06/18.html. as steve wrote.
    SELECT *
    FROM EMP
    WHERE ENAME IN (?)
    But we need the steps not to create type in the system and would there be any other solution if we would like to use variable number of values in a SQL IN clause ?
    We are using JDeveloper 10.1.3.2 with Oracle Database 10.1.3.2
    Thanks
    Raj

    Hi,
    can you please explain why the solution from steve is not the right solution for you.
    regards
    Peter

  • Creation of Variable with single values in BPS

    Dear All,
    I have a very basic requirement in creating variables that would accept single values from the user in BPS.
    Could anyone pls provide me the steps in doing so?
    I am able to create and use varibles with value ranges but could not find the option to create variables with  single values.
    Regards,
    Srini.

    Hi Raj,
    I have already been  thru SAP help file but,  though it says we can create variables with single values, it does not  provide any steps in creating it.
    Any suggestions?
    Regards,
    Srinivas Kamireddy.
    Edited by: Srinivas Kamireddy on Apr 25, 2008 7:59 PM

  • How can I get the variable with the value from Thread's run method

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    /* I should get:
    Inside the run method
    But I get only:
    Inside*/
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    Your main thread continues to run after the sathr thread is completed, consequently the output is done before the sathr thread has modified the string. You need to make the main thread pause, this will allow sathr time to run to the point where it will modify the string and then you can print it out. Another way would be to lock the object using a synchronized block to stop the main thread accessing the string until the sathr has finished with it.

  • How to call the form bean value on jsp withthe help of jstl tag

    hi
    all friends
    i am working in struts & i use jstl tag in jsp. i have one problem rise is how to call the form bean value in jsp page by using jstl tag.
    i now how to retrive the value through jsp:logic
    eg. <logic:empty name="userListForm" property="users">
    NO USER FOUND
    </logic:empty>
    see * userListForm mean formbaen name.
    * users means collection object.
    so how can i write above e.g in jstl

    You use the jstl core:if or core:choose combined with the EL:
    <c:if test="${empty users.userListForm}">
    NO USERS FOUND
    </c:if>I suggest you lookup the jsp expression language (EL) using google, it's very powerful.

Maybe you are looking for

  • Pavillion Elite e9120y Hangs at HP splash screen, I've tried it all...

    About a month ago I came home to find my PC stuck on the HP splash screen. After hours of trial and error I managed to repair the boot sectors by manually inputing codes into a command prompt. Unfortunately, I had to go to work immediatly after. When

  • Options for saving PDF files in Acrobat X Pro

    In Adobe Acrobat X Pro, there are options to Save a file as PDF/A, PDF/X, and PDF/E.  I could not find a description on what those switches/parameters do.  Would appreciate anyone telling me how they differ from a regular Save, or where I can find on

  • HT3669 Epson SX 535WD Unable to send scans to Mac  Book Pro via USB from Epson Printer screen?

    Hi, I have recently updated to mavericks, I am having porblems opperating my Epson sx 535wd scanner?  The printer side seems to work fine! I have downloaded the latest software form the EPSON www site however I am unable to download the Scanner drive

  • All objects property node and grouped objects

    Hi I am trying to position a the objects on my GUI in the centre of the screen using property nodes. However, I do not want to have to have a property node for every decoration, image and control. Is there a way that I can group all the objects and t

  • Starting a resource action on its own

    I have heard that it is possible to start a resource action on its own -- ie, not run as a before/after action for any of the normal operations. It makes sense that this can be done but it is not documented. Can someone please give me an idea of how