<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>User management<br><font class="Apple-style-span" color="#144fae"><br></font><div>To set up user management, &nbsp;create an application specific user class. In AppName-Model, create a subclass of DEUser. See accessing the model for using users as model entrypoint.<br></div><div><br></div><div>In StoryBoard you can find the SBUser class. In order to be able to login, use a subclass of the DELoginForm. Override the "userClass" method, and the form is ready to use. It has some tags to allow you to customize the look and feel using css.&nbsp;In Storyboard this is used to allow you to register in addition to logging in.</div></div><div><font class="Apple-style-span" color="#144fae"><br></font>EditForm and EditPanel<br><font class="Apple-style-span" color="#144fae"><br></font>To let the user edit the model, use edit forms and edit panels. An EditForm is for editing a single object. Create an EditForm and set the "subject" to the object to edit. Note that the form needs to know whether it should create a new instance, or needs to make a (field)copy or not. The method to set a subject is "subject: aSubject isNew: aBoolean". The flag indicates if the object is new, and does not need copying or if it is an existing object and should be copied before editing.<br><font class="Apple-style-span" color="#144fae"><br></font>The EditPanel is used when you need to edit multiple objects on the same page, and they either should be saved all together, or not saved at all (i.e. if validation of one of the objects fails). The interface of the EditPanel is very similar to EditForm, it has a "addSubject: aSubject isNew: aBoolean" method, that adds another EditComponent to the panel. You can also add EditComponents directly to the EditPanel.<br><font class="Apple-style-span" color="#144fae"><br></font>StoryBoard only uses EditForms. The first EditForm you can find is in the SBRegisterUserForm. It is used to add new users, so the isNew flag is set to true. At this point the EditForm is a child of the SBRegisterUserForm, so the save and cancel action should be set. Alternative a EditForm can be shown modal, it returns nil on a cancel and the changed value on save.<br><font class="Apple-style-span" color="#144fae"><br></font>createEditForm<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>^DEEditForm new<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>subject: SBUser new isNew: true;<span class="Apple-tab-span" style="white-space: pre; ">        </span>" create a new user, and allow the edit form to change it "<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>title: 'Register user';<span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>" title is optional and is shown as a heading "<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>propertySymbol: #initialEditFields;<span class="Apple-tab-span" style="white-space: pre; ">        </span>" normally password cannot be set when editing user, only initially, so a different field set is used "<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>saveAction: [ self save ];<span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>" is called when the user presses save, and the user is valid "<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>cancelAction: [ self cancel ];<span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>" is called when the user presses cancel "<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>yourself<br><font class="Apple-style-span" color="#144fae"><br></font>Reports<br><font class="Apple-style-span" color="#144fae"><br></font>To display collections reports are most useful. Reports are created by a builder. The builder has more or less the same options as a editForm. Reports should be refreshed when needed by setting the rows on rendering.<br><font class="Apple-style-span" color="#144fae"><br></font>In StoryBoard the project overview makes use of a report for showing the projects. The builder is asked in the createProjectReport to create the appropriate report.<br><font class="Apple-style-span" color="#144fae"><br></font>createProjectReport<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>| builder |<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>builder := DEReportBuilder new<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>subject: SBProject;<span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>" use the description of SBProject to build the report "<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>propertySymbol: #reportColumns;<span class="Apple-tab-span" style="white-space: pre; ">        </span>" use the field set 'report column fields' to build the report "<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>yourself.<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>builder addCustomColumn: self teamColumn.<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>^builder createReportFrom: self accessor: #showProject:<br><font class="Apple-style-span" color="#144fae"><br></font>And the render method looks like this:<br><font class="Apple-style-span" color="#144fae"><br></font>renderProjectsOn: canvas<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>self projectReport rows: self projects.<span class="Apple-tab-span" style="white-space:pre">        </span>" we set this the rows here, to automatically update the content each time it is rendered. "<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>canvas heading<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>level: 2;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>with: 'Current projects'.<br><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>canvas render: self projectReport.<br></div></div><div><br></div></body></html>