As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<!– Definition of new Content Type: Player –> <type name="custom:Player"> <title>Player</title> <parent>cm:content</parent> <properties> <property name="custom:PlayerName"> <title>Player Name</title> <type>d:text</type> </property> </properties> </type> <!– Definition of new Content Type: Team –> <type name="custom:Team"> <title>Team</title> <parent>cm:content</parent> <properties> <property name="custom:TeamName"> <title>Team Name</title> <type>d:text</type> </property> <property name="custom:Players"> <title>Players</title> <type>d:text</type> </property> </properties> </type>
<config evaluator="string-compare" condition="Action Wizards"> <subtypes> <type name="custom:Player" /> </subtypes> </config> <config evaluator="string-compare" condition="Content Wizards"> <content-types> <type name="custom:Player" /> </content-types> </config> <config evaluator="node-type" condition="custom:Player"> <property-sheet> <show-property name="custom:PlayerName" /> </property-sheet> </config>–> <!– Lists the custom aspect in business rules Action wizard –> <config evaluator="string-compare" condition="Action Wizards"> <subtypes> <type name="custom:Team"/> </subtypes> </config> <config evaluator="string-compare" condition="Content Wizards"> <content-types> <type name="custom:Team" /> </content-types> </config> <config evaluator="node-type" condition="custom:Team"> <property-sheet> <show-property name="custom:TeamName" /> <show-property name="custom:Players" component-generator="PlayerSelectorGenerator"/> </property-sheet> </config>–>
protected UIComponent createComponent(FacesContext context, UIPropertySheet propertySheet, PropertySheetItem item) { UIComponent component = null; if (propertySheet.inEditMode()) { component = context.getApplication().createComponent( UISelectOne.COMPONENT_TYPE); FacesHelper.setupComponentId(context, component, item.getName()); // create the list of choices UISelectItems itemsComponent = (UISelectItems)context.getApplication(). createComponent("javax.faces.SelectItems"); List<SelectItem> items = new ArrayList<SelectItem>(3); //TODO: set items dynamically items.add(new SelectItem("Player1", "Player1")); items.add(new SelectItem("Player1", "Player1")); items.add(new SelectItem("Player1", "Player1")); itemsComponent.setValue(items); component.getChildren().add(itemsComponent); } else { // create an output text component in view mode component = createOutputTextComponent(context, item.getName()); } return component; }
SearchParameters sp = new SearchParameters(); sp.addStore(Repository.getStoreRef()); sp.setLanguage(SearchService.LANGUAGE_LUCENE); sp.setQuery("TYPE:\"{custom.model}Player\""); ResultSet results = null; results = Repository.getServiceRegistry(context).getSearchService().query(sp); if(results != null) { List<SelectItem> items = new ArrayList<SelectItem>(3); for(ResultSetRow row : results) { String name = row.getQName().getLocalName(); if(name != "") { items.add(new SelectItem(name, name)); } } itemsComponent.setValue(items); component.getChildren().add(itemsComponent); }
javax.faces.FacesException: ValueBinding for UISelectMany : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/dialog/container.jsp][Class: javax.faces.component.html.HtmlForm,Id: dialog][Class: javax.faces.component.UINamingContainer,Id: dialog-body][Class: org.alfresco.web.ui.repo.component.property.UIPropertySheet,Id: content-props][Class: org.alfresco.web.ui.repo.component.property.UIProperty,Id: prop_custom_Player][Class: javax.faces.component.UISelectMany,Id: custom_Player]} must be of type List or Array
16:02:41,515 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco]] Error configuring application listener of class org.alfresco.web.app.ContextListener java.lang.ClassNotFoundException: org.alfresco.web.app.ContextListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3711) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) 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.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)