NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
leenus_0071
Joined: 24 Jun 2009 Posts: 2
|
Posted: Tue Jul 21, 2009 5:25 am Post subject: Visual web JSF components data disappears after filling from javascript |
|
|
Hello,
I have an visual web jsf page, a javascript to write data into a textarea, when i click on a button it should fill the textarea with some text, in the javascript i am using xmlhttprequest etc, at first it fills the textarea with text but in the end the page gets refreshed and the data in textarea is gone.
environment:
netbeans 6.5.1
windos xp sp2
Thanks,
leenus |
|
| Back to top |
|
 |
throwcode
Joined: 26 Dec 2008 Posts: 30
|
Posted: Tue Jul 21, 2009 1:15 pm Post subject: Visual web JSF components data disappears after filling from javascript |
|
|
Hi leenus sounds like what you need is a session property to hold the
data beyond the request. Set up a property in a SessionBean like
jtxDataVal and us el to bind the value to the text component. Then when
you retrieve the data, you use the properties setter to save the
information. When the client leaves the form you will then have to
reset the Session property to default value or as an alternative you can
do the same in face-context.
Don
leenus_0071 wrote:
| Quote: | Hello,
I have an visual web jsf page, a javascript to write data into a textarea, when i click on a button it should fill the textarea with some text, in the javascript i am using xmlhttprequest etc, at first it fills the textarea with text but in the end the page gets refreshed and the data in textarea is gone.
Thanks,
leenus
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|