I have created three custom authenticators for register flow each validate separate pages(ftl file) data. How to pass a data from one authenticator to another?
If I use session.setAttribute() that value will be removed if user refresh the page. How to persist previous page value to continue a flow?
We can use context.getAuthenticationSession().setAuthNote(key,value) to persist a value
Related
Is it possible to have 1 input text field that accepts characters from the user, and as the user types, queries to a webservice are launched, and to update the contents of another component dynamicaly with the results of the webservice (which would be a table below the input text)?
If you prefer to use Wicket form controls and Data Table component then you need to make the call to the REST service in your impl of IDataProvider.
Otherwise, as I explained to you earlier today in your other SO post you can do this directly in JS without Wicket. It is a matter of taste and skills.
We have a simple CRUD admin on rest project and with one of our objects, we would like to "Save and create another" with some prefilled in form fields. What is the best way to persist data within AOR?
Right now, I have a solution working using localStorage, but it is not awesome. I have to refresh the 2nd form to have the data prepopulated.
We are thinking about modifying the URL params to include the prefilled form fields, but this seems like a lot of work for something that should be pretty straightforward, particularly within an admin framework.
Thank you in advance!!
The Create component accepts a record prop to setup initial values of the form. This values is merged with the values of the defaultValue prop (can be a function) and values from the admin.record state in redux.
So in your situation the defaultValue prop would allow you to generate the data from the params prop of redux router.
I am new with laravel
I used the default Authentication and I added one other input that I wanted it to be saved on an other table how can I do that
If you're talking about how to save registration form input into different table (not to users) when user is registering, add something like this to create() method in app\Http\Auth\RegisterController.php:
Profile::create(['custom_column' => $data->custom_form_field]);
I think in this situation will be better to use connections in model. If this data is about user of course. Also there is important thing about submit method(simple submit or AJAX).
I am looking for file in joomla 3, where is the query that inputs into db values from registration fields?
Thanks in advance.
If you follow the code from com_users you will see that it loads and uses the Model UsersModelUser (loaded from /administrator/models/user.php ) which in turn uses the class JUser (loaded from /libraries/joomla/user/user.php ).
If you want to create/alter users, you should load and instance of UsersModelUser and use it's load() to load an existing user and it's save() method to store any change or to create new user entries.
By using the UsersModelUser and therefore JUser you will get all of the niceties like two-factor authentication (if it's configured) and the correct hash for the password based on the authentication system/plugins in use. It will even generate a random password if you don't pass one in the with data used to create a new user.
I have a multiple criteria search form with a command attribute. On the first submit, results are obtained based on the options in command object. On the results page, there is a link to export all the results to excel.. I have implemented it using the XMLViewResolver. I need to pass the SearchForm model attribute to the controller that handles this export requests. Also, from search results page, user can click on a person's profile and can come back to search results again. I want to keep this Model Attributes in session across all these requests. How would I achieve that in Spring MVC? #SessionAttributes is probably not an option because, as I understand, once the request goes to different controller, this object is flushed.
You can store whatever object you would like (SearchForm model) in the session associated with the HttpRequest via request.getSession();
This will allow you to access your model from the session within all controllers.
You could also store the criteria as hidden form fields on the form responsible for the user action. For instance, when the user clicks export to excel, the button would be contained within a form which contains hidden form fields whose values are set from the previous SearchForm bean.