Close ADF Popup Dialog with html button in Inline Frame
hi,
I'm using jdev 11.1.1.2,
I have a adf popup dialog which contains an Inline Frame(source is a jsp file).I want to close the dialog with a html submit button in the frame page. when the submit button is clicked, auto close the dialog.
can anyone help in this.
Thanks
Try to close the popup from Javascript using a sciptlet similar to the following one:
var popup = AdfPage.PAGE.findComponent('<yourPopupClientId>');
if (popup.isPopupVisible()) {
popup.hide();
}where <tt><yourPopupClientId></tt> should be replaced with the popup's client ID. The client ID is composed of the popup's ID from the <af:popup> tag preceded with IDs of the eventual parent naming containers where the popup has been declared.
For example, if the tag is <tt><af:popup id="myPopup"></tt>, then the clientId might be:
<tt> myPopup
container1:myPopup
container1:container2:myPopup</tt>
... and so on, depending on where you have defined the popup in your JSF page (i.e. within which naming containers), you should determine it first.
Similar Messages
-
does anyone know any FM which provides popup dialog with 3 button?
hi Oscar,
you can try:
POPUP_WITH_3_BUTTONS_TO_CHOOSE
hope this helps
ec -
Popup dialog with 3 buttons to show internal table
Hi,
Is there any popup dialog that can show internal table and with 3 buttons?
Just like the combination of POPUP_WITH_3_BUTTONS_TO_CHOOSE and POPUP_WITH_TABLE.
Thanks in advance.hi,
Use FM 'POPUP_TO_CONFIRM'.
Check the below example code
data parameters like spar occurs 0 with header line.
data Name(75) type c.
name = ' '.
Data : v_ecc6_text type string,
v_ecc6_title type string.
DATA: L_SVAR(1).
concatenate
'1'
'2'
'3'
into Name separated by space.
move Name to parameters-value.
move 'NAME' to parameters-param.
append parameters.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Hai'
DIAGNOSE_OBJECT = 'ZDIALOG_TEXT'
TEXT_QUESTION = 'Hello'
DEFAULT_BUTTON = '1'
IMPORTING
ANSWER = L_SVAR
TABLES
PARAMETER = parameters
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2.
Edited by: Raj on Jul 1, 2008 1:03 AM -
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 -
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 -
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 -
Automatically click OK or close LabVIEW popup dialog box
I am able to automate user actions on any front panels within the project by modifying its values (signaling) through VI References, but I can't figure out how to access a popup dialog box to automatically close it or click OK.
Is there a way to do this without replacing all LabVIEW built-in dialog box calls with a custom one?Just curious, why automate user interactions? Why not have a "mode" you are in. If it's a user interaction mode, you do what the user chooses. If it's not set in user interaction mode, you just use a state machine to go to the next step, and you don't show the dialog.
My suggestion here seems much simpler then having value signaling propery nodes all over the block diagram.
CLA, LabVIEW Versions 2010-2013 -
PopUp Dialog with SplitViewNavigator
Hi,
I created an application with a SplitViewNavigator taking care of 3 views.
I want to create a PopUp Dialog to receive some user input.
I have tried the examples that I have been able to find but they all place the dialog box in one of the views of the SplitViewNavigator instead of popping a dialog box up on the screen outside of the navigator.
Has anyone found a solution to this?
Neilhi Oscar,
you can try:
POPUP_WITH_3_BUTTONS_TO_CHOOSE
hope this helps
ec -
ADF Popup Dialog Not Showing Working
I'm using JDeveloper 10.1.3 and ADF. I have been unable to get a dialog popup working. When I click on a commandLink in the Originating page, it only refreshes the Originating page and does not open the destination page at all. It's happening in both FF and IE.
Within the faces-config.xml I created a navigational rule with outcome that begins with dialog.
Extracted sample from faces-config.xml:
*<navigation-rule>*
*<from-view-id>/Originate.jspx</from-view-id>*
*<navigation-case>*
*<from-outcome>dialog:dest</from-outcome>*
*<to-view-id>/Destination.jspx</to-view-id>*
*</navigation-case>*
*</navigation-rule>*
The commandLink action attribute begins with dialog: and useWindow attribute is true.
Extracted sample from JSP document:
*<af:commandLink text="Go to Destination" action="'dialog:dest'"*
useWindow="true" windowHeight="250" windowWidth="300"
partialSubmit="true" id="originate"/>
Is there something I'm doing wrong? Any help would be greatly appreciated.
Thanks.It seems like the dialog:popUp does not work if it is not nested within
<afh:html>
<afh:body>
<af:form>
<af:commandLink action="dialog:popUp"/>
</af:form>
</afh:body>
</afh:html>
I currently have it this way
<html>
<body>
<h:form>
<af:commandLink action="dialog:popUp"/>
</h:form>
</body>
</html>
P.S.
The former way works but it messes up page layout. It seems not to notice DIVs and image positioning.
Any clues as to why?
Edited by: user2709995 on Dec 31, 2008 6:31 AM -
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. -
How to close a popup dialog?
Looking at the Scenebuilder1.1 Login sample, a new scene is created which is placed on stage.
How would such a popup get closed and get back the original main screen?
private Initializable replaceSceneContent(String fxml) throws Exception {
FXMLLoader loader = new FXMLLoader();
InputStream in = Main.class.getResourceAsStream(fxml);
loader.setBuilderFactory(new JavaFXBuilderFactory());
loader.setLocation(Main.class.getResource(fxml));
AnchorPane page;
try {
page = (AnchorPane) loader.load(in);
} finally {
in.close();
// store the stage height in case the user has resized the window
double stageWidth = stage.getWidth();
if (!Double.isNaN(stageWidth)) {
stageWidth -= (stage.getWidth() - stage.getScene().getWidth());
double stageHeight = stage.getHeight();
if (!Double.isNaN(stageHeight)) {
stageHeight -= (stage.getHeight() - stage.getScene().getHeight());
Scene scene = new Scene(page);
if (!Double.isNaN(stageWidth)) {
page.setPrefWidth(stageWidth);
if (!Double.isNaN(stageHeight)) {
page.setPrefHeight(stageHeight);
stage.setScene(scene);
stage.sizeToScene();
return (Initializable) loader.getController();
}Thanks for your reply. I rewrote the sample to do this - created a new Stage, and it worked. :)
<T extends ControllerBase> T replaceSceneContent(T controller, String fxml, String message) {
try {
AnchorPane page;
FXMLLoader loader = new FXMLLoader(getClass().getResource(fxml));
page = (AnchorPane) loader.load();
Stage dialog = new Stage(StageStyle.UTILITY);
dialog.initOwner(MainPane.primaryStage);
dialog.getIcons().add(new Image("/resources/my-icon.gif"));
dialog.initModality(Modality.WINDOW_MODAL);
Scene scene = new Scene(page);
dialog.setScene(scene);
T c = loader.getController();
c.stage = dialog;
c.setMessage(message);
dialog.showAndWait();
return c;
} catch (IOException ex) {
Logger.getLogger(main_screenController.class.getName()).log(Level.SEVERE, null, ex);
return null;
} -
ADF Popup issue with table row not selected
OK, imagine this scenario. There is a page displaying a table of employees, and when you click on the employee_id (which is shown as URL), which is one of the columns of the table, a popup displays, showing the details of that particular employee.
Now in the properties of the employee table, we unchecked the row selection property. Now how will I be able to achieve the same thing?
I dragged the setCurrentRowWithKeyValue operation on employee_id column, changed the bindings of the TEXT property, added a popup behaviour, but still the popup displays the first row which is fetched in the table.
Where am I missing, or is there any other way to achieve the same thing?
JDev version: 11.1.2.2.0
Edited by: Sonal on Oct 11, 2012 3:11 AMI did an exercise where I created one page which was displaying all the employees, and once you click on employee_id (which is shown as URL), a 2nd page opens displaying the details of the employees.
Now in the above exercise, ROW SELECTION was disabled, for which I had to use this setCurrentRowWithKeyValue operation and then set the NDValue with the binding of the employee ID. So whenever I used to click on the employee_id, the page was taking to me the form, which was displaying exactly the same employee details.
Now this thing should work with the popup thing too, right? So I disabled the ROW SELECTION -
Hi,
I need help quickly because its for a project that needs to be in soon, I have a pop up box on a button which does open and close but I would like to add an X to the corner which would also close the box... does anybody know a code for that? Please?
Here are screenshots to help or if you need I will post the file if you would like?
This is the first screenshot before I enter the box.
This the code that I have for the box in the first screenshot.Per your previous post that I gave you some code in, you're trying to solve your issue without being a coder yet you need functionality that only someone fluent in the code you require could use.
I'm sorry your due date is closing but overall if you do not understand coding 'at all' you should not come here asking people to code your project for you.
Your question is as unspecific as before as well as any coder here would give you information you wouldn't understand the same as your previous post. -
Javascript not working in Popup/Dialog with contentDelivery=lazyUncached ?
I am seeing following problem while using jdev 11.1.1.3.0
The inline javascript function myTest2() is not available. any thought ?
<af:commandButton text="commandButton 1" id="cb1">
<af:showPopupBehavior popupId="p1" triggerType="action"/>
</af:commandButton>
<af:popup id="p1" contentDelivery="lazyUncached">
<af:dialog id="d2">
<af:resource type="javascript" source="test1.js" />
<script type="text/javascript">
function myTest2() {
alert("you have called function myTest2");
</script>
Here is the content of Dialog
calling myTest1()
calling myTest2()
</af:dialog>
</af:popup>Please ignore the <af:resource which was added for comparison. The following code segment is trying to re-create the problem I have encountered in my project.
The javascript is not working after the popup was showed. For some reason, the retrieved xmlhttp response not adding the javascript into the page.
<af:commandButton text="commandButton 1" id="cb1">
<af:showPopupBehavior popupId="p1" triggerType="action"/>
</af:commandButton>
<af:popup id="p1" contentDelivery="lazyUncached">
<af:dialog id="d2">
<script type="text/javascript">
function myTest2() {
alert("you have called function myTest2");
</script>
Here is the content of Dialog
calling myTest2()
</af:dialog>
</af:popup> -
ADF Faces components with HTML and DIV tags
Hello all,
I want to know if there a way to place a <div> tag within an adf faces component tag? eg. <af:table> tag and insert the div tag between </af:column>? I tried doing this by placing the div tag between columns and also enclosing it with verbatim tags, but a parsing exception occurs during run time. The purpose of this is to create frozen columns for horizontal scrolling.
The code looks like:
<af:table ...>
<af:column headerText= ...>
<f:facet name= ...>
<h:outputText value= .../>
</f:facet>
</af:column>
<f:verbatim>
//DIV TAG
</f:verbatim>
<af:column headerText= ...>
<f:facet name= ...>
<h:outputText value= .../>
</f:facet>
</af:column>
<af:column headerText= ...>
<f:facet name= ...>
<h:outputText value= .../>
</f:facet>
</af:column>
<f:verbatim>
//END DIV TAG
</f:verbatim>
</af:table>
Thanks in advance.
-Wes
Message was edited by:
zeoneozerorepost
-
Maybe you are looking for
-
Firewire Port not working, URGENT help please¡¡¡
Hello People, i´ve just got a new Mac Mini last week, and i´ve been trying to get my Alesis MasterControl audio interface, and is just a complete mess. This happened right after i´ve upgraded to 10.8.3 so i don´t know, the weird thing is that if i c
-
Can't Install Snow Leopard on external drive
Hey Mac Addicts, I'm trying to install Snow Leopard on an external drive (Lacie Triple Rugged, FW800 USB3.0) but keep on getting "Installation failed, can't copy the support files. My drive is partioned in to 5x100GB partitions, GUID partition schem
-
How do i claim free mountain lion
How do I download the free app for my new mac?
-
All, version: 11g One of my query which uses 'IN' operator in WHERE clause to filter. I used around 30 values inside the IN operator to filter. I'm facing performance issue with this, Is there any alternate to IN operator which improves the performan
-
Hi Gurus, Currently my plant is facing problems in planned order side. The following are my queries: 1.We have huge backlock and for that reason we are moving dates in T.code CJ20N top level assembly. Whenever we change the dates in toplevel assembly