Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Registration page
Registration page [message #1840539] Sun, 18 April 2021 11:56 Go to next message
Mark Ashworth is currently offline Mark AshworthFriend
Messages: 40
Registered: January 2012
Member
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 05:40 Go to previous messageGo to next message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
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é


Eclipse Scout Homepage | Documentation | GitHub
Re: Registration page [message #1840552 is a reply to message #1840549] Mon, 19 April 2021 09:28 Go to previous message
Mark Ashworth is currently offline Mark AshworthFriend
Messages: 40
Registered: January 2012
Member
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 Dec 26 23:20:10 GMT 2024

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

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

Back to the top