Documentation

(applications)

Manual Menu definition

Usually, we read the menu configuration for an application from a database, but the read class is defined as an interface (IWorkScreenAccess). Therefore it is not a problem to read the configuration from another datasource or configure it manually with source code.

A short example how a ProjX application will work without database (use following code in your Session LCO):

public IWorkScreenAccess getWorkScreenAccess()
{
    MemWorkScreenAccess wosc = (MemWorkScreenAccess)get("workScreenAccess");
 
    if (wosc == null)
    {
        wosc = new MemWorkScreenAccess();
 
        WorkScreenConfig cfg = new WorkScreenConfig();
        cfg.setClassName("demo.screens.SimpleWorkScreen");
        cfg.setMenuStructure("MDM");
        cfg.setText("Simple");
 
        wosc.addScreen(cfg);
 
        put("workScreenAccess", wosc);
    }
 
    return wosc;
}

If you create automated test-cases, this could be useful because it does not need a database.

This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information