cancel
Showing results for 
Search instead for 
Did you mean: 

SimpleForm binding Issue

pritesh_bamane
Explorer
0 Kudos

I have created a simple form control. In its content I have created two fields – “Userid and First Name”. I have provided a F4 value help to Userid field. When I select the values in Userid F4 popup the corresponding value of First Name does not get bind.

View:

			<f:SimpleForm id="idForm" adjustLabelSpan="false" layout="ResponsiveGridLayout" title="Update Employee Details" labelSpanL="1" labelSpanM="2" labelSpanS="12" emptySpanL="5" emptySpanM="5" emptySpanS="0" columnsL="1">
				<f:content>
					<core:Title/>
					<Label id="lblUserId" design="Bold" width="10em" text="User ID" textAlign="Center"/>
				    <Input id="inpUserId" showValueHelp="true" valueHelpRequest="onShowF4" width="10em"/>
				    <Label id="lblFirstName" design="Bold" width="10em" text="First Name" value=""/>
				    <Input id="txtFirstName" enabled="false" width="15em" value="{FIRSTNAME}"/>


Fragment for F4:

	createContent: function(oController){
		return new sap.m.SelectDialog({
			confirm:[oController.onSetInpVal, oController]
		});

Controller:

    onSetInpVal: function(oEvent){
    	var selectedItem = oEvent.getParameter("selectedItem");
    	var selectedData = selectedItem.getTitle();
    	this.getView().byId("inpUserId").setValue(selectedData);
    	var oUrl = selectedItem.getBindingContext().getPath();        //Url --> /ZEMP_ADD_SET('00000014')
    	var oFrm = this.getView().byId("idForm");
    	oFrm.bindElement(oUrl);
    },

Accepted Solutions (0)

Answers (2)

Answers (2)

maheshpalavalli
Active Contributor
0 Kudos

Can you check if the property "FIRSTNAME" is correct?

Also check if the model is only binded to F4 help fragment.. if yes it should be binded to view or the component also.

BR,

Mahesh

pritesh_bamane
Explorer
0 Kudos

I have binded the model to the view. Property "FIRSTNAME" is correct.

junwu
Active Contributor
0 Kudos

you have firstname attribute under?

/ZEMP_ADD_SET('00000014')
pritesh_bamane
Explorer
0 Kudos

Hi Jun Wu,

I have created an entity type ZEMP_ADD having below properties: