Skip to Content

Is it possible to Disable/readble view sap ui5

Hi Experts,

I would like to know that making view content only readable or non-editable. I tried below method. But it is saying "editable & enabled is not the correct property". My view contains tables and forms. I want to make the view only readable. Any suggestions??

this.getView().setEnabled(false);

or

this.getView().setEditable(false);

Regards

Karthik S

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Aug 19, 2017 at 08:51 PM

    Hi,

    In most of the view's elements the attribute:

    editable="false"

    will do the job.

    You can set it in advance in the view itself or set it dynamically (in the controller).

    You can wrap the entire view in a tag and set it, instead of going over all the elements of the view.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 19, 2017 at 07:56 PM

    There is no property of view which makes it readble/editable etc.

    You need to set the controls in the view to editable/readable/etc.

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Karthik,

      Did the answer help you? I received a notification that my answer was accepted but the post does not reflect it.

      If it has helped, request you to confirm.

      Regards,

      Sharath