Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-588

Structured contents : exception giving a tab-layout repeater the id "tabs"

XMLWordPrintable

      I defined a structured content with a repeater having layout "tabs" and id "tabs" :

      <repeater id="tabs" label="Onglets" layout="tabs" add-label="Ajouter un onglet" del-label="Supprimer le ou les onglets sélectionnés">
      ...
      </repeater>
      

      When editing, filling in the first tab, and adding a second tab, the following exception is produced :

      Caused by: java.lang.RuntimeException: Incorrect value type for "_current_tab_tabs" (expected class java.lang.Long, got class java.lang.String).
      	at org.apache.cocoon.forms.formmodel.Field.setValue(Field.java:221)
      	at org.apache.cocoon.forms.binding.ValueJXPathBinding.doLoad(ValueJXPathBinding.java:106)
      	at org.apache.cocoon.forms.binding.JXPathBindingBase.loadFormFromModel(JXPathBindingBase.java:211)
      	at org.apache.cocoon.forms.binding.ComposedJXPathBindingBase.doLoad(ComposedJXPathBindingBase.java:106)
      	at org.apache.cocoon.forms.binding.ContextJXPathBinding.doLoad(ContextJXPathBinding.java:81)
      	at org.apache.cocoon.forms.binding.JXPathBindingBase.loadFormFromModel(JXPathBindingBase.java:211)
      	at org.apache.cocoon.forms.binding.JXPathBindingBase.loadFormFromModel(JXPathBindingBase.java:225)
      	at org.ametys.anycontent.plugins.structured.forms.MakeFormAction.act(MakeFormAction.java:76)
      	...
      

      Maybe this is a "normal" behavior, and "tabs" id musn't be used on a tab-layout repeater. In this case, this should be documented.

            Unassigned Unassigned
            ngavalda Nicolas Gavalda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: