Hi,
John Goerzen a écrit :
On 2007-09-25, George Lefter <[EMAIL PROTECTED]> wrote:
I'm afraid this is not a simple config. One would have to search through the
xhtml files for date formats:
<f:convertDateTime pattern="dd/MM/yyyy" />
and change them. I have to admit that this is not very nice.
I've done some searching the mailing lists for installation info and the
like, and it seems that this change would be overwritten on each
upgrade, yes? How do people maintain their own xhtml files across
upgrades? Is everyone maintaining local branches in some version
control system, and merging?
The better way to do this is to have a custom jar that duplicates files
to modify, and is deployed after the main jars as a plugin: your own
xhtml files will be used instead of the original ones.
The directory nuxeo.war is in fact a merge of all web contributions,
which is deleted and rebuilt when jboss starts. See for instance:
http://svn.nuxeo.org/trac/nuxeo/browser/org.nuxeo.project.sample/trunk/src/main/resources/OSGI-INF/deployment-fragment.xml
(merge of custom xhtml files into nuxeo.war and merge of custom
translations).
This is a generic answer: note that the date pattern problem can be
considered as a bug on the current application.
In fact, I had downloaded 5.1.1.GA and now want to upgrade to a 5.1
snapshot, so this is a perfect opportunity to test. How could I
accomplish this upgrade without zapping xhtml files in which I've
tweaked convertDataTime?
You can provide your own jar, replicate the nuxeo.war structure for
files you would like to modify, make the changes there, and make sure
your jar is deployed after the one doing the original contributions.
I have played with the sample repo and read through the basic tutorial
and book. I'm confused by two things:
1) The sample project adds a language field to the document
(not the metadata tab). It modifies the value on the metadata
tab, but uses a pulldown list (unlike the one on the metadata tab).
But it's not defined in a schema anywhere, nor documented anywhere
I could see. How & why is this done?
Language is actually a field already provided by the dublincore schema,
used by the sample document (as well as other document types on the
application).
2) Try as I could, I can't get the sample1 or sample2 fields to show
up for searching in the Advanced Search box. I tried adding this to
my OSGI-INF/core-types-contrib.xml file:
<extension target="org.nuxeo.ecm.core.search.service.SearchServiceImpl"
point="indexableDocTyp">
<indexableDocType name="Sample" indexAllSchemas="true"/>
</extension>
but it didn't help. What am I missing?
This will index the Sample schema (provided you fix the typo on
point="indexableDocType"), you will be able to use it in queries.
If you're talking about making it available on the advanced search form,
I will let others answer that. If it's about making it available in the
full text search, you need to register your fields on another extension
point, see "fullTextField" here: (there is no example on the sample module)
http://svn.nuxeo.org/trac/nuxeo/browser/org.nuxeo.ecm.platform/trunk/nuxeo-platform-search-core/src/main/resources/OSGI-INF/nxsearch-contrib.xml
3) Let's say I want to do nothing but add some string fields to
documents. Could I: 1) modify the core Document type to support
this, without having to declare a new type at all? 2) accomplish
this without having to write any Java code? (just XML hacking)
Yes, you just need to add a new document type contribution with the same
name and redefine it. For instance :
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
<!-- redefine workspace type to add schemas -->
<doctype name="Workspace" extends="Document">
<facet name="Folderish" />
<facet name="SuperSpace" />
<schema name="common" />
<schema name="dublincore" />
<schema name="workspace" />
<schema name="custom" />
...
</doctype>
</extension>
Merging is implemented on this extension point, so you'll need to
copy all the needed information.
Note that too many changes on schemas may be a problem for the
repository (especially if instances of this document type have already
been created).
4) What's the deal with facets? They don't seem to be in the docs...
I notice that Sample extends Document, yet declares a Downloadable
facet. Does that mean that facets don't automatically come down
when you extend something? And if not, where can I find what
all facets Document uses?
Schemas are the only properties that extend to children, others have to
be set on each document type.
Facets are just flags on the document, you could use any string you
want: the DocumentModel api has a getFacet(String) method.
However the application uses "default" facets for generic purposes
(Folderish, Downloadable, Versionable,...), you can find a list here :
http://svn.nuxeo.org/trac/nuxeo/browser/org.nuxeo.ecm.core/trunk/nuxeo-core-schema/src/main/java/org/nuxeo/ecm/core/schema/FacetNames.java
(Not documented, not always used... so feel free to ask for more info).
I did google and search the list archives before asking.
I will say too that I found the instructions to set up a maven
environment clear once I plunged in. Only one minor problem, but it all
worked quite well. I have no idea what it all did, downloading all
these megabytes of stuff but only winding up with a 240K directory, but
"ant install" did its thing in the end, so I'm happy ;-)
Good :)
--
Anahide Tchertchian, Nuxeo
Mail: [EMAIL PROTECTED] - Tel: +33 (0)1 40 33 79 87
http://www.nuxeo.com - http://www.nuxeo.org
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm