04-07-2010 01:47 PM
04-08-2010 04:35 AM
04-09-2010 07:31 PM
there has to be no 'Add content' button, but only the 'Create Content' button. How can I implement this?
package ma.samples;
import org.alfresco.web.bean.NavigationBean;
/**
*
* @author Haltout Sohaib
*/
public class CustomSpaceBean {
private NavigationBean navigationBean;
/**
* Get the value of navigationBean
*
* @return the value of navigationBean
*/
public NavigationBean getNavigationBean() {
return navigationBean;
}
/**
* Set the value of navigationBean
*
* @param navigationBean new value of navigationBean
*/
public void setNavigationBean(NavigationBean navigationBean) {
this.navigationBean = navigationBean;
}
private boolean renderAddContent;
/**
* Method to determine weither to show the 'add content' action
* or any other action by the space type.
*
*/
public boolean isRenderAddContent() {
return !(navigationBean.getCurrentNode().getType().equals(MyContentModel.CUSTOM_SPACE_QNAME);
}
/**
* Set the value of renderAddContent
*
* @param renderAddContent new value of renderAddContent
*/
public void setRenderAddContent(boolean renderAddContent) {
this.renderAddContent = renderAddContent;
}
}
<bean id="customSpaceBean"
class="ma.samples.CustomSpaceBean">
<property name="navigationBean">
<ref bean="navigationBean" />
</property>
</bean>
<r:actions id="acts_add_content" value="add_content_menu" context="#{NavigationBean.currentNode}" showLink="true" /><r:actions id="acts_add_content" value="add_content_menu" context="#{NavigationBean.currentNode}" showLink="#{customSpaceBean.renderAddContent}" />04-10-2010 04:42 AM
09-04-2010 12:33 AM
09-26-2010 02:38 AM
09-26-2010 08:00 PM
09-27-2010 04:15 AM
09-28-2010 10:52 AM
09-28-2010 04:57 PM
List<SelectItem> getObjectTypes() {
List<SelectItem> objTypes = super.getObjectTypes();
// do your filtering
String nodeId = this.navigator.getCurrentNodeId();
containerNodeRef = new NodeRef(Repository.getStoreRef(), nodeId);
QName cName = getNodeService().getType(containerNodeRef);
if ( getDictionaryService().isSubClass(cName, yourType) )
else
…
return objTypes;Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.