ADF Swing problem

Hi,
We have some ADF Swing projects converted into libraries.
and these Library files are going to be used in another project.(it's done already)
problem :
this is an event that is supposed to call a form from a library :
private void jButton1_actionPerformed(ActionEvent e) {
LocationListForm lf = new LocationListForm();
Lf.main(null);
"LocationListForm " has a JPanel named "locationListPanel1"
when the "Lf.main(null)" is called we have a problem with this line (in main method) :
locationListPanel1.bindNestedContainer(panelBinding.findNestedPanelBinding("view_LocationListPanelPageDef1"));
"panelBinding" is returned null and on the Bold line we get an exception.
public void bindNestedContainer(JUPanelBinding ctr) {
//Exception on this line
*if (panelBinding.getPanel() == null) {*
ctr.setPanel(this);
panelBinding.release(DCDataControl.REL_VIEW_REFS);
panelBinding = ctr;
registerProjectGlobalVariables(panelBinding.getBindingContext());
try {
jbInit();
} catch (Exception ex) {
ex.printStackTrace();
ctr.reportException(ex);
Please Advise,
Thank you

Hi,
We have some ADF Swing projects converted into libraries.
and these Library files are going to be used in another project.(it's done already)
problem :
this is an event that is supposed to call a form from a library :
private void jButton1_actionPerformed(ActionEvent e) {
LocationListForm lf = new LocationListForm();
Lf.main(null);
"LocationListForm " has a JPanel named "locationListPanel1"
when the "Lf.main(null)" is called we have a problem with this line (in main method) :
locationListPanel1.bindNestedContainer(panelBinding.findNestedPanelBinding("view_LocationListPanelPageDef1"));
"panelBinding" is returned null and on the Bold line we get an exception.
public void bindNestedContainer(JUPanelBinding ctr) {
//Exception on this line
*if (panelBinding.getPanel() == null) {*
ctr.setPanel(this);
panelBinding.release(DCDataControl.REL_VIEW_REFS);
panelBinding = ctr;
registerProjectGlobalVariables(panelBinding.getBindingContext());
try {
jbInit();
} catch (Exception ex) {
ex.printStackTrace();
ctr.reportException(ex);
Please Advise,
Thank you

Similar Messages

  • Anyone interested in adf swing problems

    adf 11g R1 swing problem
    I test the new JDEV 11g 11.1.1.1.0 releas Juli 01
    I'm using the JClient (Swing) with ADF (BC4J)
    and test a simple app
    JTable with Combobox don't work:
    im set the binding with edit binding in context for JTable
    the combobox has a static viewobject with ID and Text (ID 0,1 Text Yes No)
    The Table with combobox render OK
    but when Click the combobox i see no values in the Combobox
    in Previous Release 11.1.1.0.2 work the sample.
    It this a Bug in Classe from the bindig Definition file pageDef ????
    RTClass="oracle.jbo.uicli.jui.JULOVEditorPropDef"
    DTClass="oracle.adfdtinternal.model.ide.objects.jui.JUDTLOVEditorProp"
    Hello,
    this Bug is not fixed in 11.1.1.2.0
    why ????
    thank you in advance
    Michael
    Edited by: user4796211 on 21.07.2009 12:18
    Edited by: user4796211 on 22.07.2009 00:59
    Edited by: user4796211 on 24.07.2009 09:54
    Edited by: user4796211 on 27.07.2009 09:59
    Edited by: user4796211 on 16.11.2009 10:56

    Hi,
    I installed JDeveloper 11.1.1.3.0 and cracked the nut. The LOV driven ComboBoxes in JTables will remain empty after migrating to the new version, but it seems to be merely a bug in the migration. What you need to do in order to get the ComboBoxes working is the following:
    I found out that in your PageDefs you need to add two attributes to the <combobox> definitions:
    ControlClass="javax.swing.JComboBox" Editable="false"
    This makes the ComboBoxes look like in previous releases. If you skip the "Editable" attribute, the user can type in values, which does not really work in LOVs but in static lists.
    Unfortunately I experienced another bug in the 11.1.1.3.0 release concerning LOVs: When defining the LOV in the ViewDef, JDeveloper wouldn't let you specify any additional columns to be displayed in the LOV ("Display Attributes"). -> The workaround is much easier than I first thought: Just resize the dialog a little bigger and the selection fields that I first missed appear!
    In the moment it looks to me like I could continue development with JDeveloper 11.1.1.3.0.
    Mathias
    Edited by: user7585671 on 05.05.2010 06:26

  • Problem with "find" mode in adf/swing application

    Hi all,
    I'm working on ADF Swing application which uses MS SQL Server 2005 (JDeveloper 10g 10.1.3)
    I think that my issue might be well-known…sorry if it has been already discussed somewhere else…
    I have a problem with the “find” mode for a detail panel in a master-detail form…(To make it clear the “find” mode is switched on when clicking on the special button on a navigation panel).
    So this mode works well in a master panel, but it demonstrates strange behavior on a detail panel, i.e. it takes me two attempts to find the necessary child object and it doesn’t switch back in a simple way from this mode to the normal mode….say if we are in the department 10 (Dept is a master form) we can’t simply find KING employee (Emp is a detail form)…is there any workaround for this?
    Thanks in advance. Alex.

    Hi Frank, please look this issue

  • ADF/Swing/JClient application migration problem from 10.1.3.5 to 11.1.1.3

    Hi,
    I am migrating an application from JDev 10.1.3.5 to 11.1.1.3 in order to deploy it to a java 1.6 JVM which is only certified with JDev 11.1.1.3
    No matter what I do the DataBindings.cpx file content is emptied by the IDE, the migration was successful => no errors displayed.
    I tried to solve the problem by doing the following but the file stays empty:
    1) the removing the project from the application and adding it again, migration is done again => FILE EMPTY
    2) adding manually the content in the source file then running XML validation => no errors, I close the file, reopen it and EMPTY AGAIN!
    Your is needed and will be appreciated!
    Thanks
    Fred
    Content of file DataBindings.cpx:
    <?xml version='1.0' encoding='UTF-8' ?>
    <Application xmlns="http://xmlns.oracle.com/adfm/application" id="DataBindings"
    Package="" version="10.1.2.18.73" SeparateXMLFiles="false"
    ClientType="JClient">
    <pageMap/>
    <pageDefinitionUsages>
    <page id="PanelWeventEditParamVO1UIModel"
    path="com.xxx.view.web.PanelWeventEditParamVO1UIModel"/>
    <page id="TogglePanelPrintSizeDpiUIModel"
    path="com.xxx.view.lab.TogglePanelPrintSizeDpiUIModel"/>
    <page id="PanelPhotographerLabROfPhotolabVO1UIModel"
    path="com.xxx.view.web.PanelPhotographerLabROfPhotolabVO1UIModel"/>
    <page id="PanelWeventEditStatusVO1UIModel"
    path="com.xxx.view.web.PanelWeventEditStatusVO1UIModel"/>
    <page id="MDDPhotographerGalleryWelcomeUIModel"
    path="com.xxx.view.web.MDDPhotographerGalleryWelcomeUIModel"/>
    <page id="PanelTranslationCountryRegionLangTableVO1UIModel"
    path="com.xxx.view.system.PanelTranslationCountryRegionLangTableVO1UIModel"/>
    <page id="PanelDestGroupDestRTableVO1UIModel"
    path="com.xxx.view.system.PanelDestGroupDestRTableVO1UIModel"/>
    <page id="PanelWeventEditPackageVO1UIModel"
    path="com.xxx.view.web.PanelWeventEditPackageVO1UIModel"/>
    <page id="PanelSiteTariffPaymentTableVO1UIModel"
    path="com.xxx.view.system.PanelSiteTariffPaymentTableVO1UIModel"/>
    <page id="PanelPhotolabClobFreePage1L1VO1UIModel"
    path="com.xxx.view.web.PanelPhotolabClobFreePage1L1VO1UIModel"/>
    <page id="PhotoWebshopDesktopUIModel"
    path="com.xxx.view.start.PhotoWebshopDesktopUIModel"/>
    <page id="PanelItemGiftKitItemGiftTableVO1UIModel"
    path="com.xxx.view.lab.PanelItemGiftKitItemGiftTableVO1UIModel"/>
    <page id="TabbedFormUIModel"
    path="com.xxx.view.system.TabbedFormUIModel"/>
    <page id="PanelEntityPhotolabVO1UIModel"
    path="com.xxx.view.system.PanelEntityPhotolabVO1UIModel"/>
    <page id="PanelAddressVO1UIModel"
    path="com.xxx.view.web.PanelAddressVO1UIModel"/>
    <page id="SiteEventTypesAndTariffsFormUIModel"
    path="com.xxx.view.start.SiteEventTypesAndTariffsFormUIModel"/>
    <page id="PanelSiteVO1UIModel"
    path="com.xxx.view.system.PanelSiteVO1UIModel"/>
    <page id="PanelSiteBonusTypeVO1UIModel"
    path="com.xxx.view.system.PanelSiteBonusTypeVO1UIModel"/>
    <page id="PanelWeventAccountFileUploaderUIModel"
    path="com.xxx.view.web.PanelWeventAccountFileUploaderUIModel"/>
    <page id="PanelLabelWhereVO1UIModel"
    path="com.xxx.view.system.PanelLabelWhereVO1UIModel"/>
    <page id="PanelLabelWhatVO1UIModel"
    path="com.xxx.view.system.PanelLabelWhatVO1UIModel"/>
    <page id="PanelLabelWhoVO1UIModel"
    path="com.xxx.view.system.PanelLabelWhoVO1UIModel"/>
    </pageDefinitionUsages>
    <dataControlUsages>
    <BC4JDataControl Configuration="BaseTablesAMLocal"
    Package="com.xxx.model.system"
    xmlns="http://xmlns.oracle.com/adfm/datacontrol"
    id="BaseTablesAMDataControl"
    FactoryClass="oracle.adf.model.bc4j.DataControlFactoryImpl"
    syncMode="Immediate">
    <Parameters>
    <Parameter name="FactoryClass"
    value="oracle.adf.model.bc4j.DataControlFactoryImpl"/>
    <Parameter name="SupportsFindMode" value="true"/>
    <Parameter name="Configuration" value="BaseTablesAMLocal"/>
    <Parameter name="SupportsTransactions" value="true"/>
    <Parameter name="Package" value="com.xxx.model.system"/>
    <Parameter name="SubType" value="DCBC4J"/>
    <Parameter name="Name" value="BaseTablesAMDataControl"/>
    <Parameter name="id" value="BaseTablesAMDataControl"/>
    </Parameters>
    </BC4JDataControl>
    <BC4JDataControl Configuration="SiteTablesAMLocal"
    Package="com.xxx.model.system"
    xmlns="http://xmlns.oracle.com/adfm/datacontrol"
    id="SiteTablesAMDataControl"
    FactoryClass="oracle.adf.model.bc4j.DataControlFactoryImpl"
    syncMode="Immediate">
    <Parameters>
    <Parameter name="FactoryClass"
    value="oracle.adf.model.bc4j.DataControlFactoryImpl"/>
    <Parameter name="SupportsFindMode" value="true"/>
    <Parameter name="Configuration" value="SiteTablesAMLocal"/>
    <Parameter name="SupportsTransactions" value="true"/>
    <Parameter name="Package" value="com.xxx.model.system"/>
    <Parameter name="SubType" value="DCBC4J"/>
    <Parameter name="Name" value="SiteTablesAMDataControl"/>
    <Parameter name="id" value="SiteTablesAMDataControl"/>
    </Parameters>
    </BC4JDataControl>
    <BC4JDataControl Configuration="SystemViewAMLocal"
    Package="com.xxx.model.system"
    xmlns="http://xmlns.oracle.com/adfm/datacontrol"
    id="SystemViewAMDataControl"
    FactoryClass="oracle.adf.model.bc4j.DataControlFactoryImpl"
    syncMode="Immediate">
    <Parameters>
    <Parameter name="FactoryClass"
    value="oracle.adf.model.bc4j.DataControlFactoryImpl"/>
    <Parameter name="SupportsFindMode" value="true"/>
    <Parameter name="Configuration" value="SystemViewAMLocal"/>
    <Parameter name="SupportsTransactions" value="true"/>
    <Parameter name="Package" value="com.xxx.model.system"/>
    <Parameter name="SubType" value="DCBC4J"/>
    <Parameter name="Name" value="SystemViewAMDataControl"/>
    <Parameter name="id" value="SystemViewAMDataControl"/>
    </Parameters>
    </BC4JDataControl>
    <BC4JDataControl Configuration="PhotolabSetupAMLocal"
    Package="com.xxx.model.lab"
    xmlns="http://xmlns.oracle.com/adfm/datacontrol"
    id="PhotolabSetupAMDataControl"
    FactoryClass="oracle.adf.model.bc4j.DataControlFactoryImpl"
    syncMode="Immediate">
    <Parameters>
    <Parameter name="FactoryClass"
    value="oracle.adf.model.bc4j.DataControlFactoryImpl"/>
    <Parameter name="Configuration" value="PhotolabSetupAMLocal"/>
    <Parameter name="SupportsFindMode" value="true"/>
    <Parameter name="SupportsTransactions" value="true"/>
    <Parameter name="Name" value="PhotolabSetupAMDataControl"/>
    <Parameter name="SubType" value="DCBC4J"/>
    <Parameter name="Package" value="com.xxx.model.lab"/>
    <Parameter name="id" value="PhotolabSetupAMDataControl"/>
    </Parameters>
    </BC4JDataControl>
    <BC4JDataControl Configuration="PhotolabWebAMLocal"
    Package="com.xxx.model.web"
    xmlns="http://xmlns.oracle.com/adfm/datacontrol"
    id="PhotolabWebAMDataControl"
    FactoryClass="oracle.adf.model.bc4j.DataControlFactoryImpl"
    syncMode="Immediate">
    <Parameters>
    <Parameter name="FactoryClass"
    value="oracle.adf.model.bc4j.DataControlFactoryImpl"/>
    <Parameter name="Configuration" value="PhotolabWebAMLocal"/>
    <Parameter name="SupportsFindMode" value="true"/>
    <Parameter name="SupportsTransactions" value="true"/>
    <Parameter name="Name" value="PhotolabWebAMDataControl"/>
    <Parameter name="SubType" value="DCBC4J"/>
    <Parameter name="Package" value="com.xxx.model.web"/>
    <Parameter name="id" value="PhotolabWebAMDataControl"/>
    </Parameters>
    </BC4JDataControl>
    </dataControlUsages>
    </Application>

    Ok it seems I have resolved my problem see end of thread
    Still have following relevant question for an Oracle team member:
    Why is my <pageMap/> empty in my migrated application cpx file?
    => when I create a new ADF Swing application this tag is not empty:
    in new file:
    <pageMap>
    <page path="view.PanelPhotolabVO1" usageId="view_PanelPhotolabVO1PageDef"/>
    </pageMap>
    <pageDefinitionUsages>
    <page id="view_PanelPhotolabVO1PageDef"
    path="view.pageDefs.PanelPhotolabVO1PageDef"/>
    in migrated file:
    <pageMap/>
    <pageDefinitionUsages>
    <page id="PanelWeventEditParamVO1UIModel"
    path="com.photoswing.view.web.PanelWeventEditParamVO1UIModel"/>
    Solution to empty migrated cpx file:
    It seems the migration utility couldn't cope with the BC4JDataControl definitions, so I edited them manually.
    Example of 10.1.3... syntax:
    <dataControlUsages>
    <BC4JDataControl Configuration="BaseTablesAMLocal"
    Package="com.xxx.model.system"
    xmlns="http://xmlns.oracle.com/adfm/datacontrol"
    id="BaseTablesAMDataControl"
    FactoryClass="oracle.adf.model.bc4j.DataControlFactoryImpl"
    syncMode="Immediate">
    <Parameters>
    <Parameter name="FactoryClass"
    value="oracle.adf.model.bc4j.DataControlFactoryImpl"/>
    <Parameter name="SupportsFindMode" value="true"/>
    <Parameter name="Configuration" value="BaseTablesAMLocal"/>
    <Parameter name="SupportsTransactions" value="true"/>
    <Parameter name="Package" value="com.photoswing.model.system"/>
    <Parameter name="SubType" value="DCBC4J"/>
    <Parameter name="Name" value="BaseTablesAMDataControl"/>
    <Parameter name="id" value="BaseTablesAMDataControl"/>
    </Parameters>
    </BC4JDataControl>
    New syntax:
    <BC4JDataControl id="BaseTablesAMDataControl"
    Package="com.xxx.model.system"
    FactoryClass="oracle.adf.model.bc4j.DataControlFactoryImpl"
    SupportsTransactions="true" SupportsFindMode="true"
    SupportsRangesize="true" SupportsResetState="true"
    SupportsSortCollection="true"
    Configuration="BaseTablesAMLocal" syncMode="Immediate"
    ExceptionMode="Immediate"
    xmlns="http://xmlns.oracle.com/adfm/datacontrol"/>
    Tip:
    Do this editing outside JDev with ide closed to avoid crashing it.
    Regards
    Fred

  • Adf/swing binding problem

    Hi all,
    Friends i need your help.
    I was a bit confused as i started developing an adf/swing application. I know that this project is not supported any more but i honestly believe that there are a lot of people still using it.
    I've already faced with a number of problems and successfully solved them but the one is really strange.
    Before describing it let me ask one preliminary question. It’s very important for me, but if it is too much …. skip the first question since the second one is the most important.
    1. I’m creating a multiframe application where I have one main window (with a desktop pane) which does not include any bindings and is used for invoking internal frames only which in their turn have been created by dragging and dropping data controls.
    Since JDeveloper only allows generating skeletons for stand-alone frames and there is lack of information concerned with adf/swing developing I’m trying to fit the automatically generated code for my purpose by myself.
    I obsessively ask some GURU to check my strategy and say whether I’m doing it right.
    First I create the BindingContext object in the main frame:
    BindContext ctx = newBindingContext();
    public MainFrame() {…………      
    try {
    JUMetaObjectManager.setErrorHandler(new JUErrorHandlerDlg());
    JUMetaObjectManager mgr = JUMetaObjectManager.getJUMom();
    mgr.setJClientDefFactory(null);
    ctx.put(DataControlFactory.APP_PARAM_ENV_INFO, new JUEnvInfoProvider());
    ctx.setLocaleContext(new DefLocaleContext(null));
    HashMap map = new HashMap(4);
    map.put(DataControlFactory.APP_PARAMS_BINDING_CONTEXT, ctx);
    mgr.loadCpx("minit.org.view.DataBindings.cpx" , map);
    DCDataControl app = (DCDataControl)ctx.get("AppModule1DataControl");
    app.setClientApp(DCDataControl.JCLIENT);
    } catch (Exception ex) {
    JUMetaObjectManager.reportException(null, ex, true);
    System.exit(1);
    Then I pass the BindingContext object into the internal frames constructors, i.e.
    private void jMenuUnitVoc_actionPerformed(ActionEvent e) {
    this.getJMenuUnitVoc().setEnabled(false);
    FormCreateUnitView1 unitVoc = new FormCreateUnitView1 (ctx);
    unitVoc.setVisible (true);
    this.deskTopPane.add (unitVoc);
    Then I setup the panel binding for a particular JinternalFrame instance through the automatically generated setBindingContext() method:
    public FormCreateUnitView1(BindingContext ctx) {
    try {
    this.setBindingContext(ctx);
    } catch (Exception ex) {
    JUMetaObjectManager.reportException(null, ex, true);
    System.exit(1);
    This predefined setBindingContext () method looks like this:
    public void setBindingContext(BindingContext bindCtx) {
    if (panelBinding.getPanel() == null) {
    panelBinding = panelBinding.setup(bindCtx, this);
    registerProjectGlobalVariables(bindCtx);
    panelBinding.refreshControl();
    try {
    jbInit();
    panelBinding.refreshControl();
    } catch (Exception ex) {
    panelBinding.reportException(ex);
    panelBinding instance variable is declared by default as
    private JUPanelBinding panelBinding = new JUPanelBinding("FormCreateUnitView1PageDef");
    when the internal frame is getting closed the panel binding is released:
    public void doDefaultCloseAction() {
    _popupTransactionDialog();
    panelBinding.releaseDataControl(); statusBar.release();
    MainFrame myFrame = (MainFrame)this.getDesktopPane().getParent().getParent().getParent().getParent();
    myFrame.getJMenuUnitVoc().setEnabled(true);
    super.doDefaultCloseAction();
    Why I’m asking about this is because I met another syntax which is known to be commonly used:
    Something like this:
    this is the code I use to (re)create the panel,
    the setBindingContext method.
    public void setBindingContext(BindingContext bindCtx)
    String detail2BCName = "myName";
    if (bindCtx.get(detail2BCName) == null)
    DCBindingContainerDef bcdef = (DCBindingContainerDef) JUMetaObjectManager.getJUMom() .findLoadedObject("mypackage." + detail2BCName);
    DCBindingContainer bc = bcdef.createBindingContainer(bindCtx);
    bc.setName(detail2BCName);
    bindCtx.put(detail2BCName, bc);
    // ... then calls to jbInit etc.
    this is the code I use to release the binding when
    the window is closed
    getPanelBinding.release();
    getPanelBinding.getBindingContext().remove(superPanelBinding.getName());
    …but this syntax is badly documented, so I’m a bit confused about which is right… my code works pretty fine (all master and detail frames are synchronized and all that…) except for one issue I’m going to describe.
    I’m waiting for your opinions….please help make it clear.
    THE MAIN PROBLEM
    2. I’ve got a master/detail internal frame. When I make any changes in it and then commit them through a navigation bar I get the following exception as I try to close it later through the standard close icon:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
         at oracle.jbo.uicli.jui.JUSVUpdateableFocusAdapter.focusLost(JUSVUpdateableFocusAdapter.java:71)
         at java.awt.AWTEventMulticaster.focusLost(AWTEventMulticaster.java:172)
         at java.awt.Component.processFocusEvent(Component.java:5380)
         at java.awt.Component.processEvent(Component.java:5244)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:840)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:530)
         at java.awt.Component.dispatchEventImpl(Component.java:3841)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.SequencedEvent.dispatch(SequencedEvent.java:93)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    … few things
    -1. If I commit a transaction through the popup dialog the exception doesn’t emerge.
    -2. If I remove the “panelBinding.releaseDataControl(); statusBar.release();” from doDefaultCloseAction() method the exception doesn’t emerge but then I get another well-known exception as I try to reopen the internal frame.
    -3. If I debug doDefaultCloseAction() method step by step the exception doesn’t emerge.
    -4. Finally…. the exception doesn’t suspend the application it just goes on as if nothing has happened (the stack is only displayed on the console).
    I learned about one similar problem here:
    JClient Threading Bug in JUCtrlAttrsBinding?
    but the bug described has been fixed in ver 10.1.3.3.
    I'm using Jdeveloper 10.1.3.3
    So, please ...please…please help me overcome it.
    Best regards. Alex.
    Edited by: Timin on Mar 31, 2009 1:52 PM

    Sorry for being a bit annoying...
    But .... no one has answered my question yet......though you promised...
    Eventually I’ve somehow solved the trouble by replacing the “ panelBinding.releaseDataControl ” with
    “ panelBinding.release(DCDataControl.REL_VIEW_REFS)
    panelBinding.getBindingContext().remove(panelBinding.getName());”
    In the doDefaultCloseAction() method
    it seems like it works good now.
    I reconstructed a bit my code
    Now I’m invoking the internal frames this way:
    private void jMenuDeptVoc_actionPerformed(ActionEvent e) {
    FormCreateDeptView deptVoc = new FormCreateDeptView();
    this.getJMenuDeptVoc().setEnabled(false);
    deptVoc.setBindingContext(panelBinding.getBindingContext());
    this.deskTopPane.add(deptVoc);
    I looked through the following how to:
    http://www.oracle.com/technology/products/jdev/howtos/10g/jcmultiform/index.html
    there is an additional method there, which is invoked before creating a new frame where the binding container for the panel binding is created:
    private void createDetailBinding()
    String detailBCName = "DetailFormUIModel";
    if (panelBinding.getBindingContext().get(detailBCName) == null)
    DCBindingContainerDef bcdef = (DCBindingContainerDef)JUMetaObjectManager.getJUMom().findLoadedObject("sample.DetailFormUIModel");
    DCBindingContainer bc = bcdef.createBindingContainer(panelBinding.getBindingContext());
    bc.setName(detailBCName);
    panelBinding.getBindingContext().put(detailBCName, bc);
    But since createBindingContainer(BindingContext) method has been deprecated in 10.1.3 i skipped this step.
    Nevertheless my program is working now I still wonder if the way I’m doing it is right.
    Thanks. Alex.
    Edited by: Timin on Apr 2, 2009 8:28 AM

  • ADF Swing Deployment problem

    Hi,
    I have an ADF Swing project completed.
    I can run my application from Jdeveloper 10.1.3.3 successfully.
    Now we are ready to go to production.
    I want to generate a simple JAR file which can be called like - java -jar MyApp.jar
    To generate MyApp.jar:
    1) I have created a new group in the deployment profile file and specify to add the Manifest.
    2) I added all the jars found in my application log file (the logs when jdev run my app.).
    3) I Specify the full path to my MainForm.class
    4) I have added all my classes
    5) Finally I generated to JAR from jdeveloper
    6) I copied the MyApp.jar into the JDK\bin folder of my Jdeveloper (to avoid potential java version conflict)
    Problem: When I try to run my app from the JDK\bin folder with java -jar MyApp.jar, I got the error Exception in thread "main" java.lang.NoClassDefFoundError: .....
    My question is : Does anybody either successed in deploying an ADF Swing application using Jdeveloper. If yes, how?
    I have read dozen of articles from this forum, nobody seemed to successed deploying ADF Swing application.
    Thanks.
    houevoton.

    Gentlmen, thank very much.
    I have made a big progress.
    First, I have deploy a simple form based on Steve's scenario. It works fine. I learn from this the role of each type of File Group in a deployment profile.
    I also read and dowload the following show case http://verveja.footsteps.be/~verveja/files/oracle/JarStuffThread615655-v0.01.zip
    It works fine. I get how to include an external jar in my deployment file.
    However, I am still having a small problem with my generated JAR.
    In fact my workspace has 3 projects.
    1- AppUtils.jpr contains my utility classes (date utilities, system constants, etc.)
    2- Model.jpr contains BC entities, views objects and the AppModule.
    3- View.jpr where my forms and panels are.
    All those 3 projects are in the same workspace, which is slightly diffrent from the example of the show case above.
    I created a deployment profile and add two File Groups:
    - The first group is simple "Packaging" group and I check all utilities classes required in my application.
    - The second one is a "Dependency Analysis" group following process described by Steve.
    When I generate and run MyApp.jar, I get error [b]JBO-30003: The application pool (full.path.AppModuleLocal) failed to checkout an application.
    Since yesterday I was struggling with this. I am not able to understand why this message.
    My AppModule is well configured with credentials to connect to the target database. I tested it and it is ok.
    I can run the application from within Jdeveloper without trouble.
    Once again, I need your help.
    Thank in advance.
    houevoton.

  • Adf swing form login problem (Frank, look at this please)

    Hi All. I'm using JDeveloper 10.1.3
    Can anybody please give me a clue on how to create a simple stand alone adf swing form with a login dialog and the oracle jaas authentication?
    For me this kind af appllications works well only in design time :(. When i try to launch my generated .jar application the login dialog does appear but the authentication
    doesn't work "incorrect username or password".
    So i think i followed all the instructions from jDeveloper online help concerned with generating a login dialog... but my application still doesn't work properly after deployment.
    Please somebody look at what i've done and tell what is wrong.
    1. I created an adf swing form with a login dialog.
    2. I set the jbo.security.enforce property for my application module to Must.
    3. I added to my application a dialog for adding, removing and modifying application users via oracle.security.jazn api.
    4 I tested my appllication in Jdeveloper. It works great! I even added a number of application specific default users via my application.
    5. I assured myself that the oc4j security library has been added into the adf/swing project as well as into the deployment profile.
    6. I deployed my apllication to a .jar file.
    7. I created "config" folder inside the directory where the.jar file has been dropped. I copied there the following files: jazn.xml and system-jazn-data.xml (the last one file includes all my previously created principals) from /jdev_home/j2ee/home/config.
    8. Now when i start the application the login dialog appears as i've mentioned but authentication doesn't work.
    I found only one similar topic over the whole forum:
    http://kr.forums.oracle.com/forums/thread.jspa?threadID=665430
    but what i've done seems to meet all Frank's advices.....
    Oracle staff please dont ignore my post.
    Thanks in advance.
    Edited by: Timin on Jun 22, 2009 11:58 PM

    Hi, rob nice to learn that i'm not the only one stumbled over this issue.
    Hope that this question will be finally answered...
    ...just a few additional comments.
    1. It appears that the position of the jazn.xml and jazn-data.xml files pointed in the documentation (config subfolder of the root .jar's folder) is right for if i rename or delete the jazn.xml it runs into the error: jazn configuration file not found, but nevertheless it works strange, it looks like it doesn't use the mentioned files at all....given the fact the i've already spent a number of days experimenting and looking for a solution i learned that after a first startup the files mentioned above (jazn.xml and jazn-data.xml) are modified in some way that prevents using them on another oc4j server instance (if i have i.e. another jdeveloper instance, i cant run and go through authentication in my application by simply coping the old jazn.xml and system-jazn-data.xml files into the /jdev_home/j2ee/home/config
    folder...instead i need to copy a pure "initial" jazn.xml file from the initial jdeveloper archive) ... something like the thing mentioned here:
    http://radio.weblogs.com/0118231/stories/2007/05/08/jdeveloperadf11gTechnicalPreviewTipsAndTricks.html
    also i noticed that if there is no system-jazn-data.xml file in the config folder it is created automatically after a first startup...so when i tried to delete the system-jazn-data.xml file from my deployed application's folder it would't create a new one though it saw the jazn.xml file (since no "jazn configuration file not found" error had ever appeared)...i also tried to place "pure" copies of jazn configuration files in my config subfolder but of course it would give no effect.
    2. i also changed the login.module.provider as well as the auth.policy.provider properties in the java.security file as documentation sais - no effect.
    So it would be great if Frank gave us a direct link to the white paper he was working on (and i hope had finished :) few years ago....or even better gave me the simpliest example of a finished adf swing application with authentication implemented.
    [email protected]
    ps. we know it's really really time consuming answering all questions but considering the lack of documentation on adf swing technology i hope we can rely on your help here.
    thanks.

  • ADF Swing LOV problem

    Hi,
    I created an application using ADF Swing with JDeveloper version 10.1.3.2.0.4066.
    I made a form contains JTable and Edit Form which using some LOVs to insert or update data. Something weird happen when user insert data using LOV.
    Scenario:
    1. firstly, JTable contains some data, let say 5 records.
    2. User want to input some new data (the sixth record), then user push (+) button in JUNavigationBar, then one new record is added into JTable
    3. User want to edit the new record, then user push Edit button which will display Edit Form
    4. User push button which will display LOV to insert the correct record, after selecting a record from LOV then user push OK button from LOV form, then LOV form will be closed.
    5. User performing commit to permanently save data to database.
    now, the weird part:
    6. User want to input the second record, then user push (+) button in JUNavigationBar, then one new record (the seventh record) is added into JTable
    7. User want to edit the new record, then user push Edit button which will display Edit Form
    8. User push button which will display LOV to insert the correct record, after selecting a record from LOV then user push OK button from LOV form, hoping that LOV form will close but NOT. User need to push OK button twice to make the LOV Form closed.
    so that is the weird thing, if user input the third record (the eighth record), then user need to push OK button three times to make the LOV Form being closed, if user input 100 record then user need to push OK button 100 times to close LOV Form. Weird?
    but if user close the main form first, then display the form again and input the new record using LOV (the seventh record), the weird thing is not gonna happen.
    how I can solve this weird thing?
    thanks

    below is step by step creation of ADF Form and how the error happened and handled (using Oracle JDeveloper 10.1.3.3.0.4157) :
    1. create database connection using JDeveloper wizard.
    a. supply connection name: dbscott
    b. supply username: scott, password: tiger, deploy password is checked.
    c. Driver: thin, hostname, JDBC Port, and SID as installed
    d. test connection: sucess
    2. from JDeveloper, open Application Navigator and then create new application:
    a. application name: ScottApp
    b. application path: default
    c. application package prefix: test.scott
    d. application template: [Swing, ADF BC]
    e. OK button pushed
    3. now, configuring Oracle Business Component:
    a. from Model project, right click and select New
    b. select ADF business component from business tier and select Business Components from tables on the right pane
    c. click OK
    d. select dbscott on the connection option. SQL Flavor and Type MAp: default
    e. click OK
    f. with only object type table is selected, shuttle all table object into selected pane and specify package to test.scott.model.entities
    g. click next
    h. shuttle all object into selected pane and specify package to test.scott.model.queries
    i. click next twice
    j. specify application module: ScottModule
    k. click next and then finish
    4. now, creating ADF Form object
    a. on the View Project, right click and select New
    b. select ADF Swing on the client tier and empty form on the right pane
    c. click OK
    d. supply form name: EmpForm, generate menu bar and generate login dialog option is unselected
    e. click next and then finish
    f. then JDeveloper will display its excellent Swing Editor, select JUNavigationBar on the EmpForm and then delete
    g. click form EmpForm and on data Panel specify layout to FormLayout
    h. on the FormLayout popo up menu, specify rows to 8 and columns to 3, insert gap is selected, click OK of course.
    i. on the data control palette, drag and drop EmpView1 to the first rows and column, then on the Add Child menu select Navigation Bar
    j. select NavigationBar, on the blue point, drag to the third column. right click NavigationBar, select Column Properties menu and click grow. then OK
    k. on the component palette, select Swing Container, drag and drop JScrollPane to the second row and first column
    l. with JScrollPane selected, on the blue point drag JScrollPane so its covers second to seventh row and first to third column
    m. right click on JScrollPane, select Row Properties menu and select Grow. click OK then
    n. on the Data Controls palette, drag and drop EmpView1 to JScrollPane, on the Add Child menu select table.
    5. now, creating ADF Edit Form object:
    a. rigth click on the View Object, select New
    b. select ADF Swing on the client tier and select Empty Panel on the right pane.
    c. Panel name: EditEmpForm, other option default
    d. click next and finish
    e. then JDeveloper will display EditEmpForm editor
    f. on the Data Controls palette, drag and drop EmpView1 to EditEmpForm then select Add Edit Form
    g. then Select Contrl window will be displayed. Click new to add LOV for Deptno
    h. new attribute will be added on the bottom, change attribute to Deptno and its control to Button LOV. create label option for this attribute is unselected.
    i. click OK
    j. adjust width and height the new panel created by JDeveloper properly
    k. in the Application Navigator, double click PanelEmpView1Helper, supply text for Deptno LOV JButton.
    6. configuring Deptno LOV JButton:
    a. with LOV JButton is selected, select model in its property inspector, then model window will be displayed
    b. LOV Update Attribute Tab is active, in Lov (source) Data Collection Pane, select DeptView1 and click New buttion below to create new iterator, click OK to create new iterator for DeptView1.
    c. click add button to add LOV attributes
    d. select deptno in the LOV Attributes and select Deptno in the target attributes.
    c. select LOV Display Attributes, shuttle all attributes to the right pane.
    d. click OK to finish configuring LOV
    7. adding EditEmpForm to EmpForm:
    a. with Empform is active in the editor, from Application Navigator drag and drop EditEmpForm.java to the last row on the first column of EmpForm.
    b. Select Option window will be displayed, select Display Panel in JDialog and Invoke JDialog from Button option is selected
    c. then a JButton will be added to last row on the first colum of EmpForm. Adjust this button to be displayed properly
    Then the creation of ADF Form is complete. We're able to create this powerful form with NO CUSTOM PROGRAMMING AT ALL, it's all because of Oracle ADF. But wait... we will run this scenario to perform how the error happen.
    Assumption, a user want to perform edit and insert data on EmpForm. He will perform following task:
    a. Run EmpForm, then the form will be displayed at runtime.
    b. The user want to edit data first, so he select a row then click Edit button, then EditEmpForm will be displayed.
    c. user edit one or more data, displaying LOV to edit Deptno. at this time, he just need to push OK button at LOV Form once. After completing edit, user close EditEmpForm by clicking OK button, EditEmpForm will be closed.
    d. now, user want to insert new record, simply at EmpForm user click (+) button at navigation bar to create new record, user click Edit button to display EditEmpForm, the user filling new information and of course diplaying LOV to select Deptno, now user need to click OK button in LOV form TWICE to be able to close the LOV Form. The user then click OK button to close EditEmpForm and back to EmpForm.
    e. The user think that just intermittent error, now he want to update data again. So, he do perfectly the same step before but now he need to click OK button from LOV Form THREE TIMES to close LOV Form. The user then click OK button to close EditEmpForm and back to EmpForm.
    f. after thinking hardly why this happened to him, the user then performing commit transaction then close EmpForm and open again.
    g. now user perform update data again but this time he just need to click OK button from LOV form once.
    The above error will not happened if the user open EditEmpForm just once ! if he close and open again EditEmpForm then he need to click and click OK button from LOV Form as many as he open EditEmpForm.
    I don't know why this happen, if something not right from how I create the application which causing this error, please let me know.
    regards,
    wong jowo

  • Adf swing form problem

    i created two adf swing new empty forms.. and i'm triying to open form2 (form2
    have some components) with a click button from form1.
    i'm using this code on the event click button
    Form2 a = new Form2();
    a.setVisible(true); //or a.Show();
    after the click, the new form (a) appears without components and in a minimum
    size bar.

    It sounds like you have them displaying properly in a JFrame if you can get to the button from Form A and click the button. Your subject says "ADF Swing", so I assume you have bound your components that are on Form B. If that is the case, then you need to call setBindingContext() on Form B to get the ADF binding to execute. Here is a small sample assuming that you are using ADF Swing bindings and have also generated a Form with a binding context.
    // In the actionPerformed method of your button
      BindingContext ctx = panelBinding.getBindingContext();
      Form2 a = new Form2();
      a.setBindingContext(ctx);
      a.setVisible(true);
    ...Hope this helps.
    Erik

  • ADF Swing panel Issue

    Hi,
    I have requirement where i need to use 2 Panels in a form. I have used JPanel in ADF Swing like what we used Panel Box in ADF. When I am running the application, The data in the first panel is coming up where the second panel data is not showing. I am using J dev 11.1.1.3.
    Can you please help me in this regard.
    Regards,
    Kalyan.
    Edited by: Kalyan on Oct 7, 2010 5:33 AM

    As I understand you have 2 JPanels implemented as 2 separate Java classes and you invoke <tt>panel.setBindingContext(bctx)</tt> on each of them. This method binds the corresponding panel to its PageDef. If you use only one common PageDef instance then one of your panels will remain unbound. In order to resolve this problem you have to either combine your panels in a single JPanel or to provide a separate PageDef instance for each of them. You should either define a separate PageDef or you can try to duplicate PageDef's declaration in DataBindings.cpx (without duplicating the PageDef's XML file). If you choose the second one then open the <tt>DataBindings.cpx</tt> file and copy the corresponding line, for example:
    <pageDefinitionUsages>
      <page id="MyPanelPageDef"       path="view.myproject.pageDefs.MyPanelPageDef"/>
      <page id="MySecondPanelPageDef" path="view.myproject.pageDefs.MyPanelPageDef"/>
    </pageDefinitionUsages>In this way you will declare a new PageDef instance without duplicating the PageDef's file. Then go to the beginning of the 2nd panel's Java class and set the new PageDef ID into it, for example replace the line:
    private String pageDef = "MyPanelPageDef"; with private String pageDef = "MySecondPanelPageDef"; (Of course, these names are just sample ones and you should set the corrent ones).

  • Cann't launch the ADF Swing Project

    Hello,
    I have created java-application(swing,adf bc) in Jdev10.1.3, and created the Java Web Start(JNLP) files for the application ,run ant target: sign. it created all files ,build ok.
    but when I run the local.html in the Jdev1013, it open IE window, then I clicke the Launch JClient Link and it asks me to download the local.jsp file or open the file.
    If I download , the file "local.jsp.jnlp" would be saved, if I open, it display beblow:
    <?xml version="1.0" encoding="Big5" ?>
    - <jnlp spec="1.0" codebase="http://127.0.0.1:8991/TestJClient-View-context-root">
    - <information>
    <title>Title</title>
    <vendor>Vendor</vendor>
    <description>My ADF Swing Project</description>
    </information>
    - <security>
    <all-permissions />
    </security>
    - <resources>
    <j2se version="1.3+" />
    <jar href="client.jar" />
    <jar href="mymt.zip" />
    <extension name="common" href="localmt.jsp" />
    </resources>
    <application-desc main-class="test.view.test" />
    </jnlp>
    I review the local.jsp in Jdev1013, find some error "should not exist the element jnlp" about below:
    <?xml version="1.0" encoding="Big5"?>
    <jnlp spec="1.0" codebase="<%= buf.toString() %> ">
    Maybe that is jdev1013 bug.
    Anyone know the reason or how to deal with the error ?
    Thanks

    Hi,
    you are mixing releases here. You start with JClient in JDeveloper 10.1.2 and end up with ADF Swing in 10.1.3. Now what is the release you have the problem with. For 10.1.2 we have a whitepaper explaining how to use Java WebStart. We didn't upgrade this paper for 10.1.3, but I get Web Start deployment working when i tried it last time in JDeveloper 10.1.3.
    Note that no file should be downloaded to teh client and instead the JSP file should be executed to generate the JNLP file
    Frank

  • MYSQL error in JDeveloper 10g using ADF Swing

    I am trying to update data in mysql database. But the following error appears in JDeveloper 10g using ADF Swing
    Mysql library is mysql-connector-java-3.1.12
    What is the problem ? INSERT and SELECT queries do not give errors. But UPDATE has problem.
    Thank you in advance.
    Sony Kalkan
    (oracle.jbo.DMLException) JBO-26041: Failed to post data to database during "Update": SQL Statement "UPDATE banner Banner SET imptotal=? WHERE bid=?".
    ----- LEVEL 1: DETAIL 0 -----
    (java.sql.SQLException) You have an error in your SQL syntax near 'Banner SET imptotal=22 WHERE bid=1' at line 1

    After i put a jtable,navigator on the form using appmoduledatacontrol on the top-right side of the jdeveloper, i run the form. Everything goes ok listing rows of data. But the error appears when i change the value of a field on the table and updating it using navigator.
    Thank you very much.

  • ADF Swing - Default LOV Dialog

    Can anyone tell me if the ADF Swing "Default LOV Dialog" was improved in JDeveloper 10.1.3? Specifically, are the same major problems with it, as documented in Frank's article at [1], still present in 10.1.3? If so, do you know if an RFE has been filed to fix it?
    Thanks
    Erik
    [1] http://www.oracle.com/technology/products/jdev/howtos/10g/jclientlov/customadfjclientlovpanel.html

    Thanks Frank,
    What about Set Allow Search? That's one of the big ones that doesn't work in 10.1.2.
    What about the extensibility of the panel? Is MyLovPanel still an inner class of JULovButtonBinding?
    Thanks
    Erik

  • NullPointerException in ADF Swing bassed application

    Hello, i have an ADF Swing based application. In close window events of JFrames it executes the next code:
    frameInstance.panelBinding.releaseDataControl(); //1
    frameInstance.dispose(); //2
    frameInstance = null; //3
    Where frameInstance is a static reference to the current JFrame object and panelBinding is the reference to the JUPanelBinding autogenerated by the framework.
    When line number 2 is executed it throws a NullPointerException:
    Exception occurred during event dispatching:
    java.lang.NullPointerException
         at oracle.jbo.uicli.binding.JUCtrlAttrsBinding$mySetEnabledThread.run(JUCtrlAttrsBinding.java:48)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:141)
         at java.awt.Dialog$1.run(Dialog.java:540)
         at java.awt.Dialog.show(Dialog.java:561)
         at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:840)
         at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:642)
         at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:613)
         at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:584)
         at s.arcadeconsultores.impl.errors.AcErrorHandler.reportException(AcErrorHandler.java:164)
         at es.arcadeconsultores.arcges.view.FrmEscaladosPedidoCliente.visualizar(FrmEscaladosPedidoCliente.java:597)
    ...Somebody knows what is the problem?
    Thanks.

    Thanks for your help Frank. I've changed and invoque methods this way:
    getPanelBinding().releaseDataControl();
    dispose();
    Now, its works but when executes the _popupTransactionDialog() method (caused trying to exit whitout save changes, and then appears the "Commit Rollback Window") the Exception appears again. I've commented the panelBinding.releaseDataControl() line and the NullPointerException dissapear...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Deploying a BC4/ADF Swing Application to a JAR File

    Hello,
    what do I exactly have to do, to deploy an ADF/Swing/Business Components-
    Project-Application to a JAR File. I can not start it outside the JDevloper IDE,
    but I created a deployment profile and deployed it to a JAR.
    There is always the error "Could not find the main class", when starting the
    JAR. In the JDeveloper IDE the application is running, and I also defined a "main class" there.
    Could anybody help me please?
    Greetings.

    You need the ADF runtime libraries in your classpath or as part of your JAR.
    Have a look at the command that JDeveloper is using to run your project (it is in the log window) and copy the classpath defenition provided there to the command line you use.

Maybe you are looking for