cancel
Showing results for 
Search instead for 
Did you mean: 

Insterting a .jar installed dashlet into presets.xml

sahudock
Champ in-the-making
Champ in-the-making
I've done a bit of searching on this topic and it really hasn't returned all that much. I recently installed formtek's Site Task Manager into my Alfresco installation and now want to create an instance of it in presets.xml for new sites. Since it's installed in a .jar file instead of the normal Alfresco directories I don't quite know what to reference for the url tag.

I'm sure if this is possible then there's a simple answer that I just can't seem to find.

Thanks in advance!
4 REPLIES 4

kaynezhang
World-Class Innovator
World-Class Innovator
By default alfresco dose not support presets.xml file in jar package.If you 'd like to support presets.xml file you should write a spring configuration file to customize webframework.presets.searchpath,for something like this :

<bean>
bean defination for jar file store
</bean>
   <bean id="webframework.classpathstore.presets.jar" class="org.springframework.extensions.webscripts.ClassPathStore">
      <property name="mustExist"><value>false</value></property>
      <property name="classPath"><value>jar:*!/META-INF/presets</value></property>
   </bean>

    <bean id="webframework.presets.searchpath" class="org.springframework.extensions.webscripts.SearchPath">
      <property name="searchPath">
         <list>
       <ref bean="webframework.classpathstore.presets.jar" />
            <ref bean="webframework.classpathstore.presets.custom" />
            <ref bean="webframework.classpathstore.presets" />
         </list>
      </property>
   </bean>
you have to do some deleloping work.
why not extract the jar file and put the presets.xml into alfresco/web-extension/site-data/presets?

sahudock
Champ in-the-making
Champ in-the-making
While I can definitely access the files within the .jar file, I have no real idea as to where those file should be extracted to within Alfresco. The folder structure within the .jar is dissimilar to that of Alfresco's so it leaves me with little context to begin to work these files into the install.

Also, there is no additional presets.xml file. I was simply referring to declaring a component within the presets file that is built into Alfresco:


        <component>
           <scope>page</scope>
           <region-id>component-1-1</region-id>
           <source-id>site/${siteid}/dashboard</source-id>
           <url>/components/dashlets/calendar</url>
           <properties>
              <height>250</height>
           </properties>


What I don't know is if it's possible to reference a .jar installed dashet in this form.

Hi Sahudock,
Have you found any solution of it ? I am also trying to insert .jar based dashlet into site configuration and funny part is i am trying the same addon as you i.e. : "formtek's Site Task Manager "

It never shows up in the site's dashboard.
thanks

kaynezhang
World-Class Innovator
World-Class Innovator
By default alfresco dose not support presets.xml file in jar package.If you 'd like to support presets.xml file you should write a spring configuration file to customize webframework.presets.searchpath,for something like this :

<bean>
bean defination for jar file store
</bean>
   <bean id="webframework.classpathstore.presets.jar" class="org.springframework.extensions.webscripts.ClassPathStore">
      <property name="mustExist"><value>false</value></property>
      <property name="classPath"><value>jar:*!/META-INF/presets</value></property>
   </bean>

    <bean id="webframework.presets.searchpath" class="org.springframework.extensions.webscripts.SearchPath">
      <property name="searchPath">
         <list>
       <ref bean="webframework.classpathstore.presets.jar" />
            <ref bean="webframework.classpathstore.presets.custom" />
            <ref bean="webframework.classpathstore.presets" />
         </list>
      </property>
   </bean>
you have to do some deleloping work.
why not extract the jar file and put the presets.xml into alfresco/web-extension/site-data/presets?