Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Next, a context wrapper class needs to be defined to provide access to the eTestSessionContext table fields.
For the SmartComponent Library session, the properties are available by accessing Consultingwerk.OERA.ContextWrapper.
For the SWAT session, the properties are available by accessing Akioma.Swat.OERA.Context.SwatContextWrapper.
A similar class should be implemented to provide strong-typed access to the custom session properties.
Both the SmartComponent Library and the SWAT context wrappers are separated into 2 different classes, the wrapper and the wrapper implementation (ex. Consultingwerk.OERA.ContextWrapper and Consultingwerk.OERA.ContextWrapperImpl), but this is not a requirement.
To simplify the implementation, we provide a base class for the implementation class: Akioma.Swat.OERA.Context.BaseContextWrapperImpl.

 

Code Block
titleSample: ITestContextWrapper
linenumberstrue
collapsetrue
INTERFACE Test.ITestContextWrapper: 
    
    DEFINE PUBLIC PROPERTY TestProperty1 AS CHARACTER NO-UNDO
    	GET. SET.  
??
	DEFINE PUBLIC PROPERTY TestProperty2 AS CHARACTER NO-UNDO
    	GET. SET.  
  
END INTERFACE.

...


Additionally, we provide a new web handler which returns the session, which requires the 'ContextName' path portion.
The ContextName will need to be one of the tables from the session dataset: eSessionContext (SmartComponentLibrary), eSwatSessionContext (SWAT), eTestSessionContext (Sample)

...