cancel
Showing results for 
Search instead for 
Did you mean: 

admin-console webscripts and surf development mode

lotharmärkle
Champ in-the-making
Champ in-the-making
Hello,

while creating a small admin-console webscript I discoverd that this is not possible using the surf developer configuration:
  
        <autowire>
            <!– Pick the mode: "production" or "development" –>
            <mode>development</mode>
         </autowire>

The content area will be just blank, regardless which console tool is selected. Switching the mode to "production" will show the tools (Version 4.0c/d).

This means I have to develop the admin webscripts with mode=production, which in turn means to restart share (or reindex the webscripts) on every change to see what happend - a litte annoying roundtrip.

Does anybody knows a workaround or how to fix it?

tia,
  lothar
4 REPLIES 4

lotharmärkle
Champ in-the-making
Champ in-the-making
there is already a wont-fixed-closed ticket for this
https://issues.alfresco.com/jira/browse/ALF-9970

But…there aren't things you can't do with surf/share/alfresco Smiley Wink

To have a workaround to work with a (single) custom admin-console webscript and development mode, so that one does not have to restart share after a change to the webscript is to hard-wire the ctool region:

  • create site-data/components directory in shared/alfresco/web-extension

  • create file page.ctool.admin-console.xml in the newly created components directory
and add this snippet there
<component>
   <region-id>ctool</region-id>
   <source-id>console</source-id>
   <scope>page</scope>
   <uri>/webscript/url/of/your/admin/console/webscript</uri>
</component>

Maybe its helpful to others as well. The downside of this approach is that the other admin-console pages are no longer accessible as long as the file page.ctool.admin-console.xml exists, but this is acceptable for the development I think.
Regards,
  lothar

You can also press "Refresh Web Scripts" on the http://$SHARE_URL/share/service/index page for clearing web scripts cache instead of switch the share in the development mode. Your web script changes also will be applied without restarting

bjoern_
Champ in-the-making
Champ in-the-making
hi lothar,

good work. thx 😉

alejandrogarcia
Champ in-the-making
Champ in-the-making
Works like a charm for a single admin-console webscript. Just what I needed for a webscript I'm developing… Will earn me lots of time!!

Thanks a million for sharing.

Regards.