Full Download OpenCms 7 Development Extending and customizing OpenCms through its Java API 1st Edition Liliedahl PDF DOCX
Full Download OpenCms 7 Development Extending and customizing OpenCms through its Java API 1st Edition Liliedahl PDF DOCX
com
https://ebookname.com/product/opencms-7-development-
extending-and-customizing-opencms-through-its-java-api-1st-
edition-liliedahl/
OR CLICK BUTTON
DOWLOAD EBOOK
https://ebookname.com/product/embedded-android-porting-extending-and-
customizing-1st-edition-karim-yaghmour/
ebookname.com
https://ebookname.com/product/open-source-messaging-application-
development-building-and-extending-gaim-1st-edition-sean-egan/
ebookname.com
https://ebookname.com/product/love-and-its-critics-from-the-song-of-
songs-to-shakespeare-and-milton-s-eden-michael-bryson/
ebookname.com
The Ultimate Guide to Network Marketing 37 Top Network
Marketing Income Earners Share Their Most Preciously
Guarded Secrets to Building Extreme Wealth 1st Edition Joe
Rubino
https://ebookname.com/product/the-ultimate-guide-to-network-
marketing-37-top-network-marketing-income-earners-share-their-most-
preciously-guarded-secrets-to-building-extreme-wealth-1st-edition-joe-
rubino/
ebookname.com
https://ebookname.com/product/dietary-sugars-and-health-1st-edition-
michael-i-goran/
ebookname.com
https://ebookname.com/product/doctors-of-deception-what-they-don-t-
want-you-to-know-about-shock-treatment-1st-edition-linda-andre/
ebookname.com
https://ebookname.com/product/cardiovascular-regeneration-and-stem-
cell-therapy-1st-edition-annarosa-leri-md/
ebookname.com
https://ebookname.com/product/hitlerjugend-hitler-youth-and-12-ss-
panzer-division-1933-45-1st-edition-tom-cockle/
ebookname.com
Artisanal Fishers on the Kenyan Coast Jan C. Hoorweg
https://ebookname.com/product/artisanal-fishers-on-the-kenyan-coast-
jan-c-hoorweg/
ebookname.com
www.it-ebooks.info
OpenCms 7 Development
Dan Liliedahl
BIRMINGHAM - MUMBAI
www.it-ebooks.info
OpenCms 7 Development
All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of
the information presented. However, the information contained in this book is sold
without warranty, either express or implied. Neither the author, Packt Publishing,
nor its dealers or distributors will be held liable for any damages caused or alleged to
be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
ISBN 978-1-847191-05-2
www.packtpub.com
www.it-ebooks.info
Credits
Reviewer Indexer
Olli Aro Rekha Nair
www.it-ebooks.info
About the Author
www.it-ebooks.info
I would like to thank the people at Packt who have helped me
along the way with this book, especially Douglas Paterson, Senior
Acquisition Editor for his initial guidance and ongoing support.
Thanks also to Abhijeet Deobhakta for his patience and for putting
up with many delays and missed deadlines. Many thanks to Olli
Arro and Himanshu Panchal for their time, comments, and helpful
suggestions. It is great people like these who have made this book
enjoyable to write and seem to go by quickly.
www.it-ebooks.info
About the Reviewer
Olli Aro hails from Finnish Lapland, but is based now in the north of England.
Olli Aro has over 10 years experience in the area of innovation and development of
software and web-based applications. In his current role as head of technology and
product development for Clicks and Links Ltd, Olli has been responsible for the
company's portfolio of Open Source-based solutions. He has been involved in the
OpenCms project since 2001 (version 4), contributing various open source modules
and bug fixes to the project. Olli was also involved in reviewing the previous version
of the OpenCms book. Prior to Clicks and Links, Olli worked for organizations such
as Nokia, eMobile Ltd, and CCC Systems Oy. In his spare time, he works on his own
social networking site, Breakaway Republix.
www.it-ebooks.info
Table of Contents
Preface 1
Chapter 1: Overview 7
The Site Design 8
Required Developer Skills 12
Basic Site Development 12
Sites Requiring Custom Content Types 13
Sites Requiring Custom Features 14
Bespoke Site Development 14
OpenCms Application Overview 14
The OpenCms Directory Structure 15
The Real File System Layout 15
The Virtual File System Layout 18
OpenCms Architecture 19
Extensibility through Modules 20
The OpenCms Web Request Process 20
OpenCms Web Application Packaging 21
Building a Complete Site with OpenCms 21
Summary 22
Chapter 2: Developing in OpenCms 23
Developing Basic Site Content 23
Setting Up an Environment for Creating JSP Code 24
Editing Files Using File Synchronization 26
Using WebDAV for Editing 28
Debugging JSP Code in OpenCms 30
Setting Up an Eclipse Environment to Build OpenCms 33
Tools Needed to Build OpenCms in Eclipse 33
Step 1: Checkout the Project Source from CVS 34
Step 2: Setting the Classpath for Compilation 40
Step 3: Using Ant to Build a Distribution Package 41
Building OpenCms outside of Eclipse Using Ant 44
Debugging OpenCms in Eclipse 45
www.it-ebooks.info
Table of Contents
[ ii ]
www.it-ebooks.info
Table of Contents
[ iii ]
www.it-ebooks.info
Table of Contents
[ iv ]
www.it-ebooks.info
Preface
OpenCms can be used by Java developers to create sophisticated add-ons and
customizations that extend the power of OpenCms in virtually unlimited directions.
Starting by showing how to set up a development environment for OpenCms
work, this book moves you through various tasks of increasing complexity. Some
of the common tasks covered are building OpenCms, XML asset type development,
templating, module development, user and role setup, and search integration. In
addition to these common tasks some more advanced topics are covered such as
self-registering users, RSS support, developing custom widgets, and extending the
administrative interface. All the topics include examples and are presented while
building a sample blog site.
This book is a clear, practical tutorial to OpenCms development. It will take you
through the development of an example site, illustrating the key concepts of
OpenCms development with examples at every stage.
Chapter 2 sets the stage for coding by providing details on how to set up various
OpenCms development environments. The chapter includes a step-by-step
procedure for using Eclipse to check out and build OpenCms from the CVS
repository. The chapter describes how to build OpenCms using Ant and also how to
debug OpenCms itself.
www.it-ebooks.info
Preface
Chapter 4 continues developing the sample site by covering JSP template coding.
A set of templates is created to display the blog content, including a complete run
through of how they are put together. The example illustrates the use of custom
template coding beyond the standard OpenCms tag library by sub-classing Java
template classes. Included in the chapter is an overview of the resource and template
loading mechanism. Also relating to templates is a description of using expressions
and JSTL within template code. Lastly in the chapter is a guide to using WebDAV for
template editing in Eclipse.
Chapter 5 covers the usage of Lucene within OpenCms, beginning with an overview
of basic Lucene concepts. This is followed by an in-depth guide to creating a search
index in OpenCms. The guide provides an example of building a new search index
for the blog site example and describes a developer tool, which may be used to
perform test queries against the index. The chapter includes a walkthrough of
implementing a search form in OpenCms for simple cases and for more
advanced situations.
Chapter 6 continues the build out of the sample site by adding support for users
and commenting. It starts with an explanation of OpenCms security, including a
discussion on Roles, Groups, Users, and Organizational Units. It then proceeds with
the set up of the group and role structure for the sample, and shows how they are
used within the code.
Chapter 7 shows how easy it is to support user customizations of site pages. It then
show an example of this by adding RSS feed support to the sample site, allowing
users to specify a custom feed. Included in the chapter is a discussion of integrating
third-party libraries into OpenCms.
Chapter 8 describes the custom widget interface, and then shows how to design and
create a widget. The widget provides a pluggable data interface that is used to obtain
a list of selection values for a select list. The chapter then illustrates how to read XML
content fields by creating a list source that gets its values from any content field.
Finally, the chapter shows how to localize message strings and how to register and
use the custom widget.
[]
www.it-ebooks.info
Preface
Chapter 9 shows how RSS feeds can be generated from OpenCms content. It also
shows how wrapper classes can be used around structured content items to make
them easier to work with, and then walks through creation of an RSS feed generation
module using these concepts.
Chapter 10 discusses how administration points are created in OpenCms, and also
how to use OpenCms dialog classes. The chapter also discusses how widgets can
be used programmatically. An example administration point is created that ties
together topics from previous chapters, showing how to use widgets, dialogs, and
multiple screens.
Conventions
In this book, you will find a number of styles of text that distinguish between
different kinds of information. Here are some examples of these styles and an
explanation of their meaning.
There are three styles for code. Code words in text are shown as follows: "We can
include other contexts through the use of the include directive."
[]
www.it-ebooks.info
Preface
When we wish to draw your attention to a particular part of a code block, the
relevant lines or items will be made bold:
<mappings>
<mapping suffix=".jsp" />
<mapping suffix=".html" /> (add this line)
<mapping suffix=".htm" /> (add this line)
</mappings>
New terms and important words are introduced in a bold-type font. Words that you
see on the screen, in menus or dialog boxes for example, appear in our text like this:
"clicking the Next button moves you to the next screen".
Reader Feedback
Feedback from our readers is always welcome. Let us know what you think about
this book, what you liked or may have disliked. Reader feedback is important for us
to develop titles that you really get the most out of.
If there is a book that you need and would like to see us publish, please send
us a note in the SUGGEST A TITLE form on www.packtpub.com or
email suggest@packtpub.com.
If there is a topic that you have expertise in and you are interested in either writing
or contributing to a book, see our author guide on www.packtpub.com/authors.
[]
www.it-ebooks.info
Preface
Customer Support
Now that you are the proud owner of a Packt book, we have a number of things to
help you to get the most from your purchase.
Errata
Although we have taken every care to ensure the accuracy of our contents, mistakes
do happen. If you find a mistake in one of our books—maybe a mistake in text or
code—we would be grateful if you would report this to us. By doing this you can
save other readers from frustration, and help to improve subsequent versions of
this book. If you find any errata, report them by visiting http://www.packtpub.
com/support, selecting your book, clicking on the Submit Errata link, and entering
the details of your errata. Once your errata are verified, your submission will be
accepted and the errata are added to the list of existing errata. The existing errata can
be viewed by selecting your title from http://www.packtpub.com/support.
Questions
You can contact us at questions@packtpub.com if you are having a problem with
some aspect of the book, and we will do our best to address it.
[]
www.it-ebooks.info
www.it-ebooks.info
Overview
This book is a guide for developers interested in building websites using the
OpenCms content management system. The book is intended for developers
who are familiar with Java, JSP, and building web applications based on the
Java J2EE framework.
In this book, we will develop a website designed for a blog writer. In the course of
building our site, we will go over these topics:
We will go over all the steps involved in building a blog website using OpenCms.
We will start by describing the features and requirements of our website and will
then provide an overview of OpenCms. Next, we will discuss how to create a
development environment. We then will go over the steps involved in creating
structured content types, to hold our site content. After that, we will cover creation
of templates and Java code, to display the content. The site also supports search and
user comments;, so we will cover the Lucene search engine as well to show how to
provide login support. As the site additionally supports RSS clients and feeds, we
will discuss how to add new features to OpenCms.
Before we get into the development details, we will first discuss some of the skills
required to develop sites with OpenCms. This will provide us with a basis
for understanding the environment and tools, which we will need to do our
development work.
www.it-ebooks.info
Overview
[]
www.it-ebooks.info
Chapter 1
• Blogs are listed in descending order of date, with the most recent blog
appearing at the top.
• Each blog entry is listed in teaser style, with a link to the full blog appearing
at the end.
• Blog entries support a list of topics attached to them.
• Archives of previous blogs appear on the righthand side, in
descending order.
• Past blog archives can be browsed.
• The site supports contents search with paginated results.
• Ads may be placed on the righthand side.
• Users may self register for the site.
• Registered users may add comments and create a customized RSS feed on
their homepage.
• Blogs may be viewed in various RSS formats.
[]
www.it-ebooks.info
Overview
There are two additional mockups for the site. The first one shows a detailed view of
a blog. This view is shown when a user clicks on a blog from the homepage:
[ 10 ]
www.it-ebooks.info
Chapter 1
The last mockup shows what the search result screen looks like. Search results are
shown in decreasing order of relevance to the search term. The pagination controls at
the bottom of the page allow for the results to be scrolled, if necessary:
[ 11 ]
www.it-ebooks.info
Overview
Files in the VFS may also be exported to the Real File System (RFS) and served
statically or by a web server. In this way, the website can operate in exactly the same
way it did, prior to being placed into OpenCms, except for the fact that it is now
version controlled. The following illustration shows how OpenCms can be used in
this fashion:
[ 12 ]
www.it-ebooks.info
Chapter 1
For this developer audience, the skill levels will include the following:
Before undertaking this task, we will want to understand the feature and content
requirements of our site in detail. This will allow us to properly design the templates
and custom content types, which our site will need. This is a design exercise which
will not be touched upon in this book. However, we will discuss the specific tasks
required in implementing templates and the custom content types once they have
been designed.
For this type of development, the developer requires first level skills plus:
[ 13 ]
www.it-ebooks.info
Overview
Developing custom features in OpenCms will require the second level skills, plus:
[ 14 ]
www.it-ebooks.info
Discovering Diverse Content Through
Random Scribd Documents
embarrassed, I confessed my error. Of course I really knew that the
Medicis had nothing to do with Venice, but for a short time it did not
appear to me at all incorrect. Now I was compelled to practise
justice; as I had so frequently interpreted my patient’s symptomatic
actions I could save my prestige only by being honest and admitting
to him the secret motives of my averseness to his trip.
It may cause general astonishment to learn how much stronger is
the impulse to tell the truth than is usually supposed. Perhaps it is a
result of my occupation with psychoanalysis that I can scarcely lie
any more. As often as I attempt a distortion I succumb to an error or
some other faulty act, which betrays my dishonesty, as was manifest
in this and in the preceding examples.
Of all faulty actions the mechanism of the error seems to be the
most superficial. That is, the occurrence of the error invariably
indicates that the mental activity concerned had to struggle with
some disturbing influence, although the nature of the error need not
be determined by the quality of the disturbing idea, which may have
remained obscure. It is not out of place to add that the same state
of affairs may be assumed in many simple cases of lapses in
speaking and writing. Every time we commit a lapse in speaking or
writing we may conclude that through mental processes there has
come a disturbance which is beyond our intention. It may be
conceded, however, that lapses in speaking and writing often follow
the laws of similarity and convenience, or the tendency to
acceleration, without allowing the disturbing element to leave a trace
of its own character in the error resulting from the lapses in
speaking or writing. It is the responsiveness of the linguistic material
which at first makes possible the determination of the error, but it
also limits the same.
In order not to confine myself exclusively to personal errors I will
relate a few examples which could just as well have been ranged
under “Lapses in Speech” or under “Erroneously Carried-out
Actions,” but as all these forms of faulty action have the same value
they may as well be reported here.
(a) I forbade a patient to speak on the telephone to his lady-love,
with whom he himself was willing to break off all relations, as each
conversation only renewed the struggling against it. He was to write
her his final decision, although there were some difficulties in the
way of delivering the letter to her. He visited me at one o’clock to tell
me that he had found a way of avoiding these difficulties, and
among other things he asked me whether he might refer to me in
my professional capacity.
At two o’clock while he was engaged in composing the letter of
refusal, he interrupted himself suddenly, and said to his mother,
“Well, I have forgotten to ask the Professor whether I may use his
name in the letter.” He hurried to the telephone, got the connection,
and asked the question, “May I speak to the Professor after his
dinner?” In answer he got an astonished “Adolf, have you gone
crazy!” The answering voice was the very voice which at my
command he had listened to for the last time. He had simply “made
a mistake,” and in place of the physician’s number had called up that
of his beloved.
(b) During a summer vacation a schoolteacher, a poor but excellent
young man, courted the daughter of a summer resident, until the
girl fell passionately in love with him, and even prevailed upon her
family to countenance the matrimonial alliance in spite of the
difference in position and race. One day, however, the teacher wrote
his brother a letter in which he said: “Pretty, the lass is not at all, but
she is very amiable, and so far so good. But whether I can make up
my mind to marry a Jewess I cannot yet tell.” This letter got into the
hands of the fiancée, who put an end to the engagement, while at
the same time his brother was wondering at the protestations of
love directed to him. My informer assured me that this was really an
error and not a cunning trick.
I am familiar with another case in which a woman who was
dissatisfied with her old physician, and still did not openly wish to
discharge him, accomplished this purpose through the interchange
of letters. Here, at least, I can assert confidently that it was error
and not conscious cunning that made use of this familiar comedy-
motive.
(c) Brill[63] tells of a woman who, inquiring about a mutual friend,
erroneously called her by her maiden name. Her attention having
been directed to this error, she had to admit that she disliked her
friend’s husband and had never been satisfied with her marriage.
Maeder[64] relates a good example of how a reluctantly repressed
wish can be satisfied by means of an “error.” A colleague wanted to
enjoy his day of leave of absence absolutely undisturbed, but he also
felt that he ought to go to Lucerne to pay a call which he did not
anticipate with any pleasure. After long reflection, however, he
concluded to go. For pastime on the train he read the daily
newspapers. He journeyed from Zurich to Arth Goldau, where he
changed trains for Lucerne, all the time engrossed in reading.
Presently the conductor informed him that he was in the wrong train
—that is, he had got into the one which was returning from Goldau
to Zurich, whereas his ticket was for Lucerne.
A very similar trick was played by me quite recently. I had promised
my oldest brother to pay him a long-due visit at a sea-shore in
England; as the time was short I felt obliged to travel by the shortest
route and without interruption. I begged for a day’s sojourn in
Holland, but he thought that I could stop there on my return trip.
Accordingly I journeyed from Munich through Cologne to Rotterdam
—Hook of Holland—where I was to take the steamer at midnight to
Harwich. In Cologne I had to change cars; I left my train to go into
the Rotterdam express, but it was not to be found. I asked various
railway employees, was sent from one platform to another, got into
an exaggerated state of despair, and could easily reckon that during
this fruitless search I had probably missed my connection.
After this was corroborated, I pondered whether or not I should
spend the night in Cologne. This was favoured by a feeling of piety,
for according to an old family tradition, my ancestors were once
expelled from this city during a persecution of the Jews. But
eventually I came to another decision; I took a later train to
Rotterdam, where I arrived late at night and was thus compelled to
spend a day in Holland. This brought me the fulfilment of a long-
fostered wish—the sight of the beautiful Rembrandt paintings at The
Hague and in the Royal Museum at Amsterdam. Not before the next
forenoon, while collecting my impressions during the railway journey
in England, did I definitely remember that only a few steps from the
place where I got off at the railroad station in Cologne, indeed, on
the same platform, I had seen a large sign, “Rotterdam—Hook of
Holland.” There stood the train in which I should have continued my
journey.
If one does not wish to assume that, contrary to my brother’s
orders, I had really resolved to admire the Rembrandt pictures on
my way to him, then the fact that despite clear directions I hurried
away and looked for another train must be designated as an
incomprehensible “blinding.” Everything else—my well-acted
perplexity, the emergence of the pious intention to spend the night
in Cologne—was only a contrivance to hide my resolution until it had
been fully accomplished.
One may possibly be disinclined to consider the class of errors which
I have here explained as very numerous or particularly significant.
But I leave it to your consideration whether there is no ground for
extending the same points of view also to the more important errors
of judgment, as evinced by people in life and science. Only for the
most select and most balanced minds does it seem possible to guard
the perceived picture of external reality against the distortion to
which it is otherwise subjected in its transit through the psychic
individuality of the one perceiving it.
XI
COMBINED FAULTY ACTS
Two of the last-mentioned examples, my error which transfers the
Medici to Venice and that of the young man who knew how to
circumvent a command against a conversation on the telephone with
his lady love, have really not been fully discussed, as after careful
consideration they may be shown to represent a union of forgetting
with an error. I can show the same union still more clearly in certain
other examples.
(a) A friend related to me the following experience: “Some years ago
I consented to be elected to the committee of a certain literary
society, as I supposed the organization might some time be of use to
me in assisting me in the production of my drama. Although not
much interested, I attended the meetings regularly every Friday.
Some months ago I was definitely assured that one of my dramas
would be presented at the theatre in F., and since that time it
regularly happened that I forgot the meeting of the association. As I
read their programme announcements I was ashamed of my
forgetfulness. I reproached myself, feeling that it was certainly rude
of me to stay away now when I no longer needed them, and
determined that I would certainly not forget the next Friday.
Continually I reminded myself of this resolution until the hour came
and I stood before the door of the meeting-room. To my
astonishment it was locked; the meeting was already over. I had
mistaken my day; it was already Saturday!”
(b) The next example is the combination of a symptomatic action
with a case of mislaying; it reached me by remote byways, but from
a reliable source.
A woman travelled to Rome with her brother-in-law, a renowned
artist. The visitor was highly honoured by the German residents of
Rome, and among other things received a gold medal of antique
origin. The woman was grieved that her brother-in-law did not
sufficiently appreciate the value of this beautiful gift. After she had
returned home she discovered in unpacking that—without knowing
how—she had brought the medal home with her. She immediately
notified her brother-in-law of this by letter, and informed him that
she would send it back to Rome the next day. The next day,
however, the medal was so aptly mislaid that it could not be found
and could not be sent back, and then it dawned on the woman what
her “absent-mindedness” signified—namely, that she wished to keep
the medal herself.
(c) Here are some cases in which the falsified action persistently
repeats itself, and at the same time also changes its mode of action:
—
Due to unknown motives, Jones[65] left a letter for several days on
his desk, forgetting each time to post it. He ultimately posted it, but
it was returned to him from the Dead-letter Office because he forgot
to address it. After addressing and posting it a second time it was
again returned to him, this time without a stamp. He was then
forced to recognize the unconscious opposition to the sending of the
letter.
(d) A short account by Dr. Karl Weiss (Vienna)[66] of a case of
forgetting impressively describes the futile effort to accomplish
something in the face of opposition. “How persistently the
unconscious activity can achieve its purpose if it has cause to
prevent a resolution from being executed, and how difficult it is to
guard against this tendency, will be illustrated by the following
incident: An acquaintance requested me to lend him a book and
bring it to him the next day. I immediately promised it, but perceived
a distinct feeling of displeasure which I could not explain at the time.
Later it became clear to me: this acquaintance had owed me for
years a sum of money which he evidently had no intention of
returning. I did not give this matter any more thought, but I recalled
it the following forenoon with the same feeling of displeasure, and at
once said to myself: ‘Your unconscious will see to it that you forget
the book, but you don’t wish to appear unobliging and will therefore
do everything not to forget it.’ I came home, wrapped the book in
paper, and put it near me on the desk while I wrote some letters.
“A little later I went away, but after a few steps I recollected that I
had left on the desk the letters which I wished to post. (By the way,
one of the letters was written to a person who urged me to
undertake something disagreeable.) I returned, took the letters, and
again left. While in the street-car it occurred to me that I had
undertaken to purchase something for my wife, and I was pleased at
the thought that it would be only a small package. The association,
‘small package,’ suddenly recalled ‘book’—and only then I noticed
that I did not have the book with me. Not only had I forgotten it
when I left my home the first time, but I had overlooked it again
when I got the letters near which it lay.”
(e) A similar mechanism is shown in the following fully analysed
observation of Otto Rank[67]:—
“A scrupulously orderly and pedantically precise man reported the
following occurrence, which he considered quite remarkable: One
afternoon on the street wishing to find out the time, he discovered
that he had left his watch at home, an omission which to his
knowledge had never occurred before. As he had an engagement
elsewhere and had not enough time to return for his watch, he
made use of a visit to a woman friend to borrow her watch for the
evening. This was the most convenient way out of the dilemma, as
he had a previous engagement to visit this lady the next day.
Accordingly, he promised to return her watch at that time.
“But the following day when about to consummate this he found to
his surprise that he had left the watch at home; his own watch he
had with him. He then firmly resolved to return the lady’s property
that same afternoon, and even followed out his resolution. But on
wishing to see the time on leaving her he found to his chagrin and
astonishment that he had again forgotten to take his own watch.
“The repetition of this faulty action seemed so pathologic to this
order-loving man that he was quite anxious to know its psychologic
motivation, and when questioned whether he experienced anything
disagreeable on the critical day of the first forgetting, and in what
connection it had occurred, the motive was promptly found. He
related that he had conversed with his mother after luncheon,
shortly before leaving the house. She told him that an irresponsible
relative, who had already caused him much worry and loss of
money, had pawned his (the relative’s) watch, and, as it was needed
in the house, the relative had asked for money to redeem it. This
almost “forced” loan affected our man very painfully and brought
back to his memory all the disagreeable episodes perpetrated by this
relative for many years.
“His symptomatic action therefore proves to be manifoldly
determined. First, it gives expression to a stream of thought which
runs perhaps as follows: ‘I won’t allow my money to be extorted this
way, and if a watch is needed I will leave my own at home.’ But as
he needed it for the evening to keep his appointment, this intention
could only be brought about on an unconscious path in the form of a
symptomatic action. Second, the forgetting expresses a sentiment
something like the following: ‘This everlasting sacrificing of money
for this good-for-nothing is bound to ruin me altogether, so that I
will have to give up everything.’ Although the anger, according to the
report of this man, was only momentary, the repetition of the same
symptomatic action conclusively shows that in the unconscious it
continued to act more intensely, and may be equivalent to the
conscious expression: ‘I cannot get this story out of my head.[68]
That the lady’s watch should later meet the same fate will not
surprise us after knowing this attitude of the unconscious.’
“Yet there may be still other special motives which favour the
transference on the ‘innocent’ lady’s watch. The nearest motive is
probably that he would have liked to keep it as a substitute for his
own sacrificed watch, and that hence he forgot to return it the next
day. He also might have liked to possess this watch as a souvenir of
the lady. Moreover, the forgetting of the lady’s watch gave him the
excuse for calling on the admired one a second time; for he was
obliged to visit her in the morning in reference to another matter,
and with the forgetting of the watch he seemed to indicate that this
visit for which an appointment had been made so long ago was too
good for him to be used simply for the return of a watch.
“Twice forgetting his own watch and thus making possible the
substitution of the lady’s watch speaks for the fact that our man
unconsciously endeavoured to avoid carrying both watches at the
same time. He obviously thought of avoiding the appearance of
superfluity which would have stood out in striking contrast to the
want of the relative; but, on the other hand, he utilized this as a
self-admonition against his apparent intention to marry this lady,
reminding himself that he was tied to his family (mother) by
indissoluble obligations.
“Finally, another reason for the forgetting of the lady’s watch may be
sought in the fact that the evening before he, a bachelor, was
ashamed to be seen with a lady’s watch by his friends, so that he
only looked at it stealthily, and in order to evade the repetition of
this painful situation he could not take the watch along. But as he
was obliged to return it, there resulted here, too, an unconsciously
performed symptomatic action which proved to be a compromise
formation between conflicting emotional feelings and a dearly
bought victory of the unconscious instance.”
In the same discussion Rank has also paid attention to the very
interesting relation of “faulty actions and dreams,” which cannot,
however, be followed here without a comprehensive analysis of the
dream with which the faulty action is connected. I once dreamed at
great length that I had lost my pocket-book. In the morning while
dressing I actually missed it; while undressing the night before the
dream I had forgotten to take it out of my trousers pocket and put it
in its usual place. This forgetting was therefore not unknown to me;
probably it was to give expression to an unconscious thought which
was ready to appear in the dream content.
I do not mean to assert that such cases of combined faulty actions
can teach anything new that we have not already seen in the
individual cases. But this change in form of the faulty action, which
nevertheless attains the same result, gives the plastic impression of
a will working towards a definite end, and in a far more energetic
way contradicts the idea that the faulty action represents something
fortuitous and requires no explanation. Not less remarkable is the
fact that the conscious intention thoroughly fails to check the
success of the faulty action. Despite all, my friend did not pay his
visit to the meeting of the literary society, and the woman found it
impossible to give up the medal. That unconscious something which
worked against these resolutions found another outlet after the first
road was closed to it. It requires something other than the conscious
counter-resolution to overcome the unknown motive; it requires a
psychic work which makes the unknown known to consciousness.
XII
DETERMINISM—CHANCE—AND
SUPERSTITIOUS BELIEFS
Points of View.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookname.com