public void createAttributesFields(ComplexTypeParameter complexParam) {

		System.out.println("a intrat");

		paramsPanel.add(Box.createVerticalStrut(10));

		attrPanel = new JPanel();
		attrPanel.setBorder(new TitledBorder(null, complexParam.getName()
				+ " attributes", TitledBorder.LEADING, TitledBorder.TOP, null,
				null));
		paramsPanel.add(attrPanel);
		attrPanel.setLayout(new BoxLayout(attrPanel, BoxLayout.Y_AXIS));

		paramsPanel.add(attrPanel);

		/*
		 * Asemanator cu generarea elementelor pentru lista de parametri ai unei operatii;
		 * diferenta este ca aici se parcurge lista de atribute a unui parametru
		 */
		
		for (int ii = 0; ii < complexParam.getAttributes().size(); ii++) {

			Attribute attr = complexParam.getAttributes().get(ii);

			attrPanel.add(Box.createVerticalStrut(10));

			/*
			 *  genereaza un checkbox cu numele atributului (atributul name din
			 *  element corespunzator parametrului)
			 *  CHeckbox-ul va fi initial setat, daca atributul este required
			 */
			param1Panel = new JPanel();
			param1Panel.setPreferredSize(new Dimension(320, 30));
			param1Panel.setMinimumSize(new Dimension(320, 30));
			param1Panel.setMaximumSize(new Dimension(320, 30));
			attrPanel.add(param1Panel);
			param1Panel.setLayout(new BoxLayout(param1Panel, BoxLayout.X_AXIS));

			horizontalStrut_1 = Box.createHorizontalStrut(30);
			param1Panel.add(horizontalStrut_1);

			JCheckBox elemName = new JCheckBox(attr.getName());
			elemName.setPreferredSize(new Dimension(100, 15));
			elemName.setMinimumSize(new Dimension(100, 15));
			elemName.setMaximumSize(new Dimension(100, 15));
			elemName.setHorizontalAlignment(SwingConstants.LEFT);

			checkboxes.add(elemName);

			// daca atributul e required, atunci este obligatoriu sa fie
			// introdusa o valoare acolo -> nu poate fi debifat
			if (attr.getUse().equals("required")) {
				elemName.setSelected(true);
				elemName.addChangeListener(new ChangeListener() {
					public void stateChanged(ChangeEvent e) {

						((JCheckBox) e.getSource()).setSelected(true);
					}
				});
			}
			param1Panel.add(elemName);

			horizontalStrut_2 = Box.createHorizontalStrut(10);
			param1Panel.add(horizontalStrut_2);

			if (attr.getRestrictions().enumeration != null) {

				JComboBox<String> elem = new JComboBox<String>(
						new DefaultComboBoxModel<String>(
								attr.getRestrictions().enumeration));
				elem.setPreferredSize(new Dimension(120, 25));
				elem.setMinimumSize(new Dimension(120, 25));
				elem.setMaximumSize(new Dimension(120, 25));
				param1Panel.add(elem);

				graphicElements.add(elem);
				combos.add(elem);

			} else {

				String type = attr.getBaseType();

				if (type.equals("decimal") || type.equals("float")
						|| type.equals("double")) {

					// daca exista restrictii de tipul minVal / maxVal, atunci
					// spinner-ul sa nu permita introducerea acestor valori

					double minValue = -1000.000;
					double maxValue = 1000.000;

					if (attr.getRestrictions().minValue != null) {

						minValue = Double
								.parseDouble(attr.getRestrictions().minValue);
					}

					if (attr.getRestrictions().maxValue != null) {

						maxValue = Double
								.parseDouble(attr.getRestrictions().maxValue);
					}

					SpinnerNumberModel spinnerModel = new SpinnerNumberModel(
							Math.max(minValue, 0), minValue, maxValue, 0.001);

					JSpinner elem = new JSpinner(spinnerModel);
					elem.setPreferredSize(new Dimension(120, 25));
					elem.setMinimumSize(new Dimension(120, 25));
					elem.setMaximumSize(new Dimension(120, 25));
					JComponent comp = elem.getEditor();
					JFormattedTextField field = (JFormattedTextField) comp
							.getComponent(0);
					DefaultFormatter formatter = (DefaultFormatter) field
							.getFormatter();
					formatter.setCommitsOnValidEdit(true);
					param1Panel.add(elem);				

					graphicElements.add(elem);
					spinners.add(elem);
				}

				if (type.equals("integer") || type.equals("int")
						|| type.equals("negativeInteger")
						|| type.equals("nonNegativeInteger")
						|| type.equals("nonPositiveInteger")
						|| type.equals("positiveInteger")) {

					int minValue = -1000;
					int maxValue = 1000;

					if (type.equals("negativeInteger")) {

						maxValue = -1;
					}

					if (type.equals("nonNegativeInteger")) {

						minValue = 0;
					}

					if (type.equals("nonPositiveInteger")) {

						maxValue = 0;
					}

					if (type.equals("positiveInteger")) {

						minValue = 1;
					}

					// presupunem ca minValue si maxvalue sunt date corect,
					// tinand cont de restrictia de tip
					if (attr.getRestrictions().minValue != null) {

						minValue = Integer
								.parseInt(attr.getRestrictions().minValue);
					}

					if (attr.getRestrictions().maxValue != null) {

						maxValue = Integer
								.parseInt(attr.getRestrictions().maxValue);
					}

					SpinnerNumberModel spinnerModel = new SpinnerNumberModel(
							Math.max(minValue, 0), minValue, maxValue, 1);

					JSpinner elem = new JSpinner(spinnerModel);
					elem.setPreferredSize(new Dimension(120, 25));
					elem.setMinimumSize(new Dimension(120, 25));
					elem.setMaximumSize(new Dimension(120, 25));
					JComponent comp = elem.getEditor();
					JFormattedTextField field = (JFormattedTextField) comp
							.getComponent(0);
					DefaultFormatter formatter = (DefaultFormatter) field
							.getFormatter();
					param1Panel.add(elem);

					graphicElements.add(elem);
					spinners.add(elem);
				}

				if (type.equals("string")) {

					JTextField elem = new JTextField();
					elem.setPreferredSize(new Dimension(120, 25));
					elem.setMinimumSize(new Dimension(120, 25));
					elem.setMaximumSize(new Dimension(120, 25));
					param1Panel.add(elem);
					elem.setColumns(10);

					elem.addCaretListener(new CaretListener() {
						public void caretUpdate(CaretEvent e) {

							errorLabel.setText("");
						}
					});

					graphicElements.add(elem);
					textFields.add(elem);
				}

			}

			horizontalStrut_3 = Box.createHorizontalStrut(20);
			horizontalStrut_3.setPreferredSize(new Dimension(10, 0));
			horizontalStrut_3.setMinimumSize(new Dimension(10, 0));
			horizontalStrut_3.setMaximumSize(new Dimension(10, 32767));
			param1Panel.add(horizontalStrut_3);
		}
	}