|
Re: Registration Form [message #1810402 is a reply to message #1810382] |
Fri, 09 August 2019 13:03 |
|
Hi Peter
That's an interesting question. I assume you use Scout Classic, which means your Client/UI logic is written in Java, right? In a Scout Classic application the LoginForm is basically a very small, independent application written in Scout JS, which means it is written in JavaScript. Only when the login has been successful the Scout Classic application is started for that user. You have multiple options to provide a registration form:
1.) This would be my preferred solution: I would implement the RegistrationForm as a part of the regular Scout application (in Java). The idea is, that an anonymous user could can access this form, without the need to log in. In order to do that you must create a "deep link" like http://example.org/?dl=registration. You need to implement a deep-link handler (extend AbstractDeepLinkHandler) that handles that URL. The handler must bring the Scout Desktop in the right state and show the RegistrationForm (and probably disable/hide everything else in your application. Check the methods setNavigationVisible, setHeaderVisible in AbstractDesktop). In a standard Scout web-application the login-filter only allows logged in users to access the application. In your case you must allow anonymous users to access at least the deep-link to show the registration form. You can do that in your web.xml. Finally you must provide your own LoginForm.js. The easiest way is to extend the existing LoginForm.js and add the link there. You could append a HtmlField or a (Link)Button to show the link to the registration form.
2.) You could create a second Scout Classic application that only contains the RegistrationForm and deploy it to a path which is not protected by a login-filter and thus accessible by anonymous users. You still need to modify the LoginForm.js though.
3.) You could write the RegistrationForm in Scout JS, so it would be part of the small login application I mentioned further above. This means you'd write the form with JavaScript and JSON and you must also have a REST service somewhere that handles the business logic and data layer on the backend.
> Do there any code examples exist?
AFAIK: no. But if you decide to implement one of the solutions above, please let us know how you did it.
Eclipse Scout Homepage | Documentation | GitHub
|
|
|
Powered by
FUDForum. Page generated in 0.02796 seconds