Using jide in eclipse

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Using jide in eclipse

Postby Kushi » Thu Sep 26, 2013 11:31 am

Hi,

Am new to JIDE and am struggling from long time how to run a sample program in eclipse.. I downloaded jars(jide-common,jide-jdaf,jlfgr-1_0) from http://erp.adeptivsolutions.com/java/ and added them to Build Path...

Itried running the following program..
Code: Select all
public class HelloGUIWorld {

    public static void main(String[] args) {
        GUIApplication application = new GUIApplication("HelloGUIWorld");
        application.addDataModelFactory(new BasicDataModelFactory(MyModel.class));
        application.addDataViewFactory(new BasicDataViewFactory(MyView.class));
        application.run(args);
    }

    public static class MyData extends BasicDataModel {
      public void newData() {
         setData("Hello World!");
      }
    }

    public static class MyView extends DataViewPane {
        JLabel label;
        protected void initializeComponents() {
            label = new JLabel();
            label.setFont(new Font("serif", Font.PLAIN, 24));
            add(label, BorderLayout.CENTER);
        }
       
        public void updateView(DataModel dataModel) throws DataModelException {
            label.setText((String)((MyModel) dataModel).getData());
        }
    }
   
    public class MyModel extends BasicDataModel {
       public void newData() {
          setData("Hello World!");
       }
    }
}


And am getting Exception,kindly find the snapshot of it..
Sep 26, 2013 11:47:49 PM com.jidesoft.app.framework.DesktopApplication logError
SEVERE: JDAF: Error in NewAction.
com.jidesoft.app.framework.DataModelException: Unable to create DataModel for criteria: null
at com.jidesoft.app.framework.DesktopApplication.newData(Unknown Source)
at com.jidesoft.app.framework.gui.GUIApplication.newData(Unknown Source)
at com.jidesoft.app.framework.gui.actions.NewAction.introduceData(Unknown Source)
at com.jidesoft.app.framework.gui.actions.DataAction.actionPerformedDetached(Unknown Source)
at com.jidesoft.app.framework.gui.GUIApplicationAction.actionPerformedDetatched(Unknown Source)
at com.jidesoft.app.framework.gui.GUIApplicationAction$0$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

P.S
The code i followed is from http://www.jidesoft.com/jdaf/tutorial.htm except that I modified
Code: Select all
 public void updateView(DataModel dataModel) throws DataModelException {
            label.setText((String)((MyModel) dataModel).getData());
        }
Kushi
 
Posts: 5
Joined: Thu Sep 26, 2013 11:06 am

Re: Using jide in eclipse

Postby JIDE Support » Thu Sep 26, 2013 12:23 pm

It will work if you change the MyModel to a static inner class. We caught InstantiationException but didn't rethrow it. Otherwise it will be easier for you to figure out what's wrong.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Using jide in eclipse

Postby Kushi » Thu Sep 26, 2013 9:46 pm

Thanks a lot.. It solved by problem... Btwn 1 more query.. When I try to view the source code of a class e.g. BasicDataModel using class file editor in eclipse.. I get the error as "The source attachment does not contain source for the file BasicDataModel "..Could please guide me where can I find the zip file to add it as the source?
Kushi
 
Posts: 5
Joined: Thu Sep 26, 2013 11:06 am

Re: Using jide in eclipse

Postby JIDE Support » Thu Sep 26, 2013 9:52 pm

The source code access is not available for developer licenses. You will have to purchase the source code license if you want to access the source code. If you would like to purchase source code license, please contact sales@jidesoft.com directly. Thanks.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 8 guests