on 2024 Nov 20 3:32 PM
Hi, everybody.
I have a problem with my custom page. I can currently see what I want but the create button is only visible when I enter edit mode. How do I make the button visible without having to edit some record?
I am using a service made in CAP and I have draft enabled.
Edit mode
Reading mode
Request clarification before answering.
Found the answer... in one of the controller extension functions (I put it in onInit), you need to add the line:
this.getView().getModel("ui").setProperty("/isEditable", true);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, MattDion.
As a temporary solution it is correct. But, visually it is not pleasant to have all the items in edit mode.
However, the solution of @mariusfreitag is nice. But it also has certain drawbacks. As commented by @anilnagvanshi on the Youtube channel.
"What i observed in this video, is that even though the developer is using a custom button to create a record in the Table in draft state, the moment he edits the draft record or even if he edits the existing records, there is a separate "Create" button that comes up in the Header of the Table. Now two things related to this behaviour:
1. If the Table rendered by Fiori elements' Line Item annotation in a Custom Page, has a "create" button, why doesn't it show up in the first place, why only in the scenario when the particular record of the entity is in Edit mode.
2. If the developer had to use a custom button to create entity in draft state, he should've disabled the upcoming of "Create" button when the record is in editing mode."
On the other hand, when trying to use the cancel button I got the following error:
And it didn't show me the standard message either, so I made an adjustment as shown below:
Preview:
Is there a way to make the create button appear right away? Without having to enter edit mode? Otherwise, is it possible to edit just one item and not all of them?
User | Count |
---|---|
53 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.