Java Code Examples for com.smartgwt.client.data.fields.DataSourceTextField#setPrimaryKey()

The following examples show how to use com.smartgwt.client.data.fields.DataSourceTextField#setPrimaryKey() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WorkflowTasksDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public WorkflowTasksDS(Integer type, String taskId) {
	setTitleField("name");
	setRecordXPath("/list/workflowtask");
	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	id.setRequired(true);
	DataSourceTextField processId = new DataSourceTextField("processId");
	DataSourceTextField name = new DataSourceTextField("name");
	DataSourceTextField workflow = new DataSourceTextField("workflow");
	DataSourceTextField pooledassignees = new DataSourceTextField("pooledassignees");
	DataSourceTextField documents = new DataSourceTextField("documents");
	DataSourceTextField documentIds = new DataSourceTextField("documentIds");
	DataSourceDateField startdate = new DataSourceDateField("startdate");
	DataSourceDateField duedate = new DataSourceDateField("duedate");
	DataSourceDateField enddate = new DataSourceDateField("enddate");
	DataSourceTextField lastnote = new DataSourceTextField("lastnote");

	setFields(id, processId, name, startdate, duedate, enddate, workflow, documents, lastnote, documentIds,
			pooledassignees);
	setDataURL("data/workflowtasks.xml?1=1" + (type != null ? "&type=" + type : "")
			+ (taskId != null ? "&taskId=" + taskId : ""));
	setClientOnly(true);
}
 
Example 2
Source File: UsersDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public UsersDS(String groupIdOrName, boolean required) {
	setTitleField("label");
	setRecordXPath("/list/user");

	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);

	DataSourceTextField username = new DataSourceTextField("username");
	DataSourceTextField label = new DataSourceTextField("label");
	DataSourceBooleanField guest = new DataSourceBooleanField("guest");
	guest.setHidden(true);
	DataSourceImageField enabled = new DataSourceImageField("eenabled");
	DataSourceTextField name = new DataSourceTextField("name");
	DataSourceTextField firstName = new DataSourceTextField("firstName");
	DataSourceTextField email = new DataSourceTextField("email");
	DataSourceTextField phone = new DataSourceTextField("phone");
	DataSourceTextField cell = new DataSourceTextField("cell");
	DataSourceTextField usergroup = new DataSourceTextField("usergroup");
	DataSourceTextField groups = new DataSourceTextField("groups");

	setFields(id, username, label, enabled, name, firstName, email, phone, cell,groups, usergroup, guest);
	setDataURL("data/users.xml?1=1" + (groupIdOrName != null ? "&groupId=" + groupIdOrName : "") + "&required="
			+ required);
	setClientOnly(true);
}
 
Example 3
Source File: FormatConvertersDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public FormatConvertersDS(String inExt, String outExt) {
	setTitleField("converters");
	setRecordXPath("/list/converter");

	DataSourceTextField id = new DataSourceTextField("id", I18N.message("id"));
	id.setPrimaryKey(true);
	DataSourceTextField in = new DataSourceTextField("in", I18N.message("in"));
	DataSourceTextField out = new DataSourceTextField("out", I18N.message("out"));
	DataSourceTextField converter = new DataSourceTextField("converter", I18N.message("converter"));
	DataSourceBooleanField enabled = new DataSourceBooleanField("eenabled", I18N.message("enabled"));
	DataSourceTextField label = new DataSourceTextField("label", I18N.message("converter"));

	setFields(id, in, out, converter, label, enabled);
	setDataURL("data/formatconverters.xml?1=1" + (inExt != null ? "&in=" + inExt : "")
			+ (outExt != null ? "&out=" + outExt : ""));
	setClientOnly(true);
}
 
Example 4
Source File: NotesDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
private void prepareFields() {
	setRecordXPath("/list/post");
	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	id.setHidden(true);
	id.setRequired(true);
	DataSourceTextField userId = new DataSourceTextField("userId");
	userId.setHidden(true);
	DataSourceTextField docId = new DataSourceTextField("docId");
	docId.setHidden(true);
	DataSourceTextField user = new DataSourceTextField("user");
	DataSourceTextField message = new DataSourceTextField("message");
	DataSourceTextField page = new DataSourceTextField("page");
	DataSourceDateTimeField date = new DataSourceDateTimeField("date");
	DataSourceTextField docFilename = new DataSourceTextField("docFilename");
	DataSourceTextField color = new DataSourceTextField("color");
	DataSourceTextField fileVersion = new DataSourceTextField("fileVersion");

	setFields(id, page, userId, user, message, date, docId, docFilename, fileVersion, color);
	setClientOnly(true);
}
 
Example 5
Source File: TenantsDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public TenantsDS() {
	setTitleField("label");
	setRecordXPath("/list/tenant");

	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);

	DataSourceTextField name = new DataSourceTextField("name");
	DataSourceTextField displayName = new DataSourceTextField("displayName");
	DataSourceImageField enabledIcon = new DataSourceImageField("enabledIcon");
	DataSourceBooleanField enabled = new DataSourceBooleanField("eenabled");
	DataSourceTextField email = new DataSourceTextField("email");
	DataSourceTextField city = new DataSourceTextField("city");
	DataSourceTextField country = new DataSourceTextField("country");
	DataSourceTextField telephone = new DataSourceTextField("telephone");
	DataSourceTextField postalCode = new DataSourceTextField("postalCode");
	DataSourceTextField state = new DataSourceTextField("state");
	DataSourceTextField address = new DataSourceTextField("address");
	DataSourceDateTimeField expire = new DataSourceDateTimeField("expire");

	setFields(id, name, enabledIcon, enabled, expire, displayName, email, city, country, telephone, postalCode,
			state, address);
	setDataURL("data/tenants.xml");
	setClientOnly(true);
}
 
Example 6
Source File: DeletedFoldersDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public DeletedFoldersDS(Long userId, Long parentId) {
	setTitleField("name");
	setRecordXPath("/list/folder");

	DataSourceTextField name = new DataSourceTextField("name");
	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	id.setHidden(true);
	id.setRequired(true);
	DataSourceImageField icon = new DataSourceImageField("icon");
	DataSourceDateTimeField lastModified = new DataSourceDateTimeField("lastModified");
	DataSourceTextField parentIdField = new DataSourceTextField("parentId");
	DataSourceImageField deleteUserId = new DataSourceImageField("deleteUserId");
	DataSourceTextField deleteUser = new DataSourceTextField("deleteUser");
	
	setFields(id, name, lastModified, icon, parentIdField, deleteUser, deleteUserId);
	setClientOnly(true);

	String url = "data/deletedfolders.xml?1=1";
	if (userId != null)
		url += "&userId=" + userId;
	if (parentId != null)
		url += "&parentId=" + parentId;
	setDataURL(url);
}
 
Example 7
Source File: AttributesDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public AttributesDS() {
	setTitleField("attributes");
	setRecordXPath("/list/attribute");
	DataSourceTextField name = new DataSourceTextField("name");
	name.setPrimaryKey(true);

	DataSourceTextField label = new DataSourceTextField("label");

	DataSourceTextField type = new DataSourceTextField("type");
	type.setHidden(true);

	setFields(name, label, type);
	setTitleField("name");
	setDataURL("data/attributes.xml?locale=" + I18N.getLocale());
	setClientOnly(true);
}
 
Example 8
Source File: StampUsersDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public StampUsersDS(long stampId) {
	setTitleField("label");
	setRecordXPath("/list/user");

	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);

	DataSourceTextField username = new DataSourceTextField("username");
	DataSourceTextField label = new DataSourceTextField("label");
	DataSourceImageField enabled = new DataSourceImageField("eenabled");
	DataSourceTextField name = new DataSourceTextField("name");
	DataSourceTextField firstName = new DataSourceTextField("firstName");
	DataSourceTextField email = new DataSourceTextField("email");
	DataSourceTextField phone = new DataSourceTextField("phone");
	DataSourceTextField cell = new DataSourceTextField("cell");

	setFields(id, username, label, enabled, name, firstName, email, phone, cell);
	setDataURL("data/stampusers.xml?stampId=" + stampId);
	setClientOnly(true);
}
 
Example 9
Source File: TagsDS.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public TagsDS(String firstLetter, boolean editing, Long docId, Long folderId) {
	setTitleField("word");
	setRecordXPath("/list/tag");
	DataSourceTextField index = new DataSourceTextField("index");
	index.setPrimaryKey(true);
	DataSourceTextField word = new DataSourceTextField("word");
	DataSourceTextField count = new DataSourceTextField("count");
	setFields(index, word, count);
	setDataURL("data/tags.xml?editing=" + editing + (firstLetter != null ? "&firstLetter=" + firstLetter : "")
			+ (docId != null ? "&docId=" + docId : "") + (folderId != null ? "&folderId=" + folderId : ""));
	setClientOnly(true);
}
 
Example 10
Source File: RatingsDS.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public RatingsDS(Long docId) {
	setTitleField("label");
	setRecordXPath("/list/rating");

	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);

	DataSourceTextField user = new DataSourceTextField("user");
	DataSourceIntegerField vote = new DataSourceIntegerField("vote");
	DataSourceDateField date = new DataSourceDateField("date");

	setFields(id, user, vote, date);
	setDataURL("data/ratings.xml?1=1" + (docId != null ? "&docId=" + docId : ""));
	setClientOnly(true);
}
 
Example 11
Source File: FolderAliasesDS.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public FolderAliasesDS(long folderId) {
	setTitleField("name");
	setRecordXPath("/list/alias");
	DataSourceImageField icon = new DataSourceImageField("icon");
	DataSourceTextField name = new DataSourceTextField("name");
	DataSourceTextField path = new DataSourceTextField("path");
	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	id.setHidden(true);
	id.setRequired(true);

	setFields(id, icon, name, path);
	setClientOnly(true);
	setDataURL("data/folderaliases.xml?folderId=" + folderId);
}
 
Example 12
Source File: ArchivesDS.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public ArchivesDS(int mode, Integer type, Integer status, Long managerId) {
	setTitleField("name");
	setRecordXPath("/list/archive");

	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	id.setHidden(true);
	id.setRequired(true);

	DataSourceTextField name = new DataSourceTextField("name");
	DataSourceTextField description = new DataSourceTextField("description");

	DataSourceTextField stat = new DataSourceTextField("status");
	DataSourceImageField statusicon = new DataSourceImageField("statusicon");
	DataSourceTextField ttype = new DataSourceTextField("type");
	DataSourceTextField typelabel = new DataSourceTextField("typelabel");
	DataSourceFloatField size = new DataSourceFloatField("size");
	DataSourceTextField creator = new DataSourceTextField("creator");
	DataSourceTextField closer = new DataSourceTextField("closer");
	DataSourceDateTimeField created = new DataSourceDateTimeField("created");

	setFields(id, name, description, size, closer, creator, ttype, typelabel, stat, statusicon, created);
	setClientOnly(true);
	setDataURL("data/archives.xml?mode=" + mode + "&locale=" + I18N.getLocale()
			+ (status != null ? "&status=" + status : "") + (type != null ? "&type=" + type : "")
			+ (managerId != null ? "&managerId=" + managerId : ""));
}
 
Example 13
Source File: SkinsDS.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public SkinsDS() {
	setTitleField("label");
	setRecordXPath("/list/skin");
	DataSourceTextField name = new DataSourceTextField("name");
	DataSourceTextField label = new DataSourceTextField("label");
	name.setPrimaryKey(true);
	name.setHidden(true);
	name.setRequired(true);

	setFields(name, label);
	setClientOnly(true);
	setDataURL("data/skins.xml");
}
 
Example 14
Source File: UserPermissionDataSource.java    From proarc with GNU General Public License v3.0 5 votes vote down vote up
public UserPermissionDataSource() {
    setID(ID);
    setDataURL(RestConfig.URL_USER_PERMISSIONS);

    DataSourceTextField permId = new DataSourceTextField(FIELD_PERMISSIONID);
    permId.setPrimaryKey(true);
    permId.setCanEdit(false);
    permId.setHidden(true);

    DataSourceTextField display = new DataSourceTextField(FIELD_DISPLAY);

    setFields(permId, display);
    setRequestProperties(RestConfig.createRestRequest(getDataFormat()));
}
 
Example 15
Source File: EventsDS.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public EventsDS(boolean folder, boolean workflow, boolean user) {
	setRecordXPath("/list/event");
	DataSourceTextField code = new DataSourceTextField("code");
	code.setPrimaryKey(true);
	code.setHidden(true);
	code.setRequired(true);
	DataSourceTextField type = new DataSourceTextField("type");
	DataSourceTextField label = new DataSourceTextField("label");

	setFields(code, type, label);
	setClientOnly(true);

	setDataURL("data/events.xml?locale=" + I18N.getLocale() + "&folder=" + folder + "&workflow=" + "&user=" + user);
}
 
Example 16
Source File: ArchivedDocsDS.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public ArchivedDocsDS(Long folderId, Integer max) {
	setTitleField("filename");
	setRecordXPath("/list/document");

	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	id.setHidden(true);
	id.setRequired(true);
	DataSourceImageField icon = new DataSourceImageField("icon");
	DataSourceTextField customId = new DataSourceTextField("customId");
	DataSourceTextField version = new DataSourceTextField("version");
	DataSourceTextField fileVersion = new DataSourceTextField("fileVersion");
	DataSourceFloatField size = new DataSourceFloatField("size");
	DataSourceDateTimeField lastModified = new DataSourceDateTimeField("lastModified");
	DataSourceDateTimeField created = new DataSourceDateTimeField("created");
	DataSourceTextField filename = new DataSourceTextField("filename");
	DataSourceTextField fid = new DataSourceTextField("folderId");
	DataSourceTextField folder = new DataSourceTextField("folder");
	DataSourceTextField type = new DataSourceTextField("type");

	setFields(id, size, version, fileVersion, created, lastModified, customId, icon, filename, fid, folder, type);
	setClientOnly(true);

	String url = "data/archiveddocs.xml?1=1";
	if (folderId != null)
		url += "&folderId=" + folderId;
	if (max != null)
		url += "&max=" + max;
	setDataURL(url);
}
 
Example 17
Source File: ChannelsDS.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public ChannelsDS() {
	setTitleField("name");
	setRecordXPath("/list/channel");
	DataSourceTextField name = new DataSourceTextField("name", I18N.message("name"), 255);
	name.setPrimaryKey(true);
	name.setRequired(true);

	DataSourceTextField members = new DataSourceTextField("members", I18N.message("members"));

	setFields(name, members);

	setDataURL("data/channels.xml");
	setClientOnly(false);
}
 
Example 18
Source File: StoragesDS.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public StoragesDS(boolean withEmpty, boolean parameters) {
	setTitleField("name");
	setRecordXPath("/list/storage");
	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	DataSourceTextField name = new DataSourceTextField("name");
	DataSourceTextField path = new DataSourceTextField("path");
	DataSourceImageField write = new DataSourceImageField("write");
	setFields(write, id, name, path);
	setDataURL("data/storages.xml?empty=" + withEmpty + "&parameters=" + parameters);
	setClientOnly(true);
}
 
Example 19
Source File: CharsetsDS.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public CharsetsDS() {
	setTitleField("name");
	setRecordXPath("/list/charset");

	DataSourceTextField code = new DataSourceTextField("code");
	code.setPrimaryKey(true);
	code.setRequired(true);

	DataSourceTextField name = new DataSourceTextField("name");

	setFields(code, name);
	setDataURL("data/charsets.xml?locale=" + I18N.getLocale());
	setClientOnly(true);
}
 
Example 20
Source File: SavedSearchesDS.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public SavedSearchesDS() {
	setRecordXPath("/list/search");
	DataSourceTextField name = new DataSourceTextField("name");
	name.setPrimaryKey(true);

	DataSourceTextField type = new DataSourceTextField("typeLabel");
	DataSourceTextField description = new DataSourceTextField("description");

	setFields(name, type, description);
	setClientOnly(true);
	setDataURL("data/savedsearches.xml?locale=" + I18N.getLocale());
}