protected void saveEditDebates() {
		String topicTitle = titleCDJtxt.getText()
				, maxTurns = maxTurnsJcbx.getSelectedItem().toString()
				, maxTime = maxTimeJcbx.getSelectedItem().toString()
				, description = descriptionCDJtxa.getText()
				, materials = "";
		int teamASize = teamACDDLM.getSize()
				, teamBSize = teamBCDDLM.getSize();
		String teams[][];
		if (teamASize > teamBSize) {
			teams = new String[2][teamASize];
		} else {
			teams = new String[2][teamBSize];
		}
		for (int i = 0; i < teamASize; i++) {
			teams[0][i] = teamACDDLM.getElementAt(i).toString();
		}
		for (int i = 0; i < teamBSize; i++) {
			teams[1][i] = teamBCDDLM.getElementAt(i).toString();
		}
		String teamAS = null, teamBS = null;
		for (int i = 0; i < teams[0].length; i++) {
			teamAS += teams[0][i];
			teamBS += teams[0][i];
		}
		int maxTurnsValue = 0;
		if (maxTurns != null) {
			maxTurnsValue = Integer.parseInt(maxTurns.toString());
		}
		String[] teamLeader = {teamALeader, teamBLeader};
		
		// Materials
		for (int i = 0; i < litratureCDDLM.getSize(); i++) {
			Object litrature = litratureCDDLM.getElementAt(i);
			if (litrature != null) {
				if (i == 0) {
					materials = litrature.toString();
				} else {
					materials += "," + litrature.toString();
				}
				
			}
		}
		Debate debateCreate = new Debate(currentDebate.getId(), maxTurnsValue, topicTitle, description, teams, -1
				, maxTime, materials, teamLeader, null, false, currentDebate.getCurentTurnTeam(), currentDebate.getStatus()
				, currentDebate.getAcceptPositionTeam(), currentDebate.getTurnDuration(), currentDebate.getTimeLeft());
		if (debate.editDebat(debateCreate)) {
			JOptionPane.showMessageDialog(this, "You have edited a debate successfully", "Success", JOptionPane.YES_OPTION);
			createDebateJfme.dispose();
			// Refresh debate list
			debateList = debate.getDebateList();
			getDebateList();
			
		} else {
			JOptionPane.showMessageDialog(this, "You have edited a debate failed", "fail", JOptionPane.YES_OPTION);
		}
		
	}