Close a popup window with a custom button
Hi All,
I have two components A and B.
I will call one of the view of B in A as a pop up
Component A
Component B
as popup
BTN
Pressing of BTN which is a custom button created in component B must close the popup screen(Exit Component B).
I have tryied using Exit outbound plug in the corresponding window of Component B, but still it is not closing.
Can any one help me to solve this problem?
OK here is the logic for the second option..
1. create a node in the component controller of the component B. make it interface node. ( say its name as WIN_NODE)
2. create an attribute there of type (type ref to IF_WD_WINDOW) (name as WIN)
3. create the same node in the view where you have the close button (custom close button). map it to the component controller
node.
then the same node will be present in the interface controller
view component controller interface controller
WIN_NODE-->WIN_NODE--
>WIN_NODE
WIN-->WIN--
>WIN
now go to the component A,
there you must have declared component B as the used component.
4.go the view which fires the window creation .
5. there go to the properties tab and add the interface controller or Component B as used controller.
6. After that go to context tab and create a node WIN_node having attribute WIN there also.
7. Map it to the node of interface controller of component B.
8. Now the coding part.
a.) in the component A which fires the event of opening the window, write the following code in the event handler.
data lo_window_manager type ref to if_wd_window_manager.
data lo_api_component type ref to if_wd_component.
data lo_window type ref to if_wd_window.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window = lo_window_manager->create_window_for_cmp_usage(
interface_view_name = 'WIN2'
component_usage_name = 'TEST'
* title =
close_in_any_case = abap_true
message_display_mode = if_wd_window=>co_msg_display_mode_selected
DATA lo_nd_win_node TYPE REF TO if_wd_context_node.
DATA lo_el_win_node TYPE REF TO if_wd_context_element.
DATA ls_win_node TYPE wd_this->element_win_node.
DATA lv_win LIKE ls_win_node-win.
* navigate from <CONTEXT> to <WIN_NODE> via lead selection
lo_nd_win_node = wd_context->get_child_node( name = wd_this->wdctx_win_node ).
* get single attribute
lo_nd_win_node->set_attribute(
EXPORTING
name = `WIN`
value = lo_window ).
lo_window->open( ).
you might be already having the code for opening and creating the window add the logic for passing the window instance to
context there as shown above.
b) in the context B fetch the window instance in the eventhandler of the close button and close it.
DATA lo_nd_win_node TYPE REF TO if_wd_context_node.
DATA lo_el_win_node TYPE REF TO if_wd_context_element.
DATA ls_win_node TYPE wd_this->element_win_node.
DATA lv_win LIKE ls_win_node-win.
* navigate from <CONTEXT> to <WIN_NODE> via lead selection
lo_nd_win_node = wd_context->get_child_node( name = wd_this->wdctx_win_node ).
* get element via lead selection
lo_el_win_node = lo_nd_win_node->get_element( ).
* get single attribute
lo_el_win_node->get_attribute(
EXPORTING
name = `WIN`
IMPORTING
value = lv_win ).
lv_win->close( ).
thanks
Sarbjeet singh
Similar Messages
-
Flex3 popup window with minimize/Maximize buttons
Hi All,
We are using title window as a pop-up in FLEX 3
The title window has a property called closeButton which when set to true displays a close button on the top right hand corner of the title window. Likewise, We also need minimizeButton property which can minimise the window. Is there any such component like title window which has this property of minimize/maximize the window or is there any suggestion to achive the same.
Thanks in advance.
Regards,
VenkateshHi All,
We are using title window as a pop-up in FLEX 3
The title window has a property called closeButton which when set to true displays a close button on the top right hand corner of the title window. Likewise, We also need minimizeButton property which can minimise the window. Is there any such component like title window which has this property of minimize/maximize the window or is there any suggestion to achive the same.
Thanks in advance.
Regards,
Venkatesh -
Custom pushbutton in ME21N should display a popup window with item details
Hello,,
The requirement is to
1. Add a custom pushbutton in ME21N screen at header level.
2. The user will select some PO line items and will click on this push button.
This inturn should trigger a popup window with item details only for those selected PO line items along with schedule line qty.
I have created the custom push button in a custom tab using the BADI ME_GUI_PO_CUST.
Now I am not able to retrieve item details and schedule line details inside the PAI of the custom tab..
i.e., when i click on the custom push button, I am not able to retrive the item data and schedule line data.
Please help me to retrive PO line item data and schedule line data.
Regards,
SharahJSF is not so relevant in this question. It's all about how the generated client side code look like. Which is usually a bunch of HTML/CSS/JS (open page in browser, rightclick and view source). If you know HTML, you should know that using target="_blank" in a <form> or <a> element would open a new window. If you know JS, you should know that using window.open() would open a new window.
Apply this so in the JSF source code so that the generated HTML/JS output is exactly what you want. -
Popup window with radio button-urgent
Hi..
Is ther any functionmodule for dispalying a popup window with radio button ....Use This
K_KKB_POPUP_RADIO2
I_TITLE ... This is the title
I_TEXT1 ... first radio button
I_TEXT2 ... second radio button
I_DEFAULT ... default
reward if useful
Amit Singla -
Have just tried to open iTunes, and I get a blank window (no dialogue, just a blank window) with an OK button. When I press OK, it closes down (not having opened anything) and shuts down. I've tried opening while holding down the option key, as I would to open with a new iTunes folder, and I"m getting the same empty window with an OK. Very frustrating, has anyone seen this, and can anyone help? Thanks in advance, Kate
so, I called a friend who's more experienced than I am. He walked me through some steps, checking iTunes and we got the same dialogue -free window with the OK button. We then uninstalled iTunes, downloaded it afresh, and it opened with no problems. Seems to all be there, music, tv, etc. Not sure what the issue was, but it has stopped this problem.
-
How to close a popup window for system events?
Hi,
I have a screen 110 which shows several input field in popup mode.
The Cancel button can close the screen.
But my question is how to close the popup window for the following system events?
1, Customer clicks the cross button in top-right corner
2, Customer clicks the system icon in top-left corner and then select either: "Close" or "Stop Session"
The PAI subroutine of the screen has not been triggered for the above system events.
Thanks for the coming help.
Best Regards,
DavidHi Siddharth,
I did check with another very experienced ABAP developer.
The solution was the same as what Arunima Rudra provided.
And I got a sample program which did work properly.
The headache is that the system events in my program still cannot be triggered even after I have all the same changes.
Anyway, I suggest you to try the solution as provided by Arunima Rudra.
It should work for 2 system events:
1, Customer clicks the cross button in top-right corner
2, Customer clicks the system icon in top-left corner and then select either: "Close"
For "Stop Session", it should not be handled by popup.
You can observe the same behavior in ALV sorting configuration popup.
Good luck!
Regards,
David -
How to close a Popup window in WebUI
Hi gurus,
I created a custom component and launched it in WebUI as a popup. Aside from closing the popup window (via pressing the little "X" on the upper right) or firing the outbound plug 'leave', is there another way to programmatically close the popup? I have several buttons there, all of them must close the popup and resume processing to the calling view. I want to be able to tell which button was pressed with as minimal coding logic as possible.
Cheers,
MarcHi Marc,
You could give your various buttons unique names. You could redefine the do_handle_event method of the impl class. In this you could direct all these events to one event handler itself. In this event handler,if you read the htmlb_event_ex parameter,this contains an attribute called event name.Here,you can distinguish which button has been clicked and then fire your outbound plug while passing a collection with button name in it.
Regards,
Sarat -
HOW TO CLOSE A POPUP WINDOW IN SELECTION-SCREEN
Hi,
My problem is i had created a selection-screen with some field on initial screen and buttons on application tool bar.when i start my selection screen initial screen appears.now when i click a push button on application tool bar an selection-screen appears as window if i close that popup window i am going back to program.but i want to go back to initial screen.SET PF-STATUS '<ZSTATUS>'
CASE sy-ucomm.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
IT will work.
regards,
swarup -
How to close a popup window in a used component?
Hi Experts,
I have two applications in the same project, and they each have one component controller. Let they be component A and B. They have similar functionalities and screens. There is a popup window in A that I would like to use in B instead of creating a new popup window in B, so I added a used component of A in B in order to share the popup window. I am able to click a button in B to get a popup window from A successfully, but I am unable to close the popup window since the event has been created in A.
Can anyone suggest me how to fix this please? I would really appreciate your help.
Thanks,
-NapadolHi,
You can either use the approach above, which is having an Attribute, type IWDWindow in B's Component Context. When you open the popup you store the reference. When you click close you get that reference back and destroy the window.
Note, I'd suggest you to have your "View" with no Close Button. Then in Component A you create another View that has an UIViewContainer with your Popup View. You can code the Close code in Component A.
This way you can do the same and have a code in Component B to close your window.
Other way would be having it as a Component variable and using the Component Interface on A (create a Method) that goes to Component A and destroy that instance.
Regards,
Daniel -
I upgraded to Mountain Lion (MacbookPro). Now when I open ical I get a popup window with a list I had added to Reminders app with the message 'Your calendar couldn't be refreshed' i--t won't go away-'delete' is greyed out--can't access calendar! Help!
I upgraded to Mountain Lion (MacbookPro). Now when I open ical I get a popup window with a list I had added to Reminders app with the message 'Your calendar couldn't be refreshed' i--t won't go away-'delete' is greyed out--can't access calendar! Help!
-
Create Window with Textbox and Button For getting Input Value
Hi All,
I have create plugin application but i want to take input from user. Therefore i want to create window with textbox and button.
please may i get solution...Or if that's all you need to do, just use JavaScript or a form.
-
Hi all,
I'm looking for a way to have a popup window (initiated from a button within
a portlet) automatically set its skins to that of the current portal.
Specifically I'm implementing a "print article" type function.
thanks,
MarkusDear,
I use the javascript window.open(....) for popup a new portlet window
(remote),
and in remote portlet jsp written the follow javascript which u posted,
however, my remote window is hang on after
copyScripts(fromElement,toElement);
What's my fault ?!
in my code is
function onLoadSetting() {
fromElement = top.opener.document.getElementsByTagName("head")[0];
toElement = document.getElementsByTagName("head")[0];
copyScripts(fromElement, toElement);
copyLinks(fromElement, toElement);
Could u help me , Thanx
best regard ,
softleader, taiwan Gary Lee
"Will Butler" <[email protected]> ¦b¶l¥ó
news:3f8d490b$[email protected] ¤¤¼¶¼g...
This can be accomplished using javascript to copy the css links and the jsscripts from the opening page... Generally, fromElement would be
top.opener.document.getElementsByTagName("head")[0] and toElement would be
document.getElementsByTagName("head")[0].
>
function copyScripts(fromElement, toElement)
var scripts = fromElement.getElementsByTagName("script");
for (var i = 0; i < scripts.length; i )
var script = scripts;
var newScript = document.createElement("script");
newScript.src = script.src;
toElement.appendChild(newScript);
function copyLinks(fromElement, toElement)
var links = fromElement.getElementsByTagName("link");
for (var i = 0; i < links.length; i )
var link = links[i];
var newLink = document.createElement("link");
newLink.rel = link.rel;
newLink.href = link.href;
toElement.appendChild(newLink); -
When I click on an annotation, a litle popup windows is coming in the middle of the screen. Does it exit a way (preferences) to make this popup window to fit the entire screen (easier to read the text inside the popup windows with th vertical scroll bar).
There is really no way to expand this popup ?
Because on a PC, Adobe Reader is taking care of the dimensions I gave to this popup.
I use QuickPdf library to do that. The command is :
int QuickPDFAddNoteAnnotation(int InstanceID, double Left, double Top,
int AnnotType, double PopupLeft, double PopupTop,
double PopupWidth, double PopupHeight, wchar_t * Title,
wchar_t * Contents, double Red, double Green, double Blue,
int Open)
Parameters
Left The horizontal co-ordinate of the anchor for the annotation
Top The vertical co-ordinate of the anchor for the annotation
AnnotType The annotation type:
0 = Note
1 = Comment
2 = Help
3 = Insert
4 = Key
5 = New paragraph
6 = Paragraph
Add 100 to any of the above values to suppress the date shown in the popup
annotation's title
PopupLeft The horizontal co-ordinate of the left edge of the popup window
PopupTop The vertical co-ordinate of the left edge of the popup window
PopupWidth The width of the popup window
PopupHeight The height of the popup window
Title The title of the annotation
Contents The body of the popup annotation
Red The red component of the color of the annotation
Green The green component of the color of the annotation
Blue The blue component of the color of the annotation
Open Specifies whether to show the annotation when the document is opened:
0 = hide
1 = show
Unfortunatly the Android Adobe reader doesn't take care of theses values and put the popup windows in the middle of the screen
It's very difficult to read the text on an galaxy SII : too small
Thanks -
How to create popup window with radio buttons and a input field
Hi Guys,
Can somebody give some directions to create a stand alone program to create a window popup with 2 radio button and an input field for getting text value. I need to update the text value in a custom table.
I will call this stand alone program from an user exit.
Please give me the guidance how go about it or please give any tutorial you have.
Thanks,
MiniHi,
There are multiple aspects of your requirements. So let's take them one at a time.
You can achieve it in the report program or you can use a combination of the both along.
You can create a standalone report program using the ABAP Editor (SE38). In the report program you can call the SAP Module pool program by CALL Screen <screen number>. And then in the module pool program you an create a subscreen and can handle the window popup with 2 radio button and an input field for getting the text.
For help - Module Pool programs you can search in ABAP Editor with DEMODYNPRO* and you will ge the entire demo code for all dialog related code.
For Report and other Module pool help you can have a look at the following:
http://help.sap.com/saphelp_nw70/helpdata/en/47/a1ff9b8d0c0986e10000000a42189c/frameset.htm
Hope this helps. Let me know if you need any more details.
Thanks,
Samantak. -
ReturnListener invocation when closing popup window with (X) Button
When I use a bounded task flow in an inline-pop, when the user clicks on the upper right (X) button of the popup window, the ReturnListener
is not invoked which needs to be called in my use case because I need to refresh the caller’s table displayed in the calling screen. Do you know if there is a way to invoke the ReturnListener method to be invoked in case of closing the dialog via (X) button on the top right? Or how to refresh(addPartialTrigger) the caller’s table in that case.
This behavior is described in Andrejus following
http://andrejusb.blogspot.com/2009/11/crud-operations-in-jdeveloperadf-11g-r1.html
Thanks for your feedback.
Best Regards,
JPHi,
We created our own region in popup system partly for that reason. You have to add a popupClosed client listener and send a custom event to the server to in turn call the returnListener. Sadly, it's really not simple to implement, so I cannot come up with a good solution for you. :(
Regards,
~ Simon
Maybe you are looking for
-
Problem in identifying control file when creating physical standby
hi there, (database version: 10.2.0.4 plateform linux) I'm using the command as below to create physical standby database from backup: rman target / auxiliary sys/tiger@paceview Recovery Manager: Release 10.2.0.4.0 - Production on Tue Sep 4 18:05:53
-
How do i update drivers audigy2
hi i ve been trying to update my audigy,but when i go to install the dvrs,it says "set up did not detect the set of required componets you have.set up will exit" thx for any help,cheers oh yeah these were the newest dm dvrs.
-
File sharing for instant messaging
I m developing a simple workplace (shared place) which comprises the services as Multiasting to discovey resource and instant messaging for every member chatting with each other as in MSN chatting form. Besides that, i also doing a file sharing servi
-
Re: Qosmio F60-100 Blue-ray doesn't start movie or even menu
Hey guys ! My Toshiba Qosmio F60-100 works perfectly. There's just the blu ray drive that causes problems, because each time I put a Blu ray in, it starts the "Win DVDBD" program but never starts to play the movie or even the menu. I just don't know
-
Resetting Photo Stream Problem
I have problem resetting my photo stream on iCloud. Cant find the advance option under my email account it was replace by notification option. Any idea where can I find the advance option under iCloud.com