...
Step 1 - Create a Simple New Client Page
- Click on Presentation and then Pages.
- Click New Page
- From Categories, select General and from Templates select Blank; name the page New Client; click Save.
- On save you will be redirected to the detail page of the New Client page, from here launch the Page Builder by clicking on Page Builder
- In the Sections tab in the Page Builder, make sure pnMain is selected
- Find Layout in Properties and delete fit and leave it blank.
- You will now add elements to to pnMain
- Add a panel called pnGeneralInfo, title General Information; set its height to 180, its padding to 20 and its border to false
- To pnGeneralInfo add a panel called pnTopColumns and set its layout to column, its border to false, and its height to 60
- Add two FormPanels to pnTopColumns, one called pnRight1 and one called pnLeft1, and set their ColumnWidths each to .5, and their borders to false
- Distribute 4 TextFields among the 2 column panels: First Name, Last Name, Email, and Mobile Phone
- To the bottom of pnClientDetails also add a TextArea called txtMailingAddress, FieldLabel Mailing Address, width 640
- To pnGeneralInfo add a panel called pnTopColumns and set its layout to column, its border to false, and its height to 60
- Create a similar panel for Department Information for the following final result:
- Add a panel called pnGeneralInfo, title General Information; set its height to 180, its padding to 20 and its border to false
- Find the Data Source tab
- Click the Add button and Add a Unified Store
- Set its ID to storeClients and click Create
- Make sure storeClients is selected and in the Properties panel at the right of the screen, click on Settings
- Set Data Source Type to Business Objects
- Set Data Source to Client
- Check the Create checkbox
- In the Create tab, match all the TextFields to attributes of the Client business object in the Controls Column
- Click on Properties and add clientCreated(); to the Success textarea.
- Click Save
- Click Save in the Configuration window
- Make sure pnMain is selected and click on TopBar in the Properties panel
- Add a button called Save with Icon Accept; click Apply
- In the Listeners tab, select Click and from Fn select PageManager.ruleAction_execute_storeClients_Create
Click on the Source tab and add the following JavaScript to the Head tag
Code Block language javascript linenumbers true <script language="javascript"> function clientCreated() { parent.newClientPage.close(); } </script>
- Click on Apply Source Code
- Click on Save Page at the top left of the screen, and click Ok to the Page Was Saved notification
Step 2 - Create a Search Page
- Click on Presentation and then Pages.
- Click New Page
- From Categories, select General and from Templates select Blank; name the page Client Search; click Save.
- On save you will be redirected to the detail page of the Client Search page, from here launch the Page Builder by clicking on Page Builder
- In the Data Sources tab, click Add and add a Page Action; call it newClientPage
- Right click on newClientPage and click on Properties
- Set Data Source to New Client
- Into CallBback Action Text add grdClients.getStore().reload();
- Click Save
- In the Data Source panel, add a Unified Store
- Call is storeClients
- Right click on storeClient and click Properties
- Select Business Object for Data Source Type and Client as the Data Source
- Select the List and Delete checkboxes
- Click Save
- Click on pnMain
- In Properties, set the layout of pnMain to border
- Drag a Grid into pnMain and call it grdClients
- Set its Region to Center
- Select grdClients in the Design panel and click on Settings in the Properties panel
- Set Data Source to storeClients[List]
- Add the following columns to the grid: First Name, Last Name, Email, Mobile Phone, and Mailing Address
- Click on Add Grid Column at the top of the Configuration window, and click on Command Column
- Click on the First arrow to move the column to the top
- Select the Command Column and change its header to Actions
- Click on the Command Columns tab
- Click on Add Command Column and click ActionCommand
- Double click on CommandName and change the name to Delete, set the idon to BulletCross and for action select storeClients_Delete
- Add another ActionCommand called Edit and change its icon to Pencil
- Click Save
- Drag an Exc Search Form into pnMain
- Call it searchClients and set its Region to East
- Click on Settings in the Properties panel
- Select First Name, Last Name, Email and Mobile Phone as search criteria
- Click Save
- Click on TopBar in the Properties panel
- Add a button called Search with icon Accept
- Set Listeners to Click
- Set Fn to PageManager.searchForm_search_searchClients
- Add a button called Clear with icon Cancel
- Set Listeners to Click
- Set Fn to PageManager.searchForm_clear_searchClients
- Click Save