--Manual Menu configuration
1 post
• Page 1 of 1
--Manual Menu configuration
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):
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;
}
{
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.
-
Development@SIB - Posts: 325
- Joined: Mon Sep 28, 2009 1:54 pm
1 post
• Page 1 of 1