cancel
Showing results for 
Search instead for 
Did you mean: 

visibility of a view

former_member205624
Contributor
0 Kudos

hi, All

I am developing an application in that application their are two views which are contained by a view set. I just want to do that in my first view thier is a button and on the click of this button i want to display a table on another view.

Please help me out.

Regards

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Just off the top of my head, you can take the following approach:

1. Create 3 views, say Root, View1 and View2.

2. In the Root create two view containers (say, Container1 and Container2) and embed the other two views, one each in these containers.

3. Create a context attribute of type WDVisibility in the component controller's context. Create a similar attribute in the Root view's context.

4. Map the visible property of the Container2 to this context of the Root view. This Container2 contains your second view.

5. In wdDoInit of Root view, set this context atribute to WDVisibility.NONE.

6. On click of the button on the first view, set this context attribute to WDVisibility.VISIBLE.

Regards,

Satyajit.

Former Member
0 Kudos

Hi

For making the visibility of view on click of the button. U can put two views in the second container i>Empty View(make it default) ii> Table View.

Attach the outboundplug of this view to inboundplug of Table view. and associate the firing of plug with action in View 1. This is simplest procedure and this is what yashpal has suggested.

And as others suggested the use of type: Visibility can be used.

I hope it and others will definitely help.

Thanks

Srikant

Former Member
0 Kudos

Hi

use Inbound and outbound plugs. upon the clicking of button; fire the outbound plug (in view 1) which has navigation link to ind bound plug in the view2 having table.

<b>now in the view 2 :</b>

you can creat a context attribute and set the type of com.sap.ide.webdynpro.uidefinitions.Visibility (dictionary simple type). Now map the visibility property of table to this context attribute.

public void onPlug<plug name>(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onPlugb(ServerEvent)

wdContext.currentContextElement().set<attribute>(WDVisibility.VISIBLE);///// u can make this invisible for default in the init method.

//@@end

}

hope it works.

Kushagra.

Former Member
0 Kudos

Hi,

You can control the visiblity of the Table in second view from the first view.

Create a valueattribute of type WDVisibility at the component controller and map the attribute to both the views.

On click of button in first view change the value of the value attribute to BLANK/VISIBLE.

Regards, Anilkumar

Yashpal
Active Contributor
0 Kudos

Hi Jitender,

create a outbound plug in first view and an inbound plug in second view in which u want to display a table ....and create a link between them....in the viewset create a empty view in the second cell and make it default...and fire the plug when a button is pressed in firstview ....

Regards,

Yash