ActionListener and actionExpression attribute of button in popup dialog

Hi,
I want to programmatically raise a popup dialog with a button bar facet.
Before popup is shown I programmatically set the actionListener and actionExpression attribute of the
button in the buttonBar facet of the dialog. This works fine if I just have one button in the buttonBar facet.
Ie. the actionListener fires and the page navigation occurs after popup closes as a result of user clicking button.
When I add one additional button to the button bar facet the navigation stops working.
Anyone familiar with this issue and has an idea to fix it.
Thanks,
Kenneth

No, as mentioned with one button it works fine. So the mechanism used for setting actionListener and action is fine.
In addition the popup is on a pageTemplate. Just the strange thing is, with one it works with two it doesnt even if I don't
do anything with it other than drag and drop an extra button in the the buttonBar facet of the dialog.

Similar Messages

  • Popup dialog not functioning

    HI,
    i want to use the popup dialog in the jdeveloper 10.1.3,
    i set the use window to true, the action to "dialog:testPopup" but when i run the page and click the button, the popup dialog doesn't appear,
    the same example works fine in all other pages, but i don't know what is the wrong with this page,
    does anyone have any idea?
    thanks

    Hi,
    the same example works in other pages fine,
    -- this tells me that Popup dialogs work in general for you
    actually i made some changes in the layout of the page by adding panel forms and panel horizontal, before that the popup was working properly
    -- this would make me think that undoing the modifications and then bringing them back one-by-one until you find the source of the problem will solve the issue
    but i don't think there's a relation between the layout and the problem!
    -- Yes, but you don't t have a proof for this statement. Sometimes you unintentionally e.g. move a component out of the form element is was in, or create a new one that is warpped in a <verbatime> tag.
    Frank

  • Region Popup Dialog doesn't show up in Detach mode

    issue description:
    1.     There is a task-flow: filter-task-flow.xml, there is method call as default activity and always route to next one view activity filter , refer to below filter.jsf code
    <af:panelGroupLayout id="pgl1" layout="vertical">
    <af:popup childCreation="deferred" autoCancel="disabled" id="filterpopup" binding="#{backingBeanScope.filterBean.p1}" contentDelivery="lazy">
    <af:dialog id="d2" ……/>
    </af:popup>
    </af:panelGroupLayout>
    2.     In my report.jsff page, there is a command button and a region with filter-task-flow.xml , refer to below
    <fnd:applicationsTreeTable featuresOff="wrap " actionsMenuRendered="false" primaryToolbarRendered="true" secondaryToolbarRendered="true" >
    <f:facet name="treeTable">
    <af:treeTable …..>
    </af:treeTable>
    </f:facet>
    <f:facet name="appsTreeTableSecondaryToolbar">
    <af:toolbar id="t1">
    <af:commandToolbarButton id="filter2" text="Filter" rendered="true" >
    <af:showPopupBehavior triggerType="click" popupId=":::fr1:filterpopup"/>
    </af:commandToolbarButton>
              </af:toolbar>
    </ fnd:applicationsTreeTable>
    <af:region value="#{bindings.filtertaskflow1.regionModel}" id="fr1"/>
    3.     In page definition reportPageDef.xml for report.jsff page, there is below definition.
    <taskFlow id="filtertaskflow1"
    taskFlowId="/WEB-INF/…../filter/flow/filter-task-flow.xml#filter-task-flow"
    xmlns="http://xmlns.oracle.com/adf/controller/binding"
    activation="deferred">
    <parameters>
    <parameter id="selectedSubTab" value="#{backingBeanScope.apprAppraisalPMOCRBean.selectedSubTabKey}"/>
    <parameter id="planId" value="#{backingBeanScope.apprAppraisalPMOCRBean.planId}"/>
    <parameter id="mgrEventId" value="#{backingBeanScope.apprAppraisalPMOCRBean.mgrEventId}"/>
    </parameters>
    </taskFlow>
    4.     Now if I go to this page(report.jsff) and click command tool bar button Filter , popup dialog works. And enter Detach mode, click Filter again, popup dialog works.
    5.     But if I go the this page(report.jsff) and enter Detach mode before clicking Filter button, then try to click Filter button, popup dialog doesn’t show up without any issue/error in UI & console. Then I exit Detach mode, and click Filter button again, It will still not popup any more until you reopen the page and click Filter button firstly.
    Appreciate for any suggestion. Thanks a lot.

    resolved. just need move dialog from region to report.jsff page and keep table content in region. that's all

  • ActionListener,action  called for all buttons.

    hi,
    I have developed my own toolbar in that i have my own buttons as input type='image' I have attached action and actionListener for that tag.
    Problem...
    If i give action or actionListener to one button it is invoked for all the buttons but i did't speacified for other buttons. Where the problem lies??
    plz help me i am stuck in my work.
    here's my jsp.
    <av:toolbar enabled="true" id="tbar" rendered="true" bar="lower">
                        <av:tbItem enabled="true" type="delete" actionListener="#{registar.countryChanged}" action="third_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="edit" actionListener="#{registar.countryChanged}" action="second_page"></avaya:tbItem>                                             
                        <av:tbItem enabled="true" type="convert" actionListener="#{registar.countryChanged}" action="third_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="print" actionListener="#{registar.countryChanged}" action="third_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="view" actionListener="#{registar.countryChanged}"action="second_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="seprator" ></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="sched" action="third_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="move" action="third_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="copy" action="second_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="design" actionListener="#{registar.countryChanged}"action="third_page"></avaya:tbItem>                         
                        <av:tbItem enabled="true" type="ddbtn" actionListener="#{registar.countryChanged}" value="#{toolbarBean.list}" action="third_page"></avaya:tbItem>                                                                                                                             
                   </av:toolbar>     
    Here see some where i have given action ,actionListener somewhere not but both of the attributes are invoked on every button.
    Message was edited by:
    prashantak

    You are on the right track.
    Implement a diaolgListener for the dialog. It'll be called when you click the ok button of the dialog. delete the record from the listener. If the user clicks the cancel button, the dialog just closes without giving you any event. This is OKif you just want to cancel the deletion of the record (no rollback needed, just abort the action). If you need more control over the process use a panelWindow inside a popup. There you can use the normal action listeners for buttons.
    Timo

  • Custom Search Form and custom attribute picklist?

    I have a custom item type which has a custom attribute NAICS_Code. The NAICS codes are stored in a database table and the attribute is set to a list of values that is a query on that table. The attribute is associated with a custom item type as a text attribute.
    Now, when I add the custom item type to a page, the NAICS Code field is a popup selector, as expected.
    On a Portal page, I have the Custom Search Portlet that searches another page that contains the custom item type.
    On the Custom Search Portlet, I can add the NAICS Code as an additional attribute, but the search field is a plain text box and NOT a pick list of any kind.
    Can I configure the Custom Search Portlet to use associated LOVs with filter by attributes?

    I'm afraid that in the version of portal you are using we don't render LOVs for LOV attributes on the search portlet.
    In 10.1.2 attributes are added to the search form using a More Attributes button which simply render an empty row for the attribute details to be filled in.
    In 10.1.4 this was improved considerably. Now attributes are added to the search form like they are added in the edit defaults, with a Choose Attributes link which opens a popup to select the attributes. On closing the popup the search form is re-rendered and any LOV attributes will be rendered with a combo box of available values to select from.

  • How can I dynamically assign prompt and URI to a button in a table?

    I've got a VO returning document name, link and a status flag. My resultsTable for this VO is currently displaying 3 fields: 2 messageStyledText fields for the document name and link text, and a switcher that shows a checkbox image or red X image depending on the value.
    I now want to put a button into this results table that a user can click to launch a subsequent page where they can fill out those related docs. To do this, I'd like to make the prompt of this button = VO.documentName, the Desitination URI of this button = VO.linkText, and then leave the switcher as is. The result might look somethign like this:
    <Form 838C> X
    <Form 1952> \/
    <Form 1234> X
    In this case, Form 1952 ahs been filled out, the others not. Users should be able to click one of the buttons to launch a subsequent page where they can fill the form.
    I found code to walk through a VO results set using an iterator, you'll see that below. Now, stubbed in these 3 steps below:
    --set button dest
    --set button label
    --determine loop end
    I can't see how to do this. I already have the table, so can I walk through the results set and access the results table at the same time?
    I need to be able to set each of the buttons to the right Label (Prompt) and then set each button to the appropriate destination. Here's what I have so far: Thanks in advance!
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    * Initializes the detail employee query.
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject summaryVO = (OAViewObject)am.findViewObject("LANLSupplDocsSummaryVO1");
    if (summaryVO != null)
    // Do not reinitialize the VO unless needed.
    String stringReqHeaderId = pageContext.getParameter("REQ_ID");
    Number defaultReqHeaderId = null;
    try
    defaultReqHeaderId = new Number(stringReqHeaderId);
    catch(Exception e)
    // throw new OAException("AK", "FWK_TBX_INVALID_EMP_NUMBER");
    throw new OAException("ICX", "XXXL_INVALID_NUMBER");
    summaryVO.setWhereClauseParams(null);
    summaryVO.setWhereClauseParam(0,defaultReqHeaderId);
    summaryVO.executeQuery();
    // This controller is associated with the table.
    OATableBean table = (OATableBean)webBean;
    // We need to format the Switcher image column so the image is centered
    // (this isn't done automatically for Switchers as it is for
    // plain image columns). We start by getting the table's
    // column formats.
    // NOTE!!! You must call the prepareForRendering() method on the table before
    // formatting columns. Furthermore, this call must be sequenced after the
    // table is queried, and after you do any control bar manipulation.
    table.prepareForRendering(pageContext);
    DataObjectList columnFormats = table.getColumnFormats();
    DictionaryData columnFormat = null;
    int childIndex = pageContext.findChildIndex(table, "DOC_STATUS");
    // int buttonIndex = pageContext.findChildIndex(table, "DOC_STATUS");
    // int meaningIndex = pageContext.findChildIndex(table, "MEANING");
    columnFormat =(DictionaryData)columnFormats.getItem(childIndex);
    columnFormat.put(COLUMN_DATA_FORMAT_KEY, ICON_BUTTON_FORMAT);
    LANLSupplDocsSummaryVORowImpl row = null;
    // This tells us the number of rows that have been fetched in the
    // row set, and will not pull additional rows in like some of the
    // other "get count" methods.
    int fetchedRowCount = vo.getFetchedRowCount();
    // We use a separate iterator -- even though we could step through the
    // rows without it -- because we don't want to affect row currency.
    RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");
    if (fetchedRowCount > 0)
    deleteIter.setRangeStart(0);
    deleteIter.setRangeSize(fetchedRowCount);
    for (int i = 0; i < fetchedRowCount; i++)
    row = (LANLSupplDocsSummaryVORowImpl)deleteIter.getRowAtRangeIndex(i);
    // For performance reasons, we generate ViewRowImpls for all
    // View Objects. When we need to obtain an attribute value,
    // we use the named accessors instead of a generic String lookup.
    // Number primaryKey = (Number)row.getAttribute("EmployeeId");
    String formPage = row.getMeaning();
    --set button dest
    --set button label
    --determine loop end
    break; // only one possible selected row in this case
    // Always close the iterator when you're done.
    deleteIter.closeRowSetIterator();
    }

    Thanks Guaravv,
    I'm unable to get this to compile. Here's the errors I'm getting, followed by my controller code. Thanks again!
    Project: LANLSupplementalDocs.jpr
    C:\oracle\jDeveloper\jdevhome\jdev\myprojects\lanl\oracle\apps\icx\por\req\webui\LANLSupplementalDocsSummaryCO.java
    Error(16,46): cannot access class oracle.apps.fnd.framework.webui.beans.OAButtonBean; file oracle\apps\fnd\framework\webui\beans\OAButtonBean.class not found
    Error(124,9): class OAButtonBean not found in class lanl.oracle.apps.icx.por.req.webui.LANLSupplementalDocsSummaryCO
    Error(124,26): class OAButtonBean not found in class lanl.oracle.apps.icx.por.req.webui.LANLSupplementalDocsSummaryCO
    Error(125,9): class OADataBoundValueViewObject not found in class lanl.oracle.apps.icx.por.req.webui.LANLSupplementalDocsSummaryCO
    Error(125,47): class OADataBoundValueViewObject not found in class lanl.oracle.apps.icx.por.req.webui.LANLSupplementalDocsSummaryCO
    Controller:
    /*===========================================================================+
    | Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA |
    | All rights reserved. |
    +===========================================================================+
    | HISTORY |
    +===========================================================================*/
    package lanl.oracle.apps.icx.por.req.webui;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.cabo.ui.data.DictionaryData;
    import oracle.cabo.ui.data.DataObjectList;
    import oracle.apps.fnd.framework.webui.beans.table.OATableBean;
    import oracle.apps.fnd.framework.webui.beans.OAButtonBean;
    import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.OAException;
    import oracle.jbo.domain.Number;
    import oracle.apps.fnd.framework.OAApplicationModule;
    //import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
    //import oracle.apps.fnd.framework.webui.beans.layout.OASpacerBean;
    //import oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean;
    * Controller for ...
    public class LANLSupplementalDocsSummaryCO extends OAControllerImpl
    public static final String RCS_ID="$Header$";
    public static final boolean RCS_ID_RECORDED =
    VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
    * Layout and page setup logic for a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    * Initializes the detail employee query.
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject summaryVO = (OAViewObject)am.findViewObject("LANLSupplDocsSummaryVO1");
    if (summaryVO != null)
    // Do not reinitialize the VO unless needed.
    String stringReqHeaderId = pageContext.getParameter("REQ_ID");
    Number defaultReqHeaderId = null;
    try
    defaultReqHeaderId = new Number(stringReqHeaderId);
    catch(Exception e)
    // throw new OAException("AK", "FWK_TBX_INVALID_EMP_NUMBER");
    throw new OAException("ICX", "XXXL_INVALID_NUMBER");
    summaryVO.setWhereClauseParams(null);
    summaryVO.setWhereClauseParam(0,defaultReqHeaderId);
    summaryVO.executeQuery();
    // This controller is associated with the table.
    OATableBean table = (OATableBean)webBean;
    // We need to format the Switcher image column so the image is centered
    // (this isn't done automatically for Switchers as it is for
    // plain image columns). We start by getting the table's
    // column formats.
    // NOTE!!! You must call the prepareForRendering() method on the table before
    // formatting columns. Furthermore, this call must be sequenced after the
    // table is queried, and after you do any control bar manipulation.
    table.prepareForRendering(pageContext);
    DataObjectList columnFormats = table.getColumnFormats();
    DictionaryData columnFormat = null;
    int childIndex = pageContext.findChildIndex(table, "DOC_STATUS");
    // int buttonIndex = pageContext.findChildIndex(table, "DOC_STATUS");
    // int meaningIndex = pageContext.findChildIndex(table, "MEANING");
    columnFormat =(DictionaryData)columnFormats.getItem(childIndex);
    columnFormat.put(COLUMN_DATA_FORMAT_KEY, ICON_BUTTON_FORMAT);
    // LANLSupplDocsSummaryVORowImpl row = null;
    // This tells us the number of rows that have been fetched in the
    // row set, and will not pull additional rows in like some of the
    // other "get count" methods.
    int fetchedRowCount = summaryVO.getFetchedRowCount();
    // We use a separate iterator -- even though we could step through the
    // rows without it -- because we don't want to affect row currency.
    // RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");
    if (fetchedRowCount > 0)
    for (int i = 0; i < fetchedRowCount; i++)
    OATableBean tableBean = (OATableBean)webBean.findChildRecursive("ResultsTable");
    OAButtonBean m= (OAButtonBean)tableBean.findChildRecursive("DocLauncher");
    OADataBoundValueViewObject tip1 = new OADataBoundValueViewObject(m, "MEANING");
    m.setAttributeValue(oracle.cabo.ui.UIConstants.DESTINATION_ATTR, tip1);
    else
    throw new OAException("ICX", "XXXL_BC");
    }

  • Is there a way to keep the checkmark or initials (Sign toolbar) active so that I can check a whole list of items without going back and forth to the button?

    Is there a way to keep the checkmark or initials (Sign toolbar) active so that I can check a whole list of items without going back and forth to the button?

    There is another way to "popup" the screen. Mute and then
    unmute the cellphone.
    Sheng-Chieh

  • How to use ActionListener and ItemListener in the same class

    Why can't I use both ActionListener and ItemListener in the same Class?
    I want to use a drop down list and an entry box on the same form.
    How? I'm having trouble compling......
    Thanks!
    CODE:
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Disp extends Applet implements ActionListener, ItemListener
    { TextField entry=new TextField(7);
    Button Enter=new Button("Enter");
    public void init()
    add(entry);
    add(Enter);
    entry.addActionListener(this);
    entry.requestFocus();
    Enter.addActionListener(this);
    public void actionPerformed(ActionEvent thisEvent)
    String answer=entry.getText();

    Simply get your Applet to implement both ActionListener and ItemListener.
    public class MyApplet extends Applet implements ActionListener, ItemListener
      public void init()
        itemWidget.addItemListener(this):
        actionWidget.addActionListener(this);
      public void actionPerformed(ActionEvent e)
        System.out.println("ACTION PERFORMED!");
      public void itemStateChanged(ItemEvent e)
        System.out.println("ITEM STATE CHANGED!");
    }Hope this helps.

  • I use Jgraballgifts on facebook and since I updated foxfire a popup comes up and I can't get rid of it and so jgraballgifts is useless right now

    I don't know what other info you need as that explains what happens

    It's all very easy,just go to the Help in the top left of Mozilla and select Trouble Shooting Information and then select Reset Firefox.When it has finished and restarted I went to Tools/Options/Advanced/Updates and selected the Check for updates but let me choose button.This will save all your Info to your computer as as file and will reset Firefox with no popup rubbish.No need for all malware checks and deleting Firefox

  • Need to add row and set attribute value on pageload

    Guys,
    On my page based on the pageflowscope variable value, i need to add a row for master and one row for detail viewobject and set attribute values. (Some of the attribute are LOV and Checkboxes as well)
    I am using following code to create records.....records are being added but i am not able to set the attributes
    OperationBinding ob;
    ob = ADFUtil.findOperationBinding("Create");
    ob.execute();
    ob = ADFUtil.findOperationBinding("CreateInsert3");
    ob.execute();
    I am using following code to set the attributes value
    DCIteratorBinding dc1 = ADFUtil.getBindingIterator("firstiterator");
    DCIteratorBinding dc = ADFUtil.getBindingIterator("seconditerator");
    row1=dc1.getCurrentRow();
    row=dc.getCurrentRow();
    row.setAttribute("activest","A");
    row1.setAttribute("type","dc14");
    Anything i am doing wrong here or any suggestion to try is greatly appreciated....

    Vinod,
    Yes commit button is there and yes its also has entry in pagedef...
    When I open the same page on edit mode and i can edit regular record and save them
    Problem is that when i open the page on new mode and try to add rows on page load..... and setting values as described above.... save button somehow doesn't work...
    seems like after i add the rows on the fly, i need to refresh the binding?
    any help is greatly appreciated....
    thank you guys

  • JTextPane (reading char and its attributes)

    Hellow,
    I am trying to write a simple editor, where a person could write his text (in different size and color etc.) and than i need to turn this text to html code.
    So the way that i determen the shape of the text in JTextPane is:
    StyleConstants.setBold(set, false);
    *               pane.setCharacterAttributes(set, false);*
    And now i have to you trought the document and read the chars and its asstributes.
    And the way that i go trought the doc is by using the caret: moveCaretPosition(x);
    Reading the char: char c=pane.getText(pane.getCaretPosition(),1).charAt(0);
    But the problem now is... by moving the caret (dot) the mark stays in its place, so when I try to read the attribues(*AttributeSet crka;crka=pane.getCharacterAttributes();*), i read them for all the chars selected so far (0->x).
    How do i move this oround, so that only one char is read and its attributes?
    Edited by: Defero on Jul 19, 2008 3:09 AM

    Sorry for that,
    Yeah but it still doesnt work right.
    Example:
    Text in pane:
    AB C DEFGH... (ignore spacers)
    And then if i read the number of attributes on each char, they go like this:
    00111111...
    Just in case, i post my code of setting the arguments:
    JButton gumb=new JButton("bold");
            gumb.addActionListener((
                     new ActionListener() {
                         public void actionPerformed(ActionEvent e) {
                              if(bold==false){     
                            StyleConstants.setBold(set, true);
                           pane.setCharacterAttributes(set, true);
                           pane.requestFocus();
                          bold=true;
                              }else {
                                   StyleConstants.setBold(set, false);
                                   pane.setCharacterAttributes(set, false);
                                   bold=false;
                                   pane.requestFocus();
                 ));And reading should go like this right?:
    StyledDocument ddoc=pane.getStyledDocument();
    for(int i=0;i<ddoc.getLength();i++){
    int x=ddoc.getCharacterElement(i).getAttributes().getAttributeCount();
    }Edited by: Defero on Jul 19, 2008 10:12 PM
    Edited by: Defero on Jul 19, 2008 10:12 PM

  • 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.

  • ActionListener and Inner Class Issue

    When I add ".addActionListener()" to buttons and create an inner class to listen/handle the action, my main class does not display the GUI. If I remove the ".addActionListener()" from the buttons and the inner class, the GUI displays. Below is my code. Anyone know what is wrong with my code?
    package projects.web;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class AppletGUI{
         // JButtons
         JButton addButton = new JButton("Add");
         JButton removeButton = new JButton("Remove");
         JButton saveButton = new JButton("Save");
         JButton cancelButton = new JButton("Cancel");
         // JPanels
         JPanel containerPanel = new JPanel();
         JPanel optionsPanel = new JPanel();
         JPanel thumbnailPanel = new JPanel();
         JPanel selectionPanel = new JPanel();
         // JScrollPane
         JScrollPane thumbnailScroll;
         public AppletGUI(JRootPane topContainer){
              // Add actionListener
              addButton.addActionListener(new ButtonHandler());
              removeButton.addActionListener(new ButtonHandler());
              saveButton.addActionListener(new ButtonHandler());
              cancelButton.addActionListener(new ButtonHandler());
              // Set border layout
              containerPanel.setLayout(new BorderLayout());
              // Add buttons to target panels
              optionsPanel.add(addButton);
              optionsPanel.add(removeButton);
              selectionPanel.add(saveButton);
              selectionPanel.add(cancelButton);
              // Set size and color of thumbnail panel
              thumbnailPanel.setPreferredSize(new Dimension (600,500));
              thumbnailPanel.setBackground(Color.white);
              thumbnailPanel.setBorder(new LineBorder(Color.black));
              // Add thumbnail panel to scrollpane
              thumbnailScroll = new JScrollPane(thumbnailPanel);
              // Set background color of scrollPane
              thumbnailScroll.setBackground(Color.white);
              // Add subpanels to containerPanel
              containerPanel.add(optionsPanel, BorderLayout.NORTH);
              containerPanel.add(thumbnailScroll, BorderLayout.CENTER);
              containerPanel.add(selectionPanel, BorderLayout.SOUTH);
              // Add containerPanel to rootPane's contentPane
              topContainer.getContentPane().add(containerPanel);
         } // end constructor
         class ButtonHandler implements ActionListener{
              public void actionPerformed(ActionEvent event){
                   new FileBrowser();
              } // end actionPerformed method
         } // end inner class ActionHandler
    } // end AppletGUI class package projects.web;
    import java.awt.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    public class FileBrowser{
         JFileChooser fileChooser = new JFileChooser();
         public FileBrowser(){
              int fileChooserOption = fileChooser.showOpenDialog(null);
         } // end constructor
    } // end class fileBrowser

    Encephalopathic wrote:
    Dan: When it doesn't display, what happens? Do you see any error messages? Also, please take a look at your other thread in this same forum as it has relevance to our conversations in the java-forums.org about whether to add GUIs to root containers or the other way around. /PeteI fiddled with the code some more and it seems that the problem is the inner code. When I changed from the inner class to the main class implementing ActionListener and had the main class implement the actionPerformed method, the GUI displayed and JFileChooser worked as well. I've add this version of the code at the bottom of this message.
    To answer your question: When it doesn't display, what happens? -- The web page loads and is blank. And there are no error messages.
    I took a look at the other thread is this forum (the one relates to our conversation in the other forum); the problem may be the way I've add the GUI. I'll try it the other way and see what happens.
    Thanks,
    Dan
    package projects.web;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class AppletGUI implements ActionListener{
         // JButtons
         JButton addButton = new JButton("Add");
         JButton removeButton = new JButton("Remove");
         JButton saveButton = new JButton("Save");
         JButton cancelButton = new JButton("Cancel");
         // JPanels
         JPanel containerPanel = new JPanel();
         JPanel optionsPanel = new JPanel();
         JPanel thumbnailPanel = new JPanel();
         JPanel selectionPanel = new JPanel();
         // JScrollPane
         JScrollPane thumbnailScroll;
         public AppletGUI(JRootPane topContainer){
              // Add actionListener
              addButton.addActionListener(this);
              removeButton.addActionListener(new ButtonHandler());
              saveButton.addActionListener(new ButtonHandler());
              cancelButton.addActionListener(new ButtonHandler());
              // Set border layout
              containerPanel.setLayout(new BorderLayout());
              // Add buttons to target panels
              optionsPanel.add(addButton);
              optionsPanel.add(removeButton);
              selectionPanel.add(saveButton);
              selectionPanel.add(cancelButton);
              // Set size and color of thumbnail panel
              thumbnailPanel.setPreferredSize(new Dimension (600,500));
              thumbnailPanel.setBackground(Color.white);
              thumbnailPanel.setBorder(new LineBorder(Color.black));
              // Add thumbnail panel to scrollpane
              thumbnailScroll = new JScrollPane(thumbnailPanel);
              // Set background color of scrollPane
              thumbnailScroll.setBackground(Color.white);
              // Add subpanels to containerPanel
              containerPanel.add(optionsPanel, BorderLayout.NORTH);
              containerPanel.add(thumbnailScroll, BorderLayout.CENTER);
              containerPanel.add(selectionPanel, BorderLayout.SOUTH);
              // Add containerPanel to rootPane's contentPane
              topContainer.getContentPane().add(containerPanel);
         } // end constructor
         public void actionPerformed(ActionEvent event){
                   new FileBrowser();
              } // end actionPerformed method
         class ButtonHandler implements ActionListener{
              public void actionPerformed(ActionEvent event){
                   new FileBrowser();
              } // end actionPerformed method
         } // end inner class ActionHandler
    } // end AppletGUI class

  • Close button in popup

    hi,
    how can i add button in popup window to close it? and i also want to display the value of element mapped to that window. i am new to web dynpro.
    thanx...

    Hi,
    If you want a popup to have options save or exit then
    you need to have two event handlers
    1) Create two event handlers Ok,close. Under methods tap select eventhandler radio button.
    2)In action button you write the following code
    IWDControllerInfo cntrl_info = wdControllerAPI.getViewInfo().getViewController();
    IWDConfirmationDialog confirm = wdComponentAPI.getWindowManager().createConfirmationWindow("You are going to Exit, Want to Proceed?", cntrl_info.findInEventHandlers("cancel"),"Cancel");
    confirm.addChoice(cntrl_info.findInEventHandlers"ok"),"Confirm");
    confirm.setWindowSize(250,100); confirm.setWindowPosition(100,100);
    confirm.show();
    3) In "ok" method in implementation you write your code to save
    --appreciate needfull answer with points before closing the thread
    Regards
    Raghu

  • 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

Maybe you are looking for

  • Is there a calendar app that will sync HTC one, android Samsuhg tablet and a PC?

    Looking for a calendar app that will sync an HTC one M8, a Samsung android Tablet and a desktop PC? If I put an event in one it will find it in the other?

  • File not found during installation (WinXP)

    Well, I downloaded Oracle 11g for Windows (32 bit) from http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html, and, basically, after having had some trouble configuring a new database, I selected the option to (simply) in

  • Will Apple help me with this issue?

    Dear Sir or Madam, I am a student in China, I really need your help, my iphone now problems bothers me! HELP ME PLEASE!!! As I bought my iPhone 4s(16GB,White) in the USA from Sprint, full price with tax,  unlocked ,it was excepted to be a global phon

  • How to migrate Oracle 9i(32 bit) to oracle 10g(64 bit) DB with ASM

    How to migrate Oracle 9i(32 bit) to oracle 10g(64 bit) DB with ASM on SAME platform RHEL4.0 Scenario My case: 1) DB size 400G. 2) Minimum downtime. 3) oracle 9i(9.2.0.4) source DB. 4) oracle 10g(10.2.0.3) target DB with ASM. 5) Source DB (HOST A) and

  • How to change color of cl_gui_alv_grid - cell ?

    Hi, i´m using cl_gui_alv_grid to display a table. In the table are colored cells.   gs_layout-ctab_fname = 'COLINFO'.       clear lcl_color.       lcl_color-fname = 'DELIV_DATE_AB'.       lcl_color-color-col = cl_gui_resources=>list_col_negative.