AnsweredAssumed Answered

Possible issue

Question asked by joksy on Apr 8, 2009
Latest reply on Apr 8, 2009 by joksy
Hi Guys, someone can tell me why….

During the wizard content creation, I try to get all the association related to a certain model.
As you can see in the code objectType is a string related to the type of the model so I ask to get all the AssociationDefinition for this model.
But an error occur and tell me: org.alfresco.service.cmr.dictionary.DictionaryException: Model '{http://xxxxxxxx/content/1.0}adocument' does not exist.

That would be ok if at the end of the wizard creation  i do not see all the property related to that type.
But instead i see all of them and also all the associations (becuase i set in my *custom-config.xml show-association bla bla).

So ?? what that means
Ah and in the first step i choose mydocument type, in fact in objectType is present.
So any Idea ???



   
public class PersonalCreateContentWizard extends CreateContentWizard
….
protected String finishImpl(FacesContext context, String outcome) throws Exception{
   
//      this.objectType.
      ArrayList<AssociationDefinition> x = new ArrayList<AssociationDefinition>();
      for(QName name:
         new ArrayList<QName>(dictionaryService.getAssociations(QName.createQName(objectType)))){
         
         x.add(dictionaryService.getAssociation(name));
      }
      
      


      return outcome

   }

Outcomes