table.add(WFUtil.getText("Checkout status"), 1, ++row); if (resource.getCheckedOut() == null) { table.add(WFUtil.getText("Not checked out","wf_listtext"), 2, row); } else { table.add(WFUtil.getText("Checked out ("+resource.getCheckedOut()+")","wf_listtext"), 2, row); } table.add(WFUtil.getText("  - "), 2, row); HtmlCommandLink checker = new HtmlCommandLink(); checker.setId(getId()+"_check"); checker.getAttributes().put(PARAMETER_RESOURCE_PATH, resource.getPath()); if (resource.getCheckedOut() == null) { checker.getChildren().add( WFUtil.getText("Check out")); checker.getAttributes().put(ACTION, ACTION_CHECK_OUT); } else {  checker.getChildren().add( WFUtil.getText("Change to Locked")); } checker.setStyleClass("wf_listlink"); checker.setActionListener(WFUtil.createMethodBinding("#{contentviewerbean.processAction}", new Class[]{ActionEvent.class})); table.add(checker, 2, row);
	protected void initializeContent() {				WebdavExtendedResource resource = getWebdavExtendedResource();		toggleLock(resource);				if (resource != null) {			String resourceName = resource.getDisplayName();			int row = 1;						Table table = new Table();			table.setId(this.getId() + "_table");			table.setWidth("100%");						table.mergeCells(1, row, 2, row);			table.add(WFUtil.getText("Document details"));							HtmlOutputLink link = new HtmlOutputLink();			link.setValue(resource.getEncodedPath());			link.setStyleClass("wf_listlink");			link.setId(getId() + "_dl");			link.getChildren().add(WFUtil.getText("Download/View"));						table.add(WFUtil.getText("Document name"), 1, ++row);			table.add(WFUtil.getText(resourceName,"wf_listtext"), 2, row);			table.add(link, 2, ++row);			table.add(WFUtil.getText("Size"), 1, ++row);			table.add(WFUtil.getText(FileUtil.getHumanReadableSize(resource.getGetContentLength()),"wf_listtext"), 2, row);			table.add(WFUtil.getText("Content type"), 1, ++row);			table.add(WFUtil.getText(resource.getGetContentType(),"wf_listtext"), 2, row);						table.add(WFUtil.getText("Creation date"), 1, ++row);			table.add(WFUtil.getText(new IWTimestamp(resource.getCreationDate()).toString(),"wf_listtext"), 2, row);						table.add(WFUtil.getText("Modification date"), 1, ++row);			table.add(WFUtil.getText(new IWTimestamp(resource.getGetLastModified()).toString(),"wf_listtext"), 2, row);						table.add(WFUtil.getText("Locked/Unlocked"), 1, ++row);			if (resource.isLocked()) {				HtmlGraphicImage lock = new HtmlGraphicImage();				lock.setUrl(IWMainApplication.getDefaultIWMainApplication().getURIFromURL(WFUtil.getContentBundle().getResourcesVirtualPath())+"/images/locked.gif");				lock.setId(this.getId()+"_lock");				lock.setHeight("16");// sizes that make sense 16/32/64/128				lock.setStyle("alignment:bottom");				table.add(lock, 2, row);				table.add(WFUtil.getText("Locked","wf_listtext"), 2, row);			} else {				table.add(WFUtil.getText("Unlocked","wf_listtext"), 2, row);			}			table.add(WFUtil.getText("  - "), 2, row);						HtmlCommandButton lockToggler = new HtmlCommandButton();			lockToggler.setId(getId()+"_lockTogg");			if (resource.isLocked()) {				//lockToggler.getChildren().add( WFUtil.getText("Change to unlocked"));				lockToggler.setValue("Unlock");			} else {				//lockToggler.getChildren().add( WFUtil.getText("Change to locked"));				lockToggler.setValue("Lock");			}						lockToggler.setStyleClass("wf_listlink");			lockToggler.setActionListener(WFUtil.createMethodBinding("#{contentviewerbean.processAction}", new Class[]{ActionEvent.class}));			lockToggler.getAttributes().put(ACTION, ACTION_TOGGLE_LOCK);			table.add(lockToggler, 2, row);			//			++row;//			table.add(WFUtil.getText("Http URL"), 1, row);//			table.add(WFUtil.getText(resource.getHttpURL().toString(),"wf_listtext"), 2, row);			//			table.add(WFUtil.getText("Owner"), 1, ++row);//			table.add(WFUtil.getText(resource.getOwner(),"wf_listtext"), 2, row);//			table.add(WFUtil.getText("Etag"), 1, ++row);//			table.add(WFUtil.getText(resource.getGetEtag(),"wf_listtext"), 2, row);			//Then add the version table			Table vTable = getVersionReportTable(resource);						++row;			table.mergeCells(1, row, 2, row);			table.add(vTable, 1, row);			this.getChildren().add(table);		}	}