on 06-28-2007 12:19 PM
Hi,
In Webdynpro java, we r having a feature called 'viewset' for to dispaly different views in the same window.
in case of webdynpro abap, how to create viewset. i didnt seen any option for to create the view set.
could you please help me to work on view set.
thanks in advance.
Hi
As nitya said , You could use viewcontaier UI element , but the difference from the java is that , it could carry only one view....
Thanks
Anzy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In you context, you have attributes to denote the visibility of each view. The attribute type can be char01 or wdui_visibility. Bind the "visible" property of the view container element to the context attribute. By default, you could make all views invisible in the doinit method itself, so that only your button will be visible. In the onAction event of the button, change this attribute to true so that the view will become visible.
Hope this helps.
Regards,
Nithya
Hi Venkat,
In WDJ for a window the view set is defined and then the views are embedded to that and there is a default view for every view set section . this feature is present in WDA in a different manner .u define a window and embedd a view inside that . for that view u can create elements which acts as a container for other view ( viewContainerUielement ) and u can align this container using the layout. in ur container element u can embedd the views u want and make a single as a default .
one advantage with this is that .. when u want to replace a view containing views as above with a different view u can easily fire a plug to new view .
Regards
Yash
Ok. Declare a context attribute read_only. Bind this to the "read_only" property of your input fields (bind each field separately). This you should do by clicking on the button next to the read only property and selecting the attribute. In the context itself, for the attribute, set the default value as 'X', so that all input fields are disabled initially.
Then, you have a button with an action defined on it. Write this in the event handler.
data:
lr_element type ref to if_wd_context_element.
lr_element = wd_context->get_element( ).
lr_element->set_attribute(
exporting
name = 'READ_ONLY'
value = ''
).
This code assumes that the attribute READ_ONLY is directly under the context and not within a node. If you have it in a node, change the code accordingly. You can use the code wizard for this.
In a similar fashion, you could set the views as visible or invisible with context attributes. Revert for any clarification.
Regards,
Nithya
Hi Venkat,
by default when you create your component an empty view is created, however you can't view it under the list of views.
when you open the window and try to embed a view in the available options there is a view called Empty view.
thus u can use this to show an empty view initially.
have multiple views including the empty view within the window or the ViewContainerUIElement, set the empty view as default.
after the button click just fire an outbound plug to the other view within the button action handler.
hope you have a clear idea about firing of plugs.
Regards,
Shweta
Hi Venkat,
a ViewContainerUIELement holds only views and no other ui elements. This enables you to place multiple views in a single window.
thus to add ui-elements you need to first create a view and then put them in it. Finally you will have to embed this view within ViewContainerUIElement.
steps you need to follow:
1)create a view say "V1" and place a ViewContainerUIElement within it.
2)create another view say "V2" and place other ui-elements within it.
3)open your default window and emebed V1 within it
4)Expand V1 and there you can see the ViewContainerUIElement there, right click on that and embed V2.
similarly you can also embed an empty view within the ViewContainerUIElement and make it default. Only on some button click you can navigate to V2 by firing the approriate outbound plug.
Hope this clears your doubt.
Regards,
Shweta
PS: Award points for helpfull answers.
Hi Venkat,
In Web Dynpro ABAP, you have something called a viewcontaineruielement. You could add any number of such elements to your main view and embed different web dynpro views to them. This way you have the concept of viewset in ABAP too.
Hope this helps.
Regards,
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.