@SuppressWarnings("unused")
	protected void deleteAction() {
		// Action type
		Object typeValueItem = actionsListJlst.getSelectedValue();
		String typeValue = null;
		if (typeValueItem != null ) {
			typeValue = typeValueItem.toString();
		}
		// Title value
		Object titleObject = titleJlst.getSelectedValue();
		int selectedIndex = titleJlst.getSelectedIndex();
		String titleValue = null;
		if (titleObject != null) {
			titleValue = titleObject.toString();
		}
		DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm a");
		Date date = new Date();
		switch (typeValue) {
		case CASECLAIM:
			boolean claimFlag = false;
			if (titleValue != null && claimResultList.size() != 0) {
				for (int i = 0; i < claimResultList.size(); i++) {
					currentClaim = claimResultList.get(i);
					if (currentClaim.getTitle().equals(titleValue) ) {
						// Has children cannot be delete 
						subclaimResultList = claim.getClaims(fileName, SUBCLAIM, teamType);
						evidenceResultList = evidence.getEvideces(fileName, EVIDENCE, teamType);
						for (int j = 0; j < subclaimResultList.size(); j++) {
							if (subclaimResultList.get(j).getParentId().equals(currentClaim.getId())) {
							
								claimFlag = true;
								JOptionPane.showMessageDialog(this, "You cannot delete this parented claim.", "Success", JOptionPane.WARNING_MESSAGE);
								break;
							}
						}
						for (int j = 0; j < evidenceResultList.size(); j++) {
							if (evidenceResultList.get(j).getParentId().equals(currentClaim.getId())) {
								claimFlag = true;
								JOptionPane.showMessageDialog(this, "You cannot delete this parented claim.", "Success", JOptionPane.WARNING_MESSAGE);
								break;
							}
						}
						if (!claimFlag) {
							if (action.delete(fileName, currentClaim)) {
								Chat c = new Chat("Delete a claim: " + titleValue, dateFormat.format(date), userLogin.getName(), debateSelected.getId());
								chat.addChat(fileName, c);
								JOptionPane.showMessageDialog(this, "You have sucessfully deleted the claim", "Success", JOptionPane.WARNING_MESSAGE);
								// Refresh Claim list
								getClaimList();
								getChatHistory();
							} else {
								JOptionPane.showMessageDialog(this, "You have failed deleted the claim", "failed", JOptionPane.WARNING_MESSAGE);
							}
						}
						break;
					}
				}
			}
			break;
		case CASESUBCLAIM:
			boolean parentFlag = false;
			if (titleValue != null && subclaimResultList.size() != 0) {
				for (int i = 0; i < subclaimResultList.size(); i++) {
					currentClaim = subclaimResultList.get(i);
					if (currentClaim.getTitle().equals(titleValue) ) {
						// Has children cannot be delete 
						for (int j = 0; j < subclaimResultList.size(); j++) {
							if (subclaimResultList.get(j).getParentId() != null) {
								parentFlag = true;
								JOptionPane.showMessageDialog(this, "You cannot delete this parented sub claim.", "Success", JOptionPane.WARNING_MESSAGE);
								break;
							}
						}
						
						if (!parentFlag) {
							if (action.delete(fileName, currentClaim)) {
								Chat c = new Chat("Delete a subclaim: " + titleValue, dateFormat.format(date), userLogin.getName(), debateSelected.getId());
								chat.addChat(fileName, c);
								JOptionPane.showMessageDialog(this, "You have sucessfully deleted the sub claim", "Success", JOptionPane.WARNING_MESSAGE);
								// Refresh Claim list
								getSubClaimList();
								getChatHistory();
							} else {
								JOptionPane.showMessageDialog(this, "You have failed deleted the sub claim", "failed", JOptionPane.WARNING_MESSAGE);
							}
						}
						break;
					}
				}
			}
			break;
		case CASEEVIDENCE:
			if (titleValue != null && evidenceResultList.size() != 0) {
				for (int i = 0; i < evidenceResultList.size(); i++) {
					evidenceCurrent = evidenceResultList.get(i);
					if (evidenceCurrent.getTitle().equals(titleValue)) {
						if (action.delete(fileName, evidenceCurrent)) {
							Chat c = new Chat("Delete a evidence: " + titleValue, dateFormat.format(date), userLogin.getName(), debateSelected.getId());
							chat.addChat(fileName, c);
							JOptionPane.showMessageDialog(this, "You have sucessfully deleted the Evidence", "Success", JOptionPane.WARNING_MESSAGE);
							// Refresh Claim list
							getEvidenceList("evidence");
							getChatHistory();
						} else {
							JOptionPane.showMessageDialog(this, "You have failed deleted the Evidence", "failed", JOptionPane.WARNING_MESSAGE);
						}
						
						break;
					}
				}
			}
			break;
		case CASECOUNTERCLAIM:
			if (titleValue != null && counterClaimResultList.size() != 0) {
				for (int i = 0; i < counterClaimResultList.size(); i++) {
					currentClaim = counterClaimResultList.get(i);
					if (currentClaim.getTitle().equals(titleValue) ) {
						if (action.delete(fileName, currentClaim)) {
							Chat c = new Chat("Delete a Counterclaim: " + titleValue, dateFormat.format(date), userLogin.getName(), debateSelected.getId());
							chat.addChat(fileName, c);
							JOptionPane.showMessageDialog(this, "You have sucessfully deleted the Counterclaim", "Success", JOptionPane.WARNING_MESSAGE);
							// Refresh Claim list
							getCounterClaimList();
							getChatHistory();
						} else {
							JOptionPane.showMessageDialog(this, "You have failed deleted the Counterclaim", "failed", JOptionPane.WARNING_MESSAGE);
						}
						
						break;
					}
				}
			}
			break;
		case CASECOUNTEREVIDENCE:
			if (titleValue != null && evidenceResultList.size() != 0) {
				for (int i = 0; i < evidenceResultList.size(); i++) {
					evidenceCurrent = evidenceResultList.get(i);
					if (evidenceCurrent.getTitle().equals(titleValue) ) {
						if (action.delete(fileName, evidenceCurrent)) {
							Chat c = new Chat("Delete a counterevidence: " + titleValue, dateFormat.format(date), userLogin.getName(), debateSelected.getId());
							chat.addChat(fileName, c);
							JOptionPane.showMessageDialog(this, "You have sucessfully deleted the Counterevidence", "Success", JOptionPane.WARNING_MESSAGE);
							// Refresh Claim list
							getEvidenceList("counterevidence");
							getChatHistory();
						} else {
							JOptionPane.showMessageDialog(this, "You have failed deleted the Counterevidence", "failed", JOptionPane.WARNING_MESSAGE);
						}
						
						break;
					}
				}
			}
			break;
		case CASEBIPOLARQUESTION:
			if (titleValue != null && bipolarQuestionList.size() != 0) {
				for (int i = 0; i < bipolarQuestionList.size(); i++) {
					bipolarQuestionCurrent = bipolarQuestionList.get(i);
					if (bipolarQuestionCurrent.getTitle().equals(titleValue)) {
						if (action.delete(fileName, bipolarQuestionCurrent)) {
							Chat c = new Chat("Delete a Response To Bipolar Question: " + titleValue, dateFormat.format(date), userLogin.getName(), debateSelected.getId());
							chat.addChat(fileName, c);
							JOptionPane.showMessageDialog(this, "You have sucessfully deleted the Response To Bipolar Question", "Success", JOptionPane.WARNING_MESSAGE);
							// Refresh Claim list
							getBipolarQuestionList();
							getChatHistory();
						} else {
							JOptionPane.showMessageDialog(this, "You have failed deleted the Response To Bipolar Question", "failed", JOptionPane.WARNING_MESSAGE);
						}
						
						break;
					}
				}
			}
			break;
		case CASERESPONSETOBIPOLAR:
			if (titleValue != null && bipolarQuestionList.size() != 0) {
				for (int i = 0; i < bipolarQuestionList.size(); i++) {
					bipolarQuestionCurrent = bipolarQuestionList.get(i);
					if (bipolarQuestionCurrent.getTitle().equals(titleValue)) {
						if (action.delete(fileName, bipolarQuestionCurrent)) {
							Chat c = new Chat("Delete a Response To Bipolar Question: " + titleValue, dateFormat.format(date), userLogin.getName(), debateSelected.getId());
							chat.addChat(fileName, c);
							JOptionPane.showMessageDialog(this, "You have sucessfully deleted the Response To Bipolar Question", "Success", JOptionPane.WARNING_MESSAGE);
							// Refresh Claim list
							getResponseBipolarList();
							getChatHistory();
						} else {
							JOptionPane.showMessageDialog(this, "You have failed deleted the Response To Bipolar Question", "failed", JOptionPane.WARNING_MESSAGE);
						}
						
						break;
					}
				}
			}
			break;
		case CASECHALLENGE:
			if (titleValue != null && challengeList.size() != 0) {
				for (int i = 0; i < challengeList.size(); i++) {
					challengeCurrent = challengeList.get(i);
					if (challengeCurrent.getTitle().equals(titleValue)) {
						if (action.delete(fileName, challengeCurrent)) {
							Chat c = new Chat("Delete a Challenge: " + titleValue, dateFormat.format(date), userLogin.getName(), debateSelected.getId());
							chat.addChat(fileName, c);
							JOptionPane.showMessageDialog(this, "You have sucessfully deleted the Challenge", "Success", JOptionPane.WARNING_MESSAGE);
							// Refresh Claim list
							getChallengeList();
							getChatHistory();
						} else {
							JOptionPane.showMessageDialog(this, "You have failed deleted the Challenge", "failed", JOptionPane.WARNING_MESSAGE);
						}
						
						break;
					}
				}
			}
			break;
		}
		
	}