String fileName = "v"+versionName.replace('.','_')+"-"+resource.getDisplayName(); versionPath.setAlternativeFileName(fileName);
if(versionName!=null){ String fileName = "v"+versionName.replace('.','_')+"-"+resource.getDisplayName(); versionPath.setAlternativeFileName(fileName); }
	protected Table getVersionReportTable(WebdavExtendedResource resource) {		Locale locale = IWContext.getInstance().getCurrentLocale();		Timer timer = new Timer();		timer.start();		List versions = VersionHelper.getAllVersions(resource);		Table vTable = new Table(8,versions.size()+1);		vTable.setId(vTable.getId() + "_ver");		vTable.setRowStyleClass(1,"wf_listheading");		vTable.setStyleClass("wf_listtable");				int vRow = 1;		int vColumn = 1;		vTable.add(getBundle().getLocalizedText("version"), vColumn, vRow);		vTable.add(getBundle().getLocalizedText("download"), ++vColumn, vRow);		vTable.add(getBundle().getLocalizedText("created_by"), ++vColumn, vRow);		vTable.add(getBundle().getLocalizedText("comment"), ++vColumn, vRow);		vTable.add(getBundle().getLocalizedText("checkout"), ++vColumn, vRow);		vTable.add(getBundle().getLocalizedText("checkin"), ++vColumn, vRow);		vTable.add(getBundle().getLocalizedText("last_modified"), ++vColumn, vRow);				if (!versions.isEmpty()) {			Iterator iter = versions.iterator();			while (iter.hasNext()) {				vColumn = 0;				WebdavResourceVersion version = (WebdavResourceVersion) iter.next();				++vRow;							if(vRow%2==0){					vTable.setRowStyleClass(vRow,"wf_listevenrow");				}				else{					vTable.setRowStyleClass(vRow,"wf_listoddrow");				}												String versionName = version.getVersionName();												vTable.add(WFUtil.getText(versionName,"wf_listtext"), ++vColumn, vRow);				DownloadLink versionPath = new DownloadLink(getBundle().getLocalizedString("download"));								versionPath.setId("dl_"+vRow);				versionPath.setStyleClass("wf_listlink");				if (versionName != null) {					String url = version.getURL();					versionPath.setRelativeFilePath(url);				}				//so we have a sensable name for the file!				String fileName = "v"+versionName.replace('.','_')+"-"+resource.getDisplayName();				versionPath.setAlternativeFileName(fileName);				//versionPath.getChildren().add(WFUtil.getText("Download/View"));				vTable.add(versionPath, ++vColumn, vRow);				vTable.add(WFUtil.getText(version.getCreatorDisplayName(),"wf_listtext"), ++vColumn, vRow);								String tComment = version.getComment();				HtmlOutputText comment = new HtmlOutputText();				comment.setStyleClass("wf_listtext");				if ("INITIAL VERSION.".equals(tComment)) {					getBundle().getLocalizedUIComponent("initial_version", comment);				} else {					comment.setValue(tComment);				}				vTable.add(comment, ++vColumn, vRow);//				vTable.add(WFUtil.getText(version.getComment(),"wf_listtext"), ++vColumn, vRow);				vTable.add(WFUtil.getText(version.getCheckedOut(),"wf_listtext"), ++vColumn, vRow);				vTable.add(WFUtil.getText(version.getCheckedIn(),"wf_listtext"), ++vColumn, vRow);//				vTable.add(WFUtil.getText(version.getLastModified(),"wf_listtext"), ++vColumn, vRow);				vTable.add(WFUtil.getText(new IWTimestamp(resource.getGetLastModified()).getLocaleDateAndTime(locale, IWTimestamp.MEDIUM, IWTimestamp.MEDIUM),"wf_listtext"), ++vColumn, vRow);			}		}				++vRow;		vTable.add("Creation time", 3, vRow);		vTable.add(timer.getTimeString(), 4, vRow);				timer.stop();				return vTable;	}