cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Form Creation in Alfresco Share

anand6105
Champ in-the-making
Champ in-the-making
Hi, I am trying to create  custom form in Alfresco Share. I have gone through lot of documents , but couldn't find any simple way to create custom form. The form architecture is also quite difficult to understand. Anybody who knows how to create custom forms, custom workflow forms templates. I have also looked into alfresco plugins available for form creation but couldn't end up as to which plugin is better. Please suggest any solution for this.

Thanks
Anand.
9 REPLIES 9

scouil
Star Contributor
Star Contributor
It actually depends on what you are trying to do.
If it's just modifying the fields order, switch to 2-columns rendering, grouping some fields, etc. , I'd redirect you to:
http://wiki.alfresco.com/wiki/Forms
All you have to do is write a short xml file that Spring will pick up.

If you want custom components or behavior, maybe you should have a look at alfresco-fdk to get a quick start.

anand6105
Champ in-the-making
Champ in-the-making
Hi Scouil,

Thanks for your reply. Actually, I am getting an error while integrating Alfresco fdk with my alfresco. I am using Alfresco 4.2.c Community edition.
I am getting the following error while accessing localhost:8080/share/page/form-console:

A problem has occurred.
This page could not be rendered:
form-console
Please notify your system administrator.

I have followed all the steps to integrate FDK with Alfresco but its not working. I also checked share.log file
It shows following error:



Caused by: org.springframework.extensions.webscripts.WebScriptException: 01040003 Failed to process template org/alfresco/form-console.ftl
   at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:175)
   at org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:438)
   … 41 more
Caused by: freemarker.core.InvalidReferenceException: Expression templateStylesheets is undefined on line 4, column 11 in org/alfresco/form-console.ftl.
   at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
   at freemarker.core.IteratorBlock.accept(IteratorBlock.java:100)
   at freemarker.core.Environment.visit(Environment.java:221)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:221)
   at freemarker.core.Macro$Context.runMacro(Macro.java:172)
   at freemarker.core.Environment.visit(Environment.java:614)
   at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
   at freemarker.core.Environment.visit(Environment.java:221)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:221)
   at freemarker.core.Environment.process(Environment.java:199)
   at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:171)
   … 42 more

scouil
Star Contributor
Star Contributor
What version of the fdk are you using? (http://wiki.alfresco.com/wiki/Community_file_list_4.2.c#Alfresco_SDK_and_APIs)
how do you deploy it?

zdenek
Champ in-the-making
Champ in-the-making
Can you please describe how to deploy that FDK.
thanks.

scouil
Star Contributor
Star Contributor
It depends if you choose amps or jar. Both are provided if I recall well.
The easiest is probably the jar. You just need to drop the jar in <tomcat>/shared/lib/ , restart the server and you're good to go.

zdenek
Champ in-the-making
Champ in-the-making
Thanks,

when i try link share/page/form-console.

i get this error:

A problem has occurred.
This page could not be rendered:
form-console
Please notify your system administrator.

scouil
Star Contributor
Star Contributor
Got anything in the log when you restart your server?
Have you picked the fdk version that correspond to your alfresco version?

zdenek
Champ in-the-making
Champ in-the-making
Yes, i have alfresco community 4.2.c(32bit) and have copied FDK to this folder C:\Alfresco\tomcat\shared\lib\alfresco-fdk-4.2.c.jar. After rebooting my work station and restart tomcat Alfresco.log and share.log are without an error.
When I tried link share/page/form-console I got this error in share log:

08:45:21,373 ERROR [freemarker.runtime] Template processing error: "Expression templateStylesheets is undefined on line 4, column 11 in org/alfresco/form-console.ftl."

Expression templateStylesheets is undefined on line 4, column 11 in org/alfresco/form-console.ftl.
The problematic instruction:
———-
==> list templateStylesheets as href [on line 4, column 4 in org/alfresco/form-console.ftl]
in user-directive renderStylesheets [on line 66, column 7 in org/alfresco/form-console.ftl]
———-

Java backtrace for programmers:
———-
freemarker.core.InvalidReferenceException: Expression templateStylesheets is undefined on line 4, column 11 in org/alfresco/form-console.ftl.
   at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
   at freemarker.core.IteratorBlock.accept(IteratorBlock.java:100)
   at freemarker.core.Environment.visit(Environment.java:221)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:221)
   at freemarker.core.Macro$Context.runMacro(Macro.java:172)
   at freemarker.core.Environment.visit(Environment.java:614)
   at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
   at freemarker.core.Environment.visit(Environment.java:221)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:221)
   at freemarker.core.Environment.process(Environment.java:199)
   at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:171)
   at org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:438)
   at org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:57)
   at org.springframework.extensions.surf.render.RenderService.processTemplate(RenderService.java:721)
   at org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.calculateComponentDependencies(TemplateInstanceRenderer.java:75)
   at org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.body(TemplateInstanceRenderer.java:134)
   at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
   at org.springframework.extensions.surf.render.bean.PageRenderer.body(PageRenderer.java:85)
   at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
   at org.springframework.extensions.surf.render.RenderService.renderPage(RenderService.java:762)
   at org.springframework.extensions.surf.mvc.PageView.dispatchPage(PageView.java:411)
   at org.springframework.extensions.surf.mvc.PageView.renderView(PageView.java:306)
   at org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:316)
   at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
   at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:374)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
   at java.lang.Thread.run(Thread.java:722)
08:45:21,408 ERROR [org.springframework.extensions.surf.render.RenderService] Unable to process template: form-console
08:45:21,408 ERROR [org.springframework.extensions.surf.render.RenderService] An exception occurred while rendering: form-console
org.springframework.extensions.surf.exception.RendererExecutionException: WebTemplateProcessor failed to process template uri: org/alfresco/form-console
   at org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:467)
   at org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:57)
   at org.springframework.extensions.surf.render.RenderService.processTemplate(RenderService.java:721)
   at org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.calculateComponentDependencies(TemplateInstanceRenderer.java:75)
   at org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.body(TemplateInstanceRenderer.java:134)
   at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
   at org.springframework.extensions.surf.render.bean.PageRenderer.body(PageRenderer.java:85)
   at org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
   at org.springframework.extensions.surf.render.RenderService.renderPage(RenderService.java:762)
   at org.springframework.extensions.surf.mvc.PageView.dispatchPage(PageView.java:411)
   at org.springframework.extensions.surf.mvc.PageView.renderView(PageView.java:306)
   at org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:316)
   at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
   at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:374)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
   at java.lang.Thread.run(Thread.java:722)
Caused by: org.springframework.extensions.webscripts.WebScriptException: 06020000 Failed to process template org/alfresco/form-console.ftl
   at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:175)
   at org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:438)
   … 41 more
Caused by: freemarker.core.InvalidReferenceException: Expression templateStylesheets is undefined on line 4, column 11 in org/alfresco/form-console.ftl.
   at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
   at freemarker.core.IteratorBlock.accept(IteratorBlock.java:100)
   at freemarker.core.Environment.visit(Environment.java:221)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:221)
   at freemarker.core.Macro$Context.runMacro(Macro.java:172)
   at freemarker.core.Environment.visit(Environment.java:614)
   at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
   at freemarker.core.Environment.visit(Environment.java:221)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:221)
   at freemarker.core.Environment.process(Environment.java:199)
   at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:171)
   … 42 more

am i missing something in configuration in my environment?
I there another way to develop(modify) alfresco from?

Thanks for help.

pwdev
Champ in-the-making
Champ in-the-making
I have an identical error to yours after deploying alfresco-fdk-4.2.c.jar into Alfresco 4.2.c Community, so I am doubtful your environment is the culprit. Testing AMP installation on a clean build now…

*update - AMP installation into 4.2.c results in same error, even on clean build. Issue is fixed in 4.2.d build with fdk-4.2.d, and works with console and unit tests. Not sure what changed yet…