First phase of client configuration re-org

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2289 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2006-02-02 22:29:15 +00:00
parent 4c49f3ce7c
commit da914e0549
40 changed files with 231 additions and 2559 deletions

View File

@@ -3,26 +3,28 @@
<beans>
<bean id="configSource" class="org.alfresco.config.source.UrlConfigSource">
<bean id="webClientConfigSource" class="org.alfresco.config.source.UrlConfigSource">
<constructor-arg>
<list>
<list>
<value>classpath:alfresco/web-client-config.xml</value>
<value>classpath:alfresco/web-client-config-properties.xml</value>
<value>classpath:alfresco/web-client-config-edit-properties.xml</value>
<value>classpath:alfresco/web-client-config-icons.xml</value>
<value>classpath:alfresco/web-client-config-navigation.xml</value>
<value>classpath:alfresco/extension/web-client-config-custom.xml</value>
</list>
</constructor-arg>
</bean>
<bean id="configService" class="org.alfresco.config.xml.XMLConfigService" init-method="init">
<bean id="webClientConfigService" class="org.alfresco.config.xml.XMLConfigService" init-method="init">
<constructor-arg>
<ref bean="configSource"/>
<ref bean="webClientConfigSource" />
</constructor-arg>
</bean>
<!-- NOTE: This references a bean in the repository Spring configuration -->
<bean id="dataDictionary" class="org.alfresco.web.bean.repository.DataDictionary">
<constructor-arg>
<ref bean="DictionaryService"/>
<ref bean="DictionaryService" />
</constructor-arg>
</bean>

View File

@@ -1,15 +1,4 @@
<alfresco-config area="edit-properties">
<!-- Example Client Configuration for exposing Types in exampleModel.xml -->
<config evaluator="node-type" condition="my:sop">
<property-sheet>
<show-property name="my:publishedDate"/>
<show-association name="my:signOff"/>
<show-property name="my:authorisedBy"/>
<show-child-association name="my:processSteps"/>
</property-sheet>
</config>
<!-- End Example -->
<alfresco-config area="edit-properties">
<config evaluator="node-type" condition="dictionaryModel">
<property-sheet>
@@ -72,15 +61,5 @@
<show-property name="app:editInline"/>
</property-sheet>
</config>
<!-- Example Client Configuration for exposing Aspects in exampleModel.xml -->
<config evaluator="aspect-name" condition="my:imageClassification">
<property-sheet>
<show-property name="my:width"/>
<show-property name="my:height"/>
<show-property name="my:resolution"/>
</property-sheet>
</config>
<!-- End Example -->
</alfresco-config>

View File

@@ -1,41 +0,0 @@
<alfresco-config>
<!-- This config file holds all the icons choices displayed -->
<!-- to users when creating various types of spaces in the -->
<!-- client. -->
<!-- NOTE: The conditions in this file are all string based -->
<!-- and will therefore not be found when using Node based -->
<!-- lookups, this also means the cm: can not be presumed. -->
<config evaluator="string-compare" condition="cm:folder">
<icons>
<icon name="space-icon-default" path="/images/icons/space-icon-default.gif" />
<icon name="space-icon-star" path="/images/icons/space-icon-star.gif" />
<icon name="space-icon-doc" path="/images/icons/space-icon-doc.gif" />
<icon name="space-icon-pen" path="/images/icons/space-icon-pen.gif" />
<icon name="space-icon-cd" path="/images/icons/space-icon-cd.gif" />
<icon name="space-icon-image" path="/images/icons/space-icon-image.gif" />
</icons>
</config>
<config evaluator="string-compare" condition="fm:forums">
<icons>
<icon name="forums_large" path="/images/icons/forums_large.gif" />
</icons>
</config>
<config evaluator="string-compare" condition="fm:forum">
<icons>
<icon name="forum_large" path="/images/icons/forum_large.gif" />
</icons>
</config>
<config evaluator="string-compare" condition="fm:topic">
<icons>
<icon name="topic_large" path="/images/icons/topic_large.gif" />
<icon name="topic_exclamation_large" path="/images/icons/topic_exclamation_large.gif" />
<icon name="topic_question_large" path="/images/icons/topic_question_large.gif" />
</icons>
</config>
</alfresco-config>

View File

@@ -0,0 +1,30 @@
<alfresco-config>
<config evaluator="node-type" condition="fm:forums">
<navigation>
<override from-view-id="/jsp/browse/browse.jsp" to-view-id="/jsp/forums/forums.jsp" />
<override from-outcome="browse" to-view-id="/jsp/forums/forums.jsp" />
<override from-outcome="showSpaceDetails" to-view-id="/jsp/forums/forums-details.jsp" />
<override from-outcome="deleteSpace" to-view-id="/jsp/forums/delete-forums.jsp" />
</navigation>
</config>
<config evaluator="node-type" condition="fm:forum">
<navigation>
<override from-view-id="/jsp/browse/browse.jsp" to-view-id="/jsp/forums/forum.jsp" />
<override from-outcome="browse" to-view-id="/jsp/forums/forum.jsp" />
<override from-outcome="showSpaceDetails" to-view-id="/jsp/forums/forum-details.jsp" />
<override from-outcome="deleteSpace" to-view-id="/jsp/forums/delete-forum.jsp" />
</navigation>
</config>
<config evaluator="node-type" condition="fm:topic">
<navigation>
<override from-view-id="/jsp/browse/browse.jsp" to-view-id="/jsp/forums/topic.jsp" />
<override from-outcome="browse" to-view-id="/jsp/forums/topic.jsp" />
<override from-outcome="showSpaceDetails" to-view-id="/jsp/forums/topic-details.jsp" />
<override from-outcome="deleteSpace" to-view-id="/jsp/forums/delete-topic.jsp" />
</navigation>
</config>
</alfresco-config>

View File

@@ -0,0 +1,119 @@
<alfresco-config>
<config evaluator="node-type" condition="content">
<property-sheet>
<show-property name="name"/>
<show-property name="mimetype" displayLabelId="mimetype" converter="org.alfresco.faces.MimeTypeConverter"/>
<show-property name="title"/>
<show-property name="description"/>
<show-property name="size" displayLabelId="size" converter="org.alfresco.faces.ByteSizeConverter"/>
</property-sheet>
</config>
<config evaluator="node-type" condition="folder">
<property-sheet>
<show-property name="name"/>
<show-property name="description"/>
</property-sheet>
</config>
<config evaluator="node-type" condition="fm:forums">
<property-sheet>
<show-property name="name"/>
<show-property name="description"/>
</property-sheet>
</config>
<config evaluator="node-type" condition="fm:forum">
<property-sheet>
<show-property name="name"/>
<show-property name="description"/>
</property-sheet>
</config>
<config evaluator="node-type" condition="fm:topic">
<property-sheet>
<show-property name="name"/>
<show-property name="description"/>
</property-sheet>
</config>
<config evaluator="node-type" condition="dictionaryModel">
<property-sheet>
<show-property name="modelActive"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="complianceable">
<property-sheet>
<show-property name="removeAfter"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="dublincore">
<property-sheet>
<show-property name="publisher"/>
<show-property name="contributor"/>
<show-property name="type"/>
<show-property name="identifier"/>
<show-property name="dcsource"/>
<show-property name="coverage"/>
<show-property name="rights"/>
<show-property name="subject"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="effectivity">
<property-sheet>
<show-property name="from"/>
<show-property name="to"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="summarizable">
<property-sheet>
<show-property name="summary"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="versionable">
<property-sheet>
<show-property name="versionLabel"/>
<show-property name="autoVersion" converter="org.alfresco.faces.BooleanLabelConverter"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="translatable">
<property-sheet>
<show-association name="translations"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="localizable">
<property-sheet>
<show-property name="locale"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="author">
<property-sheet>
<show-property name="author"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="auditable">
<property-sheet>
<show-property name="creator" readOnly="true"/>
<show-property name="created" readOnly="true"/>
<show-property name="modifier" readOnly="true"/>
<show-property name="modified" readOnly="true"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="app:inlineeditable">
<property-sheet>
<show-property name="app:editInline" converter="org.alfresco.faces.BooleanLabelConverter" />
</property-sheet>
</config>
</alfresco-config>

View File

@@ -1,10 +0,0 @@
<alfresco-config>
<plug-ins>
<evaluators>
<evaluator id="type-name" class="jsftest.repository.TypeNameEvaluator"/>
<evaluator id="aspect" class="org.alfresco.web.config.AspectEvaluator"/>
</evaluators>
</plug-ins>
</alfresco-config>

View File

@@ -123,169 +123,19 @@
<from-email-address>alfresco@alfresco.org</from-email-address>
</client>
</config>
<config evaluator="node-type" condition="content">
<property-sheet>
<show-property name="name"/>
<show-property name="mimetype" displayLabelId="mimetype" converter="org.alfresco.faces.MimeTypeConverter"/>
<show-property name="title"/>
<show-property name="description"/>
<show-property name="size" displayLabelId="size" converter="org.alfresco.faces.ByteSizeConverter"/>
</property-sheet>
</config>
<config evaluator="node-type" condition="folder">
<property-sheet>
<show-property name="name"/>
<show-property name="description"/>
</property-sheet>
</config>
<config evaluator="node-type" condition="fm:forums">
<property-sheet>
<show-property name="name"/>
<show-property name="description"/>
</property-sheet>
<navigation>
<override from-view-id="/jsp/browse/browse.jsp" to-view-id="/jsp/forums/forums.jsp" />
<override from-outcome="browse" to-view-id="/jsp/forums/forums.jsp" />
<override from-outcome="showSpaceDetails" to-view-id="/jsp/forums/forums-details.jsp" />
<override from-outcome="deleteSpace" to-view-id="/jsp/forums/delete-forums.jsp" />
</navigation>
<config evaluator="string-compare" condition="Custom Content Types">
<content-types>
<type name="cm:dictionaryModel"/>
</content-types>
</config>
<config evaluator="node-type" condition="fm:forum">
<property-sheet>
<show-property name="name"/>
<show-property name="description"/>
</property-sheet>
<navigation>
<override from-view-id="/jsp/browse/browse.jsp" to-view-id="/jsp/forums/forum.jsp" />
<override from-outcome="browse" to-view-id="/jsp/forums/forum.jsp" />
<override from-outcome="showSpaceDetails" to-view-id="/jsp/forums/forum-details.jsp" />
<override from-outcome="deleteSpace" to-view-id="/jsp/forums/delete-forum.jsp" />
</navigation>
<config evaluator="string-compare" condition="Custom Folder Types">
<folder-types>
<type name="fm:forums" icon="/images/icons/forums_large.gif" descriptionMsgId="forums_desc" />
</folder-types>
</config>
<config evaluator="node-type" condition="fm:topic">
<property-sheet>
<show-property name="name" displayLabelId="subject" />
</property-sheet>
<navigation>
<override from-view-id="/jsp/browse/browse.jsp" to-view-id="/jsp/forums/topic.jsp" />
<override from-outcome="browse" to-view-id="/jsp/forums/topic.jsp" />
<override from-outcome="showSpaceDetails" to-view-id="/jsp/forums/topic-details.jsp" />
<override from-outcome="deleteSpace" to-view-id="/jsp/forums/delete-topic.jsp" />
</navigation>
</config>
<config evaluator="node-type" condition="dictionaryModel">
<property-sheet>
<show-property name="modelActive"/>
</property-sheet>
</config>
<!-- Example client config for type defined in exampleModel.xml -->
<config evaluator="node-type" condition="my:sop">
<property-sheet>
<show-property name="name"/>
<show-property name="mimetype" displayLabelId="mimetype" converter="org.alfresco.faces.MimeTypeConverter"/>
<show-property name="title"/>
<show-property name="description"/>
<show-property name="size" displayLabelId="size" converter="org.alfresco.faces.ByteSizeConverter"/>
<show-property name="my:publishedDate"/>
<show-association name="my:signOff"/>
<show-property name="my:authorisedBy"/>
<show-child-association name="my:processSteps"/>
</property-sheet>
</config>
<!-- End Example -->
<config evaluator="aspect-name" condition="complianceable">
<property-sheet>
<show-property name="removeAfter"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="dublincore">
<property-sheet>
<show-property name="publisher"/>
<show-property name="contributor"/>
<show-property name="type"/>
<show-property name="identifier"/>
<show-property name="dcsource"/>
<show-property name="coverage"/>
<show-property name="rights"/>
<show-property name="subject"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="effectivity">
<property-sheet>
<show-property name="from"/>
<show-property name="to"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="summarizable">
<property-sheet>
<show-property name="summary"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="versionable">
<property-sheet>
<show-property name="versionLabel"/>
<show-property name="autoVersion" converter="org.alfresco.faces.BooleanLabelConverter"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="translatable">
<property-sheet>
<show-association name="translations"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="localizable">
<property-sheet>
<show-property name="locale"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="author">
<property-sheet>
<show-property name="author"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="auditable">
<property-sheet>
<show-property name="creator" readOnly="true"/>
<show-property name="created" readOnly="true"/>
<show-property name="modifier" readOnly="true"/>
<show-property name="modified" readOnly="true"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="app:inlineeditable">
<property-sheet>
<show-property name="app:editInline" converter="org.alfresco.faces.BooleanLabelConverter" />
</property-sheet>
</config>
<!-- Example Client Configuration for exposing aspects defined in exampleModel.xml -->
<config evaluator="aspect-name" condition="my:imageClassification">
<property-sheet>
<show-property name="my:width"/>
<show-property name="my:height"/>
<show-property name="my:resolution"/>
</property-sheet>
</config>
<!-- End Example -->
<config evaluator="string-compare" condition="Action Wizards">
<types>
<type name="folder" displayLabelId="space"/>
@@ -301,8 +151,6 @@
<aspect name="templatable"/>
<aspect name="translatable"/>
<aspect name="localizable"/>
<!-- Example configuration to demonstrate how to expose aspect from exampleModel.xml -->
<!-- <aspect name="my:imageClassification"/> -->
</aspects>
<transformers>
<transformer name="text/html"/>
@@ -320,17 +168,49 @@
</image-transformers>
</config>
<config evaluator="string-compare" condition="Custom Content Types">
<content-types>
<!-- <type name="my:sop" /> -->
<type name="cm:dictionaryModel"/>
</content-types>
<!-- TODO: Move the languages, advanced search and views config -->
<!-- out to separate config blocks, this means users can -->
<!-- replace just those sections independently of the client -->
<!-- section -->
<!-- This config sections below hold all the icons choices -->
<!-- displayed to users when creating various types of spaces -->
<!-- in the client. -->
<!-- NOTE: The conditions below are all string based and -->
<!-- will therefore not be found when using Node based -->
<!-- lookups, this also means the cm: can not be presumed. -->
<config evaluator="string-compare" condition="cm:folder icons">
<icons>
<icon name="space-icon-default" path="/images/icons/space-icon-default.gif" />
<icon name="space-icon-star" path="/images/icons/space-icon-star.gif" />
<icon name="space-icon-doc" path="/images/icons/space-icon-doc.gif" />
<icon name="space-icon-pen" path="/images/icons/space-icon-pen.gif" />
<icon name="space-icon-cd" path="/images/icons/space-icon-cd.gif" />
<icon name="space-icon-image" path="/images/icons/space-icon-image.gif" />
</icons>
</config>
<config evaluator="string-compare" condition="fm:forums icons">
<icons>
<icon name="forums_large" path="/images/icons/forums_large.gif" />
</icons>
</config>
<config evaluator="string-compare" condition="Custom Folder Types">
<folder-types>
<type name="fm:forums" icon="/images/icons/forums_large.gif" descriptionMsgId="forums_desc" />
</folder-types>
<config evaluator="string-compare" condition="fm:forum icons">
<icons>
<icon name="forum_large" path="/images/icons/forum_large.gif" />
</icons>
</config>
<config evaluator="string-compare" condition="fm:topic icons">
<icons>
<icon name="topic_large" path="/images/icons/topic_large.gif" />
<icon name="topic_exclamation_large" path="/images/icons/topic_exclamation_large.gif" />
<icon name="topic_question_large" path="/images/icons/topic_question_large.gif" />
</icons>
</config>
</alfresco-config>

View File

@@ -1,4 +1,4 @@
webinf.delete.tomcat=jboss*.xml,portlet*.xml,alfresco-pages.xml
webinf.delete.tomcat=jboss*.xml,portlet*.xml,alfresco-object.xml
webinf.lib.delete.jboss=log4j-1.2.8.jar,portlet-api-lib.jar,myfaces-api.jar,myfaces-impl.jar
files.faces.config=/WEB-INF/faces-config-navigation.xml,/WEB-INF/faces-config-common.xml,/WEB-INF/faces-config-repo.xml,/WEB-INF/faces-config-zoo.xml
files.faces.config=/WEB-INF/faces-config-navigation.xml,/WEB-INF/faces-config-common.xml,/WEB-INF/faces-config-repo.xml

View File

@@ -1,85 +0,0 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package jsftest;
import java.util.Properties;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Object that can be used as a backing bean for components in the zoo
*
* @author gavinc
*/
public class DummyBean
{
private static Log logger = LogFactory.getLog(DummyBean.class);
private String name;
private Properties properties;
public DummyBean()
{
this.properties = new Properties();
this.properties.put("one", "This is 1");
this.properties.put("two", "This is 2");
this.properties.put("three", "This is 3");
this.properties.put("four", "This is 4");
}
public Properties getProperties()
{
return this.properties;
}
/**
* @return Returns the name.
*/
public String getName()
{
return name;
}
/**
* @param name The name to set.
*/
public void setName(String name)
{
this.name = name;
}
/**
* @see java.lang.Object#toString()
*/
public String toString()
{
StringBuilder builder = new StringBuilder(super.toString());
builder.append(" (name=").append(this.name);
builder.append(" properties=").append(this.properties).append(")");
return builder.toString();
}
/**
* Method to call on form submit buttons
*/
public void submit()
{
if (logger.isDebugEnabled())
logger.debug("Submit called on DummyBean, state = " + toString());
}
}

View File

@@ -1,100 +0,0 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package jsftest;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.Map;
import javax.faces.event.ActionEvent;
import org.alfresco.web.ui.common.component.UIActionLink;
import org.alfresco.web.ui.common.component.UIBreadcrumb;
import org.apache.log4j.Logger;
/**
* @author kevinr
*/
public class TestList
{
/**
* Constructor
*/
public TestList()
{
// Create test data rows
Calendar date = new GregorianCalendar(1999, 1, 5);
rows.add(new TestRow("monkey", 5, true, 0.1f, date.getTime()));
date = new GregorianCalendar(2000, 12, 5);
rows.add(new TestRow("biscuit", 15, true, 0.2f, date.getTime()));
date = new GregorianCalendar(1999, 11, 15);
rows.add(new TestRow("HORSEY", 23, false, 0.333f, date.getTime()));
date = new GregorianCalendar(2003, 11, 11);
rows.add(new TestRow("thing go here", 5123, true, 0.999f, date.getTime()));
date = new GregorianCalendar(1999, 2, 3);
rows.add(new TestRow("I like docs", -5, false, 0.333f, date.getTime()));
date = new GregorianCalendar(2005, 1, 1);
rows.add(new TestRow("Document", 1235, false, 12.0f, date.getTime()));
date = new GregorianCalendar(1998, 8, 8);
rows.add(new TestRow("1234567890", 52, false, 5.0f, date.getTime()));
date = new GregorianCalendar(1997, 9, 30);
rows.add(new TestRow("space", 77, true, 17.5f, date.getTime()));
date = new GregorianCalendar(2001, 7, 15);
rows.add(new TestRow("House", 12, true, 0.4f, date.getTime()));
date = new GregorianCalendar(2002, 5, 28);
rows.add(new TestRow("Baboon", 14, true, -0.888f, date.getTime()));
date = new GregorianCalendar(2003, 11, 11);
rows.add(new TestRow("Woof", 0, true, 0.0f, date.getTime()));
}
public List getRows()
{
return this.rows;
}
public void clickBreadcrumb(ActionEvent event)
{
if (event.getComponent() instanceof UIBreadcrumb)
{
s_logger.debug("clickBreadcrumb action listener called, path now: " + ((UIBreadcrumb)event.getComponent()).getValue());
}
}
public void clickActionLink(ActionEvent event)
{
s_logger.debug("clickActionLink");
}
public void clickNameLink(ActionEvent event)
{
UIActionLink link = (UIActionLink)event.getComponent();
Map<String, String> params = link.getParameterMap();
String value = params.get("name");
if (value != null)
{
s_logger.debug("clicked item in list: " + value);
}
}
private final static Logger s_logger = Logger.getLogger(TestList.class);
private List<TestRow> rows = new ArrayList<TestRow>();;
}

View File

@@ -1,79 +0,0 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package jsftest;
import java.util.Date;
/**
* @author kevinr
*/
public class TestRow
{
/**
* Test a row bean with various data types
*/
public TestRow(String name, int count, boolean valid, float relevance, Date created)
{
this.name = name;
this.count = count;
this.valid = valid;
this.relevance = relevance;
this.created = created;
}
public String getName()
{
return name;
}
public int getCount()
{
return count;
}
public boolean getValid()
{
return valid;
}
public float getRelevance()
{
return relevance;
}
public Date getCreated()
{
return created;
}
public void setCreated(Date date)
{
this.created = date;
}
public TestRow getObject()
{
return this;
}
private String name;
private int count;
private boolean valid;
private float relevance;
private Date created;
}

View File

@@ -1,222 +0,0 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package jsftest;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.faces.model.SelectItem;
/**
* Class representing a single User bean instance.
*
* @author kevinr
*/
public class User implements Cloneable
{
public User()
{
setRoles(new ArrayList<String>(4));
}
public User(String username, String password, String name, String[] roles, Date joined)
{
setUsername(username);
setPassword(password);
setName(name);
setDateJoined(joined);
List<String> rolesList = new ArrayList<String>(roles.length);
for (int i=0; i<roles.length; i++)
{
rolesList.add(roles[i]);
}
setRoles(rolesList);
}
/**
* Private copy constructor
*
* @param u User to clone
*/
private User(User u)
{
setUsername(u.getUsername());
setPassword(u.getPassword());
setName(u.getName());
setDateJoined(u.getDateJoined());
setRoles(new ArrayList<String>(u.getRoles()));
}
/**
* @see java.lang.Object#clone()
*/
protected Object clone() throws CloneNotSupportedException
{
// invoke copy constructor
return new User(this);
}
/**
* Get the username
*
* @return the username
*/
public String getUsername()
{
return m_username;
}
/**
* Set the username
*
* @param username the username
*/
public void setUsername(String username)
{
m_username = username;
}
/**
* Get the name
*
* @return the name
*/
public String getName()
{
return m_name;
}
/**
* Set the name
*
* @param name the name
*/
public void setName(String name)
{
m_name = name;
}
/**
* Get the roles
*
* @return the roles
*/
public List<String> getRoles()
{
return m_roles;
}
/**
* Set the roles
*
* @param roles the roles
*/
public void setRoles(List<String> roles)
{
m_roles = roles;
}
/**
* Get the password
*
* @return the password
*/
public String getPassword()
{
return m_password;
}
/**
* Set the password
*
* @param password the password
*/
public void setPassword(String password)
{
m_password = password;
}
/**
* Get the All Roles List
*
* @return the allRolesList
*/
public List getAllRolesList()
{
return m_allRolesList;
}
/**
* Set the allRolesList
*
* @param allRolesList the allRolesList
*/
public void setAllRolesList(List<SelectItem> allRolesList)
{
m_allRolesList = allRolesList;
}
/**
* Get the dateJoined
*
* @return the dateJoined
*/
public Date getDateJoined()
{
return m_dateJoined;
}
/**
* Set the dateJoined
*
* @param dateJoined the dateJoined
*/
public void setDateJoined(Date dateJoined)
{
m_dateJoined = dateJoined;
}
/** the allRolesList enum list */
private static List<SelectItem> m_allRolesList = new ArrayList<SelectItem>(8);
static
{
m_allRolesList.add(new SelectItem("admin", "Administrator"));
m_allRolesList.add(new SelectItem("superuser", "Super User"));
m_allRolesList.add(new SelectItem("dev", "Developer"));
m_allRolesList.add(new SelectItem("qa", "QA"));
m_allRolesList.add(new SelectItem("standard", "Basic User"));
}
/** the password */
private String m_password;
/** the username */
private String m_username;
/** the name */
private String m_name;
/** the roles */
private List<String> m_roles;
/** the date joined */
private Date m_dateJoined;
}

View File

@@ -1,302 +0,0 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package jsftest;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Iterator;
import java.util.List;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.component.UIParameter;
import javax.faces.component.html.HtmlOutputText;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;
import javax.faces.validator.ValidatorException;
import org.apache.log4j.Logger;
/**
* JSF Managed Bean. Provides the backing for the userlist.jsp view. The view uses
* the datatable control to bind to the List of User bean objects. Implements the
* action events called by the view when the user clicks the Edit link or Add button.
*
* @author kevinr
*/
public class UserListBean
{
// ===========================================================================
// Construction
public UserListBean()
{
Calendar date = new GregorianCalendar(2002, 5, 10);
m_users.add(new User("admin", "admin", "Administrator", new String[] {"admin","superuser"}, date.getTime()));
date = new GregorianCalendar(2001, 7, 10);
m_users.add(new User("kevinr", "kevinr", "Kevin Roast", new String[] {"admin","superuser","dev"}, date.getTime()));
date = new GregorianCalendar(2003, 8, 15);
m_users.add(new User("gavinc", "gavinc", "Gavin Cornwell", new String[] {"superuser","dev"}, date.getTime()));
date = new GregorianCalendar(2003, 1, 1);
m_users.add(new User("stever", "stever", "Steve Rigby", new String[] {"superuser","qa"}, date.getTime()));
}
// ===========================================================================
// Bean methods
public List getUsers()
{
return m_users;
}
public void setUsers(List<User> users)
{
m_users = users;
}
/**
* Get the users list as a wrapped DataModel object
*
* @return DataModel for use by the data-table components
*/
public DataModel getUsersModel()
{
if (m_usersModel == null)
{
m_usersModel = new ListDataModel();
m_usersModel.setWrappedData(m_users);
}
return m_usersModel;
}
public User getUser()
{
return m_currentUser;
}
public void setUser(User user)
{
m_currentUser = user;
}
/**
* Get the isNewUser
*
* @return the isNewUser
*/
public boolean getIsNewUser()
{
return m_isNewUser;
}
/**
* Set the isNewUser
*
* @param isNewUser the isNewUser
*/
public void setIsNewUser(boolean isNewUser)
{
m_isNewUser = isNewUser;
}
/**
* Get the rolesOutputText
*
* @return the rolesOutputText
*/
public HtmlOutputText getRolesOutputText()
{
return m_rolesOutputText;
}
/**
* Set the rolesOutputText
*
* @param rolesOutputText the rolesOutputText component
*/
public void setRolesOutputText(HtmlOutputText rolesOutputText)
{
m_rolesOutputText = rolesOutputText;
}
// ===========================================================================
// Action event methods
/**
* Edit user action event listener
*
* Specified directly on the appropriate tag such as commandLink or commandButton
* e.g. actionListener="#{UserListBean.editUser}"
*
* This listener cannot directly affect the navigation of the page - the command
* tag has an "action" attribute of which the default handler will use the outcome
* from the faces-config.xml by default or call a specifid controller method
* returning the String outcome as usual.
*/
public void editUser(ActionEvent event)
{
s_logger.debug("*****USERLIST: " + ((UIParameter)event.getComponent().findComponent("userId")).getValue().toString());
// Get the username from the "param" tag component we added as a nested tag
// to the command tag that fired this event.
// So we can have a key to work out which item was clicked in the data table
String usernameId = ((UIParameter)event.getComponent().findComponent("userId")).getValue().toString();
// It is also possible to get the relevent row from the DataModel we created
// wrapping our users list. But this is a weak solution as models which then
// potentially sort or page data may not provide the correct row index.
// e.g.
// m_usersModel.getWrappedData().get(m_usersModel.getRowIndex());
for (Iterator i=m_users.iterator(); i.hasNext(); /**/)
{
User user = (User)i.next();
if (user.getUsername().equals(usernameId))
{
// set the user as current so we know which one to edit etc.
try
{
setUser((User)user.clone());
setIsNewUser(false);
}
catch (CloneNotSupportedException e)
{
// will not happen - clone is supported for our own types
}
}
}
}
/**
* OK button action handler
*
* @return outcome view name
*/
public void editUserOK(ActionEvent event)
{
s_logger.debug("*****USERLIST: persisting user: " + getUser().getUsername());
for (int i=0; i<m_users.size(); i++)
{
User user = (User)m_users.get(i);
if (user.getUsername().equals(getUser().getUsername()))
{
// found modified user - persist changes
m_users.set(i, getUser());
m_usersModel = null;
break;
}
}
}
/**
* Add user action event listener
*/
public void addUser(ActionEvent event)
{
// create a blank user template
setUser(new User());
setIsNewUser(true);
}
/**
* OK button action handler
*
* @return outcome view name
*/
public void addUserOK(ActionEvent event)
{
// persist new user details
s_logger.debug("*****USERLIST: creating user: " + getUser().getUsername());
m_users.add(getUser());
m_usersModel = null;
}
/**
* Example of a value changed event handler
* NOTE: Value changed events do not submit the form directly, either a command
* button or link submits the form or can be done manually with Javascript
*/
public void roleValueChanged(ValueChangeEvent event)
{
s_logger.debug("*****USERLIST: Value change from: " + event.getOldValue() + " to: " + event.getNewValue());
// example of the use of a direct component binding
// in the JSP page, a outputText tag has used binding='beanmethod' so we
// can now programatically modify the component as required
if (m_rolesOutputText != null)
{
m_rolesOutputText.setValue(getUser().getRoles().toString());
}
// An alternative to using the component binding would be to lookup the
// component via it's component Id:
// HtmlOutputText comp = (HtmlOutputText)event.getComponent().findComponent("roles-text");
// comp.setValue(...);
// The attributes of a component are all stored in a Map, the Map features
// attribute-property transparency which means typed attributes can be get/set
// directly without using casts as the appropriate getters/setters will be
// called for you by the framework.
// comp.getAttributes().put("style", "color:red");
}
// ===========================================================================
// Validator methods
/**
* Example of a specific validation method. Required as the basic validator
* child tags are not sufficient for anything beyond very simple length checks etc.
*/
public void validateUsername(FacesContext context, UIComponent component, Object value)
throws ValidatorException
{
String username = (String)value;
if (username.length() < 5 || username.length() > 12)
{
String err = "Username must be between 5 and 12 characters in length.";
throw new ValidatorException(new FacesMessage(err));
}
else if (username.indexOf(' ') != -1 || username.indexOf('\t') != -1)
{
String err = "Username cannot contain space or whitespace characters.";
throw new ValidatorException(new FacesMessage(err));
}
}
// ===========================================================================
// Private data
private List<User> m_users = new ArrayList<User>();
private DataModel m_usersModel = null;
private User m_currentUser = null;
private boolean m_isNewUser = false;
/** the HTMLOutputText component */
private HtmlOutputText m_rolesOutputText = null;
protected final static Logger s_logger = Logger.getLogger(UserListBean.class);
}

View File

@@ -1,35 +0,0 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package jsftest;
/**
* Managed bean that provides action handlers to navigate around the component zoo
*
* @author gavinc
*/
public class ZooService
{
public String showPropertyZoo()
{
return "showPropertyZoo";
}
public String showPropertyZoo2()
{
return "showPropertyZoo2";
}
}

View File

@@ -1,256 +0,0 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package jsftest.repository;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/**
* Class to represent a basic data dictionary service
*
* @author gavinc
*/
public class DataDictionary
{
private Map types;
public DataDictionary()
{
this.types = new HashMap();
// setup the dictionary
Property name = new Property("name", "string", "Name", false);
Property desc = new Property("description", "string", "Description" , false);
Property created = new Property("created", "datetime", "Created Date", true);
Property modified = new Property("modified", "datetime", "Modified Date", false);
Property keywords = new Property("keywords", "string[]", "Keywords", false);
MetaData base = new MetaData("base");
base.addProperty(name);
base.addProperty(desc);
base.addProperty(created);
base.addProperty(modified);
base.addProperty(keywords);
Property sopid = new Property("sopId", "string", "SOP ID", true);
Property effective = new Property("effective", "datetime", "Effective Date", false);
Property approved = new Property("approved", "boolean", "Approved", false);
Property latestVersion = new Property("latestversion", "string", "Latest Version", true);
MetaData sop = new MetaData("SOP");
sop.setProperties(base.getProperties());
sop.addProperty(sopid);
sop.addProperty(effective);
sop.addProperty(approved);
// add an aspect and the associated property
sop.addAspect("versionable");
sop.addProperty(latestVersion);
this.types.put(base.getTypeName(), base);
this.types.put(sop.getTypeName(), sop);
}
public MetaData getMetaData(String type)
{
return (MetaData)this.types.get(type);
}
/**
* @return Returns the types.
*/
public Map getTypes()
{
return this.types;
}
// *********************
// *** Inner classes ***
// *********************
/**
* Represents the meta data of an object
* @author gavinc
*/
public class MetaData
{
private Map propertiesMap;
private List properties;
private String typeName;
private List aspects;
public MetaData(String typeName)
{
this.properties = new ArrayList();
this.propertiesMap = new HashMap();
this.aspects = new ArrayList();
this.typeName = typeName;
}
/**
* Adds a property to the meta data object
*
* @author gavinc
*/
public void addProperty(Property property)
{
this.properties.add(property);
this.propertiesMap.put(property.getName(), property);
}
/**
* @return Returns the properties.
*/
public List getProperties()
{
return this.properties;
}
/**
* @param properties The properties to set.
*/
public void setProperties(List properties)
{
this.properties.clear();
this.propertiesMap.clear();
Iterator iter = properties.iterator();
while (iter.hasNext())
{
Property prop = (Property)iter.next();
this.properties.add(prop);
this.propertiesMap.put(prop.getName(), prop);
}
}
public Map getPropertiesMap()
{
return this.propertiesMap;
}
public List getAspects()
{
return this.aspects;
}
public void addAspect(String aspect)
{
this.aspects.add(aspect);
}
/**
* @return Returns the typeName.
*/
public String getTypeName()
{
return this.typeName;
}
}
/**
* Represents a property on an object
* @author gavinc
*/
public class Property
{
private String name;
private String type;
private String displayName;
private boolean readOnly;
/**
* @param name
* @param type
* @param readOnly
*/
public Property(String name, String type, String displayName, boolean readOnly)
{
this.name = name;
this.type = type;
this.displayName = displayName;
this.readOnly = readOnly;
}
/**
* @return Returns the name.
*/
public String getName()
{
return this.name;
}
/**
* @param name The name to set.
*/
public void setName(String name)
{
this.name = name;
}
/**
* @return Returns the type.
*/
public String getType()
{
return this.type;
}
/**
* @param type The type to set.
*/
public void setType(String type)
{
this.type = type;
}
/**
* @return Returns the displayName.
*/
public String getDisplayName()
{
return this.displayName;
}
/**
* @param displayName The displayName to set.
*/
public void setDisplayName(String displayName)
{
this.displayName = displayName;
}
/**
* @return Returns the readOnly.
*/
public boolean isReadOnly()
{
return this.readOnly;
}
/**
* @param readOnly The readOnly to set.
*/
public void setReadOnly(boolean readOnly)
{
this.readOnly = readOnly;
}
}
}

View File

@@ -1,44 +0,0 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package jsftest.repository;
import java.io.Serializable;
/**
* Mock NodeRef object that comes from the Mock NodeService API.
*
* @author gavinc
*/
public class NodeRef implements Serializable
{
private static final long serialVersionUID = 3833183614468175153L;
private String id;
public NodeRef(String id)
{
this.id = id;
}
/**
* @return Returns the id.
*/
public String getId()
{
return id;
}
}

View File

@@ -1,104 +0,0 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package jsftest.repository;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Mock NodeService API
*
* @author gavinc
*/
public class NodeService
{
private static Log logger = LogFactory.getLog(NodeService.class);
public static NodeRef getNodeRef(String path)
{
return new NodeRef(path);
}
public static String getType(NodeRef nodeRef)
{
String id = nodeRef.getId();
String type = null;
if (id.equalsIgnoreCase("/gav.doc") ||
id.equalsIgnoreCase("/kev.txt"))
{
type = "base";
}
else if (id.equalsIgnoreCase("/sop.txt"))
{
type = "SOP";
}
return type;
}
public static Map getProperties(NodeRef nodeRef)
{
String id = nodeRef.getId();
Map properties = null;
if (id.equalsIgnoreCase("/gav.doc"))
{
properties = createProperties("Gav", "Gavs Object",
new String[] {"gav", "gadget", "gibbon"}, null);
}
else if (id.equalsIgnoreCase("/kev.txt"))
{
properties = createProperties("Kev", "Kevs Object",
new String[] {"kev", "monkey"}, null);
}
else if (id.equalsIgnoreCase("/sop.txt"))
{
properties = createProperties("SOP", "A manufacturing SOP",
new String[] {"sop", "manufacturing"}, "sop1");
}
return properties;
}
private static Map createProperties(String name, String desc,
String[] keywords, String sop)
{
HashMap props = new HashMap();
Date date = new Date();
props.put("name", name);
props.put("description", desc);
props.put("keywords", keywords);
props.put("created", date);
props.put("modified", date);
if (sop != null)
{
props.put("sopId", sop);
props.put("effective", date);
props.put("approved", new Boolean(true));
props.put("latestversion", "1.6");
}
return props;
}
}

View File

@@ -181,9 +181,7 @@ public class AlfrescoNavigationHandler extends NavigationHandler
"' in dispatch context");
// see if there is any navigation config for the node type
ConfigService configSvc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
context).getBean(Application.BEAN_CONFIG_SERVICE);
ConfigService configSvc = Application.getConfigService(context);
Config nodeConfig = configSvc.getConfig(node);
NavigationConfigElement navigationCfg = (NavigationConfigElement)nodeConfig.
getConfigElement(NavigationElementReader.ELEMENT_NAVIGATION);

View File

@@ -55,7 +55,7 @@ public class Application
{
private static final String LOCALE = "locale";
public static final String BEAN_CONFIG_SERVICE = "configService";
public static final String BEAN_CONFIG_SERVICE = "webClientConfigService";
public static final String BEAN_DATA_DICTIONARY = "dataDictionary";
public static final String BEAN_IMPORTER_BOOTSTRAP = "importerBootstrap";
@@ -65,7 +65,6 @@ public class Application
private static StoreRef repoStoreRef;
private static String rootPath;
private static String companyRootId;
private static String companyRootDescription;
private static String glossaryFolderName;
private static String spaceTemplatesFolderName;
private static String contentTemplatesFolderName;

View File

@@ -1,47 +0,0 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.web.bean;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import org.alfresco.config.xml.XMLConfigService;
import org.alfresco.web.app.Application;
import org.springframework.web.jsf.FacesContextUtils;
/**
* Bean used for administration purposes
*
* @author gavinc
*/
public class AdminBean
{
/**
* Resets the config service
*
* @param event Event that caused the request for the reset
*/
public void resetConfigService(ActionEvent event)
{
// get the config service
XMLConfigService configSvc = (XMLConfigService)FacesContextUtils.getRequiredWebApplicationContext(
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
// reset it
configSvc.reset();
}
}

View File

@@ -35,7 +35,6 @@ import org.alfresco.config.ConfigService;
import org.alfresco.model.ContentModel;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
import org.alfresco.service.cmr.model.FileExistsException;
import org.alfresco.service.cmr.model.FileFolderService;
import org.alfresco.service.cmr.repository.AssociationRef;
@@ -53,7 +52,6 @@ import org.alfresco.web.config.PropertySheetConfigElement;
import org.alfresco.web.data.IDataContainer;
import org.alfresco.web.data.QuickSort;
import org.alfresco.web.ui.common.Utils;
import org.springframework.web.jsf.FacesContextUtils;
/**
* Backing bean for the edit document properties dialog
@@ -180,8 +178,6 @@ public class DocumentPropertiesBean
// make sure the property is represented correctly
Serializable propValue = (Serializable)props.get(propName);
PropertyDefinition propDef = this.dictionaryService.getProperty(qname);
properties.put(qname, propValue);
}
@@ -315,8 +311,7 @@ public class DocumentPropertiesBean
{
// we need to use the config service to see whether there are any
// editable properties configured for this document.
ConfigService configSvc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
ConfigService configSvc = Application.getConfigService(FacesContext.getCurrentInstance());
Config configProps = configSvc.getConfig(this.editableNode, new ConfigLookupContext("edit-properties"));
PropertySheetConfigElement propsToDisplay = (PropertySheetConfigElement)configProps.
getConfigElement("property-sheet");

View File

@@ -30,7 +30,6 @@ import javax.faces.validator.ValidatorException;
import javax.portlet.PortletRequest;
import javax.servlet.http.HttpServletRequest;
import org.alfresco.config.ConfigService;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationException;
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
@@ -99,14 +98,6 @@ public class LoginBean
this.navigator = navigator;
}
/**
* @param configService The ConfigService to set.
*/
public void setConfigService(ConfigService configService)
{
this.configService = configService;
}
/**
* @param val Username from login dialog
*/
@@ -161,8 +152,8 @@ public class LoginBean
*/
public SelectItem[] getLanguages()
{
ClientConfigElement config = (ClientConfigElement) this.configService.getGlobalConfig()
.getConfigElement(ClientConfigElement.CONFIG_ELEMENT_ID);
ClientConfigElement config = Application.getClientConfig(
FacesContext.getCurrentInstance());
List<String> languages = config.getLanguages();
SelectItem[] items = new SelectItem[languages.size()];
@@ -420,7 +411,4 @@ public class LoginBean
/** The NavigationBean bean reference */
private NavigationBean navigator;
/** ConfigService bean reference */
private ConfigService configService;
}

View File

@@ -23,7 +23,6 @@ import java.util.List;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import org.alfresco.config.ConfigService;
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.web.app.Application;
@@ -54,9 +53,6 @@ public class RecentSpacesBean implements IContextListener
/** The BrowseBean reference */
private BrowseBean browseBean;
/** ConfigService bean reference */
private ConfigService configService;
/** Maximum number of recent spaces to show */
private Integer maxRecentSpaces = null;
@@ -95,14 +91,6 @@ public class RecentSpacesBean implements IContextListener
this.browseBean = browseBean;
}
/**
* @param configService The ConfigService to set.
*/
public void setConfigService(ConfigService configService)
{
this.configService = configService;
}
/**
* @return the List of recent spaces
*/
@@ -194,8 +182,7 @@ public class RecentSpacesBean implements IContextListener
{
if (maxRecentSpaces == null)
{
ClientConfigElement config = (ClientConfigElement)this.configService.getGlobalConfig().getConfigElement(
ClientConfigElement.CONFIG_ELEMENT_ID);
ClientConfigElement config = Application.getClientConfig(FacesContext.getCurrentInstance());
maxRecentSpaces = Integer.valueOf(config.getRecentSpacesItems());
}

View File

@@ -33,8 +33,6 @@ import org.alfresco.service.namespace.QName;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.FileUploadBean;
import org.alfresco.web.bean.repository.Repository;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Handler class used by the Add Content Wizard
@@ -43,8 +41,6 @@ import org.apache.commons.logging.LogFactory;
*/
public class AddContentWizard extends BaseContentWizard
{
private static Log logger = LogFactory.getLog(AddContentWizard.class);
// TODO: retrieve these from the config service
private static final String WIZARD_TITLE_ID = "add_content_title";
private static final String WIZARD_DESC_ID = "add_content_desc";

View File

@@ -41,7 +41,6 @@ import org.alfresco.repo.action.executer.MoveActionExecuter;
import org.alfresco.repo.action.executer.SimpleWorkflowActionExecuter;
import org.alfresco.repo.action.executer.SpecialiseTypeActionExecuter;
import org.alfresco.repo.action.executer.TransformActionExecuter;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.action.ActionDefinition;
import org.alfresco.service.cmr.action.ActionService;
import org.alfresco.service.cmr.dictionary.AspectDefinition;
@@ -58,7 +57,6 @@ import org.alfresco.web.data.IDataContainer;
import org.alfresco.web.data.QuickSort;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.jsf.FacesContextUtils;
/**
* Base handler class containing common code used by the New Space Wizard and New Action Wizard
@@ -559,8 +557,7 @@ public abstract class BaseActionWizard extends AbstractWizardBean
{
if (this.encodings == null)
{
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
Config wizardCfg = svc.getConfig("Action Wizards");
if (wizardCfg != null)
{
@@ -617,8 +614,7 @@ public abstract class BaseActionWizard extends AbstractWizardBean
{
if (this.transformers == null)
{
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
Config wizardCfg = svc.getConfig("Action Wizards");
if (wizardCfg != null)
{
@@ -682,8 +678,7 @@ public abstract class BaseActionWizard extends AbstractWizardBean
{
if (this.imageTransformers == null)
{
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
Config wizardCfg = svc.getConfig("Action Wizards");
if (wizardCfg != null)
{
@@ -747,8 +742,7 @@ public abstract class BaseActionWizard extends AbstractWizardBean
{
if (this.aspects == null)
{
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
Config wizardCfg = svc.getConfig("Action Wizards");
if (wizardCfg != null)
{
@@ -825,8 +819,7 @@ public abstract class BaseActionWizard extends AbstractWizardBean
Application.getMessage(context, "content")));
// add any configured content sub-types to the list
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
Config wizardCfg = svc.getConfig("Custom Content Types");
if (wizardCfg != null)
{

View File

@@ -51,7 +51,6 @@ import org.alfresco.web.data.QuickSort;
import org.alfresco.web.ui.common.Utils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.jsf.FacesContextUtils;
/**
* Base Handler class used by the Content Wizards
@@ -499,8 +498,7 @@ public abstract class BaseContentWizard extends AbstractWizardBean
Application.getMessage(context, "content")));
// add any configured content sub-types to the list
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
Config wizardCfg = svc.getConfig("Custom Content Types");
if (wizardCfg != null)
{

View File

@@ -23,8 +23,6 @@ import javax.faces.event.ValueChangeEvent;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Repository;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Handler class used by the Create In-line Content Wizard
@@ -36,8 +34,6 @@ public class CreateContentWizard extends BaseContentWizard
protected static final String CONTENT_TEXT = "txt";
protected static final String CONTENT_HTML = "html";
private static Log logger = LogFactory.getLog(CreateContentWizard.class);
// TODO: retrieve these from the config service
private static final String WIZARD_TITLE_ID = "create_content_title";
private static final String WIZARD_DESC_ID = "create_content_desc";

View File

@@ -63,7 +63,6 @@ import org.alfresco.web.data.QuickSort;
import org.alfresco.web.ui.common.Utils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.jsf.FacesContextUtils;
/**
* Handler class used by the New Space Wizard
@@ -948,8 +947,7 @@ public class NewRuleWizard extends BaseActionWizard
{
if (this.modelTypes == null)
{
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
Config wizardCfg = svc.getConfig("Action Wizards");
if (wizardCfg != null)
{

View File

@@ -31,7 +31,6 @@ import javax.transaction.UserTransaction;
import org.alfresco.config.Config;
import org.alfresco.config.ConfigElement;
import org.alfresco.config.ConfigService;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.dictionary.TypeDefinition;
@@ -52,7 +51,6 @@ import org.alfresco.web.ui.common.component.UIListItem;
import org.alfresco.web.ui.common.component.description.UIDescription;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.jsf.FacesContextUtils;
/**
* Handler class used by the New Space Wizard
@@ -78,12 +76,12 @@ public class NewSpaceWizard extends AbstractWizardBean
private static final String ERROR = "error_space";
private static final String DEFAULT_SPACE_TYPE_ICON = "/images/icons/space.gif";
private static final String ICONS_LOOKUP_KEY = " icons";
// new space wizard specific properties
protected SearchService searchService;
protected NamespaceService namespaceService;
protected DictionaryService dictionaryService;
protected ConfigService configService;
protected String spaceType;
protected String icon;
@@ -559,9 +557,8 @@ public class NewSpaceWizard extends AbstractWizardBean
this.folderTypeDescriptions.add(defaultDesc);
// add any configured content sub-types to the list
ConfigService svc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
Config wizardCfg = svc.getConfig("Custom Folder Types");
Config wizardCfg = Application.getConfigService(FacesContext.getCurrentInstance()).
getConfig("Custom Folder Types");
if (wizardCfg != null)
{
ConfigElement typesCfg = wizardCfg.getConfigElement("folder-types");
@@ -689,7 +686,8 @@ public class NewSpaceWizard extends AbstractWizardBean
QName type = QName.createQName(this.spaceType);
String typePrefixForm = type.toPrefixString(this.namespaceService);
Config config = this.configService.getConfig(typePrefixForm);
Config config = Application.getConfigService(FacesContext.getCurrentInstance()).
getConfig(typePrefixForm + ICONS_LOOKUP_KEY);
if (config != null)
{
ConfigElement iconsCfg = config.getConfigElement("icons");
@@ -774,16 +772,6 @@ public class NewSpaceWizard extends AbstractWizardBean
{
this.dictionaryService = dictionaryService;
}
/**
* Sets the config service
*
* @param configService The ConfigService
*/
public void setConfigService(ConfigService configService)
{
this.configService = configService;
}
/**
* @return Returns the copyPolicy.

View File

@@ -30,13 +30,11 @@ import javax.faces.event.ActionEvent;
import javax.faces.validator.ValidatorException;
import javax.transaction.UserTransaction;
import org.alfresco.config.ConfigService;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
import org.alfresco.service.cmr.security.AuthenticationService;
import org.alfresco.service.cmr.security.OwnableService;
import org.alfresco.service.cmr.security.PermissionService;
@@ -44,7 +42,6 @@ import org.alfresco.service.cmr.security.PersonService;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.web.app.Application;
import org.alfresco.web.app.ContextListener;
import org.alfresco.web.app.context.UIContextService;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
@@ -97,9 +94,6 @@ public class NewUserWizard extends AbstractWizardBean
/** OwnableService bean reference */
private OwnableService ownableService;
/** ConfigService bean reference */
private ConfigService configService;
/** action context */
private Node person = null;
@@ -150,14 +144,6 @@ public class NewUserWizard extends AbstractWizardBean
{
this.ownableService = ownableService;
}
/**
* @param configService The ConfigService to set.
*/
public void setConfigService(ConfigService configService)
{
this.configService = configService;
}
/**
* Initialises the wizard
@@ -968,9 +954,7 @@ public class NewUserWizard extends AbstractWizardBean
*/
private String getDefaultPermission()
{
ClientConfigElement config = (ClientConfigElement)this.configService.getGlobalConfig().getConfigElement(
ClientConfigElement.CONFIG_ELEMENT_ID);
ClientConfigElement config = Application.getClientConfig(FacesContext.getCurrentInstance());
return config.getHomeSpacePermission();
}

View File

@@ -32,10 +32,8 @@ import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.config.ClientConfigElement;
import org.alfresco.web.data.IDataContainer;
import org.alfresco.web.ui.common.renderer.data.IRichListRenderer;
import org.alfresco.web.ui.common.renderer.data.RichListRenderer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.jsf.FacesContextUtils;
/**
* @author Kevin Roast
@@ -51,13 +49,9 @@ public class UIRichList extends UIComponentBase implements IDataContainer
public UIRichList()
{
setRendererType("org.alfresco.faces.RichListRenderer");
IRichListRenderer test = new RichListRenderer.IconViewRenderer();
// get the list of views from the client configuration
ConfigService configSvc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
FacesContext.getCurrentInstance()).getBean(Application.BEAN_CONFIG_SERVICE);
ConfigService configSvc = Application.getConfigService(FacesContext.getCurrentInstance());
ClientConfigElement clientConfig = (ClientConfigElement)configSvc.getGlobalConfig().
getConfigElement(ClientConfigElement.CONFIG_ELEMENT_ID);
List<String> views = clientConfig.getViews();

View File

@@ -29,7 +29,6 @@ import javax.faces.el.ValueBinding;
import org.alfresco.config.Config;
import org.alfresco.config.ConfigLookupContext;
import org.alfresco.config.ConfigService;
import org.alfresco.service.cmr.repository.AssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Node;
@@ -40,7 +39,6 @@ import org.alfresco.web.config.PropertySheetConfigElement.ItemConfig;
import org.alfresco.web.config.PropertySheetConfigElement.PropertyConfig;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.jsf.FacesContextUtils;
/**
* Component that represents the properties of a Node
@@ -84,7 +82,6 @@ public class UIPropertySheet extends UIPanel implements NamingContainer
*/
public void encodeBegin(FacesContext context) throws IOException
{
String var = null;
int howManyKids = getChildren().size();
Boolean externalConfig = (Boolean)getAttributes().get("externalConfig");
@@ -106,8 +103,7 @@ public class UIPropertySheet extends UIPanel implements NamingContainer
logger.debug("Configuring property sheet using ConfigService");
// get the properties to display
ConfigService configSvc = (ConfigService)FacesContextUtils.getRequiredWebApplicationContext(
context).getBean(Application.BEAN_CONFIG_SERVICE);
ConfigService configSvc = Application.getConfigService(FacesContext.getCurrentInstance());
Config configProps = null;
if (getConfigArea() == null)
{

View File

@@ -1,124 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
<!-- ==================== MANAGED BEANS ==================== -->
<managed-bean>
<description>
The bean that backs up the jsf-test webapp User List screen
</description>
<managed-bean-name>UserListBean</managed-bean-name>
<managed-bean-class>jsftest.UserListBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<description>
Bean for component testing
</description>
<managed-bean-name>TestList</managed-bean-name>
<managed-bean-class>jsftest.TestList</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<description>
The bean that acts as the Data Dictionary Service
</description>
<managed-bean-name>MockDDService</managed-bean-name>
<managed-bean-class>jsftest.repository.DataDictionary</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<description>
A bean that components in the zoo can use
</description>
<managed-bean-name>DummyBean</managed-bean-name>
<managed-bean-class>jsftest.DummyBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<!-- ==================== NAVIGATION ==================== -->
<!-- Zoo page links -->
<navigation-rule>
<from-view-id>/jsp/zoo/zoo.jsp</from-view-id>
<navigation-case>
<from-outcome>showUserlist</from-outcome>
<to-view-id>/jsp/test/userlist.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>showRichListZoo</from-outcome>
<to-view-id>/jsp/zoo/components.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>showPropertyZoo</from-outcome>
<to-view-id>/jsp/zoo/properties.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>showAutoPropertyZoo</from-outcome>
<to-view-id>/jsp/zoo/properties-auto.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>showImagePickerZoo</from-outcome>
<to-view-id>/jsp/zoo/image-picker.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>showDynaDescZoo</from-outcome>
<to-view-id>/jsp/zoo/dynamic-description.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>showWebClient</from-outcome>
<to-view-id>/jsp/browse/browse.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<!-- rule to get back to the zoo page from anywhere -->
<navigation-rule>
<from-view-id>/jsp/*</from-view-id>
<navigation-case>
<from-outcome>showZoo</from-outcome>
<to-view-id>/jsp/zoo/zoo.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<!-- test page navigation rules -->
<navigation-rule>
<from-view-id>/jsp/test/userlist.jsp</from-view-id>
<navigation-case>
<from-outcome>edituser</from-outcome>
<to-view-id>/jsp/test/edituser.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>adduser</from-outcome>
<to-view-id>/jsp/test/adduser.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/jsp/test/adduser.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/jsp/test/userlist.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>cancel</from-outcome>
<to-view-id>/jsp/test/userlist.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/jsp/test/edituser.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/jsp/test/userlist.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>cancel</from-outcome>
<to-view-id>/jsp/test/userlist.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>

View File

@@ -41,10 +41,6 @@
<property-name>browseBean</property-name>
<value>#{BrowseBean}</value>
</managed-property>
<managed-property>
<property-name>configService</property-name>
<value>#{configService}</value>
</managed-property>
</managed-bean>
<managed-bean>
@@ -141,10 +137,6 @@
<property-name>browseBean</property-name>
<value>#{BrowseBean}</value>
</managed-property>
<managed-property>
<property-name>configService</property-name>
<value>#{configService}</value>
</managed-property>
</managed-bean>
<managed-bean>
@@ -258,10 +250,6 @@
<property-name>dictionaryService</property-name>
<value>#{DictionaryService}</value>
</managed-property>
<managed-property>
<property-name>configService</property-name>
<value>#{configService}</value>
</managed-property>
<managed-property>
<property-name>namespaceService</property-name>
<value>#{NamespaceService}</value>
@@ -295,10 +283,6 @@
<property-name>browseBean</property-name>
<value>#{BrowseBean}</value>
</managed-property>
<managed-property>
<property-name>configService</property-name>
<value>#{configService}</value>
</managed-property>
<managed-property>
<property-name>namespaceService</property-name>
<value>#{NamespaceService}</value>
@@ -336,10 +320,6 @@
<property-name>searchService</property-name>
<value>#{SearchService}</value>
</managed-property>
<managed-property>
<property-name>configService</property-name>
<value>#{configService}</value>
</managed-property>
<managed-property>
<property-name>namespaceService</property-name>
<value>#{NamespaceService}</value>
@@ -570,10 +550,6 @@
<property-name>ownableService</property-name>
<value>#{OwnableService}</value>
</managed-property>
<managed-property>
<property-name>configService</property-name>
<value>#{configService}</value>
</managed-property>
</managed-bean>
<managed-bean>
@@ -890,13 +866,6 @@
</managed-property>
</managed-bean>
<managed-bean>
<description>Backing bean used for administration purposes</description>
<managed-bean-name>AdminBean</managed-bean-name>
<managed-bean-class>org.alfresco.web.bean.AdminBean</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
<managed-bean>
<description>Backing bean used for the Export dialog</description>
<managed-bean-name>ExportDialog</managed-bean-name>
@@ -1036,10 +1005,6 @@
<property-name>searchService</property-name>
<value>#{SearchService}</value>
</managed-property>
<managed-property>
<property-name>configService</property-name>
<value>#{configService}</value>
</managed-property>
<managed-property>
<property-name>namespaceService</property-name>
<value>#{NamespaceService}</value>
@@ -1077,10 +1042,6 @@
<property-name>searchService</property-name>
<value>#{SearchService}</value>
</managed-property>
<managed-property>
<property-name>configService</property-name>
<value>#{configService}</value>
</managed-property>
<managed-property>
<property-name>namespaceService</property-name>
<value>#{NamespaceService}</value>
@@ -1118,10 +1079,6 @@
<property-name>searchService</property-name>
<value>#{SearchService}</value>
</managed-property>
<managed-property>
<property-name>configService</property-name>
<value>#{configService}</value>
</managed-property>
<managed-property>
<property-name>namespaceService</property-name>
<value>#{NamespaceService}</value>
@@ -1159,10 +1116,6 @@
<property-name>searchService</property-name>
<value>#{SearchService}</value>
</managed-property>
<managed-property>
<property-name>configService</property-name>
<value>#{configService}</value>
</managed-property>
<managed-property>
<property-name>namespaceService</property-name>
<value>#{NamespaceService}</value>
@@ -1204,10 +1157,6 @@
<property-name>contentService</property-name>
<value>#{ContentService}</value>
</managed-property>
<managed-property>
<property-name>configService</property-name>
<value>#{configService}</value>
</managed-property>
<managed-property>
<property-name>namespaceService</property-name>
<value>#{NamespaceService}</value>
@@ -1245,10 +1194,6 @@
<property-name>searchService</property-name>
<value>#{SearchService}</value>
</managed-property>
<managed-property>
<property-name>configService</property-name>
<value>#{configService}</value>
</managed-property>
<managed-property>
<property-name>namespaceService</property-name>
<value>#{NamespaceService}</value>
@@ -1401,10 +1346,6 @@
<property-name>contentService</property-name>
<value>#{ContentService}</value>
</managed-property>
<managed-property>
<property-name>configService</property-name>
<value>#{configService}</value>
</managed-property>
<managed-property>
<property-name>namespaceService</property-name>
<value>#{NamespaceService}</value>

View File

@@ -1,411 +0,0 @@
<%--
Copyright (C) 2005 Alfresco, Inc.
Licensed under the Mozilla Public License version 1.1
with a permitted attribution clause. You may obtain a
copy of the License at
http://www.alfresco.org/legal/license.txt
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the
License.
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page buffer="64kb" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<r:page>
<f:view>
<%-- load a bundle of properties I18N strings here --%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
<h:form acceptCharset="UTF-8" id="testForm">
<h2>Components Test Page</h2>
<%-- ModeList tests --%>
<b>ModeList component:</b><br>
Basic ModeList<br>
<a:modeList itemSpacing="2" iconColumnWidth="0"
style="background-color:#EEEEEE" selectedStyle="background-color:#FFFFFF;border:solid #444444;border-width:1px">
<a:listItem value="1" label="First Item" tooltip="Item Number 1" />
<a:listItem value="2" label="Second Item" tooltip="Item Number 2" />
<a:listItem value="3" label="Third Item" tooltip="Item Number 3" />
</a:modeList>
<br>
Modelist with styles applied, icons, title label and the initial value set:<br>
<a:modeList label="Views:" itemSpacing="2" iconColumnWidth="20" width="100"
style="background-color:#F3F1EB" itemStyle="font-family:Tahoma;font-size:11px"
selectedStyle="background-color:#EBF1FF;font-family:Tahoma;font-size:11px;border:solid #4444FF;border-width:1px"
value="1">
<a:listItem value="0" label="None" tooltip="No Icon Here" />
<a:listItem value="1" label="Details" image="/images/icons/BlueArrow.gif" />
<a:listItem value="2" label="Icons" image="/images/icons/BlueArrow.gif" />
<a:listItem value="3" label="List" image="/images/icons/BlueArrow.gif" />
</a:modeList>
<br>
ModeList rendered horizontally with first item selected:<br>
<a:modeList itemSpacing="2" iconColumnWidth="0" horizontal="true" value="1"
style="background-color:#EEEEEE" selectedStyle="background-color:#FFFFFF;border:solid #444444;border-width:1px">
<a:listItem value="1" label="Item 001" tooltip="Item Number 1" />
<a:listItem value="2" label="Item 002" tooltip="Item Number 2" />
<a:listItem value="3" label="Item 003" tooltip="Item Number 3" />
</a:modeList>
<p>
<%-- Menu tests --%>
<b>Menus:</b><br>
Simple menu:<br>
<a:menu id="menu1" menuStyle="background-color:#FFFFFF; border:thin solid #AAAAAA;"
itemSpacing="4" label="Menu" tooltip="I am a menu tooltip">
<a:actionLink value="Item 001" />
<a:actionLink value="Item 002" />
<a:actionLink value="Item 003" />
<a:actionLink value="Should not see this" rendered="false" />
</a:menu>
<p>
Menu with image, styles and actions with icons:<br>
<a:menu id="menu2" styleClass="header" itemSpacing="2" label="More..." image="/images/icons/arrow_expanded.gif" tooltip="Click Me"
menuStyle="background-color:#eeeeee;border-top:thin solid #FFFFFF; border-left:thin solid #FFFFFF; border-right:thin solid #444444; border-bottom:thin solid #444444;">
<a:actionLink value="Menu Action Link" image="/images/icons/BlueArrow.gif" />
<a:actionLink value="Click Me" image="/images/icons/link_small.gif" action="success" actionListener="#{TestList.clickActionLink}" styleClass="header" />
<a:actionLink value="No Image here" />
</a:menu>
<p>
<%-- Breadcrumb tests --%>
<b>Breadcrumbs:</b><br>
Default style with modified separator and actionListener handler:<br>
<a:breadcrumb id="path1" value="/horse/biscuit/flibble/1234" action="success" actionListener="#{TestList.clickBreadcrumb}" separator="~" />
<br>
Path style with default separator:<br>
<a:breadcrumb id="path2" styleClass="path" value="/this/is/a/small/breadcrumb" tooltip="I am a tooltip" />
<br>
Root should be missing from this breadcrumb:<br>
<a:panel id="panelCrumb" progressive="true">
<a:breadcrumb id="path3" styleClass="path" value="/001/002/003/004/005" showRoot="false" />
</a:panel>
<p>
<%-- ActionLink tests --%>
<b>ActionLinks:</b><br>
<a:actionLink id="action1" value="Action Link" action="success" actionListener="#{TestList.clickActionLink}" />
<br>
<a:actionLink id="action2" value="Action Link With CSS" action="success" actionListener="#{TestList.clickActionLink}" styleClass="header" />
<br>
Action link with image and text, using vertical alignment property to centre text.<br>
<a:actionLink id="action3" value="Image Action Link" image="/images/icons/BlueArrow.gif" verticalAlign="40%" />
<br>
Action link with no text, just an image with title/alt text instead:<br>
<a:actionLink id="action4" value="Image Only Action Link" image="/images/icons/link_small.gif" showLink="false"/>
<p>
<%-- Progressive panel tests --%>
<b>Progressive Panels:</b><br>
<a:panel id="panel0" border="ballongrey" bgcolor="#EEEEEE" progressive="true" label="Progressive Panel Test 1" styleClass="mainTitle" expanded="false">
<p>
HTML text inside the Progressive Panel
<p>
<h:outputText id="out1" value="Text From Component with explicit ID"/>
</a:panel>
<br>
<a:panel id="panel1" border="mainwhite" bgcolor="white" progressive="true" label="Progressive Panel Test 2 (SHOULD BREAK WHEN CLOSED)" styleClass="mainTitle">
<p>
nothing exciting here
<b>not at all</b>
<p>
<h:outputText value="Component WITHOUT explicit ID (SHOULD BREAK THE PANEL!)"/>
<br>
<h:commandButton id="panel1-but1" value="Button with explicit ID" action="success" />
</a:panel>
<p>
<%-- RichList component test --%>
<%-- The RichList component is different to the data-grid in that it is
designed to render it's own child components. This means it is capable
of rendering the columns in any order and in any kind of layout. Allowing
the impl of details, icons and list views within a single component. --%>
<%-- NOTE: Suggest config of each view independantly in the config XML e.g.
to allow the icon/details views to use different page sizes or styles.
Otherwise you have to pick values "compatible" with all view modes! --%>
<b>RichList:</b><br>
RichList component test shown in Details view mode, including sortable columns of various data types and paging.<br>
<a:richList viewMode="details" pageSize="5" styleClass="" style="border:thin solid #eeeeff; padding:2px" rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
value="#{TestList.rows}" var="r" initialSortColumn="name" initialSortDescending="true">
<a:column primary="true" width="200" style="padding:2px" styleClass="">
<f:facet name="header">
<a:sortLink label="Name" value="name" mode="case-insensitive" styleClass="header"/>
</f:facet>
<f:facet name="large-icon">
<%-- this could be a clickable action image etc. --%>
<h:graphicImage alt="#{r.name}" title="#{r.name}" width="38" height="38" url="/images/icons/folder_large.png" />
</f:facet>
<f:facet name="small-icon">
<%-- example of a clickable action image as an icon --%>
<a:actionLink value="#{r.name}" image="/images/icons/folder.gif" actionListener="#{TestList.clickNameLink}" showLink="false">
<f:param name="name" value="#{r.name}" />
</a:actionLink>
</f:facet>
<a:actionLink value="#{r.name}" actionListener="#{TestList.clickNameLink}">
<f:param name="name" value="#{r.name}" />
</a:actionLink>
</a:column>
<a:column>
<f:facet name="header">
<a:sortLink label="Count" value="count" styleClass="header"/>
</f:facet>
<h:outputText value="#{r.count}"/>
</a:column>
<a:column>
<f:facet name="header">
<a:sortLink label="Valid" value="valid" styleClass="header"/>
</f:facet>
<h:outputText value="#{r.valid}"/>
</a:column>
<a:column>
<f:facet name="header">
<a:sortLink label="Relevance" value="relevance" styleClass="header"/>
</f:facet>
<h:outputText value="#{r.relevance}"/>
</a:column>
<a:column>
<f:facet name="header">
<a:sortLink label="Created Date" value="created" styleClass="header"/>
</f:facet>
<h:outputText value="#{r.created}">
<%-- example of a DateTime converter --%>
<%-- can be used to convert both input and output text --%>
<f:convertDateTime dateStyle="short" />
</h:outputText>
</a:column>
<a:column actions="true">
<f:facet name="header">
<h:outputText value="#{msg.actions}"/>
</f:facet>
<h:outputText value="Action | Action | Action"/>
</a:column>
<%-- components other than columns added to a RichList will generally
be rendered as part of the list footer --%>
<a:dataPager/>
</a:richList>
<p>
<a:panel id="panel2" border="white" bgcolor="white" progressive="true" label="Progressive Panel Example 3" styleClass="mainSubTitle">
NOTE: currently all JSF components within a Progressive Panel MUST be given an explicit ID!
<br>
Same list shown in a different view mode (Icons). This mode renderer displays the large icon and renderers in a multi-column format. It also chooses not to display the sort header links.
<a:richList id="list2" viewMode="icons" pageSize="6" styleClass="" style="padding:2px" rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
value="#{TestList.rows}" var="r" initialSortColumn="name" initialSortDescending="true">
<a:column id="list2-col1" primary="true" width="200" style="padding:2px" styleClass="">
<f:facet name="header">
<a:sortLink id="list2-sort1" label="Name" value="name" mode="case-insensitive" styleClass="header"/>
</f:facet>
<f:facet name="large-icon">
<%-- example of a clickable action image as an icon --%>
<a:actionLink id="list2-img1" value="#{r.name}" image="/images/icons/folder_large.png" actionListener="#{TestList.clickNameLink}" showLink="false">
<f:param id="list2-param1-id" name="name" value="#{r.name}" />
</a:actionLink>
</f:facet>
<f:facet name="small-icon">
<h:graphicImage id="list2-img2" alt="#{r.name}" title="#{r.name}" width="15" height="13" url="/images/icons/folder.gif" />
</f:facet>
<%-- example of a clickable action link item --%>
<a:actionLink id="list2-link1" value="#{r.name}" actionListener="#{TestList.clickNameLink}">
<f:param id="list2-param2-id" name="name" value="#{r.name}" />
</a:actionLink>
</a:column>
<%-- TODO: need some way to allow columns for specific views
<a:column forViewMode="icon">
<h:outputText value="This would be a longer textual description"/>
</a:column>
--%>
<a:column id="list2-col2">
<f:facet name="header">
<a:sortLink id="list2-sort2" label="Count" value="count" styleClass="header"/>
</f:facet>
<h:outputText id="list2-out3" value="Count: #{r.count}"/>
</a:column>
<a:column id="list2-col3">
<f:facet name="header">
<a:sortLink id="list2-sort3" label="Created Date" value="created" styleClass="header"/>
</f:facet>
<h:outputText id="list2-out4" value="Created Date: "/>
<h:outputText id="list2-out5" value="#{r.created}">
<%-- example of a DateTime converter --%>
<%-- can be used to convert both input and output text --%>
<f:convertDateTime dateStyle="short" />
</h:outputText>
</a:column>
<a:column id="list2-col4" actions="true">
<f:facet name="header">
<h:outputText id="list2-out6" value="#{msg.actions}"/>
</f:facet>
<h:outputText id="list2-out7" value="Action | Action | Action"/>
</a:column>
<%-- components other than columns added to a RichList will generally
be rendered as part of the list footer --%>
<a:dataPager id="list2-pager"/>
</a:richList>
</a:panel>
<p>
<a:panel id="panel3" border="innergrey" bgcolor="#e8e8e8" progressive="false" label="Non-progressive Panel" styleClass="mainSubTitle">
<br>
Same list shown in a different view mode (List). This mode displays the small icon and uses single column rendering.<br>
<a:richList viewMode="list" pageSize="5" styleClass="" style="padding:4px" width="100%"
value="#{TestList.rows}" var="r" initialSortColumn="name" initialSortDescending="true">
<a:column primary="true">
<f:facet name="header">
<a:sortLink label="Name" value="name" mode="case-insensitive" styleClass="header"/>
</f:facet>
<f:facet name="large-icon">
<%-- this could be a clickable action image etc. --%>
<h:graphicImage alt="#{r.name}" title="#{r.name}" width="38" height="38" url="/images/icons/folder_large.png" />
</f:facet>
<f:facet name="small-icon">
<%-- this could be a clickable action image etc. --%>
<h:graphicImage alt="#{r.name}" title="#{r.name}" width="15" height="13" url="/images/icons/folder.gif" />
</f:facet>
<a:actionLink value="#{r.name}" actionListener="#{TestList.clickNameLink}">
<f:param id="list-param-id" name="name" value="#{r.name}" />
</a:actionLink>
</a:column>
<a:column>
<f:facet name="header">
<a:sortLink label="Count" value="count" styleClass="header"/>
</f:facet>
<h:outputText value="Count: #{r.count}"/>
</a:column>
<a:column>
<f:facet name="header">
<a:sortLink label="Created Date" value="created" styleClass="header"/>
</f:facet>
<h:outputText value="Created Date: "/>
<h:outputText value="#{r.created}">
<%-- example of a DateTime converter --%>
<%-- can be used to convert both input and output text --%>
<f:convertDateTime dateStyle="short" />
</h:outputText>
</a:column>
<a:column actions="true">
<f:facet name="header">
<h:outputText value="#{msg.actions}"/>
</f:facet>
<h:outputText value="Action | Action | Action"/>
</a:column>
<%-- components other than columns added to a RichList will generally
be rendered as part of the list footer --%>
<a:dataPager/>
</a:richList>
</a:panel>
<p/>
<a:panel id="panel4" expanded="true" progressive="true"
border="white" bgcolor="white" titleBorder="greyround" titleBgcolor="#eaeaea"
label="Bordered Title Area Progressive Panel" styleClass="mainSubTitle">
<h:outputText id="panel4-text" value="The content of a bordered title area"/>
</a:panel>
<p>
<%-- component evaluators --%>
<b>Evaluators:</b><br>
1a. Boolean Evaluator - you should see the next line of text:<br>
<a:booleanEvaluator value="#{TestList.rows != null}">
<h:outputText value="Component inside an evaluator"/>
</a:booleanEvaluator>
<br><br>
1b. Boolean Evaluator - you should <i>not</i> see the next line of text:<br>
<a:booleanEvaluator value="#{TestList.rows == null}">
<h:outputText value="Component inside an evaluator"/>
</a:booleanEvaluator>
<br><br>
2a. Value Set Evaluator - you should see the next line of text:<br>
<a:valueSetEvaluator value="#{TestList.rows}">
<h:outputText value="Component inside an evaluator"/>
</a:valueSetEvaluator>
<br><br>
2b. Value Set Evaluator - you should <i>not</i> see the next line of text:<br>
<a:valueSetEvaluator value="#{null}">
<h:outputText value="Component inside an evaluator"/>
</a:valueSetEvaluator>
<br><br>
3a. String Equals Evaluator - you should see the next line of text:<br>
<a:stringEqualsEvaluator value="some string" condition="some string">
<h:outputText value="Component inside an evaluator"/>
</a:stringEqualsEvaluator>
<br><br>
3b. String Equals Evaluator - you should <i>not</i> see the next line of text:<br>
<a:stringEqualsEvaluator value="some string" condition="some string123">
<h:outputText value="Component inside an evaluator"/>
</a:stringEqualsEvaluator>
<br><br>
Test evaluators around menu actions:<br>
<a:menu id="menuX" menuStyle="background-color:#FFFFFF; border:thin solid #AAAAAA;" itemSpacing="2" label="More...">
<a:actionLink value="You should only see this one item" />
<a:booleanEvaluator value="#{TestList.rows == null}">
<a:actionLink value="You should NOT see this second item" />
</a:booleanEvaluator>
</a:menu>
<p>
<%-- Date Picker Component --%>
<%-- Example of a tag utilising an Input Component with a custom renderer.
The renderer handles encoding and decoding of date values to UI elements --%>
<b>Date Picker:</b><br>
Basic date picker:<br>
<a:inputDatePicker id="date1" value="#{TestList.rows[0].created}" startYear="1996" yearCount="10"/>
<br>
Date Picker with CSS style applied:<br>
<a:inputDatePicker id="date2" startYear="2000" yearCount="5" styleClass="inputField" />
<p>
<h:commandButton id="show-zoo-page" value="Show Zoo" action="showZoo" />
</h:form>
</f:view>
</r:page>

View File

@@ -1,69 +0,0 @@
<%--
Copyright (C) 2005 Alfresco, Inc.
Licensed under the Mozilla Public License version 1.1
with a permitted attribution clause. You may obtain a
copy of the License at
http://www.alfresco.org/legal/license.txt
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the
License.
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
<r:page>
<f:view>
<h2>Dynamic Description</h2>
<h:form acceptCharset="UTF-8" id="dyna-desc">
<h:selectOneMenu onchange="javascript:listItemSelected(this);">
<f:selectItem itemLabel="Choice One" itemValue="one" />
<f:selectItem itemLabel="Choice Two" itemValue="two" />
<f:selectItem itemLabel="Choice Three" itemValue="three" />
<f:selectItem itemLabel="Choice Four" itemValue="four" />
</h:selectOneMenu>
<br/><br/>
<a:dynamicDescription selected="one" functionName="listItemSelected">
<a:descriptions value="#{DummyBean.properties}" />
</a:dynamicDescription>
<br/><br/>
<a:imagePickerRadio columns="4" spacing="4" value="container"
onclick="javascript:itemSelected(this);">
<a:listItem value="container" label="Container" tooltip="Container"
image="/images/icons/space.gif" />
<a:listItem value="wiki" label="Wiki" tooltip="Wiki"
image="/images/icons/wiki.gif" />
<a:listItem value="discussion" label="Discussion" tooltip="Discussion"
image="/images/icons/discussion.gif" />
</a:imagePickerRadio>
<br/><br/>
<a:dynamicDescription selected="container">
<a:description controlValue="container" text="Container" />
<a:description controlValue="wiki" text="Wiki" />
<a:description controlValue="discussion" text="Discussion" />
</a:dynamicDescription>
<br/><br/>
<h:commandButton id="show-zoo-page" value="Show Zoo" action="showZoo" />
</h:form>
</f:view>
</r:page>

View File

@@ -1,62 +0,0 @@
<%--
Copyright (C) 2005 Alfresco, Inc.
Licensed under the Mozilla Public License version 1.1
with a permitted attribution clause. You may obtain a
copy of the License at
http://www.alfresco.org/legal/license.txt
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the
License.
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
<r:page>
<f:view>
<h2>Image Picker</h2>
<h:form acceptCharset="UTF-8" id="imagePicker">
<a:imagePickerRadio columns="4" spacing="5" value="#{DummyBean.properties.one}">
<a:listItem value="1" label="Checkin" tooltip="Checkin"
image="/images/icons/check_in_large.gif" />
<a:listItem value="2" label="Checkout" tooltip="Checkout"
image="/images/icons/check_out_large.gif" />
<a:listItem value="3" label="New File" tooltip="New File"
image="/images/icons/large_newFile.gif" />
</a:imagePickerRadio>
<br/>
<h:commandButton id="submit" value="Submit" action="#{DummyBean.submit}" />
<p/>
<a:imagePickerRadio columns="1" spacing="6" value="#{DummyBean.properties.two}" style="border: 1px solid black">
<a:listItem value="1" tooltip="Checkin" image="/images/icons/check_in_large.gif" />
<a:listItem value="2" tooltip="Checkout" image="/images/icons/check_out_large.gif" />
<a:listItem value="3" tooltip="New File" image="/images/icons/large_newFile.gif" />
</a:imagePickerRadio>
<br/>
<h:commandButton id="submit" value="Submit" action="#{DummyBean.submit}" />
<p/>
<h:commandButton id="show-zoo-page" value="Show Zoo" action="showZoo" />
</h:form>
</f:view>
</r:page>

View File

@@ -1,62 +0,0 @@
<%--
Copyright (C) 2005 Alfresco, Inc.
Licensed under the Mozilla Public License version 1.1
with a permitted attribution clause. You may obtain a
copy of the License at
http://www.alfresco.org/legal/license.txt
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the
License.
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
<r:page>
<f:view>
<h2>Auto configured property sheet</h2>
<h:form acceptCharset="UTF-8" id="propertySheetForm3">
<r:propertySheetGrid value="/sop.txt" var="node3">
</r:propertySheetGrid>
<div style="color:red;"><h:messages layout="table" /></div>
<br/>
<h:commandButton value="Update Properties" action="#{node3.persist}"/>
</h:form>
<br/><hr/>
<h2>Config driven property sheet (WEB-INF/web-client-config.xml)</h2>
<h:form acceptCharset="UTF-8" id="propertySheetForm4">
<r:propertySheetGrid value="/sop.txt" var="node4" externalConfig="true">
</r:propertySheetGrid>
<div style="color:red;"><h:messages layout="table" /></div>
<br/>
<h:commandButton value="Update Properties" action="#{node4.persist}"/>
<p>
<h:commandButton id="show-zoo-page" value="Show Zoo" action="showZoo" />
</h:form>
</f:view>
</r:page>

View File

@@ -1,80 +0,0 @@
<%--
Copyright (C) 2005 Alfresco, Inc.
Licensed under the Mozilla Public License version 1.1
with a permitted attribution clause. You may obtain a
copy of the License at
http://www.alfresco.org/legal/license.txt
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the
License.
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
<r:page>
<f:view>
<h2>Property sheet with standard JSF components</h2>
<h:form acceptCharset="UTF-8" id="propertySheetForm">
<r:propertySheetGrid value="/gav.doc">
<h:outputText value='#{MockDDService.types[node.type].propertiesMap["name"].displayName}: ' />
<h:inputText value="#{node.name}" />
<h:outputText value='#{MockDDService.types[node.type].propertiesMap["description"].displayName}: ' />
<h:inputText value="#{node.description}" />
<h:outputText value='#{MockDDService.types[node.type].propertiesMap["created"].displayName}: ' />
<h:inputText value="#{node.created}" disabled='#{MockDDService.types[node.type].propertiesMap["created"].readOnly}'>
<f:convertDateTime dateStyle="short" pattern="d/MM/yyyy" />
</h:inputText>
<h:outputText value='#{MockDDService.types[node.type].propertiesMap["modified"].displayName}: ' />
<h:inputText value="#{node.modified}">
<f:convertDateTime dateStyle="short" pattern="d/MM/yyyy" />
</h:inputText>
<!-- TODO: Put the keywords in here to test the custom converter tag -->
</r:propertySheetGrid>
<div style="color:red;"><h:messages layout="table" /></div>
<br/>
<h:commandButton value="Update Properties" action="#{node.persist}"/>
</h:form>
<br/><hr/>
<h2>Property sheet with custom property components</h2>
<h:form acceptCharset="UTF-8" id="propertySheetForm2">
<r:propertySheetGrid value="/kev.txt" var="node2">
<r:property value="name" columns="1" />
<r:property value="description" columns="1" />
<r:property value="created" columns="1" />
<r:property value="modified" columns="2" />
<r:property value="non-existent" columns="1" />
</r:propertySheetGrid>
<div style="color:red;"><h:messages layout="table" /></div>
<br/>
<h:commandButton value="Update Properties" action="#{node2.persist}"/>
<p>
<h:commandButton id="show-zoo-page" value="Show Zoo" action="showZoo" />
</h:form>
</f:view>
</r:page>

View File

@@ -1,56 +0,0 @@
<%--
Copyright (C) 2005 Alfresco, Inc.
Licensed under the Mozilla Public License version 1.1
with a permitted attribution clause. You may obtain a
copy of the License at
http://www.alfresco.org/legal/license.txt
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the
License.
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<r:page>
<f:view>
<h2>The Zoo</h2>
<h:form acceptCharset="UTF-8" id="zooForm">
<h:commandButton id="show-components-zoo" value="Component Zoo" action="showRichListZoo" />
<br/><br/>
<%--
<h:commandButton id="show-property-zoo" value="Property Zoo" action="showPropertyZoo" />
<br/><br/>
<h:commandButton id="show-auto-property-zoo" value="Auto Property Zoo" action="showAutoPropertyZoo" />
<br/><br/>
--%>
<h:commandButton id="show-image-picker" value="Image Picker Zoo" action="showImagePickerZoo" />
<br/><br/>
<h:commandButton id="dyna-desc" value="Dynamic Description Zoo" action="showDynaDescZoo" />
<br/><br/>
<h:commandButton id="show-user-list" value="UserList Test Pages" action="showUserlist" />
<p/><p/>
<hr/><p/>
<h:commandButton id="show-web-client" value="Back to the Web Client" action="showWebClient" />
</h:form>
</f:view>
</r:page>