public void deleteTag()
	{
		if (this.myApplicationsAppMyTagsList.getSelectedValue()!=null && this.myApplicationsTree.getSelectionPath()!=null)
		{
			String appId = ((DefaultMutableTreeNode)this.myApplicationsTree.getLastSelectedPathComponent()).toString();
			String tagName = ((TagListItem)this.myApplicationsAppMyTagsList.getSelectedValue()).getValue();
			String tagType = ((TagListItem)this.myApplicationsAppMyTagsList.getSelectedValue()).getType();
			

			
			try 
			{
				boolean valid = false;
				
				if(tagType.equalsIgnoreCase("public")){
					valid = this.model.deletePublicTag(tagName, tagType, appId);
				}else if(tagType.equalsIgnoreCase("private")){
					valid = this.model.deletePrivateTag(tagName, tagType, appId);
				}else if(tagType.equalsIgnoreCase("communities")){
					valid = this.model.deleteCommunityTag(tagName, tagType, appId, ((TagListItem)this.myApplicationsAppMyTagsList.getSelectedValue()).getCommunityId());
				}
				
				if (valid)
				{
					//If everything was correct, reload the tags
					this.loadTags(appId);
	
				}else{
					JOptionPane.showMessageDialog(this.mainWindow, "It was not possible to delete the tag", 
							"Deleting a tag", JOptionPane.ERROR_MESSAGE);
				}
				
			} catch (RemoteException e) {
				e.printStackTrace();
				JOptionPane.showMessageDialog(this.mainWindow, "It was not possible to connect with the back-end", 
						"Deleting a tag", JOptionPane.ERROR_MESSAGE);
			}

			
		}
	}