John Goerzen a écrit :
On Wednesday 26 September 2007 2:54:36 am Anahide Tchertchian wrote:

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).

What I'm getting at here more is: why are these particular fields on the new tab, and not on the Metadata tab? But from some checking, it seems that the answer is that the metadata tab is defined in an xhtml already, and would have to be overridden here. And that could perhaps cause problems because it would lead to all metadata tabs having the new fields, yes?

You're right to say that this xhtml file is shared by all document tabs. Configuring specific tabs on some document types is made using actions, maybe you'd like to have a look at it.

The view and edit tabs are different because they're supposed to handle fields from specific schemas, not from the "generic" dublincore one. This is done configuring the layout and its widgets on the document type, see:
http://svn.nuxeo.org/trac/nuxeo/browser/org.nuxeo.project.sample/trunk/src/main/resources/OSGI-INF/ecm-types-contrib.xml

Note that this layout configuration will soon be changed, as there is ongoing work to make it more configurable. When this work is available, the specific xhtml page for metadata will be using a layout configurable through extension points too.

The task is visible here:
http://jira.nuxeo.org/browse/NXP-1518

It seems there is no core difference to the app between the metadata tab and the others.

I'm not sure I get what you mean here.

I tried:

     <doctype name="File" extends="Document">
                  <schema name="common" />
                  <schema name="file" />
                  <schema name="sample" />
                  <schema name="dublincore" />
                  <facet name="Downloadable" />
                  <facet name="Versionable" />
     </doctype>

but upon starting, I see this:

18:49:11,749 ERROR [TypeImporter] >>>> ERROR: Failed to reregister doc type: File : The following nodetype change contains non-trivial changes.Up until now only trivial changes are supported. (see javadoc for org.apache.jackrabbit.core.nodetype.NodeTypeDefDiff):

and the change didn't take effect.

Yes, this is jack rabbit complaining it cannot re-register this schema (frankly sometimes I wonder why it does). If you delete your repository under server/default/data you won't have the probleme anymore. But if you'd like to force it to register the schema again (because you know it won't be a problem for existing document instances using this schema), you can edit the file in server/default/deploy/nuxeo.ear/config/default-repository-config.xml and set the attribute "forceReloadTypes" to true.

Regards,

--
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

Reply via email to