Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » Registration page
Registration page [message #1840539] Sun, 18 April 2021 07:56 Go to next message
Eclipse UserFriend
Good day,

I would like to have a registration page that is accessible with the /register URL.

I have tried to create RegisterRequestHandler which reads the Pac4J session data to prepopulate the form with userName, firstName, lastName and so forth.

The problem I am faced with, is that I do not know how to activate the PersonForm on the Desktop.

I have tried the following with and without a RunContext.

PersonForm form = new PersonForm();
 Desktop.CURRENT.get().activateForm(form);



Is there other mechanism to get this to work?

Kind regards,
Mark Ashworth

Re: Registration page [message #1840549 is a reply to message #1840539] Mon, 19 April 2021 01:40 Go to previous messageGo to next message
Eclipse UserFriend
Hi Mark

You could work with deep-link handlers. Check the interface IDeepLinkHandler and the OutlineDeepLinkHandler as an example. These handlers are built to do something in the Scout model when a certain URL-pattern is called. The handler for the outlines activates the correct outline in the Scout model for instance when this URL is called:

/contacts/?dl=outline-22561&i=search

You could do something like that for your registration page, implement a RegistrationDeepLinkHandler and call it like this:

/contacts/?dl=registration

The typical code to open a form, depends on whether you want to open a modal dialog or a view, but usually you simply use the start() method of the form, which handles all the details with the desktop:

PersonForm form = new PersonForm();
form.setHandler(form.new RegistrationHandler());
form.start();

Cheers,
André
Re: Registration page [message #1840552 is a reply to message #1840549] Mon, 19 April 2021 05:28 Go to previous message
Eclipse UserFriend
Thank you Andre, will give that a try :-)

Thanks,
Mark Ashworth
Previous Topic:Errors while using CodeType
Next Topic:AbstractChartControl - how to show chart
Goto Forum:
  


Current Time: Thu Jul 03 09:14:54 EDT 2025

Powered by FUDForum. Page generated in 0.29424 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top