Michiel Meeuwissen wrote:
I suggest that these improvements are offered as a 'HACK' together with an
updated DTD. Then commenting out is not necessary, and everybody can use
these improvements.

I agree, these improvements sound very interesting (actually, the last one fixes a problem that I've been hacking around for the last few weeks). You have my vote if this code is being proposed as a hack.


        <field ftype="startwizard" dynamic="true" inline="true"
  wizardname="" />

This looks a bit odd to me. Could nothing be done with an xpath (to access the 'virtual' field) in the wizardname in stead?

The proposed solution doesn't sound that bad to me, because you can put all the logic of finding the correct editwizard in the builder class, instead of having to use a lot of xpath. Also, you can't do everything with xpaths that you can do with with java code.


There is one more improvement on the editwizards that I'd like to discuss: the ability to use object inheritance a bit more.

If you do the following:

<action type="load">
  <relation destination="questions" role="posrel" />
</action>

and there are 'mcquestions' and 'reusequestions' that extend from 'questions', the editwizard data 'cloud' (as shown in debug.jsp) looks like this:

 <relation  ....  role="posrel" source="497" type="posrel" >
   <field did="d_12" name="pos" >1 </field>
   <object...  type="mcquestions" >
     <field did="d_14" name="name" />
   </object>
 </relation>
 <relation .... role="posrel" source="497" type="posrel" >
   <field did="d_19" name="pos" >2 </field>
   <object ... type="reusequestions" >
     <field did="d_21" name="name" >een naam </field>
   </object>
 </relation>

If you want to use this data in a <list> tag, you have a huge problem: the buildername you queried for (questions) is not available anywhere in the nodes. This means that if you want to list these nodes, you'll have to use cumbersome xpaths on the posrel type, which ofcourse breaks again if you have several different posrel relations to different objecttypes.

I've been thinking about how to fix this, and I would suggest adding an extra parameter to <object> (something like 'queriedtype'), which can be used by the <list> tag.

Any ideas on this?

Johannes



Reply via email to