Hi,
I would like to use servoy-methods with javascript via showing java-beans HTMLPane.
I construct a URL and the website include all the javasripts to use the it2be-ftp-tool to download.
The website shows up allright but he javascript-methods don’t work.
My method getsecureftp (one of theme) looks like this:
var receivedArgument = arguments[0]
var _Dateiname = arguments[1]
//var Dateiname = utils.stringRight(receivedArgument , (receivedArgument.length -(utils.stringPosition(receivedArgument,'/',1,(utils.stringPatternCount(receivedArgument,'/'))))));
//set the settings needed to log into the server
//alternative is the use of a keystore instead of a password
var settings = plugins.it2be_ftp.createPasswordSettings(globals.gbl_sshserver, globals.gbl_sshlogin,
globals.gbl_sshpassword);
// Create a client for the SFTP connection
var client = plugins.it2be_ftp.createSFTPclient(settings);
// 'Build' the connection and when the connection returns true
// start executing the rest of the code
if (client.connect()) {
var file = plugins.file.showDirectorySelectDialog()
if (file != null) {
// retrieve a document from the server and write it under the designated name
// the first entry is the remote file
// the second entry is the local (new) file name
client.get(receivedArgument, file.getAbsolutePath() + "/" + _Dateiname);
}
// Disconnect the client
globals.ftp = "GET disconnected: " + client.disconnect();
}
I guess you remember some of your code.
The html is shown with the Javabeans HTMLPane.
My question at first is if it is possible to use javascript-methods within the HTMLPane-bean?
I am not really sure that I understand you.
Which lines do you mean?
You did not give any code, but instead of complaining I made a joke of it.
Apparently you did not see that but the result is the same, you supplied us with code…
However, reading your post again, the issue is most probably that you use a javabean.
Why don’t you use the htmlfield that servoy has ‘out of the box’.
The htmlfield will capture what you do. The javabean will not…
I didn’t provided you with code in first place because my question is code-independent.
As you say it is not possible to use javascript-methods within HTMLPane-bean is exactly what I wanted to know.
As you know the included sun renderer is really a pain and a server-sided html-page would fit much better.