06-06-2007 11:25 AM
06-07-2007 05:29 AM
<!– 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>–>
:!: pay attention to this line: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;
}
the only thing i still have to do, is to add the items dynamically (search for "player" type items and add them to the array).06-08-2007 08:25 AM
12-16-2015 09:58 AM
06-10-2007 05:09 AM
06-10-2007 08:55 AM
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);
}
06-14-2007 06:43 AM
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
07-20-2007 03:19 AM
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)
here is my step:03-18-2016 02:13 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.