Team Elements

Status: Caution PostgreSQL Open Source Initiative (OSI) Java
PUBLIC PROFILE

Lookup List Examples

Most database lookup lists can be registered using the CustomLookupList Class. This class will query the specified table and using JDBC ResultSetMetaData retrieve all of the columns for each record.

<map class="org.aspcfs.utils.web.CustomLookupList" id="lookupProjectRoleList" 
      table="lookup_project_role" uniqueField="code" />

Once configured, a list can be returned with:

//Add Meta Info with fields requested
ArrayList<String> meta = new ArrayList<String>();
meta.add("id");
meta.add("description");
meta.add("level");
api.setTransactionMeta(meta);

DataRecord record = new DataRecord();
record.setName("lookupProjectRoleList");
record.setAction(DataRecord.SELECT);
api.save(record);

Sign in to add your comment.