cancel
Showing results for 
Search instead for 
Did you mean: 

how to pass a parameter form xml view to controller

0 Kudos

hai guys i am new for sap  fiori so now i need ur help ....... this is i have been done in my view so if u know plz help me ......

  <u:FileUploader

      id="fileUploader"

      name="myFileUpload"

      uploadUrl="upload/"

      width="400px"

      sendXHR= "true" 

      tooltip="Upload your file to the local server"

      uploadComplete="handleUploadComplete"

     

     

      />

    <Button

      text="Upload File"

      press="handleUploadPress"/>

  </l:VerticalLayout>

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

i need to know how to pass the parameter between xml view to controller .for example we have a  button by xml .so now how can i pass the buttton parameters to the controller......?

Qualiture
Active Contributor
0 Kudos

If you had taken a look at the API for Button, you see the 'press' event passes an event object with properties 'source' and 'parameters' (getSource() and getParameters())

In your event handler, you read this object, and do whatever you like:

onPress : function(oEvent) {

     oEvent.getSource(); //gets you the button

     oEvent.getParameters(); //map of parameters passed

}

0 Kudos

actually i am to do one image uploading by using xml so for that first we need to do now the pass the parameter so thats wt i need to know now ......

santhu_gowdaz
Active Contributor
0 Kudos

sorry i failed to understand your requirement.

this may help you,

SAPUI5 Explored

santhu_gowdaz
Active Contributor
0 Kudos

Question is not clear, Please provide more information.