How customize existing web script controller?

cancel
Showing results for 
Search instead for 
Did you mean: 
igorz
Active Member

How customize existing web script controller?

Jump to solution

I'm trying to customize web script controller for Web View Dashlet. I do the same in this tutorial but it's doesn't work for me. I created new user and when I log in to alfresco this dashlet is empty. I don't understand where it might be a bug.

Thanks,

Igor

1 Solution

Accepted Solutions
igorz
Active Member

Re: How customize existing web script controller?

Jump to solution

Thanks for reply, Krutik. I have found that "config.approval.evalautor" property "apply" value was not true, so now it works right. 

View solution in original post

7 Replies
krutik_jayswal
Senior Member II

Re: How customize existing web script controller?

Jump to solution

For overriding existing files in alfresco, you need to follow specific path.It also differs based on the alfresco version and the sdk version as well.It will be better if you can specify all the details which you did to achieve your requirement. 

igorz
Active Member

Re: How customize existing web script controller?

Jump to solution

I use "All-In-One SDK 3.0 Project" and do it all the same in this tutorial. I created webview.get.js file with next code:

if (model.isDefault == true)
{
model.widgets[0].options.webviewTitle = "Alfresco!";
model.widgets[0].options.webviewURI = "http://www.alfresco.com";
model.widgets[0].options.isDefault = false;
}


and new Surf Extension Modules file where was related targetPackageRoot with sourcePackageRoot. The auto-deploy property I set to true.

krutik_jayswal
Senior Member II

Re: How customize existing web script controller?

Jump to solution

add directory structure and module.xml as well.

mjaatit
Active Member

Re: How customize existing web script controller?

Jump to solution

HI,

Make sure that you use surf module extesnion to override the out-of-the-box webScript


<extension>
   <modules>
      <module>
            <id>Customize Web Script Controller for Web View Dashlet</id>
            <version>1.0</version> <auto-deploy>true</auto-deploy>
            <customizations>
               <customization>
                     <targetPackageRoot>org.alfresco.components.dashlets</targetPackageRoot>
                     <sourcePackageRoot>org.alfresco.tutorials.customization.webview.controller</sourcePackageRoot>
               </customization>
            </customizations>
       </module>
   </modules>
</extension>

igorz
Active Member

Re: How customize existing web script controller?

Jump to solution

Thanks for reply, Krutik. I have found that "config.approval.evalautor" property "apply" value was not true, so now it works right. 

igorz
Active Member

Re: How customize existing web script controller?

Jump to solution

Thanks for reply,Mohamed.  I've found my fault.

mjaatit
Active Member

Re: How customize existing web script controller?

Jump to solution

You are welcome.

Don't forget to mark you post as SOLVED