on 12-09-2007 6:18 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.