50 likes | 66 Views
mailTo: Functionality. This section describes how to add the common function: mailTo, to a .JSP page, so you can add the mailTo functionality to a dynamic data content JSF/EGL page. Provide mailTo: Functionality on Mouse-Click.
E N D
mailTo: Functionality This section describes how to add the common function: mailTo, to a .JSP page, so you can add the mailTo functionality to a dynamic data content JSF/EGL page
Provide mailTo: Functionality on Mouse-Click Many web applications require you to add a mailTo: feature, whereby a user can click a hyper-linked eMail address and have that action open up their default mail software package – AND seed a new eMail with the To: linked back to the clicked row’s/person’s e-Mail from the web application (see pictures below). This is relatively easy to do using JSF/RBDe tooling – steps follow on the next slide.
Provide mailTo: Functionality on Mouse-Click – Steps – 1 of 3 • Create a new JSP page named: mailToPage • Use any template • Modify the page header text • Edit the JSFHandler, and add some variables and database access statements Record and array variables EGL database access statements 3. Press Ctrl/S
Provide mailTo: Functionality on Mouse-Click – Steps – 2 of 3 4. From Page Designer/Page Data • Drag the Customer record onto the page • Create output fields • Select only a few fields • Drag the CustomerArray record onto the page • Create output fields • Select only a few fields 5. Open the Enhanced Faces Components Palette 6. From Page Designer select (set focus to) the EmailAddress output text control in the record • Double-click the Faces Link control • From Configure URL, type: mailTo: 7. Select the EmailAddress control (not the link, just the EmailAddress output control) • From its Properties, select and copy the entire fully-qualified JSF Value ***See Notesfor details
Provide mailTo: Functionality on Mouse-Click – Steps – 3 of 3 8. Re-select the link – and from Properties • In the URL: paste the fully-qualified JSF name of the field immediately after mailTo: Repeat steps 5 – 8 to add a mailTo: link to the eMailAddress control in the dataTable Run the page on the server – and click an eMail address – either from the detail record, or from a row in the dataTable mailTo:#{mailToPage.customerRec.EmailAddress}