473,480 Members | 1,498 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to retain the value of a variable?

58 New Member
Ive got a java class having a double variable whose value is populated from the front end...
eg..
Expand|Select|Wrap|Line Numbers
  1. public class AccountsCenterAction extends AbstractReportAction {
  2.  private double closingBal;
  3.  
  4. public String method1() {
  5. //stmnts;
  6. }
  7. public String method2() {
  8. //stmnts;
  9. }
  10.  
  11. public double getClosingBal() {
  12.         return closingBal;
  13.     }
  14.     public void setClosingBal(double closingBal) {
  15.         this.closingBal = closingBal;
  16.     }
  17. }
  18.  
  19.  
ive got 2 ftl pages in frontend say page1.ftl and page2.ftl
on saving page1.ftl, i set the value of closingBal = 2300 and goes to method1().
on taking page2.ftl, i go to method2(). i need to get the value of closingBal =2300 in method2()..but im getting closingBal=0.0

how can i retain the value of closingBal when calling from another ftl..?
Apr 24 '07 #1
1 3239
r035198x
13,262 MVP
Ive got a java class having a double variable whose value is populated from the front end...
eg..
Expand|Select|Wrap|Line Numbers
  1. public class AccountsCenterAction extends AbstractReportAction {
  2. private double closingBal;
  3.  
  4. public String method1() {
  5. //stmnts;
  6. }
  7. public String method2() {
  8. //stmnts;
  9. }
  10.  
  11. public double getClosingBal() {
  12.         return closingBal;
  13.     }
  14.     public void setClosingBal(double closingBal) {
  15.         this.closingBal = closingBal;
  16.     }
  17. }
  18.  
  19.  
ive got 2 ftl pages in frontend say page1.ftl and page2.ftl
on saving page1.ftl, i set the value of closingBal = 2300 and goes to method1().
on taking page2.ftl, i go to method2(). i need to get the value of closingBal =2300 in method2()..but im getting closingBal=0.0

how can i retain the value of closingBal when calling from another ftl..?
Post the code you are using for setting the value in the first page.
Apr 24 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
1863
by: Roy Gourgi | last post by:
Hi, I would like to able to able to return a value from a called function but also retain the loop counter in the called function the next time I call it again. TIA Roy
2
3941
by: Bill Cohagan | last post by:
In my app I'm validating an XML file against an XSD which contains several attribute default value specifications. I'm performing the validation via an xml document load() using a...
2
4865
by: theo | last post by:
Hi... I wish to extract the text content of an Xml file and assign it to DropDownList controls at runtime.I can get the Xml file text content into the DropDownList controls (Ex...if 5 Xml text...
3
3324
by: ANTISPAM_garycnew_ANTISPAM | last post by:
What is the simplest way to retain the last option value selected in an html select object using javascript? I am currently using a server-side cgi language to accomplish this task, but it adds...
4
1736
by: dkacher | last post by:
Hello - I'm looking for a way to retain newlines when using XSL to copy the content of an XML attribute. I have this XML input: <?xml version="1.0"?> <A > <B x = "stuff" y = "line 1 line 2"...
2
1996
by: farukcse | last post by:
Dear sir, i am using below of this code for searching and viewing data from database. <form name='search_form' method = 'POST' action='' > <input type=text name='id_no' value='' maxlength='10'...
3
3129
by: raaman rai | last post by:
Hi Fellas, i need to understand how to retain the submtted form values during an Edit/Update operation. When i add the information from a form, i retain the form values in the following way incase...
4
8530
by: pankajsingh5k | last post by:
Hi guys, These question is for all the experts... Please help me before my brain explodes The problem is again with the formview control.. I have a formview and i have to use it that...
9
5733
by: sweetline priya | last post by:
hi friends.. in my page the form contains 10 textboxes. the user has to fill these textfields. if the user made any mistake in entering value in any textbox, in the button click, a message is...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7045
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7087
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6741
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4483
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2985
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
182
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.