mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)
125605 rmunteanu: Merged 5.1.1 (5.1.1) to 5.1.N (5.1.2) 125498 slanglois: MNT-16155 Update source headers - remove svn:eol-style property on Java and JSP source files git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@125783 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,73 +1,73 @@
|
||||
package org.alfresco.web.ui.common.component.debug;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.repo.admin.patch.AppliedPatch;
|
||||
import org.alfresco.repo.admin.patch.PatchService;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.descriptor.Descriptor;
|
||||
import org.alfresco.service.descriptor.DescriptorService;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
import org.springframework.web.jsf.FacesContextUtils;
|
||||
|
||||
/**
|
||||
* Component which displays the Alfresco Repository properties
|
||||
*
|
||||
* @author kevinr
|
||||
*/
|
||||
public class UIRepositoryProperties extends BaseDebugComponent
|
||||
{
|
||||
/**
|
||||
* @see javax.faces.component.UIComponent#getFamily()
|
||||
*/
|
||||
public String getFamily()
|
||||
{
|
||||
return "org.alfresco.faces.debug.RepositoryProperties";
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.web.ui.common.component.debug.BaseDebugComponent#getDebugData()
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Map getDebugData()
|
||||
{
|
||||
// note: sort properties
|
||||
Map properties = new TreeMap();
|
||||
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
ServiceRegistry services = Repository.getServiceRegistry(fc);
|
||||
DescriptorService descriptorService = services.getDescriptorService();
|
||||
|
||||
Descriptor installedRepoDescriptor = descriptorService.getInstalledRepositoryDescriptor();
|
||||
properties.put("Installed Version", installedRepoDescriptor.getVersion());
|
||||
properties.put("Installed Schema", installedRepoDescriptor.getSchema());
|
||||
|
||||
Descriptor systemDescriptor = descriptorService.getServerDescriptor();
|
||||
properties.put("Server Version", systemDescriptor.getVersion());
|
||||
properties.put("Server Schema", systemDescriptor.getSchema());
|
||||
|
||||
WebApplicationContext cx = FacesContextUtils.getRequiredWebApplicationContext(fc);
|
||||
PatchService patchService = (PatchService)cx.getBean("PatchService");
|
||||
List<AppliedPatch> patches = patchService.getPatches(null, null);
|
||||
for (AppliedPatch patch : patches)
|
||||
{
|
||||
StringBuilder data = new StringBuilder(256);
|
||||
data.append(patch.getAppliedOnDate())
|
||||
.append(" - ")
|
||||
.append(patch.getDescription())
|
||||
.append(" - ")
|
||||
.append(patch.getSucceeded() == true ?
|
||||
Application.getMessage(fc, "repository_patch_succeeded") :
|
||||
Application.getMessage(fc, "repository_patch_failed"));
|
||||
properties.put(patch.getId(), data);
|
||||
}
|
||||
|
||||
return properties;
|
||||
}
|
||||
}
|
||||
package org.alfresco.web.ui.common.component.debug;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.repo.admin.patch.AppliedPatch;
|
||||
import org.alfresco.repo.admin.patch.PatchService;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.descriptor.Descriptor;
|
||||
import org.alfresco.service.descriptor.DescriptorService;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
import org.springframework.web.jsf.FacesContextUtils;
|
||||
|
||||
/**
|
||||
* Component which displays the Alfresco Repository properties
|
||||
*
|
||||
* @author kevinr
|
||||
*/
|
||||
public class UIRepositoryProperties extends BaseDebugComponent
|
||||
{
|
||||
/**
|
||||
* @see javax.faces.component.UIComponent#getFamily()
|
||||
*/
|
||||
public String getFamily()
|
||||
{
|
||||
return "org.alfresco.faces.debug.RepositoryProperties";
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.web.ui.common.component.debug.BaseDebugComponent#getDebugData()
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Map getDebugData()
|
||||
{
|
||||
// note: sort properties
|
||||
Map properties = new TreeMap();
|
||||
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
ServiceRegistry services = Repository.getServiceRegistry(fc);
|
||||
DescriptorService descriptorService = services.getDescriptorService();
|
||||
|
||||
Descriptor installedRepoDescriptor = descriptorService.getInstalledRepositoryDescriptor();
|
||||
properties.put("Installed Version", installedRepoDescriptor.getVersion());
|
||||
properties.put("Installed Schema", installedRepoDescriptor.getSchema());
|
||||
|
||||
Descriptor systemDescriptor = descriptorService.getServerDescriptor();
|
||||
properties.put("Server Version", systemDescriptor.getVersion());
|
||||
properties.put("Server Schema", systemDescriptor.getSchema());
|
||||
|
||||
WebApplicationContext cx = FacesContextUtils.getRequiredWebApplicationContext(fc);
|
||||
PatchService patchService = (PatchService)cx.getBean("PatchService");
|
||||
List<AppliedPatch> patches = patchService.getPatches(null, null);
|
||||
for (AppliedPatch patch : patches)
|
||||
{
|
||||
StringBuilder data = new StringBuilder(256);
|
||||
data.append(patch.getAppliedOnDate())
|
||||
.append(" - ")
|
||||
.append(patch.getDescription())
|
||||
.append(" - ")
|
||||
.append(patch.getSucceeded() == true ?
|
||||
Application.getMessage(fc, "repository_patch_succeeded") :
|
||||
Application.getMessage(fc, "repository_patch_failed"));
|
||||
properties.put(patch.getId(), data);
|
||||
}
|
||||
|
||||
return properties;
|
||||
}
|
||||
}
|
||||
|
@@ -1,72 +1,72 @@
|
||||
package org.alfresco.web.ui.common.converter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import javax.faces.component.UIComponent;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.convert.Converter;
|
||||
import javax.faces.convert.ConverterException;
|
||||
|
||||
/**
|
||||
* Converter class to convert a List of multiple values into a comma
|
||||
* separated list.
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public class MultiValueConverter implements Converter
|
||||
{
|
||||
/**
|
||||
* <p>The standard converter id for this converter.</p>
|
||||
*/
|
||||
public static final String CONVERTER_ID = "org.alfresco.faces.MultiValueConverter";
|
||||
|
||||
/**
|
||||
* @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.String)
|
||||
*/
|
||||
public Object getAsObject(FacesContext context, UIComponent component, String value)
|
||||
throws ConverterException
|
||||
{
|
||||
List<String> items = new ArrayList<String>();
|
||||
StringTokenizer tokenizer = new StringTokenizer(value, ", ");
|
||||
while (tokenizer.hasMoreTokens())
|
||||
{
|
||||
items.add(tokenizer.nextToken().trim());
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
|
||||
*/
|
||||
public String getAsString(FacesContext context, UIComponent component, Object value)
|
||||
throws ConverterException
|
||||
{
|
||||
String result = null;
|
||||
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
for (Object obj : (Collection)value)
|
||||
{
|
||||
if (buffer.length() != 0)
|
||||
{
|
||||
buffer.append(", ");
|
||||
}
|
||||
|
||||
buffer.append(obj.toString());
|
||||
}
|
||||
|
||||
result = buffer.toString();
|
||||
}
|
||||
else if (value != null)
|
||||
{
|
||||
result = value.toString();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
package org.alfresco.web.ui.common.converter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import javax.faces.component.UIComponent;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.convert.Converter;
|
||||
import javax.faces.convert.ConverterException;
|
||||
|
||||
/**
|
||||
* Converter class to convert a List of multiple values into a comma
|
||||
* separated list.
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public class MultiValueConverter implements Converter
|
||||
{
|
||||
/**
|
||||
* <p>The standard converter id for this converter.</p>
|
||||
*/
|
||||
public static final String CONVERTER_ID = "org.alfresco.faces.MultiValueConverter";
|
||||
|
||||
/**
|
||||
* @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.String)
|
||||
*/
|
||||
public Object getAsObject(FacesContext context, UIComponent component, String value)
|
||||
throws ConverterException
|
||||
{
|
||||
List<String> items = new ArrayList<String>();
|
||||
StringTokenizer tokenizer = new StringTokenizer(value, ", ");
|
||||
while (tokenizer.hasMoreTokens())
|
||||
{
|
||||
items.add(tokenizer.nextToken().trim());
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
|
||||
*/
|
||||
public String getAsString(FacesContext context, UIComponent component, Object value)
|
||||
throws ConverterException
|
||||
{
|
||||
String result = null;
|
||||
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
for (Object obj : (Collection)value)
|
||||
{
|
||||
if (buffer.length() != 0)
|
||||
{
|
||||
buffer.append(", ");
|
||||
}
|
||||
|
||||
buffer.append(obj.toString());
|
||||
}
|
||||
|
||||
result = buffer.toString();
|
||||
}
|
||||
else if (value != null)
|
||||
{
|
||||
result = value.toString();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@@ -1,55 +1,55 @@
|
||||
package org.alfresco.web.ui.common.renderer;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.faces.component.UIComponent;
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.web.ui.common.PanelGenerator;
|
||||
|
||||
/**
|
||||
* Renderer for the image picker component that outputs the list of images
|
||||
* as radio buttons within a rounded corner panel
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public class ImagePickerRadioPanelRenderer extends ImagePickerRadioRenderer
|
||||
{
|
||||
/**
|
||||
* @see javax.faces.render.Renderer#encodeBegin(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
|
||||
*/
|
||||
public void encodeBegin(FacesContext context, UIComponent component) throws IOException
|
||||
{
|
||||
if (component.isRendered() == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// output the start of the surrounding rounded corner panel
|
||||
PanelGenerator.generatePanelStart(context.getResponseWriter(),
|
||||
context.getExternalContext().getRequestContextPath(),
|
||||
(String)component.getAttributes().get("panelBorder"),
|
||||
(String)component.getAttributes().get("panelBgcolor"));
|
||||
|
||||
super.encodeBegin(context, component);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.render.Renderer#encodeEnd(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
|
||||
*/
|
||||
public void encodeEnd(FacesContext context, UIComponent component) throws IOException
|
||||
{
|
||||
if (component.isRendered() == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
super.encodeEnd(context, component);
|
||||
|
||||
// output the end of the surrounding rounded corner panel
|
||||
PanelGenerator.generatePanelEnd(context.getResponseWriter(),
|
||||
context.getExternalContext().getRequestContextPath(),
|
||||
(String)component.getAttributes().get("panelBorder"));
|
||||
}
|
||||
}
|
||||
package org.alfresco.web.ui.common.renderer;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.faces.component.UIComponent;
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.web.ui.common.PanelGenerator;
|
||||
|
||||
/**
|
||||
* Renderer for the image picker component that outputs the list of images
|
||||
* as radio buttons within a rounded corner panel
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public class ImagePickerRadioPanelRenderer extends ImagePickerRadioRenderer
|
||||
{
|
||||
/**
|
||||
* @see javax.faces.render.Renderer#encodeBegin(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
|
||||
*/
|
||||
public void encodeBegin(FacesContext context, UIComponent component) throws IOException
|
||||
{
|
||||
if (component.isRendered() == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// output the start of the surrounding rounded corner panel
|
||||
PanelGenerator.generatePanelStart(context.getResponseWriter(),
|
||||
context.getExternalContext().getRequestContextPath(),
|
||||
(String)component.getAttributes().get("panelBorder"),
|
||||
(String)component.getAttributes().get("panelBgcolor"));
|
||||
|
||||
super.encodeBegin(context, component);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.render.Renderer#encodeEnd(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
|
||||
*/
|
||||
public void encodeEnd(FacesContext context, UIComponent component) throws IOException
|
||||
{
|
||||
if (component.isRendered() == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
super.encodeEnd(context, component);
|
||||
|
||||
// output the end of the surrounding rounded corner panel
|
||||
PanelGenerator.generatePanelEnd(context.getResponseWriter(),
|
||||
context.getExternalContext().getRequestContextPath(),
|
||||
(String)component.getAttributes().get("panelBorder"));
|
||||
}
|
||||
}
|
||||
|
@@ -1,71 +1,71 @@
|
||||
package org.alfresco.web.ui.common.tag;
|
||||
|
||||
import javax.faces.component.UIComponent;
|
||||
|
||||
/**
|
||||
* Tag to place the image picker component and radio renderer inside
|
||||
* a rounded corner panel
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public class ImagePickerRadioPanelTag extends ImagePickerRadioTag
|
||||
{
|
||||
private String panelBorder;
|
||||
private String panelBgcolor;
|
||||
|
||||
/**
|
||||
* @see javax.faces.webapp.UIComponentTag#getComponentType()
|
||||
*/
|
||||
public String getComponentType()
|
||||
{
|
||||
return "org.alfresco.faces.ImagePicker";
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.webapp.UIComponentTag#getRendererType()
|
||||
*/
|
||||
public String getRendererType()
|
||||
{
|
||||
return "org.alfresco.faces.RadioPanel";
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
|
||||
*/
|
||||
protected void setProperties(UIComponent component)
|
||||
{
|
||||
super.setProperties(component);
|
||||
setStringProperty(component, "panelBorder", this.panelBorder);
|
||||
setStringProperty(component, "panelBgcolor", this.panelBgcolor);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.jsp.tagext.Tag#release()
|
||||
*/
|
||||
public void release()
|
||||
{
|
||||
super.release();
|
||||
this.panelBorder = null;
|
||||
this.panelBgcolor = null;
|
||||
}
|
||||
|
||||
public String getPanelBgcolor()
|
||||
{
|
||||
return panelBgcolor;
|
||||
}
|
||||
|
||||
public void setPanelBgcolor(String panelBgcolor)
|
||||
{
|
||||
this.panelBgcolor = panelBgcolor;
|
||||
}
|
||||
|
||||
public String getPanelBorder()
|
||||
{
|
||||
return panelBorder;
|
||||
}
|
||||
|
||||
public void setPanelBorder(String panelBorder)
|
||||
{
|
||||
this.panelBorder = panelBorder;
|
||||
}
|
||||
}
|
||||
package org.alfresco.web.ui.common.tag;
|
||||
|
||||
import javax.faces.component.UIComponent;
|
||||
|
||||
/**
|
||||
* Tag to place the image picker component and radio renderer inside
|
||||
* a rounded corner panel
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public class ImagePickerRadioPanelTag extends ImagePickerRadioTag
|
||||
{
|
||||
private String panelBorder;
|
||||
private String panelBgcolor;
|
||||
|
||||
/**
|
||||
* @see javax.faces.webapp.UIComponentTag#getComponentType()
|
||||
*/
|
||||
public String getComponentType()
|
||||
{
|
||||
return "org.alfresco.faces.ImagePicker";
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.webapp.UIComponentTag#getRendererType()
|
||||
*/
|
||||
public String getRendererType()
|
||||
{
|
||||
return "org.alfresco.faces.RadioPanel";
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
|
||||
*/
|
||||
protected void setProperties(UIComponent component)
|
||||
{
|
||||
super.setProperties(component);
|
||||
setStringProperty(component, "panelBorder", this.panelBorder);
|
||||
setStringProperty(component, "panelBgcolor", this.panelBgcolor);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.jsp.tagext.Tag#release()
|
||||
*/
|
||||
public void release()
|
||||
{
|
||||
super.release();
|
||||
this.panelBorder = null;
|
||||
this.panelBgcolor = null;
|
||||
}
|
||||
|
||||
public String getPanelBgcolor()
|
||||
{
|
||||
return panelBgcolor;
|
||||
}
|
||||
|
||||
public void setPanelBgcolor(String panelBgcolor)
|
||||
{
|
||||
this.panelBgcolor = panelBgcolor;
|
||||
}
|
||||
|
||||
public String getPanelBorder()
|
||||
{
|
||||
return panelBorder;
|
||||
}
|
||||
|
||||
public void setPanelBorder(String panelBorder)
|
||||
{
|
||||
this.panelBorder = panelBorder;
|
||||
}
|
||||
}
|
||||
|
@@ -1,31 +1,31 @@
|
||||
package org.alfresco.web.ui.common.tag;
|
||||
|
||||
import javax.faces.convert.Converter;
|
||||
import javax.faces.webapp.ConverterTag;
|
||||
import javax.servlet.jsp.JspException;
|
||||
|
||||
import org.alfresco.web.ui.common.converter.MultiValueConverter;
|
||||
|
||||
/**
|
||||
* Allows the MultiValueConverter component to be used on JSP pages
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public class MultiValueConverterTag extends ConverterTag
|
||||
{
|
||||
/**
|
||||
* Default Constructor
|
||||
*/
|
||||
public MultiValueConverterTag()
|
||||
{
|
||||
setConverterId(MultiValueConverter.CONVERTER_ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.webapp.ConverterTag#createConverter()
|
||||
*/
|
||||
protected Converter createConverter() throws JspException
|
||||
{
|
||||
return (MultiValueConverter)super.createConverter();
|
||||
}
|
||||
}
|
||||
package org.alfresco.web.ui.common.tag;
|
||||
|
||||
import javax.faces.convert.Converter;
|
||||
import javax.faces.webapp.ConverterTag;
|
||||
import javax.servlet.jsp.JspException;
|
||||
|
||||
import org.alfresco.web.ui.common.converter.MultiValueConverter;
|
||||
|
||||
/**
|
||||
* Allows the MultiValueConverter component to be used on JSP pages
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public class MultiValueConverterTag extends ConverterTag
|
||||
{
|
||||
/**
|
||||
* Default Constructor
|
||||
*/
|
||||
public MultiValueConverterTag()
|
||||
{
|
||||
setConverterId(MultiValueConverter.CONVERTER_ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.webapp.ConverterTag#createConverter()
|
||||
*/
|
||||
protected Converter createConverter() throws JspException
|
||||
{
|
||||
return (MultiValueConverter)super.createConverter();
|
||||
}
|
||||
}
|
||||
|
@@ -1,176 +1,176 @@
|
||||
package org.alfresco.web.ui.common.tag;
|
||||
|
||||
import javax.faces.component.UIComponent;
|
||||
|
||||
/**
|
||||
* @author Kevin Roast
|
||||
*/
|
||||
public class SelectListTag extends HtmlComponentTag
|
||||
{
|
||||
/**
|
||||
* @see javax.faces.webapp.UIComponentTag#getComponentType()
|
||||
*/
|
||||
public String getComponentType()
|
||||
{
|
||||
return "org.alfresco.faces.SelectList";
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.webapp.UIComponentTag#getRendererType()
|
||||
*/
|
||||
public String getRendererType()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
|
||||
*/
|
||||
protected void setProperties(UIComponent component)
|
||||
{
|
||||
super.setProperties(component);
|
||||
setBooleanProperty(component, "multiSelect", this.multiSelect);
|
||||
setBooleanProperty(component, "activeSelect", this.activeSelect);
|
||||
setStringStaticProperty(component, "var", this.var);
|
||||
setStringProperty(component, "itemStyle", this.itemStyle);
|
||||
setStringProperty(component, "itemStyleClass", this.itemStyleClass);
|
||||
setStringProperty(component, "value", this.value);
|
||||
setStringProperty(component, "onchange", this.onchange);
|
||||
setBooleanProperty(component, "escapeItemLabel", this.escapeItemLabel);
|
||||
setBooleanProperty(component, "escapeItemDescription", this.escapeItemDescription);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.jsp.tagext.Tag#release()
|
||||
*/
|
||||
public void release()
|
||||
{
|
||||
super.release();
|
||||
this.multiSelect = null;
|
||||
this.activeSelect = null;
|
||||
this.var = null;
|
||||
this.itemStyle = null;
|
||||
this.itemStyleClass = null;
|
||||
this.value = null;
|
||||
this.onchange = null;
|
||||
this.escapeItemLabel = null;
|
||||
this.escapeItemDescription = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the multi-select mode
|
||||
*
|
||||
* @param multiSelect the multi-select mode
|
||||
*/
|
||||
public void setMultiSelect(String multiSelect)
|
||||
{
|
||||
this.multiSelect = multiSelect;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the active selection mode
|
||||
*
|
||||
* @param activeSelect the active selection mode
|
||||
*/
|
||||
public void setActiveSelect(String activeSelect)
|
||||
{
|
||||
this.activeSelect = activeSelect;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the variable name for row item context
|
||||
*
|
||||
* @param var the variable name for row item context
|
||||
*/
|
||||
public void setVar(String var)
|
||||
{
|
||||
this.var = var;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the item Style
|
||||
*
|
||||
* @param itemStyle the item Style
|
||||
*/
|
||||
public void setItemStyle(String itemStyle)
|
||||
{
|
||||
this.itemStyle = itemStyle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the item Style Class
|
||||
*
|
||||
* @param itemStyleClass the item Style Class
|
||||
*/
|
||||
public void setItemStyleClass(String itemStyleClass)
|
||||
{
|
||||
this.itemStyleClass = itemStyleClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the selected value
|
||||
*
|
||||
* @param value the selected value
|
||||
*/
|
||||
public void setValue(String value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the onchange handler
|
||||
*
|
||||
* @param onchange the onchange handler.
|
||||
*/
|
||||
public void setOnchange(final String onchange)
|
||||
{
|
||||
this.onchange = onchange;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the escapeItemLabel flag
|
||||
*
|
||||
* @param escapeItemLabel true to escape the items labels
|
||||
*/
|
||||
public void setEscapeItemLabel(String escapeItemLabel)
|
||||
{
|
||||
this.escapeItemLabel = escapeItemLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the escapeItemDescription flag
|
||||
*
|
||||
* @param escapeItemDescription true to escape the items descriptions
|
||||
*/
|
||||
public void setEscapeItemDescription(String escapeItemDescription)
|
||||
{
|
||||
this.escapeItemDescription = escapeItemDescription;
|
||||
}
|
||||
|
||||
/** the selected value */
|
||||
private String value;
|
||||
|
||||
/** the itemStyle */
|
||||
private String itemStyle;
|
||||
|
||||
/** the itemStyleClass */
|
||||
private String itemStyleClass;
|
||||
|
||||
/** the multi-select mode */
|
||||
private String multiSelect;
|
||||
|
||||
/** the active selection mode */
|
||||
private String activeSelect;
|
||||
|
||||
/** the variable name for row item context */
|
||||
private String var;
|
||||
|
||||
/** the event handler for a change in selection */
|
||||
private String onchange;
|
||||
|
||||
/** the escape mode for item's labels */
|
||||
private String escapeItemLabel;
|
||||
|
||||
/** the escape mode for item's descriptions */
|
||||
private String escapeItemDescription;
|
||||
}
|
||||
package org.alfresco.web.ui.common.tag;
|
||||
|
||||
import javax.faces.component.UIComponent;
|
||||
|
||||
/**
|
||||
* @author Kevin Roast
|
||||
*/
|
||||
public class SelectListTag extends HtmlComponentTag
|
||||
{
|
||||
/**
|
||||
* @see javax.faces.webapp.UIComponentTag#getComponentType()
|
||||
*/
|
||||
public String getComponentType()
|
||||
{
|
||||
return "org.alfresco.faces.SelectList";
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.webapp.UIComponentTag#getRendererType()
|
||||
*/
|
||||
public String getRendererType()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
|
||||
*/
|
||||
protected void setProperties(UIComponent component)
|
||||
{
|
||||
super.setProperties(component);
|
||||
setBooleanProperty(component, "multiSelect", this.multiSelect);
|
||||
setBooleanProperty(component, "activeSelect", this.activeSelect);
|
||||
setStringStaticProperty(component, "var", this.var);
|
||||
setStringProperty(component, "itemStyle", this.itemStyle);
|
||||
setStringProperty(component, "itemStyleClass", this.itemStyleClass);
|
||||
setStringProperty(component, "value", this.value);
|
||||
setStringProperty(component, "onchange", this.onchange);
|
||||
setBooleanProperty(component, "escapeItemLabel", this.escapeItemLabel);
|
||||
setBooleanProperty(component, "escapeItemDescription", this.escapeItemDescription);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.jsp.tagext.Tag#release()
|
||||
*/
|
||||
public void release()
|
||||
{
|
||||
super.release();
|
||||
this.multiSelect = null;
|
||||
this.activeSelect = null;
|
||||
this.var = null;
|
||||
this.itemStyle = null;
|
||||
this.itemStyleClass = null;
|
||||
this.value = null;
|
||||
this.onchange = null;
|
||||
this.escapeItemLabel = null;
|
||||
this.escapeItemDescription = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the multi-select mode
|
||||
*
|
||||
* @param multiSelect the multi-select mode
|
||||
*/
|
||||
public void setMultiSelect(String multiSelect)
|
||||
{
|
||||
this.multiSelect = multiSelect;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the active selection mode
|
||||
*
|
||||
* @param activeSelect the active selection mode
|
||||
*/
|
||||
public void setActiveSelect(String activeSelect)
|
||||
{
|
||||
this.activeSelect = activeSelect;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the variable name for row item context
|
||||
*
|
||||
* @param var the variable name for row item context
|
||||
*/
|
||||
public void setVar(String var)
|
||||
{
|
||||
this.var = var;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the item Style
|
||||
*
|
||||
* @param itemStyle the item Style
|
||||
*/
|
||||
public void setItemStyle(String itemStyle)
|
||||
{
|
||||
this.itemStyle = itemStyle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the item Style Class
|
||||
*
|
||||
* @param itemStyleClass the item Style Class
|
||||
*/
|
||||
public void setItemStyleClass(String itemStyleClass)
|
||||
{
|
||||
this.itemStyleClass = itemStyleClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the selected value
|
||||
*
|
||||
* @param value the selected value
|
||||
*/
|
||||
public void setValue(String value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the onchange handler
|
||||
*
|
||||
* @param onchange the onchange handler.
|
||||
*/
|
||||
public void setOnchange(final String onchange)
|
||||
{
|
||||
this.onchange = onchange;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the escapeItemLabel flag
|
||||
*
|
||||
* @param escapeItemLabel true to escape the items labels
|
||||
*/
|
||||
public void setEscapeItemLabel(String escapeItemLabel)
|
||||
{
|
||||
this.escapeItemLabel = escapeItemLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the escapeItemDescription flag
|
||||
*
|
||||
* @param escapeItemDescription true to escape the items descriptions
|
||||
*/
|
||||
public void setEscapeItemDescription(String escapeItemDescription)
|
||||
{
|
||||
this.escapeItemDescription = escapeItemDescription;
|
||||
}
|
||||
|
||||
/** the selected value */
|
||||
private String value;
|
||||
|
||||
/** the itemStyle */
|
||||
private String itemStyle;
|
||||
|
||||
/** the itemStyleClass */
|
||||
private String itemStyleClass;
|
||||
|
||||
/** the multi-select mode */
|
||||
private String multiSelect;
|
||||
|
||||
/** the active selection mode */
|
||||
private String activeSelect;
|
||||
|
||||
/** the variable name for row item context */
|
||||
private String var;
|
||||
|
||||
/** the event handler for a change in selection */
|
||||
private String onchange;
|
||||
|
||||
/** the escape mode for item's labels */
|
||||
private String escapeItemLabel;
|
||||
|
||||
/** the escape mode for item's descriptions */
|
||||
private String escapeItemDescription;
|
||||
}
|
||||
|
@@ -1,18 +1,18 @@
|
||||
package org.alfresco.web.ui.common.tag.debug;
|
||||
|
||||
|
||||
/**
|
||||
* Tag implementation used to place the Repository properties component on a page.
|
||||
*
|
||||
* @author kevinr
|
||||
*/
|
||||
public class RepositoryPropertiesTag extends BaseDebugTag
|
||||
{
|
||||
/**
|
||||
* @see javax.faces.webapp.UIComponentTag#getComponentType()
|
||||
*/
|
||||
public String getComponentType()
|
||||
{
|
||||
return "org.alfresco.faces.debug.RepositoryProperties";
|
||||
}
|
||||
}
|
||||
package org.alfresco.web.ui.common.tag.debug;
|
||||
|
||||
|
||||
/**
|
||||
* Tag implementation used to place the Repository properties component on a page.
|
||||
*
|
||||
* @author kevinr
|
||||
*/
|
||||
public class RepositoryPropertiesTag extends BaseDebugTag
|
||||
{
|
||||
/**
|
||||
* @see javax.faces.webapp.UIComponentTag#getComponentType()
|
||||
*/
|
||||
public String getComponentType()
|
||||
{
|
||||
return "org.alfresco.faces.debug.RepositoryProperties";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user