cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in creating JSP pages using webforms

joeu
Champ in-the-making
Champ in-the-making
Is it possible to generate JSP pages by using webforms?
5 REPLIES 5

tommorris
Champ in-the-making
Champ in-the-making
Yes it is.

You need to associate a template with your XSD.
It's easiest to create your JSP first as normal,
and then change the extension to '.ftl' and associate it as a freemarker template, with an output path that has '.jsp' as the extension.

When you submit a newly created web-form, a new rendition will be created that represents your JSP. If this works, you can go back and modify the ftl template to include freemarker codes that include data from the web-form's fields.

Also see this: http://forums.alfresco.com/viewtopic.php?t=9279

joeu
Champ in-the-making
Champ in-the-making
Thanks for your reply.

But I couldn't able to understand it as I am very new to alfresco.

Can u plz tell the solution in clearly so that I can understand it.

Thanks for your help..

lakshmi
Champ in-the-making
Champ in-the-making
Hi JoeU,

I have tried this. The steps i followed to generate a jsp using web form are:

create your xsd and jsp files.
In your jsp use ftl syntax to include the components from your xsd as normal eg.if your xsd is index.xsd use ${index.top_logo}

Companyhome–>Datadictionary–>webform–>create new webform–>browse and select your xsd–>next–>browse and select your jsp,make the Output path pattern:${name}.jsp–>give next and finally finish.

when you create content using this webform a .jsp file is generated.

Hope this helps,
Lakshmi

zaizi
Champ in-the-making
Champ in-the-making
Hi,

If you are new to Alfresco, i strongly recommend that you work through the WSF example. It will give you a good idea. It is at http://wiki.alfresco.com/wiki/WSF

A

joeu
Champ in-the-making
Champ in-the-making
I saw the link and started to work on it.
I want to change header.jsp to make it suitable as per our requirement.

I saw the code and unable to understand.
like:
<c:set var="headerXml" value="${ds:getConfiguration(pageContext,'Header')}"/>
      <jsp:include page="${headerXml}"/>
Can u plz tell me what is ds:getConfiguration and from where this header value comes?

Thanks..