Hi Kim,

Thanks  a  lot for those information.
As I just want to do few changes to the presentation of the full item view, and 
from what you said I will do an overlay for the class I want to change.
I do understand though that if there is a need for a very different changes in 
the code base then I will create a module.

If there’s a better way please feel free.

Cheers,
Philippe


From: Kim Shepherd [mailto:kim.sheph...@gmail.com]
Sent: Wednesday, 6 October 2010 10:27 a.m.
To: Thuaud, Philippe
Cc: dspace-tech
Subject: Re: [Dspace-tech] Java file customisation for JSPUI


Hi Philippe,

Yes, you can use overlays (eg. the files you place in 
[dspace-src]/dspace/modules/jspui) for java sources, but they need to be placed 
in a [dspace-src]/dspace/modules/jspui/src/main/java, as opposed to the 
directory rather than in the [dspace-src]/dspace/modules/jspui/src/main/webapp 
directory where your overlaid JSPs are currently.

The 'java' directory might not exist as yet, so you'll need to create it if it 
isn't there.

Also, just a reminder that while compiled classes from the modules/jspui 
directory will override classes from dspace-jspui-api, you cannot add new 
classes this way.

Here's a reference to some ways of modifying the DSpace codebase or adding your 
own plugins:

https://wiki.duraspace.org/display/DSPACE/BuildCookbook#BuildCookbook-Recipe4%3A%28Deprecated%29UseOverlaystoSegregateLocalModifications

The page I've linked to above says that overlaying DSpace maven projects like 
this is a deprecated way of maintaining local customisations, but I'm not 
entirely sure why, or what the new recommendation is... if you were wanting to 
overlay dspace-api or make a lot of changes to the codebase, then creating and 
including your own module would be the usual recommendation, but for a few 
JSPUI changes (especially to presentation-related classes like ItemTag) I think 
an overlay will be fine.

Hopefully somebody else will chip in if there's a new, better way of doing this.

Cheers,

Kim

On 4 October 2010 14:40, Thuaud, Philippe 
<philippe.thu...@agresearch.co.nz<mailto:philippe.thu...@agresearch.co.nz>> 
wrote:
Dear community,

I have a Dspace version 1.6.2 with JSP User Interface.

I made some customisation on the basic jsp file like home.jsp, 
community-home.jsp where I copied first the original file to the folder " 
C:\dspace-1.6.2-src-release\dspace\modules\jspui\src\main\webapp" before 
modifying those files.

But now I want to go a bit dipper than those files. I'd like to change the 
display for full item display. What I want to do is not showing the 3rd column 
which the language. I don't want this.
So for instance here I want to change the file 
"C:\dspace-1.6.2-src-release\dspace-jspui\dspace-jspui-api\src\main\java\org\dspace\app\webui\jsptag\ItemTag.java"
 and just take out the third column that is describe in this part of the code 
(about line 619-630):

// Three column table - DC field, value, language
       out.println("<center><table class=\"itemDisplayTable\">");
       out.println("<tr><th id=\"s1\" class=\"standard\">"
               + LocaleSupport.getLocalizedMessage(pageContext,
                       "org.dspace.app.webui.jsptag.ItemTag.dcfield")
               + "</th><th id=\"s2\" class=\"standard\">"
               + LocaleSupport.getLocalizedMessage(pageContext,
                       "org.dspace.app.webui.jsptag.ItemTag.value")
               + "</th><th id=\"s3\" class=\"standard\">"
               + LocaleSupport.getLocalizedMessage(pageContext,
                       "org.dspace.app.webui.jsptag.ItemTag.lang")
               + "</th></tr>");

My question is, is it possible to do like the jsp files and copy the file into 
another folder before doing the changes or is it not like how it should be done 
for the java file...

Hope you understand my question and come back to me.

Cheers,
Philippe

________________________________________
Philippe Thuaud
Intern IT Technical & Development
T +64 7 838 5223
E philippe.thu...@agresearch.co.nz<mailto:philippe.thu...@agresearch.co.nz>
=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================

------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security
easier or more difficult to achieve? Read this whitepaper to separate the
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net<mailto:DSpace-tech@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/dspace-tech

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to