NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Visual web JSF components data disappears after filling from javascript

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
leenus_0071



Joined: 24 Jun 2009
Posts: 2

PostPosted: Tue Jul 21, 2009 5:25 am    Post subject: Visual web JSF components data disappears after filling from javascript Reply with 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.

environment:

netbeans 6.5.1
windos xp sp2

Thanks,
leenus
Back to top
throwcode



Joined: 26 Dec 2008
Posts: 30

PostPosted: Tue Jul 21, 2009 1:15 pm    Post subject: Visual web JSF components data disappears after filling from javascript Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo