cancel
Showing results for 
Search instead for 
Did you mean: 

[Resolved] Showing your custom information

dranakan
Champ on-the-rise
Champ on-the-rise
Hello,

I need some advises about the creation of custom output. As I know, we can showing custom information with :

    Webscript : we can show a page using freemarker, rss, html, xml, atom, json, …
    Dashlet : we use a webscript to show a little page inside the dashboard
    Webstudio and WCM : Creation of sites (inside Alfresco)
    Surf : we create an external war and can develop some pages (new site)
But, how do I do to show a custom jsp  ?  (I would like to show information inside the jsp like : "/jsp/content/document-details.jsp"  but not showing the menu. I do a copy of it and put it inside /jsp/extension/. How can I access it by the browser? Does I create a webscript which redirect to this jsp ?):?:

Thanks
14 REPLIES 14

mikef
Champ in-the-making
Champ in-the-making
Have you looked at the information provided here: http://wiki.alfresco.com/wiki/Customising_An_Alfresco_JSP

dranakan
Champ on-the-rise
Champ on-the-rise
Thank you MikeF for your response.

Have you looked at the information provided here: http://wiki.alfresco.com/wiki/Customising_An_Alfresco_JSP
With this doc, we have help to modify a page inside the container.jsp. I would like to do something different.
How can I have a Jsp working alone on the site (no menu, …) :?: (as if we ask Webscript responding a html page)

:arrow: Other subject (related to your link)
I have modify the document-details.jsp to show a Workflow history, but I was unable to say to Alfresco to use this modified document-details.jsp (adding the navigation-rule in the faces-config.xml). I have ask the question here : http://forums.alfresco.com/en/viewtopic.php?f=10&t=20249

Thanks.

jayjayecl
Confirmed Champ
Confirmed Champ
How can I have a Jsp working alone on the site (no menu, …)

Have a look at the "plain-container.jsp" files. They don't display the parts you don't need.

Concerning your second problem, are you patching Alfresco as an AMP module ?
Then (I know that won't solve your problem), best practices are not to edit faces-config-[repo/beans/navigation/…].xml files, but do your own configuration in faces-config-custom.xml (which is loaded last on bootstrap).

good luck

dranakan
Champ on-the-rise
Champ on-the-rise
Thank you JayJayECL,

I have take a look to the file "plain-container.jsp" but I have no idea to use it…
For example, I want to have one URL (inside the link to a node, and customPage.jsp) that can I show information. I could do with a webscript writing html, but I would like to use a JSP to reuse some parts of differents jsp page (reuse some code part).

Concerning your second problem, are you patching Alfresco as an AMP module ?
Yes, I do (I have rewrite your question and my responses here : http://forums.alfresco.com/en/viewtopic.php?f=10&t=20276#p65900)

jayjayecl
Confirmed Champ
Confirmed Champ
After having installing your AMP and started Alfresco, please check if your faces-config customization is still here.

something I have not understood :
For example, I want to have one URL (inside the link to a node, and customPage.jsp)

Can you be more precise :
- where do you want to be your link to be displayed (try to be precise : tell us the page, the exact location of the link etc …)
- have you thought about implementing a custom Dialog ?
- have you thought about displaying this link in a "(space) presentation template" and directly call your jsp resource like : http://yourserver:8080/alfresco/extension/mycustomjsp.jsp

dranakan
Champ on-the-rise
Champ on-the-rise
Thank !

something I have not understood :
For example, I want to have one URL (inside the link to a node, and customPage.jsp)
For example, an URL like this : http://yourserver:8080/alfresco/extension/mycustomjsp.jsp?spaceStore=XXX

Can you be more precise :
- where do you want to be your link to be displayed (try to be precise : tell us the page, the exact location of the link etc …)
- have you thought about implementing a custom Dialog ?
- have you thought about displaying this link in a "(space) presentation template" and directly call your jsp resource like : http://yourserver:8080/alfresco/extensi … tomjsp.jsp
I would be able to use from extern. For example giving the link to another application that should be able to show what I want without all Alfresco interface.
Yes Smiley Happy like this http://yourserver:8080/alfresco/extensi … tomjsp.jsp

I am looking about that you say : (space) presentation template

jayjayecl
Confirmed Champ
Confirmed Champ
then it depends on what you need to display on this custom jsp.
If you need to display some information corresponding to a particuliar space or document, that kind of jsp "http://yourserver:8080/alfresco/extensi … tomjsp.jsp", without any context, will not be ok.

As for me, there are some contradictions among your needs, especially :
- You want a custom jsp identified with unique URL that could be exported on a portal (then you don't want / won't have any JSF navigation Context)
- You want to display custom information depending on the space or document

Well, I think you should just begin to develop your jsp and UI, and when problems arise, we will faces the problems and solve them Smiley Happy

dranakan
Champ on-the-rise
Champ on-the-rise
To resume :

:arrow: The situation
from another application, I want to show the related document. On this application, there are different buttons calling a webscript (on Alfresco server) and this one redirect to the document (different document, depending on the button). We click and see the document. (All works). Details : button give differents metadata (URL http://...webscript?idDocument=3423), the webscript search and redirect to the document

:arrow: The Goal
Now, I want to show the document and also some properties but without the all Alfresco interface. I think that I need to redirect the webscript to a JSP (and in this I show the document and the properties).

You take time to answer me… I appreciate 🙂

jayjayecl
Confirmed Champ
Confirmed Champ
No problem, this is interesting.
Guess what ? … I'm sorry for reusability of your jsps, but I think that the best way would be still using webscripts (passing the noderef into an arg of the webscript URL).
you will then be able to define the UI of your page (where to show the document, where to show metadata…).
for example, you could easily buil a page with a vertical separator : on the left, you will see the document (maybe using the webpreviewer that you can find into share webapp), on the right, you will display the metadata you want.

I wish you good luck, keep up feeding this topic, that can be useful for anyone