cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a new dashlet in the configure wizard?

seraphon
Champ in-the-making
Champ in-the-making
Hi

I want to add a custom dashlet to the choices available in the configure wizard of the dasboard.
For that I looked at http://wiki.alfresco.com/wiki/User_Configurable_Dashboards#Configuring_Available_Layouts
but I still couldnt make anything.

To be precise I just want an dashlet where you have a link that does the same thing as the "add content to your home space" link in the getting started dashlet but with a different text.

This dashlet is for a particular group of users all using the same login whose role is to put photos in a particular space.
So instead of add content to your home space I just want to write, put photo to photos space.

Sounds simple but I couldnt manage it.
The first thing I tried is to declare a new dashlet in the file web-client-config-custom.xml in the extension folder

<config evaluator="string-compare" condition="Dashboards">
      <!– Dashboard layouts and available dashlets for the My Alfresco pages –>
      <dashboards>
        
         <dashlets>
            <!– this is a custom dashlet shown for the photo users –>
   <dashlet id="getting-photos" label-id="dashlet_gettingphotos_label"
                  description-id="dashlet_gettingphotos_desc"
                  jsp="/jsp/dashboards/dashlets/photo.jsp" allow-narrow="false" />
            <dashlet/>
         </dashlets>
      </dashboards>
   </config>

As for the photo.jsp I just copied getting_started.jsp and modofied

<a:booleanEvaluator value="#{NavigationBean.isGuest == true}">
<h:outputText style="font-weight:bold" value="Add a photo in photos space" />
</a:booleanEvaluator>
<f:verbatim><br></f:verbatim>
<h:outputText value="Navigate to homespace where files will be redirected to photos space" />

Sadly I get those errors in the log
11:07:17,765 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webClientConfigService' defined in class path resource [alfresco/web-client-application-context.xml]: Initialization of bean failed; nested exception is org.alfresco.config.ConfigException: Missing mandatory 'id' attribute for Dashboard 'dashlet' configuration element.
org.alfresco.config.ConfigException: Missing mandatory 'id' attribute for Dashboard 'dashlet' configuration element.
   at org.alfresco.web.config.DashboardsElementReader.getMandatoryDashletAttributeValue(DashboardsElementReader.java:219)
   at org.alfresco.web.config.DashboardsElementReader.parseDashletDefinition(DashboardsElementReader.java:175)
   at org.alfresco.web.config.DashboardsElementReader.parse(DashboardsElementReader.java:93)
   at org.alfresco.config.xml.XMLConfigService.parseConfigElement(XMLConfigService.java:268)
   at org.alfresco.config.xml.XMLConfigService.parse(XMLConfigService.java:123)
   at org.alfresco.config.BaseConfigService.parse(BaseConfigService.java:221)
   at org.alfresco.config.xml.XMLConfigService.init(XMLConfigService.java:81)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1093)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1063)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
   at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
   at org.apache.catalina.core.StandardService.start(StandardService.java:450)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

Can someone help me do this simple modification?

Regards
Seraphon
2 REPLIES 2

kevinr
Star Contributor
Star Contributor
The error is related to this line in your config:

<dashlet/>
You have specified an empty dashlet tag as well as your new dashlet - remove that line and it should do the trick.

Thanks,

Kevin

seraphon
Champ in-the-making
Champ in-the-making
Hi
thanks to you kevin it fianally works
and sorry for the silly mistake  :?

Regards
Seraphon
Getting started

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.