I have made a custom datatype that implements a custom commitprocessor and I need to pass arguments from a nodebuilder to this custom commitprocessor.

Any suggestions as to how to do this?

to be more concrete:
my datatype is defined in WEB-INF/config/datatypes.xml:

  <datatype id="datetime">
    <specialization id="relevantlastmodified">
      <description xml:lang="en">
Read-only date-time field that contains the most recent time at which this node was changed,
      based on mmbase datatype lastmodified
added possibility to specify fields that will not cause this field to be updated
      </description>
      <setprocessor>
        <class name="org.mmbase.datatypes.processors.Readonly" />
      </setprocessor>
      <commitprocessor>
<class name="nl.eduBroker.datatypes.processors.RelevantLastModified" />
      </commitprocessor>
    </specialization>
  </datatype>

I use this datatype to replace the lastmodified field in objectbase.xml.
    <field name="lastModifiedDateTime" state="system">
      <descriptions>
        <description xml:lang="en">Last modified on</description>
        <description xml:lang="nl">Laatst veranderd op</description>
      </descriptions>
      <gui>
        <guiname xml:lang="en">Last modified time</guiname>
        <guiname xml:lang="nl">Laatste verandering</guiname>
      </gui>
      <editor>
        <positions>
          <input>113</input>
         </positions>
      </editor>
<datatype xmlns="http://www.mmbase.org/xmlns/datatypes"; base="relevantlastmodified"/>
    </field>

With the intent that we need a lastmodified field that will not be updated if certain fields are changed. ideally, I would like to pass which fields should not trigger the lastmodified field through parameters in the builder, like so:
  <field name="lastModifiedDateTime" state="system">
        ....
<datatype xmlns=" http://www.mmbase.org/xmlns/datatypes"; base="relevantlastmodified">
       <param name="excludedfield">module.moduleHitsGeneral</param>
       <param name="excludedfield"> module.moduleHitsEnrollment</param>
    </datatype>
  </field>

But is there a way to read these parameters in my little commitprocessor class? The commitprocessor interface does not seem to provide for this.


Michiel Boerman
_______________________________________________
Users mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/users

Reply via email to