cancel
Showing results for 
Search instead for 
Did you mean: 

Surf Platform and Web Forms

sbarcena
Champ in-the-making
Champ in-the-making
Hi to all,

I have a web site basing on the example described in http: // http://www.benh.co.uk/alfresco/surf-part-I-getting-started and after seeing the webinard " Introducing the Alfresco SURF Platform ". This site is deployed in my Tomcat (if I accede at http://localhost:8080/alfresco this not appears, of course). But now I need to manage the content included in some regions of my pages. If I'm a project in http://localhost:8080/alfresco, I can include Web Forms that they allow me to manage the content. But, How can I connect these two things?

Any help?
4 REPLIES 4

deas0815
Star Contributor
Star Contributor
Hallo sbarcena,

same scenario here. Smiley Happy

At this time what we do is this:

_ Create webform based content instance in the web-client (alfresco webapp)
_ Select a content instance in a custom component in webstudio

Not perfect of course.

AFAIK alfresco is working on forms for the 3.1 and 3.2 releases. Maybe the changes ahead will allow creating
form based content easily from within a webscript component.

Nevertheless, I encountered other issues along the road.

In our scenario, form renditions do not really help. I'd like to have the raw xml content instance (or an equivalent bean)
in the controller and/or view. I got this working, but it required a few tweaks, but I may have missed something.

regards
Andreas

sbarcena
Champ in-the-making
Champ in-the-making
OK,

My site is static and is based on a structure of templates, components, pages and page-associations, so I have everything built with XML files and FTL templates.
I want build Web Forms to generate XML files in specific folders, and I'm going to have to change my FTL templates to draw the contents of XML.
Can I run jsp inside the template FTL? How?
Can I make the template FTL execute a JSP? How?
Can I configure my application to use templates JSP instead of FTL templates? How?

I'm desperate  :roll:

deas0815
Star Contributor
Star Contributor
OK,

My site is static and is based on a structure of templates, components, pages and page-associations, so I have everything built with XML files and FTL templates.
I want build Web Forms to generate XML files in specific folders, and I'm going to have to change my FTL templates to draw the contents of XML.
Can I run jsp inside the template FTL? How?
Can I make the template FTL execute a JSP? How?
Can I configure my application to use templates JSP instead of FTL templates? How?

I'm desperate  :roll:

I guess you are on the wrong track if you really consider executing a JSP from a freemarker template.

I guess what you really need/want is a natural "handy" representation of the form generated XML - at least this is
what I wanted.

I have extended alfresco classes to get a "natural" representation of the XML in Javascript (XML object) and in Freemarker (nodemodel). It works
in studio as well as "standalone".

It was a bit tricky though.

If you want, I can send you the source. Its uncommented and I'm quite busy now so I don't have time to explain in further detail.

regards
Andreas

ben
Champ in-the-making
Champ in-the-making
Hi,

I have also posted a tutorial showing two basic examples of using WCM content with SURF which may be useful - http://www.benh.co.uk/alfresco/surf-part-3-alfresco-wcm-content/

Regards, Ben.