cancel
Showing results for 
Search instead for 
Did you mean: 

Navigation between two views. input fields are not refreshing

balaji_vta
Participant
0 Kudos

Hi everyone,

Please help me. How to refresh simpleForm input fields with new details on view?

I am developing an app. App has 3 views. those are List view, CA view and FED view. If CA is selected, CA view will be displayed. if FED is selected FED view will be displayed. the problem is with details view. i have two FED records.

Issue: First, I selected 2nd record with dates 01/01/2020 To 05/21/2020 (FED). I see W4 form with dates and details. For checking the value, I put one input field value “Amt Children” as Label under Exemptions box. Now, clicked on Back button and selected 3rd record which is also FED but dates are different. Here is the actual issue. input field values are not getting updated with new context. Form binding is happening. It is holding old values. Dates are updated for both records (same view) since those are text labels. Input fields are not updated.

list-view.png

Detail view of FED (2nd from list). Value of “Amt Children” is the same on label and on input field.fed-1st-record.png

Detail view of 3rd record, Fed. The value of “Amt Children” is 4000 (marked in circle on label). But it is showing previous value on input field. fed-2nd-record.png

Not only this field, all input fields are showing first displayed details.

simpleForm context: form-context.png

former_member524141
Participant
0 Kudos

could you please provide your code as well, so that issue in code can be identified.

balaji_vta
Participant
0 Kudos

Hi Ravi,

Thank you for the response. The coding part is not much. View->page->simpleForm, all have binding with the same entityset. Below code brings only one record for the DetailView based on inputs.

From the ListView: (function behind click action)
var oRouter1 = sap.ui.core.UIComponent.getRouterFor(this);
oRouter1.navTo("Target_Fed", { SelectedItem: sQuery1 });
// Where sQuery1 holds variables.
From DetailView: (init function)
var oRouter = sap.ui.core.UIComponent.getRouterFor(this);
oRouter.getRoute("Target_Fed").attachMatched(this._onRouteFound, this);
_onRouteFound: function(oEvt) {
var oArgument = oEvt.getParameter("arguments");
var oView = this.getView();
var sPath1 = "/WH_FEDSet(" + oArgument.SelectedItem + ")"; oView.bindElement(sPath1);
}

Balaji.

Accepted Solutions (0)

Answers (1)

Answers (1)

balaji_vta
Participant
0 Kudos

I got the answer through incident. It is small thing but it killed my time. I should remember this point from next time on wards. Thanks to Mirco from SAP-UK. The answer is "Binding Mode" from manifest changed from "One time" to "One way".