A DESCRIPTION OF THE REQUEST :
There is a need to pass arguments generated in an HTML file to JNLP and then to a Java main program.
I have written an HTML function that determines the width and height of the usable area of the browser window (minus menu bars, tool bars, and scroll bars). HTML is where these values need to be generated, but there is currently no mechanism for passing the values through JNLP to a Java argument list using Java Web Start.
Consider that I have written a function called pageWidth() that gives the usable width of the browser window. I use the following HTML that accesses a JNLP file:
<A HREF="c:\java\FBApproachPlate.jnlp"></A>
What I would like to do (this does not exist today) is start the Java program through an HTML call such as
<A HREF="c:\java\FBApproachPlate.jnlp" ARG1=pageWidth()></A>
Before the FBApproachPlate.jnlp file is activated, the JavaScript function pageWidth() is evaluated. Let us assume that pageWidth() returns a value of 1850. Then 1850 would be bound to ARG1 as an actual parameter value.
Consider the following section of the corresponding FBApproachPlate.jnlp file:
<application-desc main-class="FBApproachPlate">
<argument>$arg1</argument>
</application-desc>
The idea is to have the value 1850 (bound to ARG1 in the HTML activation) to be passed in as an actual parameter that gets bound to the formal parameter $arg1. Thus $arg1 has the value 1850.
And thus the value 1850 is passed into the Java main program as the value of args[0].
JUSTIFICATION :
There is no other way to pass HTML-computed (by JavaScript) values into a Java main program. I know I could write the following in the JNLP file:
<application-desc main-class="FBApproachPlate">
<argument>1850</argument>
</application-desc>
But this obviously is not sufficient when the value that would have been computed by the JavaScript function is not 1850!
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
See above.
ACTUAL -
See above.
---------- BEGIN SOURCE ----------
See above.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None that I know of.
There is a need to pass arguments generated in an HTML file to JNLP and then to a Java main program.
I have written an HTML function that determines the width and height of the usable area of the browser window (minus menu bars, tool bars, and scroll bars). HTML is where these values need to be generated, but there is currently no mechanism for passing the values through JNLP to a Java argument list using Java Web Start.
Consider that I have written a function called pageWidth() that gives the usable width of the browser window. I use the following HTML that accesses a JNLP file:
<A HREF="c:\java\FBApproachPlate.jnlp"></A>
What I would like to do (this does not exist today) is start the Java program through an HTML call such as
<A HREF="c:\java\FBApproachPlate.jnlp" ARG1=pageWidth()></A>
Before the FBApproachPlate.jnlp file is activated, the JavaScript function pageWidth() is evaluated. Let us assume that pageWidth() returns a value of 1850. Then 1850 would be bound to ARG1 as an actual parameter value.
Consider the following section of the corresponding FBApproachPlate.jnlp file:
<application-desc main-class="FBApproachPlate">
<argument>$arg1</argument>
</application-desc>
The idea is to have the value 1850 (bound to ARG1 in the HTML activation) to be passed in as an actual parameter that gets bound to the formal parameter $arg1. Thus $arg1 has the value 1850.
And thus the value 1850 is passed into the Java main program as the value of args[0].
JUSTIFICATION :
There is no other way to pass HTML-computed (by JavaScript) values into a Java main program. I know I could write the following in the JNLP file:
<application-desc main-class="FBApproachPlate">
<argument>1850</argument>
</application-desc>
But this obviously is not sufficient when the value that would have been computed by the JavaScript function is not 1850!
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
See above.
ACTUAL -
See above.
---------- BEGIN SOURCE ----------
See above.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None that I know of.