How to update the form bean after the first submission?
Hi all,
I am trying to refresh the data that have been retrieved from database to a jsp page. The first action class is retrieving data from database and display them in the jsp page. In the same jsp page I want to create a button where a user can click to refresh the data that has been update in the database side. This is done by second action class. Please let me know as this problem is hitting my head.
The first action class
public class StateResultAction extends BaseAction{
private int year;
private int month;
public ActionForward process(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception
String forwardPage = "";
Vector data = null;
Log log = getLogger();
StateForm stateForm = ((StateForm)form);
log.debug("in StateResultAction:"+stateForm);
try {
year = stateForm.getStartYear();
month = stateForm.getStartMonth();
StateBusLogic busLogic = new StateBusLogic(stateForm);
if(stateForm.getSt().startsWith("98")){
data = busLogic.getBalance2();
}else{
data = busLogic.getBalance();
log.debug("size of data:"+data.size());
request.getSession().setAttribute("data", data);
}catch (Exception e){
log.error("Exception occur while query the balance:"+e);
forwardPage = "error";
request.getSession().setAttribute("startDate", fmrsForm.getStartDate());
request.setAttribute("endDate",stateForm.getEndDate());
request.setAttribute("st", stateForm.getSt());
if (stateForm.getProgNum() == 0 )
forwardPage = "state";
else
forwardPage = "sub-state";
return mapping.findForward(forwardPage);
}The second action class for Refreshing the same jsp page and getting the new data that just being entered in the database is
public class StateRefreshAction extends BaseAction {
public ActionForward process(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
return mapping.findForward("state");
}
http://forum.java.sun.com/thread.jspa?threadID=5147813&messageID=9553925#9553925
Similar Messages
-
How to update the inventory after committing order..?
How to update the Inventory stock level of a commerce item after committing the order.. in ATG 10.0.1..?
Thanks in Advance,
Vishnu & Nithin Kayithiyou can add the pipeline chain after the processOrder in the commerce pipeline , in the runProcess method call InventoryManager.decreaseStockLevel(String pId, long pNumber);
-
How to update the windows cached password after SSPR?
Scenario: Windows 7 remote user forgets the cached password for her laptop and uses FIM 2010 R2's Reset Password invoked from the login screen. The domain password change is successful, but the user still cannot login to the laptop as the
cached password has not been updated.
Question: How to update the cached windows logon password after SSPR to allow user to login with the new password.
ThanksPlease try the following:
KB2845626 - Cached credentials are not updated when you change your password in Windows
If you found my post helpful, please give it a Helpful vote. If it answered your question, remember to mark it as an Answer. -
How to update the table value in the valuechange event?
I have an input field in the datatable with the valueChangeListener
<rich:dataTable id="cart" value="#{cart.cartList}" var="item">
<h:inputText value="#{item.cost}" id="qty" valueChangeListener="#{items.updateCost}" onchange="submit()">
<h:outputText value="#{item.errorMsg}"> </h:outputText>
in the backing bean
Item item = (Item) model.getRowData();
// do some update, if the cost too larger, change to max_cost
item.setCost(max_cost);
item.setErrorMsg("Error Msg");
After calling the valuechange method, the screen output doesn't update the cost.
How to update the table value in the valuechange event?As you're misusing the valueChangeListener to set another input field, you need to skip the update model values phase. Otherwise the value set in the valueChangeListener will be overridden by the submitted value. You can do this by calling the FacesContext#renderResponse() inside the valueChangeListener method. This will shift the current phase immediately to the render response phase, hereby skipping the update model values and invoke application phases.
-
How to update the data in sqlserver table using procedure in biztalkserver
Hi,
Please can any one answer this below question
how to update the data in sqlserver table using procedure in biztalkserver
while am using executescalar,typedprocedure getting some warning
Warning:The adapter failed to transmit message going to send port "SendtoSql1" with URL "mssql://nal126//MU_Stage2?". It will be retransmitted after the retry interval specified for this Send Port. Details
Please send me asap....
Thanks...Hi Messip,
A detailed error would have helped us to answer you more appropriately but
You can follow the post which has step by step instructions, to understand how to use Stored Procedure:
http://tech-findings.blogspot.in/2013/07/insert-records-in-sql-server-using-wcf.html
Maheshkumar
S Tiwari|User
Page|Blog|BizTalk
2013: Inserting RawXML (Whole Incoming XML Message) in SQL database -
How to update the PHP Class Service back in Flash Builder 4
I'm not sure if my post title makes any sense or not but let me explain. I've been working on an application in Flash Builder 4 using the ZendFramework and PHP services and everything is work great. the problem I have is after I make changes to my services PHP class (edit php file that has my functions in it), how to I updated those functions in the Flash builder application?
For example, I needed to pass a second object into one of my function in my PHP class and after I edited the file and saved it, I don't see the changes in the Flash builder 4 application. Is there a button I can run to update the PHP class back in Flash Builder?
Thanks,
John BaranowskiHow do you use Flash Builder to regenerate the code for the same PHP service I connected to prior? When I first connected to the PHP service Flash Builder automatically built a package with all kinds of actionscript functions in it. I added a function to my PHP Class file server side and I need help on how to update the package back in Flex to see my new function. Can anyone help me??
-John -
HT204266 How to update the app through iTune if its size is too big?
How to update the app through iTune if its size is too big?
If your actually wanting to update your iPhone to IOS 6 and you don't have enough memory available, you still need to the action Chrisfromgastonia recommended. You will find that Movies and TV Shows being moved to your itunes will free up the largest amount of space. If IOS 6 is your objective, you may be able to re-download the Movies / Videos after the update.
-
How to update the condition price in the sales order for all the items
Hi,
How to update the condition price for all the itmes in the sales order to carry out the new price automatically through a stand alone program, for all the orders in the billing due list table?
Thanks,
BalaramHi,
There is a change in the requirement.
Scenario:
I have created a sales order with some 4 condition types, in that 2 condition types are of class A & B and the other two is of class C. Here I need to update the condition price of class A & B only and the remaining condition types should not get update even though there is an updated price is available.
For the above scenario, I need to write a standalone program. Do we have any function modules to update the price of the single condition in the sales order? Please tell me how we can update the sales order at item condition level.
Thanks.
Balaram -
How to update the condition price in sales order while creating the invoice
Hi,
How to update the condition price in the sales order to carry out the new price while creating the invoice?
While creating the invoice it should update the condition price in sales order.
Thanks,
BalaramNo, pricing is not there in delivery.
I found an exit for VF01transaction where we can update the price in order.
Can you please tell me how to update the price if I have the order, material numbers and conditions number?
Thanks,
Balaram -
How to update the BOX version of the Logic Pro 9 in Mountain Lion??
Hi!
How to update the BOX version of the Logic Pro 9 in Mountain Lion?
For example, if tomorrow will be new updates for Logic Pro for exapmle 9.1.8. (now I have 9.1.7) Will I not able to get it?? Now should I buy the second Logic pro??
Recently I have got answer from App Store support:
"Max, since you have not purchased the app in the App Store, you can't get updates directly in App Store. In this case, you will need to purchase the updated version in the App Store so you can get further updates."
It's... I bought Logic Pro 9 + MainStage + + +++ .... in the Apple Retail Store and what now?? Updates works perfect in Snow Leopard.
I can't understand...
Can you help me please? =)Max,
Rest assurred, you will get updates via the App store. What will happen is when you install the box version, the Mac App Store will ping when there is an update to download(for free), much like any other Apple app(Garageband, iWork, etc) regardless of where you bought it from. If it's installed, it will check for updates.
If the Mac App store doesn't show an update that you know is out, simply down it directly from support.apple.com and apply it.
Hope this helps. If so, LIKE the post.
Glenn -
How to update the FB01L transaction using the FM bapi_acc_document_post
Hi All,
How to update the FB01L transaction using the bapi_acc_document_post but there is no ledger group field in the bapi function module.
Please help me how to do it.hi,
use batch input method for the same.
check this.
[https://forums.sdn.sap.com/click.jspa?searchID=19107237&messageID=884744] -
How to update the iTunes in the iPad using the I pad
How to update the iTunes in the iPad using the I pad?
Then you cannot update without Conecting to iTunes on a computer.
The Over the Air Feature is only available on iOS 5 or later.
You have iOS 4... See Here...
http://support.apple.com/kb/HT4972
OR...
Connect to iTunes on the computer you usually Sync with and “ Check for Updates “...
See the Using iTunes Section Here...
How to update your iPhone, iPad, or iPod touch -
hello friends i have a problem in my ipod touch 3g it has 4.2.1 version of software but it doesnot supports any apps so how to update the ios 5 or more than this please anybody help me..i am in trouble.
I suspect you really have a 2G iPod. Those can only go to iOS 4.2.1.
Identifying iPod models
iPod touch (3rd generation)
iPod touch (3rd generation) features a 3.5-inch (diagonal) widescreen multi-touch display and 32 GB or 64 GB flash drive. You can browse the web with Safari and watch YouTube videos with Wi-Fi. You can also search, preview, and buy songs from the iTunes Wi-Fi Music Store on iPod touch.
The iPod touch (3rd generation) can be distinguished from iPod touch (2nd generation) by looking at the back of the device. In the text below the engraving, look for the model number. iPod touch (2nd generation) is model A1288, and iPod touch (3rd generation) is model A1318.
Otherwise connect to yor computer and update via iTunes. Yo need iTunes 10 or later on the computer.
To more easily find compatilbe apps for 4.2.1
iOSSearch - search the iTunes store for compatible apps.
Vintapps 3.1.3 - paid app.
Apple Club - filter apps by iOS version.
Discussion post by msgarmar - technique to sort apps by date. -
How to get the first 4 chars form a var ?
Hi guys,
How to get the first 4 chars form a var ?
i.e temp type num20 value '00000000000012345678'.
how to move the first 4 chars to another var?
thx in advance.hi
use OFFESTS..
example:
var1 = '12345678'.
var2 = var1+0(4).
now var2 conatins '1234'.
thx
pavan -
How to update the bucketset of business rules in MDS through Rules SDK
How to update the bucketset of business rules in MDS through Rules SDK.
Any sample code which will help me........ :)
Is it possible to expose a Business Rule as webservice which was created with the help of Java fact?
Edited by: 984804 on Jan 29, 2013 6:12 PMFYI, the output of this call returns something like:
<?xml version="1.0" encoding="UTF-8"?>
<queryplan>
<union>
<fullOuterJoin>
<statement index="1">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), count( distinct SALES.inv_id) FROM SALES GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
<statement index="2">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), sum(INVOICE_LINE.nb_guests) FROM SALES, INVOICE_LINE, SERVICE_LINE, SERVICE WHERE ( SALES.INV_ID=INVOICE_LINE.INV_ID ) AND ( INVOICE_LINE.SERVICE_ID=SERVICE.SERVICE_ID ) AND ( SERVICE.SL_ID=SERVICE_LINE.SL_ID ) AND ( SERVICE_LINE.service_line = 'Accommodation' ) GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
</fullOuterJoin>
<fullOuterJoin>
<statement index="3">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), count( distinct SALES.inv_id) FROM SALES GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
<statement index="4">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), sum(INVOICE_LINE.days * INVOICE_LINE.nb_guests * SERVICE.price) FROM SALES, INVOICE_LINE, SERVICE WHERE ( SALES.INV_ID=INVOICE_LINE.INV_ID ) AND ( INVOICE_LINE.SERVICE_ID=SERVICE.SERVICE_ID ) GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
</fullOuterJoin>
</union>
</queryplan> -
How to update the second JComboBox according selection in first JComboBox??
I am having a hard time to update the second JcomboBox according to the selection of the first JcomboBox. For example, the content of the first JcomboBox is {city, rent}. When "city" is selected, the content of the second JcomboBox should be set to a number of cities. When "rent" is selected, the content of the second JcomboBox should be set to a range of rent.
Since I have to detect the selection in actionperformed(), where the JcomboBoxes have been added to a Panel, and my JFrame setContentPane() to this Panel, I don't know how to update the JFrame or the Panel. I can make the old JFrame disappear and a new JFrame appear instead, but this is not what I want. I tried method update(Graphics) and removeAll(), and never made it work.
I would greatly appreciate if anyone could give me any help.Thanks for your response. I fixed the problem in the following clumsy way:
frame.getContentPane().remove(mainPanel);
mainPanel.remove(box2);
if(box1.compareTo("city")==0)
box2 = new JComboBox(cities);
else if(box1.compareTo("rent")==0)
box2 = new JComboBox(rents);
else if(box1.compareTo("type")==0)
box2 = new JComboBox(types);
box2.setBounds(305, 30, 90, 20);
mainPanel.add(box2);
frame.getContentPane().add(mainPanel);
Maybe there is a better way, but I don't know, and I don't understand your suggestion, could you further explain it? Thanks a lot.
lz22
Maybe you are looking for
-
Can't get Pioneer DVR-110D to work
I just bought a Pioneer DVR-110D drive and installed it, but I can't get it to support burning. I tried PatchBurn 1 (I use OS 10.2.8) but to no avail. I searched this forum for posts on both PatchBurn and the drive, and I've been doing everything as
-
Lightroom 3.2 cannot display Nikon NEF file in Win7
I just upgraded my system from winxp to win7 64bit. I have used lr 2.x/3.x under xp without problem with my Nikon D80 raw picture. But now under win7 64bit professional lr 2.x still ok but 3.2 cannot process the nef file correct -- not display image.
-
Hello. i'm trying to Redeem my account with a 25GBP ITunes card and it says it must be used on a UK Store Front. Can someone help as my account is billed in USDollars
-
Been having trouble w/Chrome would play audio only of Vimeo videos, fixed that but now will not display photos on Pinterest, only the links behind them. So I thought I'd try Firefox again, used to use it for several years. Downloaded and then thought
-
Changed my APPLE ID - iCloud login failed on iphone - login data cannot be updated!
Dear manufacturers and users of APPLE's hipster devices, I just changed my APPLE Id & created a new password. To do that, I've been using my Desktop PC with a standard browser and the official login to the APPLE Id management website: appleid.apple.c