cancel
Showing results for 
Search instead for 
Did you mean: 

Create Dynamic pages in Alfresco

lmanoh
Champ in-the-making
Champ in-the-making
Hi all, im new to alfresco, i need a help from u guys,
one of my requirement,  i need to create dynamic pages on alfresco template,
for example, ii  wants to have a text box with two button name  save and edit,
i need to display the data which is available in database in the text box and i can able to edit and save the same data in the template,

can anybody tell me, is this achivable task??  and How.?

help would be highly appriciated. :roll:

- Lenin M
2 REPLIES 2

samuel_penn
Champ in-the-making
Champ in-the-making
By template, I assume you mean a Freemarker presentation template which is displaying in a custom space view. You can't (easily - I haven't found a way) add a form into this, since the entire Alfresco page is already nested inside a form (and you can't have forms inside forms). However, you can have a link to a web script[1]. The way I've done this, is to have a link to a web script (with parameters in the URL so the script knows what to display), and the web script displays a form that the user can fill in, and save back. The final action of the web script is to redirect the user back to the page they came from.

Whether there is a way to do what you want all within a single presentation template I don't know. You can also call scripts (not web scripts) from a template[2], though this gives less control over presentation.

The Javascript API gives you access to the content in the Alfresco database (searching, setting node properties etc). If you need access to a different database, then that's somewhat trickier.

[1] http://wiki.alfresco.com/wiki/Web_Scripts
[2] http://wiki.alfresco.com/wiki/URL_Addressability

lmanoh
Champ in-the-making
Champ in-the-making
Thanks samuel,
i need one more help,

i download source file from Alfresco SVN. i modified something. in that i need access the costom content model by using the java script. i read that alfresco java script API available. but i dont know.. how to use that directly with our code.

var name=person.properties.userName

here, person not identified as an object. how can we exceute this code in java script.

shall i need to import anything??

please anyone help me

-lenin.