on 06-29-2007 6:38 PM
All,
I have a window which has a view called Main. There is a button in Main view, The moment i click the button, I wanted to open another view in dialog mode. But I dont wanted to create another Window to open a dialog.Is it possible? If yes, How can we do that? Please Help..
If its not possible, can you tell me why?
BM
Define "dialog mode".
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Armin,
Thanks for your reply. Could you please explain me in detail?
Im trying open a view in dialog with below code but gettting an error:
public void onActionOpenView(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionOpenView(ServerEvent)
IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI
.getComponentInfo()
.findInViews("DialogView");
IWDWindow window = wdComponentAPI.getWindowManager()
.createModalWindow( windowInfo);
window.setWindowPosition(300, 150);
window.open();
//@@end
}
<b>ERror:</b>
java.lang.ClassCastException
at com.tech.examples.welcome.WelcomeComponentView.onActionOpenView(WelcomeComponentView.java:234)
at com.tech.examples.welcome.wdp.InternalWelcomeComponentView.wdInvokeEventHandler(InternalWelcomeComponentView.java:166)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleAction(WebDynproMainTask.java:101)
... 23 more
BM
Hi Armin,
some day the amount of my daily work didn't allow me to contribute any longer as seriously as i always tried to do in the earlier days of SDN.
And, even worse, since Web Dynpro was and is still evolving in a tremendous speed, if you don't keep up to date with the material (since there's a lack of spare time) you're getting "off-topic" quite quickly.
But i was always there as a passive member...this might change again
Nevertheless, nice to meet you again.
Regards,
Stefan
Barathi,
i'm not quiet sure, what you mean by "calling a view in dialog mode".
A view just defines layout and behaviour of a rectangular area of the user interface. If you put a view into a window and use the code snippet mentioned earlier, you'll get a modal dialog containing the view contents.
If you don't want this, you even have to embed the view into a window. A view is not "able to live" without a window.
Please have a look at the <a href="http://help.sap.com/saphelp_nwmobile71/helpdata/en/44/7e0d1ff9a63abee10000000a155369/content.htm">SAP Help Files</a>.
Hope that helps.
Regards
Stefan
Bharathi,
please clarify, do you want to:
1. display MainView in the (let's call it) "main area" of the browser and DialogView in an own separate (modal) dialog window if the user presses a button -or-
2. display MainView in the "main area" of the browser and DialogView in an own separate (modal) dialog window <b>without</b> the user doing anything -or-
3. display MainView and DialogView in the "main area" of the browser?
Regards
Stefan
Thanks for your patience...My MainView & DialogView both are in <b>same window</b> say "Main area".
When I click on Button on Mainview I wanted to <b>open Dialogview in Dialog Mode</b>...
Here I have only one Window & 2 views..Dialogview needs to be opened as popup..
Is it possoble?
BM
Message was edited by:
Bharathi M
Bharati,
if you embed two views into one window (without using a ViewSet), only <b>one</b> view will be visible (MainView or DialogView).
Let's call the window of the main area "MainWindow".
There's no need to place DialogView into MainWindow despite you want to navigate from MainView to DialogView inside of MainWindow (like Armin stated).
The simple solution is to create a new window called "DialogWindow" and follow the steps of the code snippet in the thread posted earlier.
Of course it's possible to embed multiple views into one window, but only one view is active and visible inside of a window at a discrete time.
If i got you right, you want to place a button inside of MainView (currently visible inside of MainWindow) and as a reaction open the DialogView (in the newly created DialogWindow).
This is exactly what the code snippet already mentioned does.
Hope that helps.
Regards
Stefan
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.