Hi,

I am on MMBase 1.6.3 and have a cloud with an Article node that is related to a Link 
node which, on it's part, is related to a URL node.
I have configured an Editwizard that shows fields of nodes that are two nodes away in 
the nodepath. (On the article editwizard I show the Url node that is related to a link 
node that is related to the article node). This is done by configuring the <action 
type="load"> node to load these attributes and making sure the <list> node contains an 
<item> node that in itself contains a new <list> node again. See the examples below.

This works fine when I load the Wizard for the first time. However, when I create a 
new relation to a link node, the fields of this node are shown but not the URL node 
that is related to this node. When I save the return back to the same wizard, the URL 
node is shown correctly related to the link node. 

My questions are: 
1. is this a known problem ?
2. is the load.xml consulted again on the moment a relation is created from a wizard 
and the wizard refreshes ?
3. could it be that this load action does not operate on temporary nodes ?

I understand this is a complicated problem but nevertheless maybe somebody could help 
me. What is the status of the documentation of the 'hidden' EditWizard features ? Are 
any bugs solved in this aspect in the 1.7 version of the EditWizards ?

Kind regards,

Peter


<action type="load">
    <field name="titel" />
    <field name="intro" />
    <field name="body" />     
    <field name="elementtype" />
    <field name="notitie" />
    <relation destination="links" role="posrel">        
         <object type="links">
              <field name="naam" />  
              <relation destination="urls" role="related">
                   <object type="urls">
                      <field name="url" />
                   </object>
              </relation>
         </object>                     
    </relation>
</action>

fragment from <list> node of links:
 <item>
                <title>Link</title>
                <description></description>
                <field name="naam" ftype="data">
                        <prompt>Naam</prompt>
                </field>
                <list role="related" destination="urls">
                     <item>
                         <field name="url" ftype="data">
                               <prompt>Url</prompt>
                         </field>
                     </item>
                </list>
  </item>
 <<load.xml>>  <<add_posrel_attachments.xml>>  <<add_posrel_image.xml>>  
<<add_posrel_internelinks.xml>>  <<add_posrel_links.xml>>  <<artikelen.xml>>  
<<create.xml>>  <<delete.xml>>  <<edit.xml>> 
---------------------------------
Peter Reitsma
telno. 855
Innovatie & ontwikkeling 
www.kennisnet.nl 


<?xml version="1.0"?>
<!DOCTYPE action PUBLIC "-//MMBase/DTD editwizard 1.0//EN" "http://www.mmbase.org/dtd/wizard-schema_1_0.dtd";>
<action type="load">
    <field name="titel" />
    <field name="intro" />
    <field name="body" />     
    <field name="elementtype" />
    <field name="notitie" />
    <relation destination="links" role="posrel">        
         <object type="links">
              <field name="naam" />  
              <relation destination="urls" role="related">
                   <object type="urls">
                      <field name="url" />
                   </object>
              </relation>
         </object>                     
    </relation>
    <relation destination="internelinks" role="posrel">        
         <object type="links">
              <field name="naam" />  
              <relation destination="categorieen" role="related">
                   <object type="categorieen">
                      <field name="naam" />
                   </object>
              </relation>
         </object>                     
    </relation>    
    <relation destination="attachments" role="posrel" />
    <relation destination="images" role="posrel" />  
</action>
<?xml version="1.0"?>
<!DOCTYPE list PUBLIC "-//MMBase/DTD editwizard 1.0//EN" "http://www.mmbase.org/dtd/wizard-schema_1_0.dtd";>

<list role="posrel" destination="attachments" minoccurs="0" maxoccurs="*"
        orderby="[EMAIL PROTECTED]'pos']" ordertype="number"> 

        <title>Attachments</title>

        <item>
                <title>Attachments</title>
                <description></description>
                <field name="title" ftype="data">
                        <prompt>Naam</prompt>
                </field>
                <field ftype="startwizard" inline="true" wizardname="wizards/attachments/attachments" />
           <!-- positie
                <field fdatapath="[EMAIL PROTECTED]&apos;pos&apos;]" ftype="line"><prompt>Position</prompt></field>
           -->
        </item>

        <command name="search" nodepath="attachments" fields="title" orderby="title" age="-1">
                <prompt></prompt>
                <search-filter>
                        <name>Naam contains</name>
                        <search-fields>title</search-fields>
                </search-filter>
        </command>
        
        <command name="startwizard" inline="true" wizardname="wizards/attachments/attachments" objectnumber="new">
                <prompt>New</prompt>
        </command>
        
        <action type="create">
                <relation role="posrel">
                        <object type="attachments" />
                        <field name="pos">{sum(//[EMAIL PROTECTED]&apos;posrel&apos; and @lastitem=&apos;true&apos;]/[EMAIL PROTECTED]&apos;pos&apos;])+{$pos}}</field>
                </relation>
        </action>
</list>
<?xml version="1.0"?>
<!DOCTYPE list PUBLIC "-//MMBase/DTD editwizard 1.0//EN" "http://www.mmbase.org/dtd/wizard-schema_1_0.dtd";>

<list role="posrel" destination="images" minoccurs="0" maxoccurs="1"
        orderby="[EMAIL PROTECTED]'pos']" ordertype="number"> 

        <title>Plaatje</title>

        <item>
                <title>Plaatje</title>
                <description></description>
                <field name="title" ftype="data">
                        <prompt>Naam</prompt>
                </field>
                <field ftype="startwizard" inline="true" wizardname="wizards/images/images" />
<!--    show position
                <field fdatapath="[EMAIL PROTECTED]&apos;pos&apos;]" ftype="line"><prompt>Position</prompt></field>
-->
        </item>

        <command name="search" nodepath="images" fields="title" orderby="title" age="-1">
                <prompt></prompt>
                <search-filter>
                        <name>Naam contains</name>
                        <search-fields>title</search-fields>
                </search-filter>
        </command>
        
        <command name="startwizard" inline="true" wizardname="wizards/images/images" objectnumber="new">
                <prompt>New</prompt>
        </command>
        
        
        <action type="create">
                <relation role="posrel">
                        <object type="images" />
                        <field name="pos">{sum(//[EMAIL PROTECTED]&apos;posrel&apos; and @lastitem=&apos;true&apos;]/[EMAIL PROTECTED]&apos;pos&apos;])+{$pos}}</field>
                </relation>
        </action>
</list>
<?xml version="1.0"?>
<!DOCTYPE list PUBLIC "-//MMBase/DTD editwizard 1.0//EN" "http://www.mmbase.org/dtd/wizard-schema_1_0.dtd";>

<list role="posrel" destination="internelinks" minoccurs="0" maxoccurs="*"
        orderby="[EMAIL PROTECTED]'pos']" ordertype="number"> 

        <title>Interne Links</title>

        <item>
                <title>Interne Link</title>
                <description></description>
                <field name="naam" ftype="data">
                        <prompt>Naam</prompt>
                </field>
                <list role="related" destination="categorieen">
                     <item>
                         <field name="naam" ftype="data">
                               <prompt>Naam</prompt>
                         </field>
                     </item>
                </list>                
                                            
                <field ftype="startwizard" inline="true" wizardname="wizards/internelinks/internelinks" />
<!--    show position
                <field fdatapath="[EMAIL PROTECTED]&apos;pos&apos;]" ftype="line"><prompt>Position</prompt></field>
-->
        </item>

       <command name="search" nodepath="categorieen,related,internelinks" fields="internelinks.naam,categorieen.naam" orderby="internelinks.naam,categorieen.naam" age="-1">
                <prompt></prompt>
                <search-filter>
                        <name>Naam contains</name>
                        <search-fields>internelinks.naam</search-fields>
                </search-filter>
                <search-filter>
                        <name>paginanaam contains</name>
                        <search-fields>categorieen.naam</search-fields>
                </search-filter>
       </command>
    
        
    <!--    <command name="search" nodepath="links" fields="naam" orderby="naam" age="-1">
                <prompt></prompt>
                <search-filter>
                        <name>Naam contains</name>
                        <search-fields>naam</search-fields>
                </search-filter>
        </command> -->
     
        
        <command name="startwizard" inline="true" wizardname="wizards/internelinks/internelinks" objectnumber="new">
                <prompt>New</prompt>
        </command>
        
        <action type="create">
                <relation role="posrel">
                        <object type="internelinks" />
                        <field name="pos">{sum(//[EMAIL PROTECTED]&apos;posrel&apos; and @lastitem=&apos;true&apos;]/[EMAIL PROTECTED]&apos;pos&apos;])+{$pos}}</field>
                </relation>
        </action>
</list>
<?xml version="1.0"?>
<!DOCTYPE list PUBLIC "-//MMBase/DTD editwizard 1.0//EN" "http://www.mmbase.org/dtd/wizard-schema_1_0.dtd";>

<list role="posrel" destination="links" minoccurs="0" maxoccurs="*"
        orderby="[EMAIL PROTECTED]'pos']" ordertype="number"> 

        <title>Links</title>

        <item>
                <title>Link</title>
                <description></description>
                <field name="naam" ftype="data">
                        <prompt>Naam</prompt>
                </field>
                <list role="related" destination="urls">
                     <item>
                         <field name="url" ftype="data">
                               <prompt>Url</prompt>
                         </field>
                     </item>
                </list>                
                                            
                <field ftype="startwizard" inline="true" wizardname="wizards/links/links" />
<!--    show position
                <field fdatapath="[EMAIL PROTECTED]&apos;pos&apos;]" ftype="line"><prompt>Position</prompt></field>
-->
        </item>

       <command name="search" nodepath="urls,related,links" fields="links.naam,urls.url" orderby="links.naam,urls.url" age="-1">
                <prompt></prompt>
                <search-filter>
                        <name>Naam contains</name>
                        <search-fields>links.naam</search-fields>
                </search-filter>
                <search-filter>
                        <name>url contains</name>
                        <search-fields>urls.url</search-fields>
                </search-filter>
       </command>
    
        
    <!--    <command name="search" nodepath="links" fields="naam" orderby="naam" age="-1">
                <prompt></prompt>
                <search-filter>
                        <name>Naam contains</name>
                        <search-fields>naam</search-fields>
                </search-filter>
        </command> -->
     
        
        <command name="startwizard" inline="true" wizardname="wizards/links/links" objectnumber="new">
                <prompt>New</prompt>
        </command>
        
        <action type="create">
                <relation role="posrel">
                        <object type="links" />
                        <field name="pos">{sum(//[EMAIL PROTECTED]&apos;posrel&apos; and @lastitem=&apos;true&apos;]/[EMAIL PROTECTED]&apos;pos&apos;])+{$pos}}</field>
                </relation>
        </action>
</list>
<?xml version="1.0"?>
<!DOCTYPE wizard-schema PUBLIC "-//MMBase/DTD editwizard 1.0//EN" "http://www.mmbase.org/dtd/wizard-schema_1_0.dtd";>
<wizard-schema id="edit-artikelen">
 
   <title>Artikelen</title>

    <action include="wizards/artikelen/create.xml"/>
        
    <action include="wizards/artikelen/delete.xml"/>
    
    <action include="wizards/artikelen/load.xml"/>
    
    <lists>
         <optionlist include="wizards/optionlist/ce_types.xml" /> 
    </lists>              
        
    <steps>
          <step form-schema="edit-artikelen"/>
    </steps>
        
    <form-schema id="edit-artikelen" extends="wizards/artikelen/edit.xml"/>
               
</wizard-schema>

<?xml version="1.0"?>
<!DOCTYPE action PUBLIC "-//MMBase/DTD editwizard 1.0//EN" "http://www.mmbase.org/dtd/wizard-schema_1_0.dtd";>
<action type="create">
        <object type="contentelementen">
               <!-- set elementtype value to Artikel -->
               <field name="elementtype">Artikel</field>
               <!-- create relation to CELayout node instance Artikel (this Alias should exist) -->
		         <relation role="related" destination="Artikel" />            
        </object> 
</action>


<?xml version="1.0"?>
<!DOCTYPE action PUBLIC "-//MMBase/DTD editwizard 1.0//EN" "http://www.mmbase.org/dtd/wizard-schema_1_0.dtd";>
<action type="delete">
        <prompt>Dit artikel verwijderen ?</prompt>
        <description>Klik hier om dit artikel te verwijderen.</description>
</action>
<?xml version="1.0"?>
<!DOCTYPE form-schema PUBLIC "-//MMBase/DTD editwizard 1.0//EN" "http://www.mmbase.org/dtd/wizard-schema_1_0.dtd";>
<form-schema id="edit_artikelen">
        <title>Artikelen</title>
        <subtitle>Maak een nieuw artikel aan</subtitle>
        
        <field name="titel" ftype="line" dtrequired="true"><prompt>Titel</prompt></field>
        
        <list include="wizards/artikelen/add_posrel_image.xml" />      
        
        <field name="intro" ftype="html"><prompt>Intro</prompt></field>                                          
        <field name="body" ftype="html" dtrequired="true"><prompt>Body</prompt></field>   
        
        <list include="wizards/artikelen/add_posrel_links.xml" />      
                         
        <list include="wizards/artikelen/add_posrel_internelinks.xml" />
        
        <list include="wizards/artikelen/add_posrel_attachments.xml" />
        
        <field name="notitie" ftype="text" rows="4">
                <prompt>Redactie Notitie (wordt niet gepubliceerd)</prompt>
        </field>
        
</form-schema>

Reply via email to