<h:dataTable value="#{BrowseBean.content}" var="r2" styleClass="recordSet"
rowClasses="RecordSetRow, RecordSetRowAlt" headerClass="RecordSetHeader" width="100%" rendered="#{not empty BrowseBean.content}">
<%– Content list –%>
<a:richList id="contentRichList"
binding="#{BrowseBean.contentRichList}"
viewMode="#{BrowseBean.browseViewMode}"
pageSize="#{BrowseBean.pageSizeContent}" styleClass="recordSet"
headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow"
altRowStyleClass="recordSetRowAlt" width="100%"
value="#{BrowseBean.content}" var="r" refreshOnBind="true">
</a:richList>
<h:dataTable id="contentList" value="#{BrowseBean.content}" binding="#{CustomBean.dataTable}" var="r2" styleClass="recordSet"
rowClasses="recordSetRow, recordSetRowAlt" headerClass="recordSetHeader" width="100%" rendered="#{not empty BrowseBean.content}">
<h:column>
<h:selectBooleanCheckbox id="checkboxes" value="#{CustomBean.selectedIds[r2.id]}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{msg.name}" styleClass="header" id="col10-sort"/>
</f:facet>
<h:inputHidden id="hiddenUrl" value="#{r2.url}"/>
<h:inputHidden id="hiddenName" value="#{r2.name}"/>
<a:actionLink id="col10-act1" value="#{r2.name}" href="#{r2.url}" target="new" image="#{r2.fileType16}" showLink="false" styleClass="inlineAction" />
</h:column>
</h:dataTable>
<br><br>
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
public class CustomBean {
private BrowseBean browseBean;
private NodeService nodeService;
private Map<String, Boolean> selectedIds = new HashMap<String, Boolean>();
private HtmlDataTable dataTable;
public CustomBean(){
FacesContext fc = FacesContext.getCurrentInstance();
BrowseBean bbean = (BrowseBean)fc.getExternalContext().getSessionMap().get("BrowseBean");
dataTable = new HtmlDataTable();
}
public void submit(ActionEvent event){
FacesContext fc = FacesContext.getCurrentInstance();
ServiceRegistry service = Repository.getServiceRegistry(fc);
setBrowseBean((BrowseBean)fc.getExternalContext().getSessionMap().get("BrowseBean"));
NavigationBean navBean = (NavigationBean)fc.getExternalContext().getSessionMap().get("NavigationBean");
FileFolderService fileFolderService = service.getFileFolderService();
Node companyHome = navBean.getCompanyHomeNode();
try {
setNodeService(service.getNodeService());
NodeRef dictionary = getNodeService().getChildByName(companyHome.getNodeRef(), ContentModel.ASSOC_CONTAINS , "Data Dictionary");
NodeRef temp = getNodeService().getChildByName(dictionary, ContentModel.ASSOC_CONTAINS , "Temp");
for(int i = 0; i<browseBean.getContent().size(); i++){
Node nodo = (Node)browseBean.getContent().get(i);
if(getSelectedIds().get(nodo.getId()) != null && getSelectedIds().get(nodo.getId()).booleanValue()){
fileFolderService.move(nodo.getNodeRef(), temp, null);
}
}
selectedIds = new HashMap<String, Boolean>();
}catch(FileNotFoundException e){
}
}
public void setBrowseBean(BrowseBean browseBean) {
this.browseBean = browseBean;
}
public BrowseBean getBrowseBean() {
return browseBean;
}
public void setNodeService(NodeService nodeService) {
this.nodeService = nodeService;
}
public NodeService getNodeService() {
return nodeService;
}
public void setSelectedIds(Map<String, Boolean> selectedIds) {
this.selectedIds = selectedIds;
}
public Map<String, Boolean> getSelectedIds() {
return selectedIds;
}
public void setDataTable(HtmlDataTable dataTable) {
this.dataTable = dataTable;
}
public HtmlDataTable getDataTable() {
return dataTable;
}
}
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.