[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
java objects as 'resulttext' for t:htjscall component  XML
Forum Index -> Development
Author Message
kretzler

Power User

Joined: 21/11/2007 13:00:57
Messages: 73
Location: Karlsruhe
Offline

Hello,

is it possbile to get a java object as 'resulttext' for a t:thjscall component?

the javascript function:
function ccGetLastError() {
var error = document.SCardApplet.scard.getLastError();
var errorCode = error.code;
var errorMsg = error.text;

var result = new Object();
result.callback = true;
result.returnvalue = xxx;
return result;
};

The return value from the applet is a java bean. It would be nice to pass this java bean to captain casa.

If this isnt possible I would return something like this
result.returnvalue = error.code + ';' + errorMsg;
and then split this string later.

Any other ideas?


Thanks,
Ralph
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5520
Offline

Hi,

NOOOOO chance ;-)
Remember: the applet is inside the browser pages, the server processing on the server side. The only chance would be to serialize the object and re-serialize on server side - with problems when versions are not compatible etc.

So: serialization as csv-String, as you propose, is the better way. Or any other format (you may pass some XML as well...), but character/String based...

Björn

Björn Müller, CaptainCasa GmbH
kretzler

Power User

Joined: 21/11/2007 13:00:57
Messages: 73
Location: Karlsruhe
Offline

Hi,

ok I thought that this isnt possible.

But to have only a String as a return value is a bit tricky. Is it possible to have two return values. (resulttext and resulttext[])

function ccGetCard() {
var result = new Object();
result.callback = true;
result.returnvalue = 'xxx';
result.returnvalue2 = new Array('a', 'b', 'c');
return result;
};

We use a Java Applet, so I have also 'java objects' within javascript and break down all java objects to a string is a bit tricky.
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5520
Offline

...the question is when to end with what type of result can be pased.

I would really like to just say: there is one result string. Any information needs to be "serialized" into this string. If you need the code for simplifying e.g. CSV-conversion - please contact us.

...OK? (Sorry, I know it does not exactly match what you ask us to do...)

Björn

Björn Müller, CaptainCasa GmbH
kretzler

Power User

Joined: 21/11/2007 13:00:57
Messages: 73
Location: Karlsruhe
Offline

Hello Björn,

ok, this is a point. We can also serialize all information into a string.


Thanks,
Ralph
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5520
Offline

...thanks! Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team