While we're on the subject. How can I access the meta-data of a container field from live?
JahiaField creatorField = productReviewContainer.getContentContainer().getMetadataAsJahiaField(CoreMetadataConstant.CREATOR, jParams); This code currently returns null as the EntryState object used later on can't be resolved with the LoadRequest set to live. Is there another method I can use? Thanks, Richard. Khue Nguyen wrote: > > Hi, > > > > > > extra metadata fields can be defined in the > WEB-INF/etc/spring/applicationcontext-metadata.xml configuration file. > > > > <bean id="metadataDefinitionConfig" > class="org.jahia.services.metadata.MetadataDefinitionConfig"> > > <property name="definitions"> > > <map> > > .... > > <entry key="fielddef.categories"> > > <ref bean="fielddef.categories" /> > > </entry> > > > > <entry key="fielddef.myMetadata"> > > <ref bean="fielddef.myMetadata" /> > > </entry> > > </map> > > </property> > > </bean> > > > > <bean id="fielddef.categories" > class="org.jahia.services.metadata.FieldDefinition"> > > <property name="name"><value>defaultCategory</value></property> > > ... > > </bean> > > > > <bean id="fielddef.myMetadata" > class="org.jahia.services.metadata.FieldDefinition"> > > <property name="name"><value>myMetadata</value></property> > > <property name="title"><value><![CDATA[<jahia-resource > id="JahiaEnginesResources" > key="org.jahia.services.metadata.myMetadata" default-value="My > Metadata"/>]]></value></property> > > <property name="type"><value>20</value></property> <!-- > SMALLTEXT_SHARED_LANG --> > > <property name="defaultValue"><value></value></property> > > <property name="readOnly"><value>false</value></property> > > <property name="editableDefinition"><value>false</value></property> > <!-- not editable definition, as loaded from xml file --> > > <property > name="hiddenFromEditingEngine"><value>false</value></property> <!-- > metadata displayed or not in editing engine --> > > <property name="required"><value>false</value></property> <!-- > mandatory in engine --> > > <property name="order"><value>13</value></property> <!-- default > order --> > > <property name="contentDefinitionMappings"> <!-- mappings --> > > <list> > > <value>org.jahia.services.pages.JahiaPageDefinition</value> > > > <value>org.jahia.data.containers.JahiaContainerDefinition</value> > <!-- if you want to create this metadata for all containers too.--> > > </list> > > </property> > > </bean> > > > > Regards, > > Khue > > > > ------------------------------------------------------------------------ > > *From:* [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] *On Behalf Of *Bildsoe, Poul > *Sent:* vendredi, 24. août 2007 08:44 > *To:* [email protected] > *Subject:* [template_list] Additional meta data fields > > > > In several places I have seen it mentioned that the meta data fields > can be extended and I have seen that a Jahia Field can be a meta data > field (setIsMetadata) but I cannot find any documentation or examples > showing how to ad for example extra metadata fields to all pages on a > site. If i for instance declare a field in a template I cannot tell > the field to be a meta data field. Can anyone shed some light on these > matters? > > Capgemini Danmark A/S, Registered office: Gentofte, Reg.No. 25606965 > > > > > > This message contains information that may be privileged or > confidential and is the property of the Capgemini Group. It is > intended only for the person to whom it is addressed. If you are not > the intended recipient, you are not authorized to read, print, retain, > copy, disseminate, distribute, or use this message or any part > thereof. If you receive this message in error, please notify the > sender immediately and delete all copies of this message. > > ------------------------------------------------------------------------ > > _______________________________________________ > template_list mailing list > [email protected] > http://lists.jahia.org/cgi-bin/mailman/listinfo/template_list > -- Richard Gate Developer Souk Digital A Souk Group Company. London Office 1st Floor, Shaftesbury House, 151 Shaftesbury Avenue, London WC2H 8AL Tel: +44 (0) 20 7420 7880 Nottingham Office High Pavement Business Centre, 3-5 High Pavement, The Lace Market, Nottingham. NG1 1HF Tel: +44 (0) 115 959 6455 Fax: +44 (0) 115 959 6456 www.soukdigital.com Confidentiality: This e-mail and its attachments are intended for the above named only and may be confidential. If they have come to you in error you must take no action based on them, nor must you copy or show them to anyone; please reply to this e-mail and highlight the error. Security Warning: Please note that this e-mail has been created in the knowledge that Internet e-mail is not a 100% secure communications medium. We advise that you understand and observe this lack of security when e-mailing us. Viruses: Although we have taken steps to ensure that this e-mail and attachments are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free. _______________________________________________ template_list mailing list [email protected] http://lists.jahia.org/cgi-bin/mailman/listinfo/template_list
