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

dranakan
Champ on-the-rise
Champ on-the-rise
:cry:
I have found good code to show the workflow history in a jsp. I would to reuse it (like you said, page with a vertical separator : on the left, you will see the document and on the right the workflow history).

There is no way to use JSP from a Webscript… I will rewrite in freemarker…

Thanks for your help !

jayjayecl
Confirmed Champ
Confirmed Champ
Well, I had a look at your own signature ("Alfresco How To"), followed the "How to … dashlet" chapter and then went to this very link
:http://livinginjava.blogspot.com/2008/11/how-to-create-custom-dashlet-in.html

That might be helpful to you

dranakan
Champ on-the-rise
Champ on-the-rise
This is to show the JSP in the dashboard.
It do : Webscript -> JSP -> Freemarker (show inside the dashboard). But I cannot do what I want with that…

You look know a lot of things about Alfresco, your help could be useful in this page How to : http://wiki.alfresco.com/wiki/How_to

Update it if you have good links JayJayECL 🙂

jayjayecl
Confirmed Champ
Confirmed Champ
I'll try to remember and will do my best…

good luck and tell us if you get results

dranakan
Champ on-the-rise
Champ on-the-rise
Hello,
But, how do I do to show a custom jsp ?
(in my first Post)

:arrow: We can create an custom JSP (test.jsp) page and put it for exemple in :/jsp/extension/test.jsp (the contains of this page is very simple. This do nothing… it's just to show some fields).
<%@ page contentType="text/html" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="html" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="core" %>
<core:view>
<html:form>
<BR/>
<html:outputText value="ABC "/>
<BR/>
<html:outputText value="DEF"/>
<html:outputText value="GEHI"/>
<BR/>
<html:outputText value="KLM :"/>
<html:inputText value=""/>
<html:commandButton value="Valider" action=""/>
<BR/>
</html:form>
</core:view>
:arrow: We can access it by : http://server:8080/alfresco/faces/jsp/extension/test.jsp

It's is also possible to use navigation rules (for exemple, having a formulaire that redirect to this page).
I recommend to read some documentation about Java JSF.

:arrow: If you try to do the same with a page like /jsp/content/document-details.jsp (copy in /jsp/extension/ and try to access), you receive an error because the JSP page use the tag <f:verbatim> which need to be use specificatly. You can do the same with /jsp/browse/browse.jsp and all works.