Transient variables non initialised........

Hi everyone,
I have two transient variables that is causing me problems. In my jsp page I have an entry form with a persist entity button..... The entry form does not have the two transient variables.
Below the form is a table that will display all the records entered by the user.The table coluns comprises of the two transient variables but when i persist these two fields are not filled . I have to click on the table ( as if the table is refreshed to have the variables).
In fact for the display of the tables below I have written in my session bean a method that will retrieve all the records by the user for the current week and set the values for the two transient variables .
My question is how can i fill the transient variables in the table when i persist that is on submit.
I am using Ejb 3.0....
Please help me ...
Regards Lutchumaya

Hi Frank,
here is the code from which i generate the table .... The PPR all is set as you told me...
But how I can change my method in my session facade please help me . Here is my method
/** <code>select object (o) from TrpStimeReports o where o.trpSemployees = :emp and o.weekNumber = :weeknum</code> */
public List<TrpStimeReports> getEmpTrp(Object emp, Object weeknum) {
// return em.createNamedQuery("getEmpTrp").setParameter("emp", emp).setParameter("weeknum", weeknum).getResultList();
Calendar cal = Calendar.getInstance();
if(weeknum == null){
weeknum = cal.get(Calendar.WEEK_OF_YEAR);
//Get the project assigned to the user
List userpro = getUserProjects(((TrpSemployees) emp).getUsername());
TrpSprojects pro = null;
TrpStask taskuser = null;
Long taskid = null;
//Get the user task list for that user
List usertas = getUserTasks(((TrpSemployees) emp).getUsername());
//List of the time report for that user for the current week
List trprepo = em.createNamedQuery("getEmpTrp").setParameter("emp", emp).setParameter("weeknum", weeknum).getResultList();
//proid to store the id of the project
Long proid = null;
//Here am setting the values for the transient variables that are in my TrpStimeReports class
for(Iterator itertrp = trprepo.iterator();itertrp.hasNext();){
TrpStimeReports repo = (TrpStimeReports) itertrp.next();
TrpSprojects prochange = getProjectForAssignment(repo.getProjectId());
repo.setProjectName(prochange.getProjectName());
String taskname =((TrpStask) getTaskById(repo.getTaskId())).getTaskName();
repo.setTaskName(taskname);
return trprepo;
Thank you for your reply
Regards
Lutchumaya

Similar Messages

  • How can we have transient variable value as a parameter for an attribute?

    Hi,
    I am using JDev 11.1.1.2 with ADF11g.
    I have a requirement where I have to display a table with many columns. One of the columns is a drop down whose values are fetched from DB. This is a non-DB item and so becomes a transient variable of the VO.
    There is another column/attribute of the VO that has to first pick the value of the transient variable and display values in the LOV.
    How can this be achieved? Do we have an example link for this?

    Hi simanta,
    According to your description that you are experiencing the issue with passing one textbox's values as parameter to another textbox, you got some errors, right?
    I have tested on my local environment and can reproduce your issue, your issue can be caused by the invalid expression you have added in the parameter for textbox1, you have mentioned that the textbox1 have just one value, for example, if you specify
    the default value and available value using this expression "=first(Fields!Yourfields.Value, "DataSet2")" you will get this kind of error.
    So, I suggest you not using the expression in the parameter, you can add condition in the query to get the proper value for textbox1, you said you also try to create an dataset for textbox1 but not getting the proper values of textbox1, please reference
    to details information below to check if you have done the right actions:
    Create an Dataset(Dateset2) to get the value for textbox1:
    I suppose you want to get the first values from the table, you can use query below instead of the using expression:
    Select Top 1 amount from tablename2
    Add the parameter(Param1) for textbox1, specify both the available values and default values by select the "Get values from a query" (DataSet2)
    In the main dataset(Dataset1), add the filter like below to display the textbox2's values which are  greater than Textbox1:
    You can also filter the data by modify the query of Dataset1:
    SELECT  * FROM   TableName1
    where  SalesAmount >(@Param1)
    If you problem still exists, please try to provide information below to help us more effective to provide an solution:
    How did you get the value for textbox1(Please provide all the expressions or the dataset query you are currently using)
    How did you add the filter to filter the Textbox2 which greater than textbox1?
    Any problem, please free to ask.
    Regards
    Vicky Liu

  • Value not displaying for the transient variable

    Hi all,
    I have added a transient variable in my VO.xml file and assigning a value to it in my code along with other non-transient variables. But that value is not getting displayed on the UI.
    Please help me in understanding the behavior of the transient variables in this context and how will I be able to see that value on the UI.
    Thanks.
    Gurpreet Singh

    hi Gurpreet,
    You can add values to that transient column programatically,either by getiing the row from the iterator and then row.setAttribute('Column_name','Value');
    Or providing value to it in the SQL...

  • How to populate an EO Transient variable used in Conditional expression.

    Hi All
    I have a Unique Key Validator which has Conditional Execution in which I am checking for the value of transient variable and based on that value this validator is invoked.
    Problem is :- When this Conditional expression is processed, transient variable is not populated (code to populate it is written in getter method). As a result of which, I am not getting expected results.
    This is my conditional expression :- source.<Transient_variable> = <some value>
    I tried by replacing this expression as :- adf.object.getterMethod = <some value> , but that gave me the prototype not found error (method is present in EOImpl.java).
    How can I populate this transient variable before it is evaluated in conditional expression???
    Suggestions are welcomed!!!
    Thanks
    Nitin

    Just to explain
    Both adf.object.methodName and source.methodName are used to access EntityImpl methods. Difference is
    adf.object.methodName - used while defaulting the values of attributes
    source.methodName - used in validation expression and raising error messages/warning.
    Thanks
    Nitin

  • What is a Transient Variable and when should it be used

    Hello everyone,
    I just want to know the details regarding the transient variable and when should we use it. what is the significance of this variable?

    Transient variables are not written out when the class is serialized.
    http://java.sun.com/docs/books/tutorial/essential/io/providing.html

  • Flex blazeds/lcds AMF serialization for transient variables

    I am using LCDS and Flex. When I am sending an object from java to Flex, I donot want to send all  the properties. As far as I know,  if you do not want to serialize make a  variable transient.
    eg.
    private transient Date birthDate;
    public Date getBirthDate(){ 
        return birthDate;
    public void setBirthDate(Date val){
        birthDate = val;
        //Some code here.
    Now the serialized object should not have birthDate in it.  But When I  see the AMF logs , the object has the birthDate with value in it.
    Does serialization looks into code and checks the private variable is  transient.( I don't understand how it has access to private property. I  am little confused.)
    Should I mark variable as public. Then getters and setters make no sense  and moreover I write some code in setter method. So I need setter.
    Questions:
    I read in a book(Enterprise flex with blazeds by Brain Telintelo,  Chapter 15) that out of box Blazeds only serializes fileds that have  matching getters and setters. If this is the case, will blazeds even  bothers to check private property as transient.
    Can some body please explain how normal serializtion( not amf  serializtion ) takes place and keeps track of private transient  variables even though they have public getters and setters.
    How do I make a java variable not serialize in Flex/LCDS/BlazeDS environment.
    I have 50-60 variables in objects and 4 or 5 varibales should not be seriablezed. So writing custion Serializer in such a large objects is a big pain. And another disadvantage I see is hibernate will not be able to use this object if I write my own serializer.

    Martin
    Is it possible to post your findings as well ? 
    I'm encountering the same concerns with AMF and could use some help. 
    Ideally, can you assist with the following:
    1.  convert actionscript object graph to amf bytearray
    2.  convert amf bytearray to actionscript object graph
    3.  convert java object graph to amf bytearray
    4.  convert amf byte array to java object graph 
    Thanks,
    -Jonathan

  • Af:selectManyChoice transient variable to show selected rec in edit mode

    Hi All,
    Previous i have asked about af:selectManyChoice.
    My requirement i have two tables HeadTab and ChildTab.
    In my jsff , am showing HeadTab in table grid .In HeadTabVO , i have created a transient variable named chDetail.
    In table grid , am using af:selectManyChoice to chDetail , where user select multiple records. I can successful in get the selected records and saving in the ChildTab.
    Issue : when am in edit mode or revisit the page . Now i need to show the selected /saved records for respective HeadTab Id in chDetail (af:selectManyChoice) .
    I have created view link to HeadTab and ChildTab. How can i show the existing record in selected manner in chDetail transient variable for respective IDs in HeadTab.
    Thanks in advance.

    Frank,
    I'm saving selected records in ChildTab . when user revisits /edit mode , i have to show the records which are saved in ChildTab as selected in the af:selectManyChoice(this is transient variable) .I'm using jspx page.
    Edited by: user9010551 on Nov 5, 2012 9:08 PM

  • Transient  variable

    hi....
    i want to add a transient variable in EO and VO..but i dont know when i have add a transient variable in EO and when i have add a transient variable in EO and in VO.after that i want to give some java code in that transient variable..please tell me where i have to give the code setter or getter..but am getting values for transient values from entity object attributes only.

    Santhosh,
    not sure what your comment was meant to point out.
    Suganya,
    good question.
    Entity-derived view attributes are view attributes which map to a transient entity attribute. In a particular view row, entity-derived view attributes (like persistent view attributes) will never store values directly. Instead, they store pointers to values in the entity cache. Like persistent view attributes, entity-derived view attributes take advantage of Oracle ADF entity caching, which can aid in maintaining a consistent view and may save memory. These attributes are best used for temporary calculation and storage. Entity-derived attributes, unlike persistent attributes, can derive their values from complex SQL expressions, or use no SQL at all in their calculations. Bottom line, you use entity attributes if calculation of transient attributes is an expensive operation so that you want to avoid doing this over-and-over again and to leverage the entity cache for better performance or to share a transient attribute value between different View Object views. Also entity based transient attributes are updateable.
    Frank

  • ADF Transient variables reusage

    Hello,
    I have a question regarding transient variables in VO.
    When defining a view object, can i have in it 2 transient variables that have the default value "SQL" format and can be something like this:
    transVal1 = "SELECT NAME FROM EMPLOYEES WHERE EMPLOYEE_ID = 1"
    transVal2 = "SELECT EMPLOYMENT_DATE FROM EMP_DATES WHERE NAME = transVal2"   (this will return just one value)
    First time asking a question here, hope it's ok.
    Thanks in advance.

    My view component looks something like this:
    SELECT Table1.TABLE1_ID,
           Table1.TABLE1_DESCRIPTION,
           Table2.TABLE2_ID,
           Table2.TABLE2_DESCRIPTION,
           (SELECT DATE FROM (SELECT MAX(DATE) FROM TABLE3 GROUP BY GROUP_ID) AS Table3 WHERE Table3.TABLE3_FK_ID = Table2.TABLE2_ID) AS MAX_DATE    <- transient
           (SELECT SOMETHING FROM TABLE4 WHERE DATE = MAX_DATE) AS SOME_ATTR                                                            <- transient
    FROM  TABLE1 Table1, TABLE2 Table2
    The problem is, that, if i put the SQL in the second transient variable, then i can't use "Table2.TABLE2_ID"
    Thanks in advance.

  • EjbLoad() transient variable

    I have a transient variable that I use to concatenate some information
    before giving it back to the user. The name variable is mapped to the
    database.However the name is create with a trigger on the database to
    add a unique sequence numer.
    When retrieving the points according to the EJB specs the ejbLoad()
    should be called and I can see it being called. I store the value
    retrieved from the database into a transient variable called pointName
    public String name = null;
    transient String pointName = null;
    public ejbLoad()
    pointName = name;
    public String getName()
    return pointName;
    In Weblogic 5.1 everything worked fine and calling getName() will
    retrieve the proper concatenated name. We switched to 6.1 and I can see
    the ejbLoad() being called but us soon as I call getName() the value
    return is null. It seems that the container is resetting the transient
    variable between calls. Any idea???

    I agree that it should be a container problem. The container has to synchronize
    with the database in the ejbLoad() and anytime it passivates it should synchronized
    with the database prior to returning the data to the user. So if you create a
    transient variable in the ejbLoad() you should be able to retrieve it anytime. This
    is the same algorithm that happens with the isModified() method which uses a
    isDirty transient variable. Anyone having the same problem and being able to
    resolve it please help.
    Thanks
    Jeyakumar Raman wrote:
    Hi Nikola,
    Even I faced the same problem, as you told It should be container problem, even
    i could not figure how to resolve,
    if you found anything can you update me.
    Thanks
    Jeyakumar Raman.
    Rob Woollen <[email protected]> wrote:
    I suspect that you're in 2 different bean instances. I'd recommend
    printing out the System.identityHashCode(this) in ejbLoad and before
    you
    call getName.
    -- Rob
    Nikola Kapetanovic wrote:
    I have a transient variable that I use to concatenate some information
    before giving it back to the user. The name variable is mapped to the
    database.However the name is create with a trigger on the databaseto
    add a unique sequence numer.
    When retrieving the points according to the EJB specs the ejbLoad()
    should be called and I can see it being called. I store the value
    retrieved from the database into a transient variable called pointName
    public String name = null;
    transient String pointName = null;
    public ejbLoad()
    pointName = name;
    public String getName()
    return pointName;
    In Weblogic 5.1 everything worked fine and calling getName() will
    retrieve the proper concatenated name. We switched to 6.1 and I cansee
    the ejbLoad() being called but us soon as I call getName() the value
    return is null. It seems that the container is resetting the transient
    variable between calls. Any idea???--
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com

  • Convertion of class variable (static) into instance variable(non-static)!

    Dear all,
    got a slight different question.
    Is that possible to convert class variable (static) into instance variable(non-static)?
    If so, how to make the conversion?
    Appreciating your replies :)
    Take care all,
    Leslie V
    http://www.googlestepper.blogspot.com
    http://www.scrollnroll.blogspot.com

    JavaDriver wrote:
    Anything TBD w.r.to pass by value/reference (without removing 'static' keyword)?Besides the use of acronyms in ways that don't make much sense there are two other large problems with this "sentence".
    1) Java NEVER passes by reference. ALWAYS pass by value.
    2) How parameters are passed has exactly zero to do with static.
    Which all means you have a fundamentally broken understanding of how Java works at all.
    Am I asking something apart from this?
    Thanks for your reply!
    Leslie VWhat you're asking is where to find the tutorials because you're lost. Okay. Here you go [http://java.sun.com/docs/books/tutorial/java/index.html]
    And also for the love of god read this [http://www.javaranch.com/campfire/StoryPassBy.jsp] There is NO excuse for not knowing pass-by in Java in this day and age other than sheer laziness.

  • J2EE session variables & Non Random Session IDs

    Our server keeps failing our PCI compliance test due to the Session ID's being non random.
    Description: Web Server Uses Non Random Session IDs       Synopsis: The remote web server generates predictable session IDs.      Impact: The remote web server generates a session ID for each connection.  A session ID is typically used to keep track of the actions of a user while he visits a web site.  The remote server generates non-random session IDs.  An attacker might use this flaw to guess the session IDs of other users and therefore steal their session.  See also : http://pdos.csail.mit.edu/cookies/seq_sessionid.html        Data Received: Sending several requests gives us the following session IDs : CFID=896744 CFID=896745 CFID=896746 CFID=896747 CFID=896748      Resolution: Configure the remote site and CGIs so as to use random session IDs.       Risk Factor: Medium/ CVSS2 Base Score: 6.4       AV:N/AC:L/Au:N/C:P/I:P/A:N
    We are using J2EE session variables which I though was the more secure option. Is there something else you have to do to guarentee that the Session ID's are non random or is this the Compliance test picking up on a false positive?
    P.S. It's a recent migration to CF10, don't know if that has anything to do with it.

    Personally, I use the client scope instead of the session scope so that I don't have to worry about sticky sessions.  That has always worked out nicely for me.
    I read that article you referenced, and it's got some interesting stuff.  In particular, I have seen the client scope database tables not purge as they're supposed to.  And the stuff about preparing, executing, and then unpreparing SQL statements on each request is alarming, if true.
    However, I have to say that I have never, ever, ever, ever had performance issues due to client variables.  Not once.  Whatever performance hit my application may incur from using client variables has, to this point, been completely dwarfed by the performance of the application itself.  And, c'mon, the stuff about being lazy because you don't want to spend precious engineering time worrying about something like session management (which is never going to add value to your product) rather than coding something actually useful to your end users...that seems overly harsh to me.
    I completely agree that storing client vars in the Windows Registry is bananas, as is the defualt 90 day purge limit (though as of CF 9.0.whatever, the default is 1 day, 7 hours, so clearly they've made some changes since this article was written).  But I'm loathe to throw away client-based management.
    I think, getting back to the issue at hand, that this may be a false positive.  CFID is sequential, but CFTOKEN is not; that should really be the end of the story.  I'll see if McAfee will listen.  (-;

  • Inaccessible with local variable(non-final) via method local inner class

    Hi All,
    Usually local variables, including automatic final variable live on the stack and objects & instanace variables live on the heap.The contracts for using the method local inner class should allow merely method final variable, not non-final stack variable.
    Can anyone please clarify me ,behind the scene what is actual fact why method inner class should not access the stack(method) variable and only allow final variable?
    Is anything correlated with the stack and heap aspects?
    Thanks,
    Stalin.G

    [email protected] wrote:
    ...behind the scene what is actual fact why method inner class should not access the stack(method) variable and only allow final variable?...explained by dcminter and Jardium in [an older thread|http://forums.sun.com/thread.jspa?messageID=10694240#10694240|http://forums.sun.com/thread.jspa?messageID=10694240#10694240]:
    ...Final variables are copied into inner classes - that's why they have to be declared final; to avoid the developer making an incorrect assumption that the local variable can be modified and have the change reflected in the copy.
    When a local class uses a local variable, it doesn't actually use the variable. Instead, it takes a copy of the value which is contained in the variable at the moment the class is instantiated. It's like passing the variable to a constructor of the class, except that you do not actually declare any such constructor in your code.
    To avoid messy execution flows to be present in a Java method, the Java language authors thought it was better to allow a single value to be present in such a variable throughout all its life. Thus, the variable has to be declared final.
    ...HTH

  • Using transient variables

    I have a class which implements Serializable
    and I was wondering if there was anything
    I could do to speed up transfering this class
    from Server to Client. The class contains
    two String variables which are set on the server
    and then passed to the client. Would it make
    sense to make them transient or would I then
    loose their values when they get passed to the
    server?

    You would lose the value when your object is serialized.
    If you want to optimize the serialized data, you can implement writeObject() and readObject() -- see the documentation for java.lang.Serializable for more details.

  • Webutil - variable bean initialisation time

    Hi
    I have a 10g web form which checks a registry value to determine whether to allow access to another screen or not.
    The read_registry is done on form startup and is therefore in a timer. The problem I have is that it seems that the time webutil takes to initialise and become available seems to vary.
    It seems to take longer if it is the first time java has run since the pc started or if the pc is a low spec.
    Has anybody else faced similar problem? Is there a tight way to know when webutil is ready and available for use? It would be great to have a when-webutil-available trigger
    thanks
    paul

    Hello,
    Maybe this comes from the HIDE parameter. Actually, the bean area have to be shown (so its visible property must be true and the canvas must be displayed) to be taken into account.
    Francois

Maybe you are looking for

  • Remote Desktop and Licensing

    I wrote my own licensing scheme and I would like to know how to prevent multiple executions of my app. The licensing is on a per machine basis where it looks at the mac address of the computer to see if it's allowed to run. Because through remote des

  • Ipod freezing when connecting to pc

    i just purchased a 30 gig ipod this summer, but when i plug it into my pc, the ipod lights up and freezes on the first menu...the ipod stays on this screen until the batteries drain. This has happened all but one time when plugging it in. i can't eve

  • Windows 8 libraries don't sort/group by metadata (like Windows 7 could)

    One of the great things about the Windows 7 libraries was the way they let you group and sort the stuff in them. For example, in the music library you could sort by artist, and it would group them by albums (see attached). By contrast, the Windows 8

  • SAP - SRM Integration

    Hello, First of all I'd like to say that I do not know anything about SAP. Recently I have switched one of my client's hosting company and shortly after I started hearing complaints from my client that his client cannot order from the catalog. Turns

  • Manage Auto Attendent Prompts from Outside Network

    Is it possible to manage, edit, change auto attendant prompts in CME from outside network i.e.: calling in from outside line? Any help would be greatly appreciated!