cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic table & view modifying - i'm desparately in need. please help

Former Member
0 Kudos

Hi all

I've a problem.

I'm creating a dynamic table based on the size of the node associated with that table. But i don't want that table to be diaplayed when the view is loaded first. I want the view to be modified when a button is pressed.

Is possible to do that? If so can anybody tell how its done?

Thanks & Regards

Aparnna

Message was edited by:

aparnna prasad

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member4529
Active Contributor
0 Kudos

Hi Aparnna,

You can set the table as visible=none (by setting a context attribute of type visibility to the to visible property of the table). On click of the button you can change the value of the context element so that the table becomes visible. You can also use the wdDoModifyView(…) method of the view to do anything on change of the view. You can track if it's first time display by checking the boolean parameter firstTime. For dynamic programing (creating UI elements dynamically) check the following links:

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b3f6e990-0201-0010-c087-c865f2c738b3">Dynamic UI programming Tutorial</a>

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/74cda090-0201-0010-6b91-f85b2489f765">Dynamic UI programming in Java Webdynpro</a>

Thanks & regards,

Dipankar

Former Member
0 Kudos

Hi Dipankar

Thank u for ur view. But I got it solved in my on way.

Instead of using the boolean variable firstTime, i used my own boolean variable say 'flag'. Initially it is false. It 's changed to true in the action where i want that table to be displayed.

In the wdDoModifyView(..) method use this flag as my condition variable.

If there is anything wrong in what i've done, please inform me.

Regards

Aparnna

Former Member
0 Kudos

Better use a context attribute of type Visibility and bind the Table.visible property to it. In the action handler, set the context attribute value to WDVisibility.VISIBLE or WDVisibility.NONE.

If your boolean variable "flag" is static in the view controller, then your approach is wrong.

Armin

Former Member
0 Kudos

Hi Armin

Thank u very much. I was using the static variable as u've guessed.

I've changed it the way u've suggested. Now my application is working properly

Regards

Aparnna

former_member4529
Active Contributor
0 Kudos

Hi Aparnna,

It's always better to use the firstTime parameter of wdDoModifyView(..) method as it's controlled and set by the WDP runtime itself.

Thanks & regards,

Dipankar