Difference between revisions of "Codeunit/Pagecontent"

From TempusServa wiki
Jump to navigation Jump to search
old>Admin
(Created page with 'PageContent is activated by suuplying the name of the class in a command Example http://..../.../main?com.acme.tempusserva.MySpecialPage Supported methods are public …')
 
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
PageContent is activated by suuplying the name of the class in a command
PageContent is activated by suuplying the name of the class in a command


Example
Example for the codeunit MySpecialPage


     http://..../.../main?com.acme.tempusserva.MySpecialPage
     http://..../.../main?com.acme.samples.MySpecialPage


Note that is is only possible invoke classes that inherits the CodeunitPagecontent class


Supported methods are
Supported methods are


   public String execute( Command command, Security user, Hashtable parameters );
   public String execute( Command command, Security user, Hashtable parameters );
The resulting string is the inner part of the page. Wrappers, menus etc. are added to the output.
=== Example ===
<syntaxhighlight lang="java">
  package com.acme.samples;
  import com.acme.samples.CodeunitPagecontentPublic;
  public class MySpecialPage extends CodeunitPagecontentPublic {
    @Override
    public String execute() {
        return "<h1>Hello world !</h1>";
    }
  }
</syntaxhighlight>

Latest revision as of 08:38, 3 October 2023

PageContent is activated by suuplying the name of the class in a command

Example for the codeunit MySpecialPage

   http://..../.../main?com.acme.samples.MySpecialPage

Note that is is only possible invoke classes that inherits the CodeunitPagecontent class

Supported methods are

  public String execute( Command command, Security user, Hashtable parameters );

The resulting string is the inner part of the page. Wrappers, menus etc. are added to the output.

Example

  package com.acme.samples;

  import com.acme.samples.CodeunitPagecontentPublic;

  public class MySpecialPage extends CodeunitPagecontentPublic {
    @Override
    public String execute() {
        return "<h1>Hello world !</h1>";
    }
  }