Jim,
Man, I hope you have the time to shed even more light on this undocumented subject!
I've been learning Premise scripting from the available examples but there aren't that many dealing with web-development ... and the few I've found focus on using SYSConnector/AutomationBrowser. Everything I know is based on Rob Brun's XBrowser module and that is a derivative of Premise's MiniBrowser.
I've created a picture-frame application ("PhotoFrame.xdo") that does not use SYSConnector because it must work with non-Windows-based Internet Appliances (i.e. 3COM Audrey). Although PhotoFrame works, based on your revelations, I'm concerned I might be using Premise's web server incorrectly!
PhotoFrame's URLs look like this: PremiseServer/sys/{
GUID}?d??SelectPhoto(1)
SelectPhoto is a ClassFunction and it takes one parameter to indicate the sequence of displayed photos (-1=Previous, 0=Pause, 1=Next). Your example opened my eyes to new possibilities (I've never seen the "?g?" command) but it is important that I can pass parameters (via the URL).
... the 'd' indicates an InvokeMethod call. Question marks are used to delimit the parts of the request. The ?? just means that the "target" is not specified. The target is the object that receives the response and is really geared to the automation browser model and is oriented around returning responses.
Question 1: Proper Syntax
Based on your explanation, I've used the URL syntax designed for AutomationBrowser. What is the proper URL for non-AutoBrowser purposes?
Question 2: Detailed Syntax Explanation
You indicated that "??" simply meant that the target object is missing (i.e. something can go between the two question marks). I guess the full URL syntax looks something like this: "
{GUID}?MysteryLetterCode?TargetObject?Method".
Is that correct?
Question 3: Letter Codes
So "d" in "?d??" means
InvokeMethod. Your example used "?g?". What is this Mystery Letter Code "g" and what other letter codes are understood by the web server? There's no double-question mark used in your example. Does this mean that "g" cannot specify a target object?
Question 4: Target Object
I don't understand the purpose of the "target object" you've described. My simple brain says, SelectPhoto is a method of the object identified by GUID ... isn't this the "target"?
Question 5: GetUniqueID
In XBrowser and MiniBrowser, there's a curious URL usage that makes no sense to me. Here's an excerpt from mbRenderColorPicker:
Code:
<A href = ""/sys/" & this.ObjectID & "?d??mbSelectColor(" & system.GetUniqueId() & ", 'aliceblue')"">
mbSelectColor is a ClassFunction that takes two parameters but it does absolutely nothing with the first one ... this funky GetUniqueID value! What's weirder is that this UniqueID is force-fed to functions even if they don't take parameters! Most URLS are generated using the mbGetAnchor function where the mysterious Unique ID is included. What's that all about?
Code:
Function mbGetAnchor(func, img)
mbGetAnchor = "<A href=""/sys/" & this.ObjectID & "?d??" & func & "(" & system.GetUniqueId() & ")""><IMG class=""ImageButton"" src=""/Plugins/Images/" & img & """></A>"
End Function
Question 6: HTTP POST Usage
Note: there is an URL syntax for setting a property value, but that uses an HTTP POST (not a GET) and the value is in the message body, not in the URL itself, so that is tricky.
Please, please, please explain how this is done! I want to use the <FORM> tag in my web pages but I don't know what to specify for the FORM's "action=" parameter. Using "method=post", I have no idea how to process the results posted back to the web-server. I'm assuming the URI specified in "action" will contain the name of a method ... but how does it receive the results (as a passed parameter?) and what do they look like? Maybe something like this: "name=JimSpr&joined=03.09.08&posts=8".
Thanks for your help ... let me know where to ship the beer!
Taras