I solved the problem that I had when my JSP inserts a container into a containerlist on another page by looking at the source code of the method FormContentMapperHandlerTag, which can be found here: http://svn.jahia.org/websvn/filedetails.php?repname=jahia&path=%2Fbranch es%2FJAHIA-4-1-BRANCH%2Fsrc%2Fjava%2Forg%2Fjahia%2Ftaglibs%2Fform%2FForm ContentMapperHandlerTag.java&rev=11321&sc=1
The storeForm() method demonstrates how it should be done. I copied the code from that method into my JSP and this correctly inserts items. I was generally on the right track, there were just some subtle mistakes. I suspect the order of some of the methods called after I do that matters too. I would advise anyone with similar problems to look at the storeForm() method for an example. Best regards, Max. > -----Original Message----- > From: Hirschfeld, Max [mailto:[EMAIL PROTECTED] > Subject: Jahia 4: Big problem adding a container programmatically > > I am working on a JSP to import data into a page on a Jahia 4.1 server. > At this point, it is a proof of concept, just inserting a single > container into a list on an existing page. I have considerable problems > inserting a container programmatically. > > After an attempt to fill more fields in my script, I get an > ArrayIndexOutOfBounds exception whenever I try to edit a container > inserted by my code (exception is included at the bottom of this > message). >
