cancel
Showing results for 
Search instead for 
Did you mean: 

Insert muliple value properties

ingdade
Champ in-the-making
Champ in-the-making
Hello,

i write a small application in php using php library.

I use a form to submit metadata. One of the property accept multiple value :

<property name="sc:annotazione">
<type>d:text</type>
<multiple>true</multiple>
</property>

To insert this metadata in Alfresco i use

$annotazione [] = $_POST['Annotazione1'];
$annotazione [] = $_POST['Annotazione2'];
$properties["{http://www.someco.com/model/content/1.0}annotazione"] = $annotazione ;

Property are stored and i can access it from php.

But if i go in Alfresco web client (detail page for a document) i can't see them. In the field is written "array" and i can't modify. delete orr add other value for the property becouse i get this exception:

java.lang.UnsupportedOperationException
at java.util.AbstractList.remove(AbstractList.java:144)
at org.alfresco.web.ui.repo.component.UIMultiValueEditor.broadcast(UIMultiValueEditor.java:362)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:139)
at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.alfresco.module.vti.VtiContextFilter.doFilter(VtiContextFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:619)

How i have to insert multiple value from php if i want to continue using also Alfresco web client?
1 REPLY 1

dwilson
Champ in-the-making
Champ in-the-making
This is the same problem I'm having when trying to apply multiple categories to content via PHP, see my thread here:

http://forums.alfresco.com/en/viewtopic.php?f=21&t=15880

It'd be great if the PHP API got some love from Alfresco.