com.smartgwt.client.data.fields.DataSourceTextField Java Examples

The following examples show how to use com.smartgwt.client.data.fields.DataSourceTextField. 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: 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 #2
Source File: DocumentHistoryDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
private void init(String url) {
	setRecordXPath("/list/history");
	DataSourceTextField user = new DataSourceTextField("user");
	DataSourceDateTimeField date = new DataSourceDateTimeField("date");
	DataSourceTextField event = new DataSourceTextField("event");
	DataSourceTextField comment = new DataSourceTextField("comment");
	DataSourceTextField reason = new DataSourceTextField("reason");
	DataSourceTextField filename = new DataSourceTextField("filename");
	DataSourceTextField version = new DataSourceTextField("version");
	DataSourceImageField icon = new DataSourceImageField("icon");
	DataSourceBooleanField _new = new DataSourceBooleanField("new");
	DataSourceTextField documentId = new DataSourceTextField("docId");
	DataSourceTextField folderId = new DataSourceTextField("folderId");
	DataSourceTextField userId = new DataSourceTextField("userId");
	DataSourceTextField path = new DataSourceTextField("path");
	DataSourceTextField sid = new DataSourceTextField("sid");

	setFields(user, filename, date, event, comment, reason, version, icon, _new, documentId, folderId, userId, path, sid);
	setClientOnly(true);

	setDataURL(url);
}
 
Example #3
Source File: SubscriptionsDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public SubscriptionsDS(Long folderId, Long docId) {
	setTitleField("name");
	setRecordXPath("/list/subscription");
	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	id.setRequired(true);

	DataSourceImageField icon = new DataSourceImageField("icon");
	DataSourceTextField name = new DataSourceTextField("name");
	DataSourceDateTimeField created = new DataSourceDateTimeField("created");
	DataSourceTextField type = new DataSourceTextField("type");
	DataSourceTextField objectId = new DataSourceTextField("objectid");
	DataSourceTextField events = new DataSourceTextField("events");
	DataSourceTextField userName = new DataSourceTextField("userName");
	DataSourceTextField userId = new DataSourceTextField("userId");
	DataSourceTextField folderOption = new DataSourceTextField("folderOption");

	setFields(id, icon, name, created, type, objectId, events, userName, userId, folderOption);
	setClientOnly(true);
	String dataUrl = "data/subscriptions.xml?1=1";
	if (folderId != null)
		dataUrl += "&folderId=" + folderId;
	if (docId != null)
		dataUrl += "&docId=" + docId;
	setDataURL(dataUrl);
}
 
Example #4
Source File: DiscussionsDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public DiscussionsDS(long docId) {
	setRecordXPath("/list/discussion");
	DataSourceTextField name = new DataSourceTextField("name");
	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	id.setHidden(true);
	id.setRequired(true);
	DataSourceTextField user = new DataSourceTextField("user");
	DataSourceIntegerField posts = new DataSourceIntegerField("posts");
	DataSourceIntegerField visits = new DataSourceIntegerField("visits");
	DataSourceDateTimeField lastPost = new DataSourceDateTimeField("lastPost");

	setFields(id, name, user, posts, visits, lastPost);
	setClientOnly(true);
	setDataURL("data/discussions.xml?docId=" + docId);
}
 
Example #5
Source File: CalendarEventsDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public CalendarEventsDS(Long docId) {
	setRecordXPath("/list/event");
	DataSourceSequenceField id = new DataSourceSequenceField("eventId");
	id.setPrimaryKey(true);

	DataSourceTextField name = new DataSourceTextField("name");
	DataSourceTextField description = new DataSourceTextField("description");
	DataSourceDateTimeField start = new DataSourceDateTimeField("startDate");
	DataSourceDateTimeField end = new DataSourceDateTimeField("endDate");
	DataSourceDateTimeField eventWindowStyle = new DataSourceDateTimeField("eventWindowStyle");
	DataSourceTextField parentId = new DataSourceTextField("parentId");

	setFields(id, name, description, start, end, eventWindowStyle, parentId);
	setClientOnly(true);
	setDataURL("data/calendarevents.xml" + (docId != null ? "?docId=" + docId : ""));
}
 
Example #6
Source File: LocalizationDataSource.java    From proarc with GNU General Public License v3.0 6 votes vote down vote up
public LocalizationDataSource() {
        setID(ID);
        setDataURL(RestConfig.URL_LOCALIZATION);

        DataSourceTextField bundle = new DataSourceTextField(LocalizationResourceApi.ITEM_BUNDLENAME);
        bundle.setHidden(true);
        DataSourceTextField key = new DataSourceTextField(LocalizationResourceApi.ITEM_KEY);
        key.setHidden(true);
        // primary key is composite of bundleName and key; unsupported by SmartGWT 3.0
//        key.setPrimaryKey(true);

        DataSourceTextField value = new DataSourceTextField(LocalizationResourceApi.ITEM_VALUE);

        setFields(bundle, key, value);
        setRequestProperties(RestConfig.createRestRequest(getDataFormat()));
        // cache data source for session
        setCacheAllData(Boolean.TRUE);
    }
 
Example #7
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 #8
Source File: ReportsDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public ReportsDS() {
	setTitleField("name");
	setRecordXPath("/list/report");
	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	DataSourceTextField name = new DataSourceTextField("name");
	DataSourceTextField outputFolderId = new DataSourceTextField("outputFolderId");
	DataSourceTextField outputDocId = new DataSourceTextField("outputDocId");

	DataSourceImageField runningIcon = new DataSourceImageField("runningIcon");
	DataSourceIntegerField status = new DataSourceIntegerField("status");

	DataSourceImageField enabledIcon = new DataSourceImageField("enabledIcon");
	DataSourceBooleanField enabled = new DataSourceBooleanField("eenabled");

	DataSourceDateTimeField lastRun = new DataSourceDateTimeField("lastRun");
	DataSourceDateTimeField lastModified = new DataSourceDateTimeField("lastModified");

	setFields(id, name, enabled, enabledIcon, runningIcon, status, lastRun, outputFolderId, outputDocId,
			lastModified);
	setDataURL("data/reports.xml");
	setClientOnly(true);
}
 
Example #9
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 #10
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 #11
Source File: GarbageDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public GarbageDS() {
	setTitleField("filename");
	setRecordXPath("/list/entry");
	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	id.setHidden(true);
	id.setRequired(true);
	DataSourceImageField icon = new DataSourceImageField("icon");
	DataSourceTextField customId = new DataSourceTextField("customId");
	DataSourceDateTimeField lastModified = new DataSourceDateTimeField("lastModified");
	DataSourceTextField folderId = new DataSourceTextField("folderId");
	DataSourceTextField type = new DataSourceTextField("type");
	DataSourceTextField fileName = new DataSourceTextField("filename");

	setFields(id, fileName, customId, icon, lastModified, folderId, type);
	setClientOnly(true);
	setDataURL("data/garbage.xml");
}
 
Example #12
Source File: AutomationTriggersDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public AutomationTriggersDS(Long foldId, String event) {
	setRecordXPath("/list/trigger");

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

	DataSourceTextField events = new DataSourceTextField("events");
	DataSourceTextField folderId = new DataSourceTextField("folderId");
	DataSourceTextField folder = new DataSourceTextField("folder");
	DataSourceTextField routine = new DataSourceTextField("routine");
	DataSourceTextField routineId = new DataSourceTextField("routineId");
	DataSourceTextField automation = new DataSourceTextField("automation");

	setFields(id, events, folderId, folder, routineId, routine, automation);
	setClientOnly(true);
	setDataURL("data/automationtriggers.xml?locale=" + I18N.getLocale()
			+ (foldId != null ? "&folderId=" + foldId : "") + (event != null ? "&event=" + event : ""));
}
 
Example #13
Source File: FolderHistoryDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public FolderHistoryDS(long folderId) {
	setRecordXPath("/list/history");
	DataSourceTextField user = new DataSourceTextField("user");
	DataSourceDateTimeField date = new DataSourceDateTimeField("date");
	DataSourceTextField event = new DataSourceTextField("event");
	DataSourceTextField comment = new DataSourceTextField("comment");
	DataSourceTextField reason = new DataSourceTextField("reason");
	DataSourceTextField fileName = new DataSourceTextField("filename");
	DataSourceTextField path = new DataSourceTextField("path");
	DataSourceTextField sid = new DataSourceTextField("sid");

	setFields(user, date, event, comment, reason, fileName, path, sid);
	setClientOnly(true);

	setDataURL("data/folderhistory.xml?id=" + folderId + "&locale=" + I18N.getLocale());
}
 
Example #14
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 converter) {
	setTitleField("converters");
	setRecordXPath("/list/association");

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

	setFields(id, in, out, selected, enabled);
	setDataURL("data/formatconverters.xml?converter=" + converter);
	setClientOnly(true);
}
 
Example #15
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 #16
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 #17
Source File: WorkflowParameterDataSource.java    From proarc with GNU General Public License v3.0 6 votes vote down vote up
public WorkflowParameterDataSource() {
        setID(ID);
        setDataURL(RestConfig.URL_WORKFLOW_PARAMETER);

        DataSourceTextField name = new DataSourceTextField(FIELD_NAME);
        name.setDisplayField(WorkflowModelConsts.PARAMETER_PROFILELABEL);
        name.setCanEdit(false);

        DataSourceTextField value = new DataSourceTextField(FIELD_VALUE);
        value.setCanEdit(true);

        setFields(name, value);
        setRequestProperties(RestConfig.createRestRequest(getDataFormat()));
//        setOperationBindings(
//                RestConfig.createAddOperation(),
//                RestConfig.createDeleteOperation(),
//                RestConfig.createUpdateOperation());
    }
 
Example #18
Source File: FeedMessagesDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public FeedMessagesDS() {
	setTitleField("title");
	setRecordXPath("/list/feedmessage");
	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	id.setRequired(true);

	DataSourceTextField guid = new DataSourceTextField("guid");
	DataSourceTextField text = new DataSourceTextField("text");
	DataSourceTextField description = new DataSourceTextField("description");
	DataSourceTextField link = new DataSourceTextField("link");
	DataSourceDateTimeField pubDate = new DataSourceDateTimeField("pubDate");
	DataSourceIntegerField read = new DataSourceIntegerField("read");

	setFields(id, guid, text, description, link, pubDate, read);
	setClientOnly(true);
	setDataURL("data/feedmessage.xml");
}
 
Example #19
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 #20
Source File: MessagesDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public MessagesDS() {
	setTitleField("subject");
	setRecordXPath("/list/message");
	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	id.setRequired(true);

	DataSourceTextField subject = new DataSourceTextField("subject");
	DataSourceTextField text = new DataSourceTextField("text");
	DataSourceImageField priority = new DataSourceImageField("priority");
	DataSourceTextField from = new DataSourceTextField("from");
	DataSourceDateTimeField sent = new DataSourceDateTimeField("sent");
	DataSourceTextField read = new DataSourceTextField("read");

	setFields(id, subject, text, priority, from, sent, read);
	setClientOnly(true);
	setDataURL("data/messages.xml");
}
 
Example #21
Source File: DocumentAliasesDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public DocumentAliasesDS(long docId) {
	setTitleField("filename");
	setRecordXPath("/list/alias");
	DataSourceImageField icon = new DataSourceImageField("icon");
	DataSourceTextField filename = new DataSourceTextField("filename");
	DataSourceTextField path = new DataSourceTextField("path");
	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	id.setHidden(true);
	id.setRequired(true);

	DataSourceTextField folderId = new DataSourceTextField("folderId");
	folderId.setHidden(true);
	
	setFields(id, icon, filename, path, folderId);
	setClientOnly(true);
	setDataURL("data/documentaliases.xml?docId=" + docId);
}
 
Example #22
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 #23
Source File: BookmarksDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public BookmarksDS() {
	setTitleField("name");
	setRecordXPath("/list/bookmark");
	DataSourceTextField name = new DataSourceTextField("name");
	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	id.setHidden(true);
	id.setRequired(true);
	DataSourceImageField icon = new DataSourceImageField("icon");
	DataSourceTextField description = new DataSourceTextField("description");
	DataSourceIntegerField position = new DataSourceIntegerField("position");
	DataSourceTextField userId = new DataSourceTextField("userId");
	DataSourceTextField targetId = new DataSourceTextField("targetId");
	DataSourceTextField folderId = new DataSourceTextField("folderId");
	DataSourceIntegerField type = new DataSourceIntegerField("type");
	type.setHidden(true);

	setFields(id, name, description, icon, userId, targetId, position, folderId, type);
	setClientOnly(true);
	setDataURL("data/bookmarks.xml");
}
 
Example #24
Source File: ContactsDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public ContactsDS() {
	setTitleField("email");
	setRecordXPath("/list/contact");
	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	id.setHidden(true);
	id.setRequired(true);
	DataSourceTextField email = new DataSourceTextField("email");
	DataSourceTextField firstName = new DataSourceTextField("firstName");
	DataSourceTextField lastName = new DataSourceTextField("lastName");
	DataSourceTextField company = new DataSourceTextField("company");

	setFields(id, email, firstName, lastName, company);
	setDataURL("data/contacts.xml?userId=" + Session.get().getUser().getId());
	setClientOnly(true);
}
 
Example #25
Source File: DeviceDataSource.java    From proarc with GNU General Public License v3.0 6 votes vote down vote up
public DeviceDataSource() {
    ClientMessages i18n = GWT.create(ClientMessages.class);
    setID(ID);
    setDataURL(RestConfig.URL_DEVICE);

    DataSourceTextField fieldId = new DataSourceTextField(FIELD_ID);
    fieldId.setPrimaryKey(Boolean.TRUE);
    fieldId.setTitle(i18n.DeviceManager_Id_Title());

    DataSourceTextField label = new DataSourceTextField(FIELD_LABEL);
    label.setTitle(i18n.DeviceManager_Label_Title());
    label.setLength(255);

    DataSourceTextField model = new DataSourceTextField(FIELD_MODEL);
    model.setTitle(i18n.DeviceManager_Model_Title());

    setFields(fieldId, label, model);
    setRequestProperties(RestConfig.createRestRequest(getDataFormat()));
    setOperationBindings(
            RestConfig.createAddOperation(),
            RestConfig.createDeleteOperation(),
            RestConfig.createUpdateOperation());
}
 
Example #26
Source File: IncrementalArchivesDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public IncrementalArchivesDS(int archivesType) {
	setTitleField("name");
	setRecordXPath("/list/archive");

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

	DataSourceTextField prefix = new DataSourceTextField("prefix");
	DataSourceTextField type = new DataSourceTextField("type");
	DataSourceTextField typelabel = new DataSourceTextField("typelabel");
	DataSourceIntegerField frequency = new DataSourceIntegerField("frequency");

	setFields(id, prefix, type, typelabel, frequency);
	setClientOnly(true);
	setDataURL("data/incrementalarchives.xml?locale=" + I18N.getLocale() + "&type=" + archivesType);
}
 
Example #27
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 #28
Source File: RetentionPoliciesDS.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public RetentionPoliciesDS() {
	setTitleField("name");
	setRecordXPath("/list/policy");
	DataSourceTextField id = new DataSourceTextField("id");
	id.setPrimaryKey(true);
	DataSourceTextField name = new DataSourceTextField("name");
	DataSourceTextField days = new DataSourceTextField("days");
	DataSourceTextField dateOption = new DataSourceTextField("dateOption");
	DataSourceTextField template = new DataSourceTextField("template");
	DataSourceTextField action = new DataSourceTextField("action");
	DataSourceImageField enabled = new DataSourceImageField("eenabled");

	setFields(id, name, days, dateOption, template, action, enabled);
	setDataURL("data/retentionpolicies.xml");
	setClientOnly(true);
}
 
Example #29
Source File: SOSDataSource.java    From SensorWebClient with GNU General Public License v2.0 6 votes vote down vote up
public SOSDataSource(String id) {
	setID(id);
	setRecordXPath("/instances/instance");
	DataSourceIntegerField pkField = new DataSourceIntegerField("itemID");
       pkField.setPrimaryKey(true);  
	pkField.setHidden(true);

	DataSourceTextField sosURLField = new DataSourceTextField("url");
	DataSourceTextField sosVersionField = new DataSourceTextField("version");
	DataSourceBooleanField cachedField = new DataSourceBooleanField("cached");
	DataSourceTextField sosItemNameField = new DataSourceTextField("itemName");
	DataSourceBooleanField waterMLField = new DataSourceBooleanField("waterML");
	DataSourceFloatField llEastingField = new DataSourceFloatField("llEasting");
	DataSourceFloatField urEastingField = new DataSourceFloatField("urEasting");
	DataSourceFloatField llNorthingField = new DataSourceFloatField("llNorthing");
	DataSourceFloatField urNorthingField = new DataSourceFloatField("urNorthing");
	DataSourceIntegerField defaultZoomField = new DataSourceIntegerField("defaultZoom");
	DataSourceIntegerField requestChunkField = new DataSourceIntegerField("requestChunk");
	
	setFields(pkField, sosItemNameField, sosVersionField, sosURLField, waterMLField, cachedField, llEastingField, llNorthingField, urEastingField, urNorthingField, defaultZoomField, requestChunkField);
	setDataURL(SOS_INSTANCES_DATA_SOURCE);
}
 
Example #30
Source File: UserDataSource.java    From SensorWebClient with GNU General Public License v2.0 6 votes vote down vote up
public UserDataSource() {

        DataSourceIntegerField id = new DataSourceIntegerField("parameterId", "ID");
        id.setPrimaryKey(true);
        id.setHidden(true);

        DataSourceTextField userName = new DataSourceTextField("userName", i18n.userName());
        DataSourceTextField name = new DataSourceTextField("name", i18n.name());
        DataSourceTextField password = new DataSourceTextField("password", i18n.password());
        DataSourceTextField eMail = new DataSourceTextField("eMail", i18n.emailAddress());
        DataSourceTextField handy = new DataSourceTextField("handy", i18n.handyNumber());
        DataSourceTextField role = new DataSourceTextField("role", i18n.role());

        setFields(id, userName, name, password, eMail, handy, role);

        setClientOnly(true);
    }