mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
15297: Merged V3.1 to V3.2 15093: Merged V2.1-A to V3.1 12428: Fix for ADB-150 13461: Fix for ADB-163 - Generic picker now resizes but has minimum width 13462: Fix for ADB-164 ACT 7788 - Search button label now configurable as component attribute. 13757: Fix for ADB-155 14113: Fix for ABD-143 14115: Fix for ADB-144 14493: Fixes for ADB-155 (correction) and ADB-161, ADB-184, ADB-185, ADB-186, ADB-188, ADB-189. 15162: Fix for ETHREEOH-2278 - missed during merge of ABD-143 15278: Fix for ETHREEOH-2474 - search regression git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15298 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -152,6 +152,7 @@ public class NodeInfoBean implements Serializable
|
||||
model.put("date", new Date());
|
||||
model.put("msg", new I18NMessageMethod());
|
||||
model.put("url", new BaseTemplateContentServlet.URLHelper(context));
|
||||
model.put("locale", I18NUtil.getLocale());
|
||||
if (nodeRef != null)
|
||||
{
|
||||
model.put("node", new TemplateNode(
|
||||
|
@@ -76,7 +76,8 @@ public class UIGenericPicker extends UICommand
|
||||
private Boolean showAddButton = null;
|
||||
private Boolean filterRefresh = null;
|
||||
private Boolean multiSelect = null;
|
||||
private String addButtonLabel;
|
||||
private String addButtonLabel = null;
|
||||
private String searchButtonLabel = null;
|
||||
private Integer width = null;
|
||||
private Integer height = null;
|
||||
|
||||
@@ -128,6 +129,7 @@ public class UIGenericPicker extends UICommand
|
||||
filters = (SelectItem[])values[12];
|
||||
filterRefresh = (Boolean)values[13];
|
||||
multiSelect = (Boolean)values[14];
|
||||
searchButtonLabel = (String)values[15];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -135,7 +137,7 @@ public class UIGenericPicker extends UICommand
|
||||
*/
|
||||
public Object saveState(FacesContext context)
|
||||
{
|
||||
Object values[] = new Object[15];
|
||||
Object values[] = new Object[16];
|
||||
// standard component attributes are saved by the super class
|
||||
values[0] = super.saveState(context);
|
||||
values[1] = showFilter;
|
||||
@@ -152,6 +154,7 @@ public class UIGenericPicker extends UICommand
|
||||
values[12] = filters;
|
||||
values[13] = filterRefresh;
|
||||
values[14] = multiSelect;
|
||||
values[15] = searchButtonLabel;
|
||||
return (values);
|
||||
}
|
||||
|
||||
@@ -321,14 +324,21 @@ public class UIGenericPicker extends UICommand
|
||||
{
|
||||
out.write("<input name='");
|
||||
out.write(clientId + FIELD_CONTAINS);
|
||||
out.write("' type='text' maxlength='256' style='width:120px' value=\"");
|
||||
out.write("' type='text' maxlength='256' style='width:");
|
||||
out.write(getShowFilter() ? "120" : "180");
|
||||
out.write("px' value=\"");
|
||||
out.write(Utils.encode(this.contains));
|
||||
out.write("\"> ");
|
||||
}
|
||||
|
||||
// Search button
|
||||
out.write("<input type='submit' value='");
|
||||
out.write(Utils.encode(bundle.getString(MSG_SEARCH)));
|
||||
String msg = getSearchButtonLabel();
|
||||
if (msg == null || msg.length() == 0)
|
||||
{
|
||||
msg = bundle.getString(MSG_SEARCH);
|
||||
}
|
||||
out.write(Utils.encode(msg));
|
||||
out.write("' onclick=\"");
|
||||
out.write(generateFormSubmit(context, ACTION_SEARCH));
|
||||
out.write("\">");
|
||||
@@ -361,7 +371,7 @@ public class UIGenericPicker extends UICommand
|
||||
|
||||
// results list row
|
||||
out.write("<tr><td colspan=2>");
|
||||
out.write("<select size='8' style='width:");
|
||||
out.write("<select size='8' style='min-width:");
|
||||
out.write(Integer.toString(getWidth()));
|
||||
out.write("px;height:");
|
||||
out.write(Integer.toString(getHeight()));
|
||||
@@ -399,7 +409,7 @@ public class UIGenericPicker extends UICommand
|
||||
{
|
||||
out.write("<tr><td colspan=2>");
|
||||
out.write("<input type='submit' value='");
|
||||
String msg = getAddButtonLabel();
|
||||
msg = getAddButtonLabel();
|
||||
if (msg == null || msg.length() == 0)
|
||||
{
|
||||
msg = bundle.getString(MSG_ADD);
|
||||
@@ -440,6 +450,28 @@ public class UIGenericPicker extends UICommand
|
||||
return this.filterIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the searchButtonLabel.
|
||||
*/
|
||||
public String getSearchButtonLabel()
|
||||
{
|
||||
ValueBinding vb = getValueBinding("searchButtonLabel");
|
||||
if (vb != null)
|
||||
{
|
||||
this.searchButtonLabel = (String)vb.getValue(getFacesContext());
|
||||
}
|
||||
|
||||
return this.searchButtonLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param searchButtonLabel The searchButtonLabel to set.
|
||||
*/
|
||||
public void setSearchButtonLabel(String searchButtonLabel)
|
||||
{
|
||||
this.searchButtonLabel = searchButtonLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the addButtonLabel.
|
||||
*/
|
||||
|
@@ -31,6 +31,7 @@ import javax.faces.context.FacesContext;
|
||||
import javax.faces.context.ResponseWriter;
|
||||
import javax.faces.el.ValueBinding;
|
||||
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.ui.common.component.SelfRenderingComponent;
|
||||
|
||||
/**
|
||||
@@ -42,6 +43,9 @@ public abstract class BaseDebugComponent extends SelfRenderingComponent
|
||||
{
|
||||
private String title;
|
||||
|
||||
private static String COMPONENT_PROPERTY = "component_property";
|
||||
private static String COMPONENT_VALUE = "component_value";
|
||||
|
||||
/**
|
||||
* Retrieves the debug data to show for the component as a Map
|
||||
*
|
||||
@@ -69,7 +73,11 @@ public abstract class BaseDebugComponent extends SelfRenderingComponent
|
||||
out.write("</td></tr>");
|
||||
}
|
||||
|
||||
out.write("<tr style='border: 1px solid #dddddd;'><th align='left'>Property</th><th align='left'>Value</th></tr>");
|
||||
out.write("<tr style='border: 1px solid #dddddd;'><th align='left'>");
|
||||
out.write(Application.getMessage(context, COMPONENT_PROPERTY));
|
||||
out.write("</th><th align='left'>");
|
||||
out.write(Application.getMessage(context, COMPONENT_VALUE));
|
||||
out.write("</th></tr>");
|
||||
|
||||
Map session = getDebugData();
|
||||
for (Object key : session.keySet())
|
||||
|
@@ -66,6 +66,7 @@ public class GenericPickerTag extends BaseComponentTag
|
||||
setBooleanProperty(component, "filterRefresh", this.filterRefresh);
|
||||
setBooleanProperty(component, "multiSelect", this.multiSelect);
|
||||
setStringProperty(component, "addButtonLabel", this.addButtonLabel);
|
||||
setStringProperty(component, "searchButtonLabel", this.searchButtonLabel);
|
||||
setActionProperty((UICommand)component, this.action);
|
||||
setActionListenerProperty((UICommand)component, this.actionListener);
|
||||
setIntProperty(component, "width", this.width);
|
||||
@@ -95,6 +96,7 @@ public class GenericPickerTag extends BaseComponentTag
|
||||
this.showContains = null;
|
||||
this.showAddButton = null;
|
||||
this.addButtonLabel = null;
|
||||
this.searchButtonLabel = null;
|
||||
this.action = null;
|
||||
this.actionListener = null;
|
||||
this.width = null;
|
||||
@@ -224,6 +226,20 @@ public class GenericPickerTag extends BaseComponentTag
|
||||
{
|
||||
this.multiSelect = multiSelect;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the searchButtonLabel
|
||||
*
|
||||
* @param searchButtonLabel the searchButtonLabel
|
||||
*/
|
||||
public void setSearchButtonLabel(String searchButtonLabel)
|
||||
{
|
||||
this.searchButtonLabel = searchButtonLabel;
|
||||
}
|
||||
|
||||
|
||||
/** the searchButtonLabel */
|
||||
private String searchButtonLabel;
|
||||
|
||||
/** the multiSelect */
|
||||
private String multiSelect;
|
||||
|
Reference in New Issue
Block a user