cancel
Showing results for 
Search instead for 
Did you mean: 

Sharing a view in read only mode

Former Member
0 Kudos

Hi,

I am new in this domain. I have made an application in which I made two local development projects. Through that I am using views of one into another with the help of "Used WebDynpro Components" concept. After deploying, I have got these two views.

But the problem is that I want that view in read only mode which I have taken from other local development project and this view was not in read only mode in its local development projects.

Please provide me the solution in detail so that I can understand easily.

Accepted Solutions (1)

Accepted Solutions (1)

former_member197348
Active Contributor
0 Kudos

Hi Manish,

Say View1 is the view in main Component,View2 is the view in used Component. Exactly follow these steps.

Create a context attribute <b>enable </b>of type String in used Component's controller,used Component's Interface controller, View1 and View2.

Using context mapping map these attributes View2 -> used Component's controller-> used Component's Interface controller -> View1 ( if you don't know how to map double click the the Main component: Data navigation modeler is opened; In the diagram, right side select small arrow first select View1 drag to used Component's Interface controller,in the wizard select right hand side <b>enable </b>attribute drag to left side)

you can map similarly View2 -> used Component's controller-> used Component's Interface controller.

In View2 create another variable <b>edit </b>of boolean type.

Open Layout tab of View2, bind this attribute to enable property of all the UI elements which you want to disable.

In implementation tab of View1 in method wdDoInit() write this code

wdContext.currentContextElement.setEnable("display"); 

In implementation tab of View2 in method wdDoInit() write this code

if(wdContext.currentContextElement.getEnable().equalIgnoreCase("display"))
wdContext.currentContextElement.setEdit(false);
else
wdContext.currentContextElement.setEdit(true);

Hope this helps for you.

Best regards,

Siva

Message was edited by:

Armin Reichert

Former Member
0 Kudos

Hi Siva,

Thank you for reply. It is really worthy for me.

Regards ,

Manish

Answers (0)