Forum

Julia
Participant
    5 years, 8 months ago #18076
    Up
    0
    Down
    ::

    Hi Dinkel,

    I’ll annotated your post in bold letters here.

    ___________

    Add a button (sap.m.Button) and add the following to the press event like you did in a post above.
    I guess you mean a additionally button in the same screen as the FileUplaoder? Ok, done that.

    var fileUploader = $(‘#Create_Image–ui_unifed_FileUploader-fu’);
    if (fileUploader !== null)
    fileUploader.click();

    Then add to the onAfterRendering of your screen the following code:
    You mean to the screen containing the buttons, right? Ok …

    $(‘#Create_Image–ui_unifed_FileUploader-fu’).change(function() {
    $(‘#Create_Image–ui_unified_FileUploader1-fu_form’).submit();
    });

    Now hide the button with a CSS rule which says
    I’ve guessed you mean I should hide the new button? Ok …

    display: none;

    Now you can trigger the hidden button with
    Done that too …

    sap.ui.getCore().byId(“Id_Of_The_Button”).firePress()

    On this way the file chooser will appear automatically.
    But unfortunately nothing happens.

    __________

    Have I done something wrong?

    Best regards
    Julia