cancel
Showing results for 
Search instead for 
Did you mean: 

Reuse of views?

0 Kudos

Hi all, I have just started developing a web dynpro application that looks different than other applications I've made. Maybe anyone  could give me some hints about how to think when designing the application.

The user will on the first view get a table listed. From there she will be able to click on a link of one of the listed  items to get a detailed view with additional information about the item. The fields on the detailed screen will sometimes be in input mode sometimes closed depending the user. Other users will go directly to the detailed screen without passing the list on the first screen and there be able to create items of the same type of the list of the first screen, this kind of user will never go to the first view/ see the table listed on the first screen.  The question is if I should create two views with one component controller holding the information, one view listing the table and the other view showing the detailed information? But it would be nice to "reuse" views so that the detailed screen could be used for several purposes, to either show information  or to have the user to enter information instead of creating several components. I am not sure whether this question is to generel to fit in here in this forum.

Thanks a lot, kind regards Lena

Accepted Solutions (1)

Accepted Solutions (1)

chengalarayulu
Active Contributor
0 Kudos

Hi Lena,

As per my understanding, there are totally three cases in your requirement.

1. New (Directly navigate to Details view without data)

2. Filled (Directly navigate to Details view with data)

3. Main View >> Selected record related data should display in Detailed View

Its very simple, and you have already good thinking power, as you said just take TWO views and ONE more.

1. on first view insert a ViewContainer UI element, and embed remaining two view into this with navigations plugs.

2. This is your Main Table view to select.

3. This is your details view.

I hope you know the user type who logged in, then if in case 1(new), just fire details view plug,

in case 2(filled) - just fetch data and bind to the node and navigate to details view, in case 3(two-step) - fire main view plug, and from there fire details view plug.

I hope this would clarify in clear.

0 Kudos

Thank you very much for your answer!

Via parameters I will send information so I can find out which kind of user it is running the application. In the window there are methods to read the parameters right?

And then depending the user fire different plugs that call differens views?

regards Lena

0 Kudos

Hi again, after checking the parameters I will know which kind of user logged in, and if to call (fire)  the details view or the table view. Should I create outbound plugs from the view with the viewContainer element and create a navigational link to the inbound plug to the details, and table view? Where do I fire the events for the plugs? Could I user the Doinit method to check which user that it logged in and from there fire the different plugs? regards Lena

chengalarayulu
Active Contributor
0 Kudos

Hi Lena,

Exactly you can do what you have in your mind. and also you can do in another way i.e. visibility based.

Just create different ViewContainer UI elements based on your requirement, and maintain binding for visibility for all ViewContainers and based on user who logged in you can make respective VC as visible and hide all remaining VCs.

it will resolve your problem.

Answers (2)

Answers (2)

former_member199125
Active Contributor
0 Kudos

As you are not confirmed about initial view, Its better to use dynamic application configuration depends on type of user.

assign configuration id dynamically based on your logic or type of user,

Regards

Srinivas

0 Kudos

Hi, I have only done application configuration in Web CRM IC rel 7.0 where you per org.unit can maintain which view to be called all the way to field level what to be shown to the user. Is is working the same way for web dynpro? Do you mean that I can customize so that for example view A is called for user A wheras view is called for user B?

regards Lena

former_member199125
Active Contributor
0 Kudos

Yes

create two app configuration, based on type of user assing configuration dynamicall.

Former Member
0 Kudos

You can reuse views through "ViewContainer" UI element. Do some research on how to use them.