<Edit title={"XYZ"} {...props}>
<TabbedForm defaultValue={defaultValues} redirect={false}>
In the above code I am trying to stop the default behavior of redirection into the List page from Edit page, when click on save button.
The page is not redirected but it displays the empty fields. Once If I click on refresh button, then I can able to see the updated values in the fields.
Related
I've three pages first showing List of my items on tap I'm redirecting it to a History Page with Object defined with static property with
await Shell.Current.GoToAsync($"/{nameof(DeviceHistoryPage)}");
then from this page i'm again redirecting user to show more details of each history item to next page with data as static property
await Shell.Current.GoToAsync($"/{nameof(DeviceHistoryDetailsPage)}");
I'm able to achieve this navigation and able to move back and forth from first page to second page but from second page once redirected to third page and i'm not able return back to previous page with back button present in navbar
Also I've tried registering routes as independent as well as a child in AppShell as follows
Routing.RegisterRoute($"{nameof(ListPage)}/{nameof(HistoryPage)}", typeof(HistoryPage));
Routing.RegisterRoute($"{nameof(HistoryPage)}/{nameof(HistoryDetailsPage)}", typeof(HistoryDetailsPage));
I want a button to appear on index.blade after another button is clicked on the same page.the second button returns results in index.blade too and i want to show the new button after these results come back.
what's the easiest way to do it in Laravel.
sorry I'm a beginner.
I have an index page where all the models are shown and when you click edit you go to edit page and after you change something you click update and you will be redirected to index, all fine there.
And now i have made a show view and in show view i made the same edit button to go to edit page and when you click update of course you will be redirected of to the index page and i don't want that. I want to redirect user to the page where the EDIT button was clicked.
How can i redirect users to the page where they actually clicked the edit button?
You can keep URL in session to go two pages back in Laravel:
$links = session->has('links') ? session('links') : []; // Get data from session
array_unshift($links, $_SERVER['REQUEST_URI']); // Add current URI to an array
session(compact('links')); // Save an array to session
Then you can go 2 pages back:
return redirect(session('links')[2]);
You can use:
return back();
It returns you to back as it is so obvious. You can research this and other helper functions here:
https://laravel.com/docs/5.3/helpers#method-back
I have a currently loaded form with different fields in it. Example I am on URL: https://localhost:44300/ where the form is currently displayed. However, once of the fields has a link beside it "View Full List" where in once I click on that it will redirect me to a different view and user can select one value from there.
View full list when clicked will be redirected to: https://localhost:44300/project/organisationfulllist/
Now, once I have selected from the displayed list in that view (radiobutton list), I will click on a [SAVE] button and it should redirect me back to my original form with URL https://localhost:44300/
My question is when I am redirecting to the original view, the previous inputs on several fields were reset. What I want is to preserve these inputs from user. Is there a way to sort of save the session of the previous form?
Save the information in the session once the user clicks "View Full List"
Session["formdata"] = formdata;
Then get it back when you open the form again
FormModel formModel = Session["formdata"] as FormModel;
Is it possible to not redirect when user clicks "View Full List" and keep the selection on the same page? On a pop-up or something.
When a user double clicks on a row on my page, I navigate them to an edit screen which shows them some important information. When they submit that patient I gerimander jqGrid to take them page to the page that they were just viewing...
serializeGridData: function (postData) {
//debugger;
var pagInfo = $(this).se
debugger;
if ((rowFromTemp != "") && (pageFromTemp != "")) {
//debugger;
postData.page = pageFromTemp;
pageFromTemp = "";
rowFromTemp = "";
}
return postData;
},
I basically edited the postData in the serializeGridData function.
My question is, when I navigate to a different page lets say page 3 of 10 after I have edited information and returned to the correct page, when I click refresh of the whole page...
I want the user to return to the page that they just navigated to. Right now, it will return them back to the page that they initially returned from after editing information. So If I were to construct a timeline of events...
1) user see's paged information...
2) user selects row to edit
3) user navigates to edit page and does his thing then submits
4) user now is sent back to page where he came from...
5) user goes to a different page (either next or last)
6) user refreshes page
7) !! user is sent to page X from step 3 and 4 and Not 5 !!
I was hoping to to some kind of refresh of page event and set the correct page in there.
Is my methodology or thinking in correct here? Is there a way to ensure that the correct page is selected no matter what?
I just checked again. It would seem that if a user
1) navigates to page X
3) refreshes a page
he will be sent to page 1.
Maybe I am setting an unrealistic expectation. Maybe if they reload the whole page, they should expect to go back to page 1.
Well even so, how could I accomplish that task with the first workflow
In my opinion the real problem which you have is the usage of step 3: "user navigates to edit page and does his thing then submits". The step makes all the problems which you try to solve. Instead of going to another page one can create dynamically some controls which allows to edit the selected row. jqGrid provide inline editing or form editing for the purpose. You need just include editable: true property in the columns which you need to edit implement starting of inline/form editing on select of row or on double click. Alternatively you can use buttons from the navigator bar (see navGrid and inlineNav) or in addition column of the grid (see formatter: "actions").
If you still don't want to use any editing mode which provide jqGrid you can just place the whole content of the body of the main page inside of a div. You can hide the div using jQuery.hide instead of redirection to "edit page". You can load the content of "edit page" on the same main page (per jQuery.load for example). Then you can remove the loaded "edit page" and show the original main page. As the result the main page will be shown in exactly the same form as it was before starting of editing.