cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamical View - Visible / Invisible mode

Former Member
0 Kudos
120

Hi,

I've 5 table in a view of a Web Dynpro and 5 button for any table.

I need to display only a table dipending the button pushed .

I think to put 5 table on a view in invisible mode.

I can't place on all the table each other.

Have you an idea?

Tnx a lot.

Domenico.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can create a context attributes of type "WDVISIBILITY" for different tables and on click on the buttons you can make others visible or none by using

wdContext.currentContextElement().set<TABLE1VISIBLE>(WDVISIBILITY.NONE)

wdContext.currentContextElement().set<TABLE1VISIBLE1>(WDVISIBILITY.VISIBLE)

Regards, Anilkumar

Former Member
0 Kudos

Tnx a lotttttttttttt

Alla prossima

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Adding to what Anil has said

The table has property called Visibile bind this to a context attribute of type WDVisibility.

The property Visible can take three values

blank : The UI element is not visible on the screen but takes up space.

none : The UI element is not visible on the screen and takes up no space.

visible :The UI element is displayed on the screen.

In the init method set all the tables visibility to none like

wdContext.currentContextelement.set"Name of attribute"(WDVisibility.None);

Then as and when you require to see a particular table set the context attribute to visible.

Hope this helps.

Regards,

Vijith

Former Member
0 Kudos

Put the tables in a TabStrip element.

Armin

Former Member
0 Kudos

Hi Domenico,

you can add a view set with two rows one column. In the lower view set you can add 5 views each having one table in it and place the button set in the top view area's view. Depending upon the button click you can change the repective table view in the bottom view area.

or you can dynamically change the visibility of the tables like below: add the dynamic coding in WDDoModifyView method of your view controller

public static void wdDoModifyView(IPrivateTopView wdThis, IPrivateTopView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)

{

//@@begin wdDoModifyView

IWDTable myTable = (IWDTable)view.getElement("myTableId");

myTable.setVisible(WDVisibility.NONE); //to make one table invisible

//OR

myTable.setVisible(WDVisibility.VISIBLE);//to make one table visible

//@@end

}

Hope it helps!!!

Shubhadip