This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes how to get the value which changed by javascript in pagecode? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "how to get the value which changed by javascript in pagecode?" Watch "how to get the value which changed by javascript in pagecode?" New topic
Author

how to get the value which changed by javascript in pagecode?

lijun wang
Greenhorn

Joined: Jan 20, 2006
Posts: 28
changePrice( getpriceTotals());
I have this method in the changprice.java(pagecode),getpriceTotals() get the totlas price bean which is a managed bean from session scpoe, this bean also bind to text40 (a HtmlOutputText)in changeprice.jsp.
my question is , when I change the value of text40, how can I get the right value through getpriceTotals(), because I always get the old value.
Thanks
g madhava
Ranch Hand

Joined: Sep 14, 2001
Posts: 85
The easy solution for you is to create a hidden field
and have both the text output value and the javascript value refer to this hidden field. the managed bean will also refer to this hidden field.

For example;
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get the value which changed by javascript in pagecode?
 
Similar Threads
AJAX (no framework), JSF Portlet w/ Managed Bean on WebSphere
Submitting a page with a hiddenInput fieldwith javascript
UIData and DataTable
Date and Time as Combo Boxes
Redirct of JSF page