Hi Gavinc,
I looked at the wiki pages.
At the end, I decided to use NodePath component of alfresco and I created a generator for it. Steps that I took were:
1-I created a jar file including the following source code
package org.alfresco.web.bean.generator;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import org.alfresco.web.app.servlet.FacesHelper;
import org.alfresco.web.ui.repo.RepoConstants;
import org.alfresco.web.ui.repo.component.property.PropertySheetItem;
import org.alfresco.web.ui.repo.component.property.UIPropertySheet;
/**
* Generates a component to manage child associations.
*
* @author gavinc
*/
public class CustomNodePathGenerator extends BaseComponentGenerator
{
private String disabled;
public UIComponent generate(FacesContext context, String id)
{
UIComponent component = context.getApplication().
createComponent("org.alfresco.faces.NodePath");
FacesHelper.setupComponentId(context, component, id);
component.getAttributes().put("disabled", this.disabled);
return component;
}
@Override
protected void setupMandatoryValidation(FacesContext context, UIPropertySheet propertySheet,
PropertySheetItem item, UIComponent component, boolean realTimeChecking, String idSuffix)
{
// Override the setup of the mandatory validation
// so we can send the _current_value id suffix.
// We also enable real time so the page load
// check disables the ok button if necessary, as the user
// adds or removes items from the multi value list the
// page will be refreshed and therefore re-check the status.
super.setupMandatoryValidation(context, propertySheet, item,
component, true, "_current_value");
}
public String getDisabled() {
return disabled;
}
public void setDisabled(String disabled) {
this.disabled = disabled;
}
}
2-Then I add the following lines to faces-config-custom.xml
<managed-bean>
<managed-bean-name>CustomNodePathGenerator </managed-bean-name>
<managed-bean-class>org.alfresco.web.bean.generator.CustomNodePathGenerator</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>disabled </property-name>
<value>true</value>
</managed-property>
</managed-bean>
3-Then I add the following lines to web-client-config-custom.xml
<show-child-association name="my:incomingDocuments" component-generator="CustomNodePathGenerator" display-label="Incoming Documents"/>
But nothing happened.
Even I tried each of the followings:
<show-child-association name="my:incomingDocuments" converter="org.alfresco.faces.DisplayPathConverter" component-generator="CustomNodePathGenerator" display-label="Incoming Documents"/>
<show-child-association name="my:incomingDocuments" converter="org.alfresco.faces.DisplayPathConverter" display-label="Incoming Documents"/>
And again I got nothing. Can you help me please.
Thank you in advance.