cancel
Showing results for 
Search instead for 
Did you mean: 

Problems on ui5 Naming Conversion

Former Member
0 Kudos

Dear All,

I created odata services for simple form while consuming odata services from ui5 what ever the fields names odata that fields only i am able to consuming . If i am change fields Description i am unable to consume odata services

Ex: my odata services field name Date_Birth and ui5 label name in Date of Birth i  am unable to consuming/create data on ui5

Please help me

Accepted Solutions (0)

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos

your code

Former Member
0 Kudos

my view code please help me

<Page >

  <content>

  <Table id="idProductsTable"

  inset="false"

  mode= "SingleSelectLeft"

  visible="false"

  items="{

  path: 'empModel>/birthSet'

  }">

  <columns>

  <Column>

  <Text text="Date of Application" />

  </Column>

  <Column>

  <Text text="Type of Birth" />

  </Column>

  <Column>

  <Text text="City of Birth" />

  </Column>

  <Column>

  <Text text="Postal Code" />

  </Column>

  <Column>

  <Text text="Name of Child" />

  </Column>

  <Column>

  <Text text="Date of Birth" />

  </Column>

  <Column>

  <Text text="Father's Name" />

  </Column>

  <Column>

  <Text text="UDID/ID number of Father" />

  </Column>

  <Column>

  <Text text="Mother's Name" />

  </Column>

  <Column>

  <Text text="UDID/ID number of Mother" />

  </Column>

  <Column>

  <Text text="Ward of City" />

  </Column>

  </columns>

  <items>

  <ColumnListItem>

  <cells>

  <Text

  text="{empModel>Dateapp}" />

  <Text

  text="{empModel>Type_Birth}" />

  <Text

  text="{empModel>Bukrs}" />

  <Text

  text="{empModel>PINCODE}" />

  <Text

  text="{empModel>Childfirstname}" />

  <Text

  text="{empModel>CHILDLASTNAME}" />

  <Text

  text="{empModel>Date_Birth}" />

  <Text

  text="{empModel>Fathefname}" />

  <Text

  text="{empModel>Fathelname}" />

  <Text

  text="{empModel>UdidnoFather}" />

  <Text

  text="{empModel>MOTHERFNAME}" />

  <Text

  text="{empModel>MOTHERLNAME}" />

  <Text

  text="{empModel>UDIDNO_MOTHER}" />

  <Text

  text="{empModel>NATIONALITY}" />

  <Text

  text="{empModel>WARDINFO}" />

  </cells>

  </ColumnListItem>

  </items>

  </Table>

<Button xmlns="sap.m"

  id="IdCreate"

  text="Create"

  press="onCreate">

</Button>

<Button xmlns="sap.m"

  id="IdUpdate"

  text="Update"

  press="onUpdate">

</Button>

  <l:Grid

  defaultSpan="L12 M12 S12"

  id="gridId"

  width="auto">

  <l:content>

  <f:SimpleForm id="SimpleFormChange480"

  minWidth="1024"

  maxContainerCols="2"

  editable="true"

  layout="ResponsiveGridLayout"

  title="Birth registration form"

  labelSpanL="4"

  labelSpanM="4"

  emptySpanL="0"

  emptySpanM="0"

  columnsL="2"

  columnsM="2"

  class="editableForm">

  <f:content>

  <core:Title text="Basic Information" />

  <Label text="Date Of Application" class="css3"/>

  <Input value="{DATEAPP}" id="a1">

  <layoutData>

  <l:GridData span="L4 M3 S4" />

  </layoutData>

  </Input>

  <Label text="Type of Birth" />

          <Select width="50%" id="group1">

            <items>

              <core:Item text="" key="1"/>

              <core:Item text="" key="2"/>

              <core:Item text="" key="3"/>

              <core:Item text="" key="4"/>

            </items>

          </Select>

  <Label text="City of Birth"/>

  <Input value="{Bukrs}"  id = "a2">

  <layoutData>

  <l:GridData span="L3 M3 S4" />

  </layoutData>

  </Input>

  <Label text="Postal Code"/>

  <Input value="{PINCODE}" id="a3">

  <layoutData>

  <l:GridData span="L3 M3 S4" />

  </layoutData>

  </Input>

  <Label text="Name of child"/>

  <Input value="{Childfirstname}" id="a4">

  <layoutData>

  <l:GridData span="L4 M3 S4" />

  </layoutData>

  </Input>

  <Input value="{CHILDLASTNAME}" id="a5"/>

  <Label text="Date of Birth"/>

  <Input value="{Date_Birth}" id="a6">

  <layoutData>

  <l:GridData span="L3 M3 S4" />

  </layoutData>

  </Input>

  <Label text="Father's name"/>

  <Input value="{FATHEFNAME}" id="a7">

  <layoutData>

  <l:GridData span="L4 M3 S4" />

  </layoutData>

  </Input>

  <Input value="{FATHELNAME}" id="a8" />

  <Label text="UDID/ID number of Father" />

  <Input value="{UdidnoFather}" id="a9" width="50%" />

  <Label text="Mother's name"/>

  <Input value="{MOTHERFNAME}" id="a10">

  <layoutData>

  <l:GridData span="L4 M3 S4" />

  </layoutData>

  </Input>

  <Input value="{MOTHERLNAME}" id="a11" />

  <Label text="UDID/ID number of Mother" />

  <Input value="{UDIDNO_MOTHER}" id="a12" width="50%" />

  <core:Title text="" />

  <Label text="Nationality" class="css1"/>

  <Input value= "Indian"  class="css1" width="50%" id="a14"/>

  <Label text="Ward of City" />

  <Input value="{WARDINFO}" width="50%" id="a13" />

   <Label text="Gender"  class="css"/>

              <HBox >

                      

     

      <RadioButton groupName="Gender" id="gender_male"   text="Male"  class="css" />

      <RadioButton groupName="Gender" id="gender_female" text="Female"  class="css"/>

 

    </HBox>

  <Label text="SSSM id no of Parent"  />

  <Input value="{SSSm id no of Parent}"   id="a15" width="50%" />

  <core:Title text="Address of Parent(At The Time of Birth)" />

  <Label text="Address Line" />

  <Input value="{}" width="50%" id="a16" />

  <Label text="District" />

  <Input value="{}" width="50%" id="a17" />

  <core:Title text="" />

  <Label text="City" />

  <Input value="{}" width="50%" id="a18" />

  <Label text="Postal Code" />

  <Input value="{}" width="50%" id="a19" />

  <core:Title text="Permanent Address of Parent(At The Time of Birth)" />

  <Label text="Address Line" />

  <Input value="{}" width="50%" id="a20" />

  <Label text="District" />

  <Input value="{}" width="50%" id="a21" />

  <core:Title text="" />

  <Label text="City" />

  <Input value="{}" width="50%" id="a22" />

  <Label text="Postal Code" />

  <Input value="{}" width="50%" id="a23" />

  <core:Title text="Birth Hospital Details" />

  <Label text="Name of Hospital" />

  <Input value="{}" width="50%" id="a24" />

  <Label text="Address" />

  <Input value="{}" width="50%" id="a25" />

  <Label text="District" />

  <Input value="{}" width="50%" id="a26" />

  <core:Title text="" />

  <Label text="Registration no of Hospital" />

  <Input value="{}" width="50%" id="a27" />

  <Label text="City" />

  <Input value="{}" width="50%" id="a28" />

  <Label text="Postal Code" />

  <Input value="{}" width="50%" id="a29" />

  <core:Title text="Applicant Information" />

  <Label text="Name of Applicant" />

  <Input value="{}" width="50%" id="30" />

  <Label text="Mobile number of Applicant" />

  <Input value="{}" width="50%" id="a31" />

  <Label text="Identity proof Type of Applicant" />

          <Select width="50%" id="group2">

            <items>

              <core:Item text="" key="1"/>

              <core:Item text="" key="2"/>

              <core:Item text="" key="3"/>

              <core:Item text="" key="4"/>

            </items>

          </Select>

          <Label text="Relationship of Applicant" />

          <Select width="50%" id="group3">

            <items>

              <core:Item text="" key="1"/>

              <core:Item text="" key="2"/>

              <core:Item text="" key="3"/>

              <core:Item text="" key="4"/>

            </items>

          </Select>

          <core:Title text="" />

  <Label text="Age of Applicant" />

  <Input value="{}" width="50%" id="a32" />

  <Label text="Email ID of applicant" />

  <Input value="{}" width="50%" id="a33" />

  <Label text="Identity card of Applicant" />

  <Input value="{}" width="50%" id="a34" />

  <core:Title text="Paternal  Information" />

  <Label text="Mother Age at the time of Marriage" />

  <Input value="{}" width="50%" id="35" />

  <Label text="Mother Weights at the time of Birth" />

  <Input value="{}" width="50%" id="a36" />

  <Label text="Religion Mother" />

          <Select width="50%" id="group4">

            <items>

              <core:Item text="" key="1"/>

              <core:Item text="" key="2"/>

              <core:Item text="" key="3"/>

              <core:Item text="" key="4"/>

            </items>

          </Select>

          <Label text="Mother Occupation" />

          <Select width="50%" id="group5">

            <items>

              <core:Item text="" key="1"/>

              <core:Item text="" key="2"/>

              <core:Item text="" key="3"/>

              <core:Item text="" key="4"/>

            </items>

          </Select>

          <Label text="Father Occupation" />

          <Select width="50%" id="group6">

            <items>

              <core:Item text="" key="1"/>

              <core:Item text="" key="2"/>

              <core:Item text="" key="3"/>

              <core:Item text="" key="4"/>

            </items>

          </Select>

          <core:Title text="" />

  <Label text="Mother Age at the time of Birth" />

  <Input value="{}" width="50%" id="a37" />

  <Label text="Noo.of total Children" />

  <Input value="{}" width="50%" id="a38" />

  <Label text="Identity card of Applicant" />

  <Input value="{}" width="50%" id="a39" />

  <Label text="Mother Qualificaton" />

          <Select width="50%" id="group7">

            <items>

              <core:Item text="" key="1"/>

              <core:Item text="" key="2"/>

              <core:Item text="" key="3"/>

              <core:Item text="" key="4"/>

            </items>

          </Select>

          <Label text="Father  Qualificaton" />

          <Select width="50%" id="group8">

            <items>

              <core:Item text="" key="1"/>

              <core:Item text="" key="2"/>

              <core:Item text="" key="3"/>

              <core:Item text="" key="4"/>

            </items>

          </Select>

          <core:Title text="" />

          <core:Title text="" />

  <core:Title text="" />

  <Button type="Accept" id="saveBtnId" press="onSave"  width="150px" text="Submit" ></Button>

  </f:content>

  </f:SimpleForm>

  </l:content>

  </l:Grid>

  </content>

  </Page>

karthikarjun
Active Contributor
0 Kudos

Will this help? http://plnkr.co/edit/5vZRfTLGCHV69gxVL9m3?p=preview ( credit goes to sai)

Don't mess up with field label and field input. please go-through the working example, I hope you will understand the bg process

Regards,

Karthik A