cancel
Showing results for 
Search instead for 
Did you mean: 

link properties

shay
Champ in-the-making
Champ in-the-making
Hi,

I'm having some problems with links in alfresco:

when i create a link via the web client (copy and paste as link) and then i try to modify the link properties i get the following exception:

in the console:

15:07:02,796 ERROR [ui.common.Utils] A system error happened during the operation: null
java.lang.NullPointerException
        at org.alfresco.web.bean.LinkPropertiesBean.save(LinkPropertiesBean.java :209)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
        at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
        at javax.faces.component.UICommand.broadcas(UICommand.java:106)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
        at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:105)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)

        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)

and in the web client:

A system error happened during the operation: null


is there a solution for this problem?


second question:
i need to add some new properties to a link, i tried to add some new properties into the contentModel.xml and now my cm:link element looks like:

<type name="cm:link">
         <title>Link Object</title>
         <parent>cm:cmobject</parent>
         <properties>
            <property name="cm:destination">
               <title>Link Destination</title>
               <type>d:noderef</type>
               <mandatory>true</mandatory>
            </property>
            <property name="cmSmiley Frustratedtatus">
                      <title>Status</title>
                    <type>d:text</type>
                    <constraints>
                            <constraint ref="cmSmiley Frustratedtatus"/>
                      </constraints>
                  </property>
                  <property name="cm:GalleryId">
                      <title>Gallery Id</title>
                    <type>d:text</type>
                  </property>
                  <property name="cm:Index">
                      <title>Index</title>
                    <type>d:long</type>
                  </property>
         </properties>
      </type>

Is it the currect place to put those parametetrs?
Where do I set the web client to show them?
I done it for content types but from what I saw link is not content

Thanks in advance,
Shay.
10 REPLIES 10

gavinc
Champ in-the-making
Champ in-the-making
externalConfig doesn't point to a particular file it just says that the property sheet will read what properties to show from the config files.

Basically all config files get loaded (including web-client-config-custom.xml) and all property sheet config blocks get combined. This is why you'll see the default properties AND your custom properties.

What you can do in your config is to 'hide' the default properties, you can do this by adding the show-in-edit-mode="false" and show-in-view-mode="false" attributes i.e.

<show-property name="title" show-in-view-mode="false" show-in-edit-mode="false" />

As for edit-link-properties.jsp that page should really be using the property sheet tag as well as I mentioned earlier in this thread. I have raised a JIRA issue to get this fixed: http://issues.alfresco.com/browse/AWC-1457