Skip to Content
0
Former Member
May 09, 2006 at 08:34 AM

Checkbox event disables checkboxes

9 Views

Hi,

I am building a Search Component for the KM Using in NW 04 Stack 14.

In the Search Component I User Checkboxes to search in predefined Taxonomies.

To make it more easy to our Customers there should be a Checkbox to Search in all of these predefined Taxonomies. This Checkbox is per default enabled.

When a user select one of the other checkboxes for a single taxonomie search the checkbox should be automatically disabled.

At the moment I use the code below to create the checkboxes.

I tried the function setOnClick, but I don’t know the correct syntax to deactivate a checkbox by clicking another one.

Perhaps someone of you can help me.

Thanks

Sascha

private Component createCheckboxes()
	 
		{
				Checkbox AGS = new Checkbox(Search_WL.m_buzzwords[1]);
				AGS.setText(Search_WL.m_buzzwords[1]);
				AGS.setChecked(false);
				AGS.setTooltip(Search_WL.IndexTooltip[1]);
								
				Checkbox BS = new Checkbox(Search_WL.m_buzzwords[2]);
				BS.setText(Search_WL.m_buzzwords[2]);
				BS.setChecked(false);
				BS.setTooltip(Search_WL.IndexTooltip[2]);
				
				Checkbox EDV = new Checkbox(Search_WL.m_buzzwords[3]);
				EDV.setText(Search_WL.m_buzzwords[3]);
				EDV.setChecked(false);
				EDV.setTooltip(Search_WL.IndexTooltip[3]);
				
				Checkbox FS = new Checkbox(Search_WL.m_buzzwords[4]);
				FS.setText(Search_WL.m_buzzwords[4]);
				FS.setChecked(false);
				FS.setTooltip(Search_WL.IndexTooltip[4]);
				
				Checkbox KHM = new Checkbox(Search_WL.m_buzzwords[5]);
				KHM.setText(Search_WL.m_buzzwords[5]);
				KHM.setChecked(false);
				KHM.setTooltip(Search_WL.IndexTooltip[5]);
				
				Checkbox MAKO = new Checkbox(Search_WL.m_buzzwords[6]);
				MAKO.setText(Search_WL.m_buzzwords[6]);
				MAKO.setChecked(false);
				MAKO.setTooltip(Search_WL.IndexTooltip[6]);
													
				Checkbox VSS = new Checkbox(Search_WL.m_buzzwords[7]);
				VSS.setText(Search_WL.m_buzzwords[7]);
				VSS.setChecked(false);
				VSS.setTooltip(Search_WL.IndexTooltip[7]);
				
				Checkbox VPS = new Checkbox(Search_WL.m_buzzwords[8]);
				VPS.setText(Search_WL.m_buzzwords[8]);
				VPS.setChecked(false);
				VPS.setTooltip(Search_WL.IndexTooltip[8]);
				
				Checkbox Vertrieb = new Checkbox(Search_WL.m_buzzwords[9]);
				Vertrieb.setText(Search_WL.m_buzzwords[9]);
				Vertrieb.setChecked(false);
				Vertrieb.setTooltip(Search_WL.IndexTooltip[9]);
				
				Checkbox Alle = new Checkbox(Search_WL.m_buzzwords[0]);
				Alle.setText(Search_WL.m_buzzwords[0]);
				Alle.setChecked(true);
				Alle.setTooltip(Search_WL.IndexTooltip[0]);
			
				GridLayout grid = new GridLayout();		
								grid.setWidth("100%");
				grid.addComponent(AGS);
				grid.addComponent(BS);				
				grid.addComponent(EDV);
				grid.addComponent(FS); 
				grid.addComponent(KHM);				
				grid.addComponent(MAKO);
				grid.addComponent(VSS);
				grid.addComponent(VPS);				
				grid.addComponent(Vertrieb);
	grid.addComponent(Alle);

				return grid;
		}