cancel
Showing results for 
Search instead for 
Did you mean: 

Add a custom control above Work list FIORI Element

prasad
Participant
0 Kudos

Hi all,

I have implemented a list/object page FIORI element in UI5 version 1.60.1. by default filter bar is disabled and used local annotations to get the UI

Is there way i can add a new control (any ui5 control like image,link) above work list for a specific requirement .

How Can we add UIview Extensions ?

Regards

prasad

Accepted Solutions (0)

Answers (2)

Answers (2)

prasad
Participant
0 Kudos

since the controls has be placed on header level took the Header content Title which is dynamic header page

var oPageHeaderTitle = this.getView().getContent()[0].getTitle();

inserted our own controls in insertExpandedContent of Title

oPageHeaderTitle.insertExpandedContent( new sap.m.Text("",{text:"our text or heading "));

we can place any number of controls inside this insertExpandedContent that appears above work list page.

Regards

Prasad

maheshpalavalli
Active Contributor
0 Kudos

Hi Prasad,

Initial.page is only to display the filter bar and table.. But in the object page if you want to add you own section you can do that..

But in the initial worklist page, you can add your own controls in the filter are field or table new custom field for this you need to create extensions.

https://ui5.sap.com/#/topic/a892eb8ae1fb498a9bc6c5194432e820

BR

Mahesh

prasad
Participant
0 Kudos

Hi Mahesh

Thanks for the reply .

Used the controller extension of list report and in onAfterRendering method used below code to add text to list report

	onAfterRendering: function (oEvent) {
var oTxt_subscription = new sap.m.Text('', {
text: "Subscriptions"
}).addStyleClass('sapUiSmallMargin');
var oSubscription = new sap.m.VBox('genctext_othimpbfcheckvbox', {
items: [oTxt_subscription]
});

//add control to pageHeader
this.getView().getContent()[0].getHeader().insertContent(oSubscription, 0);
},

Maintained the isWorkList:false in manifest so that filters and our custom control can be shown in Page header .

but the table now is not able to fetch data with out clicking on go button in Filter .

How can we enable the table to fetch the data with out clicking the Go button on filter and hide the Adapt filters and Go button to get the required functionality

Regards

Prasad

maheshpalavalli
Active Contributor
0 Kudos

Hi PRASAD VSRK

I really didn't recommend the approach you are using right now.. You can probably get the "Go" button instance and manually fire the press event.(SAP might change those IDs in any release). But there are better ways to approach your requirement.

So could you please give me a brief intro to your requirement, may be I can give some advice...? Also, I would like to know if you are navigating to the object page from the worklist page..

BR,

Mahesh

prasad
Participant
0 Kudos

Hi maheshkumar.palavalli .

Below is my requirement and i should use fiori elements only.

Every thing is achieved by Fiori work list page . but only the Placing of text on top of list is not happening and i should use only fiori elements and we have a navigation to other app rather than object page from this app.

Regards

Prasad

maheshpalavalli
Active Contributor
0 Kudos

What you are doing is incorrect and it might break in future releases and convince those who gave that requirement.

Create a normal dynamic page and use the smart table it will still be using fiori elements.. you will get the same look and feel with very minimal code.. hardly 4,5 lines.. generate the worklist app using the webide and replace the normal table with smart table.

BR

Mahesh

prasad
Participant
0 Kudos

Hi maheshkumar.palavalli ,

Thanks for you suggestion . i would like to use the smart table then .but how to handle local annotations file as we use local annotations file to populate the smart table.

what settings needs to be done in manifest.json ? is there any example which i can refer?

Regards

Prasad

maheshpalavalli
Active Contributor
0 Kudos

Nothing.. it's very simple. Just click on the project and click on new annotation file.. and from there it's normal like how you add annotations for the smart table..

prasad
Participant
0 Kudos

Hi maheshkumar.palavalli

Thanks for your continous support . i was able to use a standalone app with smart table with local annotations . but now the smart table is not showing the delete , add rows funtionality based on metadata . when we used a work list app the table tool bar was able to show all the functionality of smart table on tool bar..

what might i have missed here in smart table?

Regards

Prasad

maheshpalavalli
Active Contributor
0 Kudos

I think in the normal app if you use the smart table, they will not be shown.. I though you didn't want add and delete as there is no object page for you..? For delete you can write a small piece of code to execute it. But for add..?