Hi, Are you sure the textarea contains the good id attribute ? Are you sure to enter the if statement ?
You don't have to use JSNI to update the textarea. Use instead : Element element = Document.get().getElementById(fieldId); if (element != null) { GWT.log("found element with id:" + fieldId); TextAreaElement textfield = element.cast(); textfield.setValue(newValue); } Alexandre 2011/4/4 pepgrifell <pepgrif...@gmail.com> > hi, > > we are migrating our old website (based on JSP) to GWT. The > application is big and we cannot do all the changes at one, so in the > application there are some pages in GWT and some pages in JSP. > > I have a JSP with some fields. One of them is a textarea. When I click > in it, a GWT window pops up with a list of values. When I click in one > of the values, I need to put the selected value in the textarea (JSP). > > In GWT window, when selecting the value I call to native method (as > parameters,I pass the id of textarea field and the text to set to the > textarea. > > public native void updateOldWebField(String fieldId,String newValue) / > *-{ > var textfield = $doc.getElementById(fieldId); > if (textfield!=null) { > textfield.value = newValue; > } > }-*/; > > But nothing is set into the textarea. Does I need to call > parent.document ? how I do that ? > > Thanks, > pep > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to google-web-toolkit@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.