It's not a silly question at all. ND should have provided an easy way to
put values into a web event such that they would be available to the event
method, same as you could cram values into the String[] argument that is
sent to the ND3 method.
It looks as though somebody thought about this, as all children of CSpEvent
support a no-arg String method called paramString(). In the case of a
CSpWebEvent, you get something like this:
ON_BEFORE_WEB_EVENT, Method=test.pgParamTest.buttontest_onWebEvent
(buttontest)
But there doesn't appear to be any way to set values into it based on
values set into the html.
Except, hey, Method=test.pgParamTest.buttontest_onWebEvent (buttontest)
corresponds to NAME=Method=test.pgParamTest.buttontest_onWebEvent
(buttontest) in the html.
So I wonder if you could mess with the html (onBeforeHtmlOutputEvent) to
tack something on such that ND would still recognize the right method and
source button, and let you grab the added stuff by parsing the return from
paramString(). Something like
NAME=Method=test.pgParamTest.buttontest_onWebEvent (buttontest)
?value=AKWESASNE
Here's something that will definitely work:
1. Have your event method be exactly the same as in ND3, with String[]
args and all that.
2. Make your button a static text field in the Studio, instead of a button.
3. In the onBeforeHtmlOutputEvent of the static text field, set the html
to be the complete html for a button, including an ND3 style invocation of
the event method.
-- Curt Springer
Team ND
At 04:30 PM 5/20/99 -0400, Brent Claxton wrote:
>I have a project I have migrated from ND3.12 to ND4.13. In this project I
>have a button. When this button is clicked I used to check some criteria
>and either process the button as normal (doAction), or trigger the code of
>another button.
>
>In ND3.12 I simply populated a string array with the parameter I wanted
>("Delete" in this case) and called the event with the string array as a
>parameter.
>
>I have moved my code to the new event model and now I'm not sure how to do
>this as the event parameter is now very different.
>
>I'm sure this is a silly question but how would I go about this.
>
>Any suggestions, snippets would be greatly appreciated.
>
>Thanks,
>
>Brent Claxton
>
>_________________________________________________________________________
>
>For help in using, subscribing, and unsubscribing to the discussion
>forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>
>For dire need help, email: [EMAIL PROTECTED]
>
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]