Java Code Examples for com.smartgwt.client.data.fields.DataSourceTextField#setRequired()
The following examples show how to use
com.smartgwt.client.data.fields.DataSourceTextField#setRequired() .
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: VersionsDS.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public VersionsDS(Long docId, Long archiveId, int max) { setRecordXPath("/list/version"); DataSourceTextField id = new DataSourceTextField("id"); id.setPrimaryKey(true); id.setHidden(true); id.setRequired(true); DataSourceTextField user = new DataSourceTextField("user"); DataSourceTextField event = new DataSourceTextField("event"); DataSourceTextField version = new DataSourceTextField("version"); DataSourceTextField fileVersion = new DataSourceTextField("fileVersion"); DataSourceDateTimeField date = new DataSourceDateTimeField("date"); DataSourceTextField comment = new DataSourceTextField("comment"); DataSourceTextField docid = new DataSourceTextField("docid"); DataSourceTextField customid = new DataSourceTextField("customid"); DataSourceFloatField size = new DataSourceFloatField("size"); DataSourceImageField icon = new DataSourceImageField("icon"); DataSourceTextField template = new DataSourceTextField("template"); DataSourceTextField type = new DataSourceTextField("type"); DataSourceTextField fileName = new DataSourceTextField("filename"); setFields(id, user, event, version, fileVersion, date, comment, docid, customid, type, size, icon, template, fileName); setClientOnly(true); setDataURL("data/versions.xml?max=" + max + (docId != null ? "&docId=" + docId : "&archiveId=" + archiveId) + "&locale=" + I18N.getLocale()); }
Example 2
Source File: GarbageDS.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
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 3
Source File: MessagesDS.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
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 4
Source File: AutomationRoutinesDS.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public AutomationRoutinesDS(boolean showEmpty) { setTitleField("name"); setRecordXPath("/list/routine"); 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 body = new DataSourceTextField("automation"); setFields(id, name, description, body); setDataURL("data/automationroutines.xml" + (showEmpty ? "?showEmpty=true" : "")); setClientOnly(true); }
Example 5
Source File: SubscriptionsDS.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
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 6
Source File: WorkflowTriggersDS.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
public WorkflowTriggersDS(String folderId) { setTitleField("workflow"); setRecordXPath("/list/workflowtrigger"); DataSourceTextField id = new DataSourceTextField("id"); id.setPrimaryKey(true); id.setHidden(true); id.setRequired(true); DataSourceTextField workflowId = new DataSourceTextField("workflowId"); workflowId.setHidden(true); DataSourceTextField templateId = new DataSourceTextField("templateId"); templateId.setHidden(true); DataSourceTextField workflow = new DataSourceTextField("workflow", I18N.message("workflow")); DataSourceTextField template = new DataSourceTextField("template", I18N.message("template")); DataSourceBooleanField checkin = new DataSourceBooleanField("triggerAtCheckin", I18N.message("triggeratcheckin")); setFields(id, workflowId, templateId, workflow, template, checkin); setDataURL("data/workflowtriggers.xml?folderId=" + folderId); setClientOnly(false); }
Example 7
Source File: MenusDS.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
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 8
Source File: ContactsDS.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
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 9
Source File: FeedMessagesDS.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
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 10
Source File: FolderAliasesDS.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
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 11
Source File: WorkflowHistoriesDS.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public WorkflowHistoriesDS(Long instanceId, Long workflowTemplateId, String eventFilter, String tagFilter) { setRecordXPath("/list/workflowhistory"); DataSourceTextField id = new DataSourceTextField("id"); id.setPrimaryKey(true); id.setRequired(true); DataSourceTextField tag = new DataSourceTextField("tag"); DataSourceTextField name = new DataSourceTextField("name"); DataSourceTextField taskId = new DataSourceTextField("taskId"); DataSourceDateTimeField startDate = new DataSourceDateTimeField("startdate"); DataSourceDateTimeField endDate = new DataSourceDateTimeField("enddate"); DataSourceTextField documents = new DataSourceTextField("documents"); DataSourceTextField initiator = new DataSourceTextField("initiator"); DataSourceTextField event = new DataSourceTextField("event"); DataSourceDateTimeField date = new DataSourceDateTimeField("date"); DataSourceTextField user = new DataSourceTextField("user"); DataSourceTextField comment = new DataSourceTextField("comment"); DataSourceTextField filename = new DataSourceTextField("filename"); DataSourceTextField documentId = new DataSourceTextField("documentId"); DataSourceTextField sessionId = new DataSourceTextField("sessionid"); DataSourceTextField transition = new DataSourceTextField("transition"); setFields(id, taskId, name, tag, startDate, endDate, documents, initiator, event, date, user, comment, filename, transition, documentId, sessionId); setDataURL("data/workflowhistories.xml?locale=" + I18N.getLocale() + (instanceId != null ? "&instanceId=" + instanceId : "") + (workflowTemplateId != null ? "&workflowTemplateId=" + workflowTemplateId : "") + (eventFilter != null ? "&event=" + eventFilter : "") + (tagFilter != null ? "&tag=" + tagFilter : "")); setClientOnly(true); }
Example 12
Source File: TicketsDS.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public TicketsDS(Integer max) { setTitleField("ticketId"); setRecordXPath("/list/ticket"); DataSourceTextField id = new DataSourceTextField("id"); id.setPrimaryKey(true); id.setHidden(true); id.setRequired(true); DataSourceTextField ticketId = new DataSourceTextField("ticketId"); DataSourceTextField docId = new DataSourceTextField("docId"); DataSourceTextField folderId = new DataSourceTextField("folderId"); DataSourceDateTimeField creation = new DataSourceDateTimeField("creation"); DataSourceDateTimeField expired = new DataSourceDateTimeField("expired"); DataSourceIntegerField count = new DataSourceIntegerField("count"); DataSourceIntegerField maxCount = new DataSourceIntegerField("maxCount"); DataSourceTextField suffix = new DataSourceTextField("maxCount"); DataSourceBooleanField valid = new DataSourceBooleanField("valid"); DataSourceTextField fileName = new DataSourceTextField("fileName"); DataSourceImageField icon = new DataSourceImageField("icon"); DataSourceImageField enabled = new DataSourceImageField("eenabled"); setFields(id, ticketId, docId, creation, expired, count, maxCount, suffix, enabled, valid, icon, fileName, folderId); setClientOnly(true); String url = "data/tickets.xml?1=1"; if (max != null) url += "&max=" + max; setDataURL(url); }
Example 13
Source File: ExtensionAliasesDS.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public ExtensionAliasesDS() { setTitleField("name"); setRecordXPath("/list/alias"); DataSourceTextField extension = new DataSourceTextField("extension"); extension.setPrimaryKey(true); extension.setRequired(true); DataSourceTextField aliases = new DataSourceTextField("aliases"); setFields(extension, aliases); setClientOnly(true); setDataURL("data/extensionaliases.xml"); }
Example 14
Source File: LockedDocsDS.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public LockedDocsDS(Long userId) { 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"); DataSourceTextField userIdItem = new DataSourceTextField("userId"); DataSourceTextField username = new DataSourceTextField("username"); DataSourceFloatField size = new DataSourceFloatField("size"); DataSourceDateTimeField lastModified = new DataSourceDateTimeField("lastModified"); DataSourceTextField fileName = new DataSourceTextField("filename"); DataSourceTextField digest = new DataSourceTextField("digest"); DataSourceIntegerField immutable = new DataSourceIntegerField("immutable"); DataSourceTextField folderId = new DataSourceTextField("folderId"); DataSourceTextField type = new DataSourceTextField("type"); DataSourceIntegerField status = new DataSourceIntegerField("status"); setFields(id, userIdItem, username, size, version, fileVersion, lastModified, customId, icon, fileName, digest, immutable, folderId, type, status); setClientOnly(true); String url = "data/lockeddocs.xml"; if (userId != null) url += "?userId=" + userId; setDataURL(url); }
Example 15
Source File: CharsetsDS.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
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 16
Source File: LinksDS.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
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); }
Example 17
Source File: TasksDS.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public TasksDS() { setTitleField("name"); setRecordXPath("/list/task"); DataSourceTextField name = new DataSourceTextField("name"); name.setPrimaryKey(true); name.setRequired(true); DataSourceImageField enabledIcon = new DataSourceImageField("enabledIcon"); DataSourceBooleanField enabled = new DataSourceBooleanField("eenabled"); DataSourceIntegerField status = new DataSourceIntegerField("status"); DataSourceTextField scheduling = new DataSourceTextField("scheduling"); DataSourceIntegerField progress = new DataSourceIntegerField("progress"); DataSourceIntegerField progressbar = new DataSourceIntegerField("progressbar"); DataSourceIntegerField completion = new DataSourceIntegerField("completion"); DataSourceIntegerField size = new DataSourceIntegerField("size"); DataSourceDateTimeField lastStart = new DataSourceDateTimeField("lastStart"); lastStart.setRequired(false); DataSourceDateTimeField nextStart = new DataSourceDateTimeField("nextStart"); nextStart.setRequired(false); DataSourceBooleanField indeterminate = new DataSourceBooleanField("indeterminate"); DataSourceImageField runningIcon = new DataSourceImageField("runningIcon"); setFields(name, enabledIcon, enabled, status, scheduling, progress, progressbar, completion, size, lastStart, nextStart, indeterminate, runningIcon); setClientOnly(false); setDataURL("data/tasks.xml?locale=" + I18N.getLocale()); }
Example 18
Source File: EventsDS.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
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 19
Source File: DeletedDocsDS.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public DeletedDocsDS(Long userId, Long folderId) { 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"); DataSourceTextField userIdItem = new DataSourceTextField("userId"); DataSourceTextField username = new DataSourceTextField("username"); DataSourceFloatField size = new DataSourceFloatField("size"); DataSourceDateTimeField lastModified = new DataSourceDateTimeField("lastModified"); DataSourceTextField filename = new DataSourceTextField("filename"); DataSourceTextField digest = new DataSourceTextField("digest"); DataSourceIntegerField immutable = new DataSourceIntegerField("immutable"); DataSourceTextField fid = new DataSourceTextField("folderId"); DataSourceTextField type = new DataSourceTextField("type"); DataSourceImageField locked = new DataSourceImageField("locked"); DataSourceImageField deleteUserId = new DataSourceImageField("deleteUserId"); DataSourceTextField deleteUser = new DataSourceTextField("deleteUser"); setFields(id, userIdItem, username, size, version, fileVersion, lastModified, customId, icon, filename, digest, immutable, fid, deleteUserId, deleteUser, type, locked); setClientOnly(true); String url = "data/deleteddocs.xml?1=1"; if (userId != null) url += "&userId=" + userId; if (folderId != null) url += "&folderId=" + folderId; setDataURL(url); }
Example 20
Source File: UserDataSource.java From proarc with GNU General Public License v3.0 | 4 votes |
public UserDataSource() { setID(ID); ClientMessages i18n = GWT.create(ClientMessages.class); setDataURL(RestConfig.URL_USER); DataSourceIntegerField userId = new DataSourceIntegerField(FIELD_ID); userId.setPrimaryKey(true); userId.setCanEdit(false); userId.setHidden(true); userId.setTitle(i18n.UsersView_ListHeader_Id_Title()); DataSourceTextField userName = new DataSourceTextField(FIELD_USERNAME); userName.setCanEdit(false); userName.setRequired(true); userName.setReadOnlyEditorProperties(new StaticTextItem()); userName.setTitle(i18n.UsersView_ListHeader_Username_Title()); userName.setPrompt(i18n.UsersView_ListHeader_Username_Hint()); DataSourcePasswordField passwd = new DataSourcePasswordField(FIELD_PASSWORD); passwd.setHidden(true); passwd.setTitle(i18n.UsersView_ListHeader_Password_Title()); DataSourceTextField surname = new DataSourceTextField(UserResourceApi.USER_SURNAME); surname.setRequired(true); surname.setTitle(i18n.UsersView_ListHeader_Surname_Title()); DataSourceTextField forename = new DataSourceTextField(UserResourceApi.USER_FORENAME); forename.setTitle(i18n.UsersView_ListHeader_Forename_Title()); DataSourceTextField organization = new DataSourceTextField(UserResourceApi.USER_ORGANIZATION); organization.setTitle(i18n.UsersView_ListHeader_Organization_Title()); organization.setValueMap(Organization.getMap()); organization.setReadOnlyEditorProperties(new StaticTextItem()); DataSourceTextField role = new DataSourceTextField(UserResourceApi.USER_ROLE); role.setTitle(i18n.UsersView_ListHeader_Role_Title()); role.setValueMap(UserRole.getMap()); role.setReadOnlyEditorProperties(new StaticTextItem()); DataSourceTextField email = new DataSourceTextField(UserResourceApi.USER_EMAIL); email.setTitle(i18n.UsersView_ListHeader_Email_Title()); DataSourceTextField home = new DataSourceTextField(UserResourceApi.USER_HOME); home.setCanEdit(false); home.setReadOnlyEditorProperties(new StaticTextItem()); home.setHidden(true); home.setTitle(i18n.UsersView_ListHeader_Home_Title()); DataSourceDateTimeField created = new DataSourceDateTimeField(UserResourceApi.USER_CREATED); created.setCanEdit(false); created.setTitle(i18n.UsersView_ListHeader_Created_Title()); created.setDateFormatter(DateDisplayFormat.TOEUROPEANSHORTDATETIME); DataSourceTextField remoteName = new DataSourceTextField(UserResourceApi.USER_REMOTENAME); remoteName.setTitle(i18n.UsersView_ListHeader_RemoteName_Title()); remoteName.setCanEdit(false); remoteName.setHidden(true); DataSourceTextField remoteType = new DataSourceTextField(UserResourceApi.USER_REMOTETYPE); remoteType.setTitle(i18n.UsersView_ListHeader_RemoteType_Title()); remoteType.setCanEdit(false); remoteType.setHidden(true); setFields(userId, userName, passwd, surname, forename, organization, role, email, created, remoteName, remoteType, home); setOperationBindings(RestConfig.createAddOperation(), RestConfig.createUpdateOperation()); setRequestProperties(RestConfig.createRestRequest(getDataFormat())); }