473,545 Members | 2,679 Online
Bytes | Software Development & Data Engineering Community
+ 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 3252
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
1866
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
3949
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 ValidatingXMLReader. After loading the document (and validating it) I assume that the resulting doc will (as appropriate) have elements with attributes set to their...
2
4877
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 tags then 5 dropdownlist controls each containing the 5 Xml text tags). Problem,when I save the user DropDownList selected items by means of a...
3
3334
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 a lot of overhead and I would like to move the overhead to the remote client's PC, using javascript. Thank you for your assistance. ...
4
1748
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" /> </A>
2
2001
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' > <input type='submit' value='SEARCH' name='search' > </form> but when i click the submit button it can't retain the id value in it's field. so...
3
3134
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 there is something missing or the values are incorrect. <input type="text" name="camount" tabindex="4" value="<?php echo $form->value("camount");...
4
8541
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 when it displays it shows values from the database and i have a link button edit on the ItemTemplate that changes the mode to edit mode and allows to...
9
5738
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 displayed to intimate the user like ' u wrongly enter the value'.. in button click all the textbox values are erased. so can anybody tell me how to...
0
7496
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7685
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7941
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6014
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5354
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5071
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3485
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1039
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
738
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.