cancel
Showing results for 
Search instead for 
Did you mean: 

share-config-custom.xml creates out-of-bounds exception

ustamills
Champ in-the-making
Champ in-the-making
Hello,

I'm using Community 4.2c + Tomcat7 + Windows7.  I've developed a custom model and it works, including the properties I refer to below.  Share allows me to edit my custom content using the ugly default form.  Now I'm trying to use share-config-custom.xml to create a better form.

When I use some very basic code that comes from the sample file, it works. If I create a config that has only the default properties (cm:XXXX), then it works

Any config that I create for my content, even just one property, causes the error.  .


  <config evaluator="node-type" condition="al:apInvoice">
    <forms>
      <form>
        <field-visibility>
          <show id="cm:name" />
          <show id="cm:title" force="true" />
          <show id="cm:description" force="true" />
          <show name="al:apInvDate" />
          <!– <show name="al:apInvPayee" /> –>
          <!– <show name="al:apInvoiceNumber" /> –>
          <!– <show name="al:apInvAltourDiv" /> –>
        </field-visibility>
      </form>
    </forms>
  </config>


Showing that one item al:apInvDate, causes the error.  If I comment it out, it works again. As a reminder: the default (ugly) form shows that custom property just fine. I also tried uncommenting one of the other properties and commenting the date property in case it was the 'date' field only that would not work.  This did not change anything.  So the error occurs whether using a date field or a text field.

Interesting behavior:  The error occurs after I 'visit' a file of this type (click on it in the document library) but *before* I try to edit properties.  It occurs again after I try to edit properties.

The exact error is:


2013-08-20 10:32:07,560  ERROR [scripts.forms.FormUIGet] [http-apr-8180-exec-10] java.lang.ArrayIndexOutOfBoundsException: -1


More behavior: When I try to edit properties for a doc of this content type the page begins to load but only gets as far as displaying the title.

Anyone know what this might be?
2 REPLIES 2

mrksjs
Champ on-the-rise
Champ on-the-rise
Hi

check out http://wiki.alfresco.com/wiki/Forms#Syntax
 <show id="string" [for-mode="view|edit|create"] [force="boolean"] /> 


there is no 'name'-attribute for 'show'-element.


ustamills
Champ in-the-making
Champ in-the-making
THANK YOU!  THANK YOU!!  THANK YOU!!!  I am so relieved.

It sometimes seems like I'm guessing at the XML.  That link is a keeper!

BTW, it's working again.  Smiley Happy