cancel
Showing results for 
Search instead for 
Did you mean: 

Suggest to better design the view?

Former Member
0 Kudos

Hello Experts,

we are in the process of designing a huge User Interface using WDJ for our client. And this would contain many views which has to render few UI Elements based on the End Users action. For eg., in a view there will be a few default elements displayed with a Button to Add a couple of Table UI Element and a couple of Input Fields upto 5 or 10 times.

I just want make sure to keep the view/component/custom controller lite , how could I design this particular view?

Any thoughts or ideas or suggestions are very much helpful.

Thanks in advance

Balaji

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello!

If you are really sure with number of additional sections and just want to load them on user action - you can go with static UI creaton. Something like that:

Create 10 separate IViews

Create ViewContainerUIElement for these additional UIs

Create Viewset and choose layout (Grid layout with 1 column and 10 rows for example to show them one by one)

Embed one of your UIs + EmptyView in every section of ViewSet with EmptyView by default

Create plugs for all 10 UIs and call them on User's action

In this way, your views will be loaded firstly only on User's action (which will fire plug to required IView)

Hope it helps. Thanks, Mikhail

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Friend,

Keep minimum piece of code in the wdDoInit() of the view/component controller which need to be called when the DC is initialized.

Try restricting the code in views only for displaying purpose and keep other functionalitied like retrieval of data in the component controller. Call methods of component controllers in the view rather than putting all of the code in the actions or hook methods of the view. Try avoiding calls in wdDoModify hook method which would be called on every server round trip, and hence adversely effect the performance of application.

Prefer Grid Layout of the groups/transparent containers for alighning the UI elements. Try using minimum no. of transparent containers/invisible elements if possible.

If you are using BAPIs then create model node in the component controllers rather than view and do not directly bind the attributes within to UI elements in the view by first mapping the model node between view and component controller.

Regards,

Tushar S

Former Member
0 Kudos

Dear Tushar,

Thanks a lot for your suggestions.

I've been following these hints perfectly: +keep the min. code in view/comp controller, calling the methods from comp controller from the view. +

Now, I'm trying to know the best way to design the view which is going to be loaded based on the end users decisions. So I'm just trying to evaluate what approach would be the best to design this type of View. is it recommended to go for dynamic UI generation or what else are the options to design this view?

And, When you mentioned to prefer Grid Layout and min. transparent containers..what would be the reason?

Former Member
0 Kudos

Hi,

If you know the number of UIs in design time, Please create them in design time. If not go for Dynamic UI Generation.

I would prefer Matrix layout over Grid layout. Check out the following link for more info

http://help.sap.com/saphelp_nw04/helpdata/en/5b/bea93e6c514310e10000000a114084/frameset.htm

Please check out the thread for Transparent Containers

- Saravanan K

Former Member
0 Kudos

Hi Sravan,

Thanks for your response.

We know the number of no. UIs there should be on the form, but also user is allowed to add and delete the UIs.

For eg. in the initial screen the User can see the default UIs where there will be button ADD SEGMENT UPTO 5 TIMES. In this scenario what would be the best practice to follow. whether it's dynamic UI or use some containers and hide the UIs intially....

Regards, Balaji

Former Member
0 Kudos

Hi Sai,

Create only those UIs at design time which you are sure to be displayed/used in the application sometime or the other. For UIs to be created on user action should be created at runtime using coding. Reason being if more number of UIs are created in design time and part of it is hidden as per requirement, then it will take more time to load unnecessarily.

As suggested before use less of transparent containers as possible.

Regards,

Tushar S