eXept Software AG Logo

Smalltalk/X Webserver

Smalltalk Dynamic Web Pages - Source of WebDemoApp1-test4:

Home

Documentation
www.exept.de
Everywhere
for:
test4:aRequest
    "another dialog form

     Invoke via the browser as URL:
        host:port/<N>,test4:
     where <N> is the registered name of this service.
    "
    |replyPresenter|

    replyPresenter := aRequest replyPresenter.
    replyPresenter title:'Another Dialog form'.
    replyPresenter parametersAt:#secondHeadLine put:'Test4: Another Dialog form'.
    aRequest
        nextPutLine:'<h1>Enter values</h1>';
        nextPutLine:'This is a dialog test';
        nextPutAll:'The following forms contents is executed as unix command,';
        nextPutLine:'and the result presented in another page.<p>';
        nextPutLine:'For security reasons, only a very limited set of commands is allowed (such as "ls", "pwd" or "date").<p>';
        nextPutLine:'<FORM action="', (aRequest linkIdFor:self selector:#'test4Action:'), '" method=POST>';
        nextPutLine:'Script: <input name="scriptName" size=15 value="ls"></input><p>';
        nextPutLine:'Arg1: <input name="arg1" size=15 value="-l"></input><br>';
        nextPutLine:'Arg2: <input name="arg2" size=15 value=""></input><br>';
        nextPutLine:'Arg3: <input name="arg3" size=15 value=""></input><p>';
        nextPutLine:'Press <input type=submit value="Execute"></input> to execute the above as unix command ...<br><br>';
        nextPutLine:'</form>'.

    self addLinksForSource:#'test4:' previous:#'test3:' next:#'test5:' to:aRequest.

    "Modified: / 20-11-2017 / 20:09:33 / mawalch"

Edit
Index


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Tue, 19 Mar 2024 04:23:11 GMT