>it builds [in Javascript] an array of checkboxes checked
>called valueArray, which is not used now).
Correction: actually, it seems that there is an attempt
in the existing code to pass Javascript array to Java:
onsubmit="if(this.inclusions)excludes.value=getCheckedValues(inclusions,true);return
true;"
Interestingly, "inclusions" is a name of all checkboxes in XSL
page. But on Java side it doesn't use "inclusions", "excludes"
or "valueArray", but uses:
String [] exclusions = request.getParameterValues("exclusions");
- I don't see where request parameter "exclusions" is coming
from;
- later instead of that array exclusions[] they pass NULL to the
method which is supposed to create SQL based on that.
I checked a few Javascript books, and it looks like one has to
use LiveConnect technology to use JavaScript variables in Java,
that requires "import netscape.javascript.*" package.
There are no such imports in the code.
Are there other ways to use JavaScript vars in Java ?
What does "(this.inclusions)" means in
"if(this.inclusions)excludes.value=getCheckedValues(inclusions,true);return
true;" ?
Is that a sort of casting ? Passing array from JS to Java ?
Is that a legitimate way to pass variables JS->Java ?
Please advise.
Thank you in advance,
Oleg.
--- Oleg Konovalov <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to enhance somebody's Cocoon 2.0.4 application
> (tons of XSL and XML, Java and a bit of Javascript).
>
> On my page there is a bunch of checkboxes (defined in XSL),
> and based on which of them user selects,
> it supposed to dynamically build SQL stament
> (in Stored Procedure with flags as parameters),
> called from Java.
>
> There is a little bit of manipulation on these checkboxes
> currently done in JavaScript (e.g. it builds an array
> of checkboxes checked called valueArray, which is not used
> now).
> I think, I can use that JavaScript array,
> but not sure how to access it from Java. How ?
> something with LiveConnect (have no experience with that),
> any sample ?
>
> Would that be a normal thing to do in Cocoon application
> or is there a better and easier way (since XSL will generate
> Java bytecode) ?
>
> Sorry for the newbie question.
>
>
> Thank you in advance,
> Oleg.
>
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]