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

--Manual Menu configuration

Information about development with ProjX.

--Manual Menu configuration

Postby Development@SIB » Thu Jan 10, 2013 5:39 pm



This article is outdated - please use our new system at

https://doc.sibvisions.com




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):

Syntax: [ Download ] [ Hide ]
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.
User avatar
Development@SIB
 
Posts: 325
Joined: Mon Sep 28, 2009 1:54 pm

Return to Documentation