简体   繁体   中英

How to extract values from text fields in RCP and place it in Javascript code?

I am creating a RCP application which takes source and destination from text fields and gives directions using Google Maps API in a different view. I have javascript code which calls the API, but I need source and destination to be taken from my RCP text fields instead of specifying in the HTML file. How to extract values from those fields and place in the javascript code?

If anyone can share their idea, I would appreciate. Thanks!

I am not sure where you are stuck in this.. but hope this helps

Text sourceText = new Text(...);
Text destinationText = new Text(...);

//To get value from this text 

String source = sourceText.getText();
String destination = destinationText .getText();

But question seems so trivial, that i doubt this is what you want..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM