Skip to Content

how to pass a parameter form xml view to controller

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>

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jul 22, 2015 at 06:28 AM

    Question is not clear, Please provide more information.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 22, 2015 at 06:41 AM

    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 ......

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 22, 2015 at 08:12 AM

    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......?

    Add comment
    10|10000 characters needed characters exceeded

    • 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

      }