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

The following examples show how to use com.smartgwt.client.data.fields.DataSourceTextField#setRootValue() . 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: ShareFileDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public ShareFileDS(boolean folders) {
	setTitleField("name");
	setRecordXPath("/list/entry");

	DataSourceTextField name = new DataSourceTextField("name", I18N.message("name"), 255);

	DataSourceTextField id = new DataSourceTextField("iid", I18N.message("id"));
	id.setPrimaryKey(true);
	id.setRequired(true);

	DataSourceTextField type = new DataSourceTextField("type", I18N.message("type"));
	type.setRequired(true);

	DataSourceTextField icon = new DataSourceTextField("iicon", I18N.message("icon"));

	DataSourceTextField parent = new DataSourceTextField("parent", I18N.message("parent"));
	parent.setRequired(true);
	parent.setForeignKey(getID() + ".iid");
	parent.setRootValue("#parent#");

	setFields(name, id, type, parent, icon);

	setDataURL("data/sharefile.xml?folders=" + folders);
	setClientOnly(false);
}
 
Example 2
Source File: MenusDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public MenusDS() {
	setID("MenusDS");

	setTitleField("name");
	setRecordXPath("/list/menu");
	DataSourceTextField name = new DataSourceTextField("name", I18N.message("name"), 255);

	DataSourceTextField id = new DataSourceTextField("id", I18N.message("id"));
	id.setPrimaryKey(true);
	id.setRequired(true);

	DataSourceTextField parent = new DataSourceTextField("parent", "Parent ID");
	parent.setRequired(true);
	parent.setForeignKey("MenusDS.id");
	parent.setRootValue("/");

	DataSourceIntegerField position = new DataSourceIntegerField("position", I18N.message("position"));

	setFields(name, id, position, parent);

	setDataURL("data/menus.xml");
	setClientOnly(false);
}
 
Example 3
Source File: ZohoDS.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public ZohoDS(String id, boolean folders) {
	String dsId = id;
	if (dsId == null)
		dsId = "ZohoDS";
	setID(dsId);
	setTitleField("name");
	setRecordXPath("/list/entry");

	DataSourceTextField name = new DataSourceTextField("name", I18N.message("name"), 255);

	DataSourceTextField entryId = new DataSourceTextField("id", I18N.message("id"));
	entryId.setPrimaryKey(true);
	entryId.setRequired(true);

	DataSourceTextField type = new DataSourceTextField("type", I18N.message("type"));
	type.setRequired(true);

	DataSourceTextField icon = new DataSourceTextField("iicon", I18N.message("icon"));

	DataSourceTextField parent = new DataSourceTextField("parent", "Parent");
	parent.setRequired(true);
	parent.setForeignKey(dsId + ".id");
	parent.setRootValue("#parent#");

	setFields(name, entryId, type, parent, icon);

	setDataURL("data/zoho.xml?folders=" + folders);
	setClientOnly(false);
}
 
Example 4
Source File: FoldersDS.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public FoldersDS(String id, boolean nopagination) {
	String dsId = id;
	if (dsId == null)
		dsId = "FoldersDS";
	setID(dsId);
	setTitleField("name");
	setRecordXPath("/list/folder");
	DataSourceTextField name = new DataSourceTextField("name", I18N.message("name"), 255);

	DataSourceTextField color = new DataSourceTextField("color", I18N.message("color"), 255);

	DataSourceTextField recordId = new DataSourceTextField("id", I18N.message("id"));
	recordId.setPrimaryKey(true);
	recordId.setRequired(true);

	DataSourceTextField folderId = new DataSourceTextField("folderId", I18N.message("id"));
	folderId.setHidden(true);

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

	DataSourceIntegerField type = new DataSourceIntegerField("type", I18N.message("type"));
	type.setRequired(true);

	DataSourceFloatField size = new DataSourceFloatField("size", I18N.message("size"));

	DataSourceTextField parent = new DataSourceTextField("parent", "Parent ID");
	parent.setRequired(true);
	parent.setForeignKey(dsId + ".id");
	parent.setRootValue("/");

	setFields(recordId, name, folderId, foldRef, parent, type, size, color);

	setDataURL("data/folders.xml" + (nopagination ? "?nopagination=true" : ""));
	setClientOnly(false);
}
 
Example 5
Source File: DropboxDS.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public DropboxDS(String id, boolean folders) {
	String dsId = id;
	if (dsId == null)
		dsId = "DropboxDS";
	setID(dsId);
	setTitleField("name");
	setRecordXPath("/list/entry");

	DataSourceTextField name = new DataSourceTextField("name", I18N.message("name"), 255);

	DataSourceTextField path = new DataSourceTextField("path", I18N.message("path"));
	path.setPrimaryKey(true);
	path.setRequired(true);

	DataSourceTextField type = new DataSourceTextField("type", I18N.message("type"));
	type.setRequired(true);

	DataSourceTextField icon = new DataSourceTextField("iicon", I18N.message("icon"));

	DataSourceTextField parent = new DataSourceTextField("parent", "Parent");
	parent.setRequired(true);
	parent.setForeignKey(dsId + ".path");
	parent.setRootValue("#parent#");

	setFields(name, path, type, parent, icon);

	setDataURL("data/dropbox.xml?folders=" + folders);
	setClientOnly(false);
}
 
Example 6
Source File: LinksDS.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public LinksDS(long docId) {
	setID("LinksDS");

	setTitleField("filename");
	setRecordXPath("/list/link");
	DataSourceTextField filename = new DataSourceTextField("filename");
	DataSourceTextField linkId = new DataSourceTextField("linkId");
	DataSourceTextField folderId = new DataSourceTextField("folderId");
	DataSourceTextField folderId1 = new DataSourceTextField("folderId1");
	DataSourceTextField folderId2 = new DataSourceTextField("folderId2");
	DataSourceTextField documentId = new DataSourceTextField("documentId");
	documentId.setPrimaryKey(true);
	documentId.setHidden(true);
	documentId.setRequired(true);

	DataSourceImageField icon = new DataSourceImageField("icon");
	DataSourceTextField direction = new DataSourceTextField("direction");
	DataSourceTextField type = new DataSourceTextField("type");

	DataSourceTextField parent = new DataSourceTextField("parent", "Parent ID");
	parent.setRequired(true);
	parent.setForeignKey("LinksDS.documentId");
	parent.setRootValue("/");

	setFields(linkId, parent, folderId, documentId, filename, icon, direction, type, folderId1, folderId2);
	setClientOnly(true);

	setDataURL("data/links.xml?docId=" + docId);
	setClientOnly(false);
}