eXept Software AG Logo

Smalltalk/X Webserver

Smalltalk Dynamic Web Pages - Source of WebDemoApp1-test4:

Home

everywhere
www.exept.de
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 follwoing 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.

Edit
Index


ST/X 7.1.0.0; WebServer 1.653 at exept.de:8081; Mon, 23 Oct 2017 00:46:00 GMT