Error when calling method from xsml
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   James_Rogers
Posted On:   Tuesday, August 2, 2011 08:02 PM

I am trying to use java to translate some values. Basically I have some input values that are set in the xsl and then based on those values I might call a method I wrote in java to parse the values and possibly add to them. But I am getting an error everytime I call my script. This is the error message... "Error! The first argument to the non-static Java function 'trickModeTranslate' is not a valid object reference." Here is the relevant code from the xsl... 0"> And then here is the java code... public class translateMode { //    More>>

I am trying to use java to translate some values. Basically I have some input values that are set in the xsl and then based on those values I might call a method I wrote in java to parse the values and possibly add to them. But I am getting an error everytime I call my script.



This is the error message...

"Error! The first argument to the non-static Java function 'trickModeTranslate' is not a valid object reference."


Here is the relevant code from the xsl...

			










0">











And then here is the java code...

			
public class translateMode {

//
// TrickMode Descriptor
//
public static String setMode(final String modes, final int fwImply, final int bwImply) {
String disabledModes = modes;
if(fwImply == 0 && bwImply == 0) {
return disabledModes;
}
else if(fwImply == 1 && bwImply == 0) {
String str = modes;
String skipForward = "SF";
String[] results = str.split(",");
int searchFF = Arrays.binarySearch(results, "FF");
if (searchFF >= 0) {
int searchSF = Arrays.binarySearch(results, "SF");
if (searchSF < 0) {
disabledModes = modes+skipForward;
return disabledModes;
}
}
return disabledModes;
}
else if(fwImply == 0 && bwImply == 1) {
String str = modes;
String skipBack = "SB";
String[] results = str.split(",");
int searchFB = Arrays.binarySearch(results, "FB");
if (searchFB >= 0) {
int searchSF = Arrays.binarySearch(results, "SB");
if (searchSF < 0) {
disabledModes = modes+skipBack;
return disabledModes;
}
}
return disabledModes;
}
else if(fwImply == 1 && bwImply == 1) {
String str = modes;
String skipForward = "SF";
String skipBack = "SB";
String[] results = str.split(",");
int searchFF = Arrays.binarySearch(results, "FF");
if (searchFF >= 0) {
int searchSF = Arrays.binarySearch(results, "SF");
if (searchSF < 0) {
disabledModes = modes+skipForward;
}
}
int searchFB = Arrays.binarySearch(results, "FB");
if (searchFB >= 0) {
int searchSF = Arrays.binarySearch(results, "SB");
if (searchSF < 0) {
disabledModes = modes+skipBack;
return disabledModes;
}
}
return disabledModes;
}
return disabledModes;
}
}



Anybody seen this before? I am totally lost. Any help is greatly appreciated. Thanks.

   <<Less

Re: Error when calling method from xsml

Posted By:   Anonymous  
Posted On:   Saturday, August 6, 2011 02:53 AM

yes, anyone who is familiar on this??


DWS Riester Rente l Riester Rente l Webseite
About | Sitemap | Contact