Can anyone help me in join the 3 combo boxes with filters

The main idea is there are 3 combo boxes

when we select an item in the first combo box the related items should apper on the remaining 3 combo boxes

and when we select an item on the second combo box then the related item should appear on the last(third) combo box.

Do anyone has an idea please help me

Thanks,

What code do you have so far for your problem?

I am using the code as follows

At first I am displaying the List of items in the 3 comboboxes and then implementing the actionlisteners for 2 comboboxes inorder to load list of items at runtime the code is as follows

first I am usng actiolistener for the APPSET combobox inorder to get the selected items in the remainig 2 combo boxes the code is as follows and it is woring perfectly

// creating AppSet Label
private JLabel getAppSetLabel() {
		if (this.appSetLabel == null) {
			this.appSetLabel = new JLabel("App Set:");
		}
		return this.appSetLabel;
	}
	//Getting data into APPSet Combo Box
	private JComboBox getAppSetComboBox() {
		if (this.appSetComboBox == null) {
			this.appSetComboBox = new JComboBox();
			// Populate the App Set list
			this.appSetComboBox.addItem("All Application");
			ArrayList<String> anAppSetList = CBRCPMDailyT20AppManager.instance()
					.getAppSetList();
			for (int i = 0; i < anAppSetList.size(); i++) {
				this.appSetComboBox.addItem(anAppSetList.get(i));
			}			
			this.appSetComboBox.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent eventset) {
					appSetComboBox_actionPerformed(eventset);
				}
			});
		}
		return this.appSetComboBox;
}


//Implementing the action listener
	private void appSetComboBox_actionPerformed(ActionEvent eventset) {		
		String appSet = this.getAppSetComboBox().getSelectedItem().toString();		
		//String appSet = "AMADEUS_ABG";
		this.appSetComboBox.setSelectedItem(appSet);		
		this.getAppComboBox().removeAllItems();
		this.getPackageComboBox().removeAllItems();
		this.appComboBox.addItem("All Application");
		this.packageComboBox.addItem("All Application");
		ArrayList<String> anAppList CBRCPMDailyT20AppManager.instance()
				.getAppList(appSet);//replace by appSet
		for (int i = 0; i < anAppList.size(); i++) {
			this.appComboBox.addItem(anAppList.get(i));
		}
		ArrayList<String> anPackageList CBRCPMDailyT20AppManager.instance()
		.getPackageList(appSet);//replace by appSet
        for (int l = 0; l < anPackageList.size(); l++) {
	    this.packageComboBox.addItem(anPackageList.get(l));
       }
		this.appComboBox.setSelectedIndex(0);
		this.packageComboBox.setSelectedIndex(0);
	}

here I am removing all the items from the 2 combo boxes list before I adding the items at runtime so it is giving me the Null Pointer Exception error when I am adding the action Listener to the second combo box(APP) in order to display the related selected items in the third combo box(Package) at runtime by selecting an item in the APP combo box

When I comment this statement

this.getAppComboBox().removeAllItems();

the action lisener of APP combo box is working nd I am getting the data in Package combo box.

But the problem is the list of items are displaying many times because I am loading the App combo box for 2 times

for firs time normally

and second with actionlistener of AppSet at runtime


This is my problem, I think I had explained clearly,

Please give me an Idea to solve this

I will be very much thankful to you

Could you make a small program that compiles and executes and demonstrates the problem?

Exactly which line is giving the NPE? Is it in getAppComboBox() - where's that code?

It seems you did not understand the my problem

I will explain now clearly again in three points

1. I am adding 3 combo boxes to the toolbarpanel their names are APPSET, APP, PACKAGE.

and I am dispalying the List of items for all the combo boxes as normally .

2. I am adding action listener to the APPSET combo box and by this actionPerformed method I am at first removing the items from the 2 combo boxes(APP, PACKAGE) and adding the items at runtime.

Up to this my code is perfect there is no problem

3.Now I want to add another action listener to APP combo box and should add the items to the PACKAGE combo box again at runtime.

But when I add an action listener to the APP combo box it is giving Null Pointer Exception because I am removing All the items from Both the Combo boxes at Action Performed in APPSET


So this is the problem

can you please give any idea

Thanks

I understood what you said, so there was no need to say it again. I'm not stupid. But if you don't want to give me the additional info I asked for, that's OK. Good luck. I'm outta here. Bye bye. J

their names are APPSET, APP, PACKAGE

Are you sure you have posted the correct code. There are NO varibles with the names: APPSET, APP, PACKAGE in your code???

I am sorry,

It is not like that , don't think so

I gave answer for the first reply and not for the second one

I am giving the code now

The problem is exactly with the RemoveAll statement that I had placed in the APPSET ActionPerformed method

So is there any idea for placing this ReplaceAll command in another way inorder to delete the items form the APP combobox and not in the ActionPerformed method

Please help me I will be very thankful to you

private void appSetComboBox_actionPerformed(ActionEvent eventset) {		
		String appSet = this.getAppSetComboBox().getSelectedItem().toString();		
		//String appSet = "AMADEUS_ABG";
		this.appSetComboBox.setSelectedItem(appSet);		
		this.getAppComboBox().removeAllItems();


I am getting errir here can I place this anywhere but not here

Please suggest me an idea


		this.getPackageComboBox().removeAllItems();
		this.appComboBox.addItem("All Application");
		this.packageComboBox.addItem("All Package");
		ArrayList<String> anAppList = CBRCPMDailyT20AppManager.instance()
				.getAppList(appSet);//replace by appSet
		for (int i = 0; i < anAppList.size(); i++) {
			this.appComboBox.addItem(anAppList.get(i));
		}
		ArrayList<String> anPackageList = CBRCPMDailyT20AppManager.instance()
		.getPackageList(appSet);//replace by appSet
        for (int l = 0; l < anPackageList.size(); l++) {
	    this.packageComboBox.addItem(anPackageList.get(l));
       }
		this.appComboBox.setSelectedIndex(0);
		this.packageComboBox.setSelectedIndex(0);
	}

Thanks

Yes I had posted the correct code which is exactly working in my Eclipse

please suggest me an idea


Thank you very much

I think the problem is that your IDE has changed the names of the variables. There is no variable named: APP in what you posted.
It is important when posting code to use the same name as the variable in the program when talking about the code. Otherwise there is confusion.

Hello NormR1,

Thanks for your reply

Now again I am posting the code

the combo boxes are app, appSet, package

// creating AppSet Label
	private JLabel getAppSetLabel() {
		if (this.appSetLabel == null) {
			this.appSetLabel = new JLabel("App Set:");
		}
		return this.appSetLabel;
	}
	//Getting data into APPSet Combo Box
	private JComboBox getAppSetComboBox() {
		if (this.appSetComboBox == null) {
			this.appSetComboBox = new JComboBox();
			// Populate the App Set list
			this.appSetComboBox.addItem("All Application");
			ArrayList<String> anAppSetList = CBRCPMDailyT20AppManager.instance()
					.getAppSetList();
			for (int i = 0; i < anAppSetList.size(); i++) {
				this.appSetComboBox.addItem(anAppSetList.get(i));
			}			
			this.appSetComboBox.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent eventset) {
					appSetComboBox_actionPerformed(eventset);
				}
			});
			//this.getAppComboBox();
			//this.appSetComboBox.removeActionListener(appSetComboBox);
		}
		return this.appSetComboBox;
		
	}
	
	//Implementing the action listener
	private void appSetComboBox_actionPerformed(ActionEvent eventset) {		
		String appSet = this.getAppSetComboBox().getSelectedItem().toString();		
		//String appSet = "AMADEUS_ABG";
		this.appSetComboBox.setSelectedItem(appSet);		
		this.getAppComboBox().removeAllItems();
		this.getPackageComboBox().removeAllItems();
		this.appComboBox.addItem("All Application");
		this.packageComboBox.addItem("All Package");
		ArrayList<String> anAppList = CBRCPMDailyT20AppManager.instance()
				.getAppList(appSet);//replace by appSet
		for (int i = 0; i < anAppList.size(); i++) {
			this.appComboBox.addItem(anAppList.get(i));
		}
		ArrayList<String> anPackageList = CBRCPMDailyT20AppManager.instance()
		.getPackageList(appSet);//replace by appSet
        for (int l = 0; l < anPackageList.size(); l++) {
	    this.packageComboBox.addItem(anPackageList.get(l));
       }
		this.appComboBox.setSelectedIndex(0);
		this.packageComboBox.setSelectedIndex(0);
	    
	}
	
	

//creating App Label
	private JLabel getAppLabel() {
		if (this.appLabel == null) {
			this.appLabel = new JLabel("Application:");
		}
		return this.appLabel;
	}
	//bookingsCombo.removeActionListener(new BookingComboListener());
	//Getting data for App Combo Box
	public JComboBox getAppComboBox() {			
		if (this.appComboBox == null) {
			this.appComboBox = new JComboBox();
			// Populate the App list
			this.appComboBox.addItem("All Application");
			ArrayList<String> anAppList = CBRCPMDailyT20AppManager.instance()
					.getAppList();
			for (int j = 0; j < anAppList .size(); j++) {
				this.appComboBox.addItem(anAppList .get(j));
			}	
			 this.appSetComboBox.removeActionListener(appSetComboBox);
	 		 this.appComboBox.addActionListener(new ActionListener() {
				
				public void actionPerformed(ActionEvent eventpack) {
					appComboBox_actionPerformed(eventpack);
				}
			});
		}
		return this.appComboBox;
	}
	

private void appComboBox_actionPerformed(ActionEvent eventpack) {		
		//String appSet = "AMADEUS_CPM";
		String app = this.getAppComboBox().getSelectedItem().toString();
		this.appComboBox.setSelectedItem(app);		
		this.getPackageComboBox().removeAllItems();
		this.packageComboBox.addItem("All Package");
		ArrayList<String> anPackageList = CBRCPMDailyT20AppManager.instance()
				.getPackageListapp(app);//replace by app
		for (int j = 0; j < anPackageList.size(); j++) {
			this.packageComboBox.addItem(anPackageList.get(j));
		}
		this.packageComboBox.setSelectedIndex(0);
	}
	

// Creating package Label
	private JLabel getPackageLabel() {
		if (this.packageLabel == null) {
			this.packageLabel = new JLabel("Package:");
		}
		return this.packageLabel;
	}

	//Getting Data for package combo box
	
	private JComboBox getPackageComboBox() {		
		if (this.packageComboBox == null) {
			this.packageComboBox = new JComboBox();
			// Populate the Package list
			this.packageComboBox.addItem("All Package");
			ArrayList<String> anPackageList = CBRCPMDailyT20AppManager.instance()
					.getPackageList();
			for (int i = 0; i < anPackageList.size(); i++) {
				this.packageComboBox.addItem(anPackageList.get(i));
			}
		}
		return this.packageComboBox;
	}

and I am getting the error in the following line I wrote this in the appSet combo box actionperformed method

this.getAppComboBox().removeAllItems();

But when I remove this I am not getting the error

but my data in the app combobox are repeating many times

Please help me in this,

Thank you very much.

What does getAppComboBox() return? Why not use appSetComboBox?

Hello JamesCherrill,

getAppComboBox() will give the list of items for the app combo box

the getAppComboBox() code is as follows

public JComboBox getAppComboBox() {			
		if (this.appComboBox == null) {
			this.appComboBox = new JComboBox();
			// Populate the App list
			this.appComboBox.addItem("All Application");
			ArrayList<String> anAppList = CBRCPMDailyT20AppManager.instance()
					.getAppList();
			for (int j = 0; j < anAppList .size(); j++) {
				this.appComboBox.addItem(anAppList .get(j));
			}	
			// this.appSetComboBox.removeActionListener(appSetComboBox);
			this.appComboBox.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent eventset) {
					appComboBox_actionPerformed(eventset);
				}
			});
		}
		return this.appComboBox;
	}

and I don,t understand your question where to place appSetcombobox()

can you give me an idea

Thank you very much

getAppComboBox() will give the list of items for the app combo box

So why is it declared as returning a JComboBox?

Exactly what error are yo getting now?

Hello JamesCherrill,

I am getting the following error because I am using the

this.getAppComboBox.removeAllItems();

in the appSet_actionPerformed() method

If I won't use this then the data in the app combo box are repeating many times whenever I select an item in the appSet combo box

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at client.cpm.dailyT20.CBRCPMDailyT20View.appComboBox_actionPerformed(CBRCPMDailyT20View.java:243)
at client.cpm.dailyT20.CBRCPMDailyT20View.access$1(CBRCPMDailyT20View.java:241)
at client.cpm.dailyT20.CBRCPMDailyT20View$2.actionPerformed(CBRCPMDailyT20View.java:234)
at javax.swing.JComboBox.fireActionEvent(Unknown Source)
at javax.swing.JComboBox.contentsChanged(Unknown Source)
at javax.swing.JComboBox.intervalRemoved(Unknown Source)
at javax.swing.AbstractListModel.fireIntervalRemoved(Unknown Source)
at javax.swing.DefaultComboBoxModel.removeAllElements(Unknown Source)
at javax.swing.JComboBox.removeAllItems(Unknown Source)
at client.cpm.dailyT20.CBRCPMDailyT20View.appSetComboBox_actionPerformed(CBRCPMDailyT20View.java:194)
at client.cpm.dailyT20.CBRCPMDailyT20View.access$0(CBRCPMDailyT20View.java:190)
at client.cpm.dailyT20.CBRCPMDailyT20View$1.actionPerformed(CBRCPMDailyT20View.java:181)
at javax.swing.JComboBox.fireActionEvent(Unknown Source)
at javax.swing.JComboBox.setSelectedItem(Unknown Source)
at javax.swing.JComboBox.setSelectedIndex(Unknown Source)
at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(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)

I used return appComboBox just to return the valus to the app Combo

Thanks in advance

The syntax you just quoted isn't right right, so its not very helpful.
Exactly which line of code does the error refer to - it has the line number but I don't have a current listing to match that up with.
Are you saying that you create a new JComboBox just so you can use it to return some values?

JamesCherrill,


Yes I am creating 3 JComboboxes and returning values to them
The error just refer to the following line

this.getAppCombobox.removeAllItems();

Which is in the appSet_actioPerformed() method

It is as follws

private void appSetComboBox_actionPerformed(ActionEvent eventset) {		
		String appSet = this.getAppSetComboBox().getSelectedItem().toString();		
		//String appSet = "AMADEUS_ABG";
		this.appSetComboBox.setSelectedItem(appSet);		
		this.getAppComboBox().removeAllItems();		this.getPackageComboBox().removeAllItems();
		this.appComboBox.addItem("All Application");
		this.packageComboBox.addItem("All Package");
		ArrayList<String> anAppList = CBRCPMDailyT20AppManager.instance()
				.getAppList(appSet);//replace by appSet
		for (int i = 0; i < anAppList.size(); i++) {
			this.appComboBox.addItem(anAppList.get(i));
		}
		ArrayList<String> anPackageList = CBRCPMDailyT20AppManager.instance()
		.getPackageList(appSet);//replace by appSet
        for (int l = 0; l < anPackageList.size(); l++) {
	    this.packageComboBox.addItem(anPackageList.get(l));
       }
        
	   	}

The Line I quoted in red

I am getting error for that line
But If I remove it I am not getting the error but the data is repeating for the selections in the appCombobox

Thank you very much

One last time before I move on to something else...
why are using getAppComboBox() instead of just referring to appComboBox like you do on the next line? It can't be what you told me earlier - "give the list of items for the app combo box" - because the very next thing you do is to remove all the contents anyway.

Hello JamesCherrill

Ya becuase For the first time I
should display all the List of items for the 3 comboboxes

Depending on the combo boxes I am displaying a table

and If the user just want to see the table that filters on the appcombobox

without or before the actionlisteners in the appSet so it is used

And if you have any idea to change the without displaying the app and package comboboxes for the first time and implement the actionlisteners for the app and appSet comboboxes

Please tell me and give tha code according my code
Then I will manage here

I will be very much thankful to you for spending a lot of time on my isuue

Thanks a lot

Create the combo boxes at initialisation time (ie by calling the get method, just once only), but don't put any data in them. Then in the action handler just check if the existing combo box is empty and, if not, removeAllItems(), then load the new data into it.

HelloJamesCherrill,

If you don't mind can you please give me a piece of code

for this how to implement

I will be very greatful to you and sorry for wasting your valuable time

Thanks

Sorry, forum rules say I can help you by suggesting good directions to go in, and helping to fix specific problems, but I can't write your homework code for you.
Just slow down, step back a bit, look at your overall code, then dive into particular parts.
If you're using Eclipse the use the code folding feature to hide all the implementations of your methods so all you see are the signatures, then think about exactly what should be done in each one, and what data each one needs to do that.

Hello JamesCherrill,

Thank you very much

But Please give me an idea for how to implement an actionlistener for appComboBox inorder
to get the data for package at runtime

Please suggest this idea

And moreover I am using Eclipse

Thank you very much

Please give me an idea for how to implement an actionlistener for appComboBox inorder
to get the data for package at runtime

This is very confusing. You already have an action listener for appComboBox, which contains code that apparently gets the data for package at runtime

ArrayList<String> anAppList = CBRCPMDailyT20AppManager.instance()
				.getAppList(appSet);//replace by appSet
		for (int i = 0; i < anAppList.size(); i++) {
			this.appComboBox.addItem(anAppList.get(i));
		}

I thought your problem was that when you cleared the old data from the list you got an NPE, and you haven't responded to my questions or suggestions about that.

JamesCherrill,

The main problem is with the actionlistener in the getAppComboBox()

but not with the actionlistener in the getAppSetComboBox

and the code which you had pointed out is not for filling Packagecombobox but for filling the appComboBox based on the selection made in the appSetCombobox

Thanks

Yes, but it should be exactly the same structure except for the details of the CBRCPMDailyT20AppManager query, which I have no info for.

JamesCherrill Sir,

I am giving the code for AppManger as below

package client.cpm.dailyT20;

import java.util.ArrayList;

import javax.naming.Context;
import javax.naming.InitialContext;

import cbrdataejb.session.CBRCPMDailyT20FactTableRemote;
import cbrutil.CBRApplicationServer;
import cbrutil.CBRUserPreferences;

import com.borland.dx.dataset.StorageDataSet;
public class CBRCPMDailyT20AppManager {
	// Singleton
	private static CBRCPMDailyT20AppManager singleton = null;
	// Class attributes
	private Context context = null;
	// EJB
	private CBRCPMDailyT20FactTableRemote factTableRemote;
	private ArrayList<String> appSetList = null;
	private ArrayList<String> appList = null;
	private ArrayList<String> packageList = null;
	// Singleton accessor
	public static CBRCPMDailyT20AppManager instance() {
		if (CBRCPMDailyT20AppManager.singleton == null) {
			CBRCPMDailyT20AppManager.singleton = new CBRCPMDailyT20AppManager();
		}
		return CBRCPMDailyT20AppManager.singleton;
	}
	// Private constructor
	private CBRCPMDailyT20AppManager() {
		try {
			// Create the context of this class
			this.context = new InitialContext(CBRApplicationServer
					.getProperties());
			// EJB
			factTableRemote = (CBRCPMDailyT20FactTableRemote) this.context
					.lookup(cbrdataejb.session.CBRCPMDailyT20FactTable.RemoteJNDIName);
			factTableRemote.init(CBRUserPreferences.instance().getDataSource(),
					"PRD-CPM", CBRUserPreferences.instance().getPortServer());
			// Instantiation of the data attributes
			this.appSetList = new ArrayList<String>();
			this.appList 	= new ArrayList<String>();
			this.packageList = new ArrayList<String>();
			// Load existing data from the database
			load();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	// the database
	public void load() {
		try {
			// Clear the existing data
			this.appSetList.clear();
			this.appList.clear();
			this.packageList.clear();

			// Get the chosen application
			//String app = this.getAppComboBox().getSelectedItem().toString();		

			// Get app data 
			StorageDataSet storageDataSetSet = new StorageDataSet();
			factTableRemote.getAppSetList().loadDataSet(storageDataSetSet);

			StorageDataSet storageDataSet = new StorageDataSet();
			factTableRemote.getAppList().loadDataSet(storageDataSet);

			StorageDataSet storageDataSetPackage = new StorageDataSet();
			factTableRemote.getPackageList().loadDataSet(storageDataSetPackage);

			// Parse the data set in order to fill the data list - AppSet Combo
			storageDataSetSet.first();
			for (int i = 0; i < storageDataSetSet.rowCount(); i++) {
				String anAppSet = storageDataSetSet.getString("IDAppSet");
				if (this.appSetList.contains(anAppSet) == false) {
					this.appSetList.add(anAppSet);
				}
				storageDataSetSet.next();
			}

			// Parse the data set in order to fill the data list - Applications Combo
			storageDataSet.first();
			for (int j = 0; j < storageDataSet.rowCount(); j++) {
				String anApp = storageDataSet.getString("IDApp");
				if (this.appList.contains(anApp) == false) {
					this.appList.add(anApp);
				}
				storageDataSet.next();
			}

			// Parse the data set in order to fill the data list Package Combo
			storageDataSetPackage.first();
			for (int k = 0; k < storageDataSetPackage.rowCount(); k++) {
				String anPackage = storageDataSetPackage.getString("IDPackage");
				if (this.packageList.contains(anPackage) == false) {
					this.packageList.add(anPackage);
				}
				storageDataSetPackage.next();
			}

		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	// Public method
	public ArrayList<String> getAppSetList() {
		return this.appSetList;
	}	
	public ArrayList<String> getAppList() {
		return this.appList;
	}
	public ArrayList<String> getPackageList() {
		return this.packageList;
	}
	 
	// Combos with Filter 
	public ArrayList<String> getAppList(String appSet) {
		try{
		// Clear the existing data
		this.appList.clear();
		StorageDataSet storageDataSetapp = new StorageDataSet();
		factTableRemote.getAppList(appSet).loadDataSet(storageDataSetapp);	

			// Parse the data set in order to fill the data list
			storageDataSetapp.first();
			for (int j = 0; j < storageDataSetapp.rowCount(); j++) {
				String anApp = storageDataSetapp.getString("IDApp");
				if (this.appList.contains(anApp) == false) {
					this.appList.add(anApp);
				}
				storageDataSetapp.next();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return appList ;
	}
	
	public ArrayList<String> getPackageList(String appSet) {
		try{
		// Clear the existing data
		this.packageList.clear();
		StorageDataSet storageDataSetpack = new StorageDataSet();
		factTableRemote.getPackageList(appSet).loadDataSet(storageDataSetpack);	

			// Parse the data set in order to fill the data list
			storageDataSetpack.first();
			for (int k = 0; k < storageDataSetpack.rowCount(); k++) {
				String anPackage = storageDataSetpack.getString("IDPackage");
				if (this.packageList.contains(anPackage) == false) {
					this.packageList.add(anPackage);
				}
				storageDataSetpack.next();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return packageList ;
	}
	
	
	public ArrayList<String> getPackageListapp(String app) {
		try{
		// Clear the existing data
			this.packageList.clear();
			StorageDataSet storageDataSetF = new StorageDataSet();
			factTableRemote.getPackageList(app).loadDataSet(storageDataSetF);	

			// Parse the data set in order to fill the data list
			storageDataSetF.first();
			for (int k = 0; k < storageDataSetF.rowCount(); k++) {
				String anPackageF = storageDataSetF.getString("IDPackage");
				if (this.packageList.contains(anPackageF) == false) {
					this.packageList.add(anPackageF);
				}
				storageDataSetF.next();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return this.packageList;
	}
	
	
	
	
	public void removeEJB() {
		try {
			factTableRemote.remove();
		} catch (Exception ex) {
		}
	}
}

please have a look

Thank you very much for spending your valuable time.

OK, so theres a
ArrayList<String> getPackageList(String appSet)
method just like the
ArrayList<String> getAppList(String appSet)
method that gives you the packages in a specified appSet, so, as I said, the new listener is exactly like the one you already have except that is goes from appSet to package, not from app to appSet

Hello JamesCherrill Sir

It is going for both for the first time

from appSet ---> app and appSet-->package

The first seletion is working perfectly, there is no problem in that

the problem is with the second selection should be from app--> package

So here is the problem withe the second listener,

Thank you very much

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.