diff --git a/apps/showcase/src/main/resources/myTemplateDir/myTheme/myAnotherTemplate.ftl b/apps/showcase/src/main/resources/myTemplateDir/myTheme/myAnotherTemplate.ftl index 6ed9e3d93..50506fca6 100644 --- a/apps/showcase/src/main/resources/myTemplateDir/myTheme/myAnotherTemplate.ftl +++ b/apps/showcase/src/main/resources/myTemplateDir/myTheme/myAnotherTemplate.ftl @@ -21,6 +21,6 @@

Freemarker Custom Template - -parameter 'paramName' - ${parameters.paramName} +parameter 'paramName' - ${attributes.paramName}

diff --git a/apps/showcase/src/main/resources/template/ajaxErrorContainers/actionerror.ftl b/apps/showcase/src/main/resources/template/ajaxErrorContainers/actionerror.ftl index 9988a6cb6..6f3e881ed 100644 --- a/apps/showcase/src/main/resources/template/ajaxErrorContainers/actionerror.ftl +++ b/apps/showcase/src/main/resources/template/ajaxErrorContainers/actionerror.ftl @@ -22,22 +22,22 @@ Make sure element is always present. To be filled later via JS. --> -<#if parameters.id??> - id="${parameters.id}"<#rt/> - -<#if parameters.cssClass??> - class="${parameters.cssClass}"<#rt/> +<#if attributes.id??> + id="${attributes.id}"<#rt/> + +<#if attributes.cssClass??> + class="${attributes.cssClass}"<#rt/> <#else> class="errorMessage"<#rt/> -<#if parameters.cssStyle??> - style="${parameters.cssStyle}"<#rt/> +<#if attributes.cssStyle??> + style="${attributes.cssStyle}"<#rt/> > <#if (actionErrors?? && actionErrors?size > 0)> <#list actionErrors as error> <#if error??> -
  • <#if parameters.escape>${error!}<#else>${error!}<#rt/>
  • <#rt/> +
  • <#if attributes.escape>${error!}<#else>${error!}<#rt/>
  • <#rt/> diff --git a/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlfooter.ftl b/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlfooter.ftl index ccba70757..3b94f28c0 100644 --- a/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlfooter.ftl +++ b/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlfooter.ftl @@ -18,16 +18,16 @@ * under the License. */ --> -${parameters.after!}<#t/> +${attributes.after!}<#t/> <#lt/> -<#if (parameters.errorposition!"top") == 'bottom'> -<#assign hasFieldErrors = parameters.name?? && fieldErrors?? && fieldErrors.get(parameters.name)??/> +<#if (attributes.errorposition!"top") == 'bottom'> +<#assign hasFieldErrors = attributes.name?? && fieldErrors?? && fieldErrors.get(attributes.name)??/> <#if hasFieldErrors> - + <#rt/> <#if hasFieldErrors> - <#list fieldErrors.get(parameters.name) as error> + <#list fieldErrors.get(attributes.name) as error>
    ${error}
    <#t/> diff --git a/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlheader-core.ftl b/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlheader-core.ftl index 4dda1db63..c75fbef9f 100644 --- a/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlheader-core.ftl +++ b/apps/showcase/src/main/resources/template/ajaxErrorContainers/controlheader-core.ftl @@ -21,22 +21,22 @@ <#-- Always include elements to show errors. They may be filled later via AJAX. --> -<#assign hasFieldErrors = parameters.name?? && fieldErrors?? && fieldErrors.get(parameters.name)??/> -<#if (parameters.errorposition!"top") == 'top'> - - <#rt/> +<#assign hasFieldErrors = attributes.name?? && fieldErrors?? && fieldErrors.get(attributes.name)??/> +<#if (attributes.errorposition!"top") == 'top'> + + <#rt/> <#if hasFieldErrors> - <#list fieldErrors.get(parameters.name) as error> + <#list fieldErrors.get(attributes.name) as error>
    ${error}
    <#t/> <#lt/> -<#if !parameters.labelPosition?? && (parameters.form.labelPosition)??> -<#assign labelPos = parameters.form.labelPosition/> -<#elseif parameters.labelPosition??> -<#assign labelpos = parameters.labelPosition/> +<#if !attributes.labelPosition?? && (attributes.form.labelPosition)??> +<#assign labelPos = attributes.form.labelPosition/> +<#elseif attributes.labelPosition??> +<#assign labelpos = attributes.labelPosition/> <#-- if the label position is top, @@ -48,10 +48,10 @@ <#else> <#rt/> -<#if parameters.label??> +<#if attributes.label??> <#t/> <#lt/> diff --git a/apps/showcase/src/main/webapp/WEB-INF/tags/ui/componentTagExample.jsp b/apps/showcase/src/main/webapp/WEB-INF/tags/ui/componentTagExample.jsp index a905715b6..97711e428 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/tags/ui/componentTagExample.jsp +++ b/apps/showcase/src/main/webapp/WEB-INF/tags/ui/componentTagExample.jsp @@ -1,19 +1,19 @@ - * + *

    * *

    * - * - * + *

    + *

    * * public class AppendIteratorTagAction extends ActionSupport { - * + *

    * private List myList1; * private List myList2; * private List myList3; - * - * + *

    + *

    * public String execute() throws Exception { - * + *

    * myList1 = new ArrayList(); * myList1.add("1"); * myList1.add("2"); * myList1.add("3"); - * + *

    * myList2 = new ArrayList(); * myList2.add("a"); * myList2.add("b"); * myList2.add("c"); - * + *

    * myList3 = new ArrayList(); * myList3.add("A"); * myList3.add("B"); * myList3.add("C"); - * + *

    * return "done"; * } - * + *

    * public List getMyList1() { return myList1; } * public List getMyList2() { return myList2; } * public List getMyList3() { return myList3; } - *} + * } * - * + *

    * * <s:append var="myAppendIterator"> * <s:param value="%{myList1}" /> @@ -106,18 +106,16 @@ import java.util.List; * </s:iterator> * * - * * @see org.apache.struts2.util.AppendIteratorFilter * @see org.apache.struts2.views.jsp.iterator.AppendIteratorTag - * */ -@StrutsTag(name="append", tldTagClass="org.apache.struts2.views.jsp.iterator.AppendIteratorTag", description="Append the values of a list of iterators to one iterator") +@StrutsTag(name = "append", tldTagClass = "org.apache.struts2.views.jsp.iterator.AppendIteratorTag", description = "Append the values of a list of iterators to one iterator") public class AppendIterator extends ContextBean implements UnnamedParametric { private static final Logger LOG = LogManager.getLogger(AppendIterator.class); - private AppendIteratorFilter appendIteratorFilter= null; - private List _parameters; + private AppendIteratorFilter appendIteratorFilter = null; + private List attributesToAppend; public AppendIterator(ValueStack stack) { super(stack); @@ -125,7 +123,7 @@ public class AppendIterator extends ContextBean implements UnnamedParametric { @Override public boolean start(Writer writer) { - _parameters = new ArrayList(); + attributesToAppend = new ArrayList<>(); appendIteratorFilter = new AppendIteratorFilter(); return super.start(writer); @@ -133,9 +131,7 @@ public class AppendIterator extends ContextBean implements UnnamedParametric { @Override public boolean end(Writer writer, String body) { - - for (Object iteratorEntryObj : _parameters) { - + for (Object iteratorEntryObj : attributesToAppend) { if (!MakeIterator.isIterable(iteratorEntryObj)) { LOG.warn("param with value resolved as {} cannot be make as iterator, it will be ignored and hence will not appear in the merged iterator", iteratorEntryObj); continue; @@ -155,10 +151,10 @@ public class AppendIterator extends ContextBean implements UnnamedParametric { // UnnamedParametric implementation -------------------------------------- @Override public void addParameter(Object value) { - _parameters.add(value); + attributesToAppend.add(value); } - @StrutsTagAttribute(description="The name of which if supplied will have the resultant appended iterator stored under in the stack's context") + @StrutsTagAttribute(description = "The name of which if supplied will have the resultant appended iterator stored under in the stack's context") @Override public void setVar(String var) { super.setVar(var); diff --git a/core/src/main/java/org/apache/struts2/components/Component.java b/core/src/main/java/org/apache/struts2/components/Component.java index d5633f7a8..f61d07fd4 100644 --- a/core/src/main/java/org/apache/struts2/components/Component.java +++ b/core/src/main/java/org/apache/struts2/components/Component.java @@ -71,7 +71,7 @@ public class Component { protected boolean devMode = false; protected boolean escapeHtmlBody = false; protected ValueStack stack; - protected Map parameters; + protected Map attributes; protected ActionMapper actionMapper; protected boolean throwExceptionOnELFailure; protected boolean performClearTagStateForTagPoolingServers = false; @@ -86,7 +86,7 @@ public class Component { */ public Component(ValueStack stack) { this.stack = stack; - this.parameters = new LinkedHashMap<>(); + this.attributes = new LinkedHashMap<>(); getComponentStack().push(this); } @@ -279,7 +279,7 @@ public class Component { */ protected StrutsException fieldError(String field, String errorMsg, Exception e) { String msg = "tag '" + getComponentName() + "', field '" + field + - (parameters != null && parameters.containsKey("name") ? "', name '" + parameters.get("name") : "") + + (attributes != null && attributes.containsKey("name") ? "', name '" + attributes.get("name") : "") + "': " + errorMsg; throw new StrutsException(msg, e); } @@ -454,20 +454,20 @@ public class Component { * pushed before the component itself, any key-value pair that can't be assigned to component * will be set in the parameters Map. * - * @param params the parameters to copy. + * @param attributesToCopy the attributes to copy. */ - public void copyParams(Map params) { - stack.push(parameters); + public void copyAttributes(Map attributesToCopy) { + stack.push(attributes); stack.push(this); try { - for (Map.Entry entry : params.entrySet()) { + for (Map.Entry entry : attributesToCopy.entrySet()) { String key = entry.getKey(); if (key.indexOf('-') >= 0) { // UI component attributes may contain hypens (e.g. data-ajax), but ognl // can't handle that, and there can't be a component property with a hypen - // so into the parameters map it goes. See WW-4493 - parameters.put(key, entry.getValue()); + // so into the attributes map it goes. See WW-4493 + attributes.put(key, entry.getValue()); } else { stack.setValue(key, entry.getValue()); } @@ -493,21 +493,21 @@ public class Component { } /** - * Gets the parameters. + * Gets the attributes. * - * @return the parameters. Is never null. + * @return the attributes. It's never null. */ - public Map getParameters() { - return parameters; + public Map getAttributes() { + return attributes; } /** - * Adds all the given parameters to this component's own parameters. + * Adds all the given attributes to this component's own attributes. * - * @param params the parameters to add. + * @param additionalAttributes the attributes to add. */ - public void addAllParameters(Map params) { - parameters.putAll(params); + public void addAllAttributes(Map additionalAttributes) { + attributes.putAll(additionalAttributes); } /** @@ -522,7 +522,7 @@ public class Component { */ public void addParameter(String key, Object value) { if (key != null) { - Map params = getParameters(); + Map params = getAttributes(); if (value == null) { params.remove(key); diff --git a/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java b/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java index 09fab37fb..3c2e461a4 100644 --- a/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java +++ b/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java @@ -164,7 +164,7 @@ public abstract class DoubleListUIBean extends ListUIBean { // ok, let's look it up Component form = findAncestor(Form.class); if (form != null) { - addParameter("formName", form.getParameters().get("name")); + addParameter("formName", form.getAttributes().get("name")); } } @@ -188,7 +188,7 @@ public abstract class DoubleListUIBean extends ListUIBean { if (doubleId != null) { addParameter("doubleId", findString(doubleId)); } else if (form != null) { - addParameter("doubleId", form.getParameters().get("id") + "_" + escape(doubleName != null ? findString(doubleName) : null)); + addParameter("doubleId", form.getAttributes().get("id") + "_" + escape(doubleName != null ? findString(doubleName) : null)); } else { addParameter("doubleId", escape(doubleName != null ? findString(doubleName) : null)); } diff --git a/core/src/main/java/org/apache/struts2/components/DoubleSelect.java b/core/src/main/java/org/apache/struts2/components/DoubleSelect.java index cf102d252..c1adfcc1c 100644 --- a/core/src/main/java/org/apache/struts2/components/DoubleSelect.java +++ b/core/src/main/java/org/apache/struts2/components/DoubleSelect.java @@ -57,7 +57,7 @@ public class DoubleSelect extends DoubleListUIBean { public void evaluateExtraParams() { super.evaluateExtraParams(); StringBuilder onchangeParam = new StringBuilder(); - onchangeParam.append(getParameters().get("id")).append("Redirect(this.selectedIndex)"); + onchangeParam.append(getAttributes().get("id")).append("Redirect(this.selectedIndex)"); if(StringUtils.isNotEmpty(this.onchange)) { onchangeParam.append(";").append(this.onchange); } diff --git a/core/src/main/java/org/apache/struts2/components/File.java b/core/src/main/java/org/apache/struts2/components/File.java index 605fd97f7..9c754b849 100644 --- a/core/src/main/java/org/apache/struts2/components/File.java +++ b/core/src/main/java/org/apache/struts2/components/File.java @@ -67,13 +67,13 @@ public class File extends UIBean { Form form = (Form) findAncestor(Form.class); if (form != null) { - String encType = (String) form.getParameters().get("enctype"); + String encType = (String) form.getAttributes().get("enctype"); if (!"multipart/form-data".equals(encType)) { // uh oh, this isn't good! Let's warn the developer LOG.warn("Struts has detected a file upload UI tag (s:file) being used without a form set to enctype 'multipart/form-data'. This is probably an error!"); } - String method = (String) form.getParameters().get("method"); + String method = (String) form.getAttributes().get("method"); if (!"post".equalsIgnoreCase(method)) { // uh oh, this isn't good! Let's warn the developer LOG.warn("Struts has detected a file upload UI tag (s:file) being used without a form set to method 'POST'. This is probably an error!"); diff --git a/core/src/main/java/org/apache/struts2/components/Form.java b/core/src/main/java/org/apache/struts2/components/Form.java index 019e39bef..52c987038 100644 --- a/core/src/main/java/org/apache/struts2/components/Form.java +++ b/core/src/main/java/org/apache/struts2/components/Form.java @@ -172,7 +172,7 @@ public class Form extends ClosingUIBean { if (name == null) { //make the name the same as the id - String id = (String) getParameters().get("id"); + String id = (String) getAttributes().get("id"); if (StringUtils.isNotEmpty(id)) { addParameter("name", id); } @@ -204,7 +204,7 @@ public class Form extends ClosingUIBean { // keep a collection of the tag names for anything special the templates might want to do (such as pure client // side validation) - if (!parameters.containsKey("tagNames")) { + if (!attributes.containsKey("tagNames")) { // we have this if check so we don't do this twice (on open and close of the template) addParameter("tagNames", new ArrayList()); } @@ -242,7 +242,7 @@ public class Form extends ClosingUIBean { protected void evaluateClientSideJsEnablement(String actionName, String namespace, String actionMethod) { // Only evaluate if Client-Side js is to be enable when validate=true - Boolean validate = (Boolean) getParameters().get("validate"); + Boolean validate = (Boolean) getAttributes().get("validate"); if (validate != null && validate) { addParameter("performValidation", Boolean.FALSE); @@ -269,7 +269,7 @@ public class Form extends ClosingUIBean { } public List getValidators(String name) { - Class actionClass = (Class) getParameters().get("actionClass"); + Class actionClass = (Class) getAttributes().get("actionClass"); if (actionClass == null) { return Collections.EMPTY_LIST; } @@ -278,7 +278,7 @@ public class Form extends ClosingUIBean { ActionMapping mapping = actionMapper.getMappingFromActionName(formActionValue); if (mapping == null) { - mapping = actionMapper.getMappingFromActionName((String) getParameters().get("actionName")); + mapping = actionMapper.getMappingFromActionName((String) getAttributes().get("actionName")); } if (mapping == null) { diff --git a/core/src/main/java/org/apache/struts2/components/FormButton.java b/core/src/main/java/org/apache/struts2/components/FormButton.java index 914d050c9..268c39e29 100644 --- a/core/src/main/java/org/apache/struts2/components/FormButton.java +++ b/core/src/main/java/org/apache/struts2/components/FormButton.java @@ -55,7 +55,7 @@ public abstract class FormButton extends ClosingUIBean { addParameter("type", submitType); if (!BUTTON_TYPE_INPUT.equals(submitType) && (label == null)) { - addParameter("label", getParameters().get("nameValue")); + addParameter("label", getAttributes().get("nameValue")); } if (action != null || method != null) { @@ -98,8 +98,8 @@ public abstract class FormButton extends ClosingUIBean { // this check is needed for backwards compatibility with 2.1.x tmpId = findString(id); } else { - if (form != null && form.getParameters().get("id") != null) { - tmpId = tmpId + form.getParameters().get("id").toString() + "_"; + if (form != null && form.getAttributes().get("id") != null) { + tmpId = tmpId + form.getAttributes().get("id").toString() + "_"; } if (name != null) { tmpId = tmpId + escape(findString(name)); diff --git a/core/src/main/java/org/apache/struts2/components/GenericUIBean.java b/core/src/main/java/org/apache/struts2/components/GenericUIBean.java index 2e0ac3cf1..942d122a2 100644 --- a/core/src/main/java/org/apache/struts2/components/GenericUIBean.java +++ b/core/src/main/java/org/apache/struts2/components/GenericUIBean.java @@ -34,23 +34,23 @@ import com.opensymphony.xwork2.util.ValueStack; *

    * *

    Freemarker:

    - *
    Objects provided can be retrieve from within the template via $parameters._paramname_.
    + *
    Objects provided can be retrieve from within the template via $attributes._attrname_.
    * *

    JSP:

    - *
    Objects provided can be retrieve from within the template via <s:property value="%{parameters._paramname_}" />
    + *
    Objects provided can be retrieve from within the template via <s:property value="%{attributes._attrname_}" />
    * *

    - * In the bottom JSP and Velocity samples, two parameters are being passed in to the component. From within the + * In the bottom JSP and Velocity samples, two attributes are being passed in to the component. From within the * component, they can be accessed as: *

    * *

    Freemarker:

    - *
    $parameters.get('key1') and $parameters.get('key2') or $parameters.key1 and $parameters.key2
    + *
    $attributes.get('key1') and $attributes.get('key2') or $attributes.key1 and $attributes.key2
    * *

    JSP:

    *
    - * <s:property value="%{parameters.key1}" /> and <s:property value="%{'parameters.key2'}" /> or
    - * <s:property value="%{parameters.get('key1')}" /> and <s:property value="%{parameters.get('key2')}" />
    + * <s:property value="%{attributes.key1}" /> and <s:property value="%{'attributes.key2'}" /> or
    + * <s:property value="%{attributes.get('key1')}" /> and <s:property value="%{attributes.get('key2')}" />
      * 
    * *

    diff --git a/core/src/main/java/org/apache/struts2/components/Include.java b/core/src/main/java/org/apache/struts2/components/Include.java index c78a11106..5eff39424 100644 --- a/core/src/main/java/org/apache/struts2/components/Include.java +++ b/core/src/main/java/org/apache/struts2/components/Include.java @@ -144,13 +144,13 @@ public class Include extends Component { urlBuf.append(page); // Add request parameters - if (!parameters.isEmpty()) { + if (!attributes.isEmpty()) { urlBuf.append('?'); String concat = ""; // Set parameters - for (Map.Entry entry : parameters.entrySet()) { + for (Map.Entry entry : attributes.entrySet()) { Object name = entry.getKey(); List values = (List) entry.getValue(); @@ -235,11 +235,11 @@ public class Include extends Component { // instead, include tag requires that each parameter be a list of objects, // just like the HTTP servlet interfaces are (String[]) if (value != null) { - List currentValues = (List) parameters.get(key); + List currentValues = (List) attributes.get(key); if (currentValues == null) { currentValues = new ArrayList(); - parameters.put(key, currentValues); + attributes.put(key, currentValues); } currentValues.add(value); diff --git a/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java b/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java index 585f4c803..4c934545a 100644 --- a/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java +++ b/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java @@ -174,7 +174,7 @@ public class InputTransferSelect extends ListUIBean { // key -> select tag id, value -> headerKey (if exists) - Map formInputtransferselectIds = (Map) formAncestor.getParameters().get("inputtransferselectIds"); + Map formInputtransferselectIds = (Map) formAncestor.getAttributes().get("inputtransferselectIds"); // init lists if (formInputtransferselectIds == null) { @@ -182,13 +182,13 @@ public class InputTransferSelect extends ListUIBean { } // id - String tmpId = (String) getParameters().get("id"); - String tmpHeaderKey = (String) getParameters().get("headerKey"); + String tmpId = (String) getAttributes().get("id"); + String tmpHeaderKey = (String) getAttributes().get("headerKey"); if (tmpId != null && (! formInputtransferselectIds.containsKey(tmpId))) { formInputtransferselectIds.put(tmpId, tmpHeaderKey); } - formAncestor.getParameters().put("inputtransferselectIds", formInputtransferselectIds); + formAncestor.getAttributes().put("inputtransferselectIds", formInputtransferselectIds); } else { diff --git a/core/src/main/java/org/apache/struts2/components/Label.java b/core/src/main/java/org/apache/struts2/components/Label.java index 787f0f658..ff6c5d061 100644 --- a/core/src/main/java/org/apache/struts2/components/Label.java +++ b/core/src/main/java/org/apache/struts2/components/Label.java @@ -79,7 +79,7 @@ public class Label extends UIBean { if (value != null) { addParameter("nameValue", findString(value)); } else if (key != null) { - Object nameValue = parameters.get("nameValue"); + Object nameValue = attributes.get("nameValue"); if (nameValue == null || nameValue.toString().isEmpty()) { // get the label from a TextProvider (default value is the key) String providedLabel = TextProviderHelper.getText(key, key, stack); diff --git a/core/src/main/java/org/apache/struts2/components/ListUIBean.java b/core/src/main/java/org/apache/struts2/components/ListUIBean.java index 2e7d6587d..55605d87a 100644 --- a/core/src/main/java/org/apache/struts2/components/ListUIBean.java +++ b/core/src/main/java/org/apache/struts2/components/ListUIBean.java @@ -67,7 +67,7 @@ public abstract class ListUIBean extends UIBean { Object value; if (list == null) { - list = parameters.get("list"); + list = attributes.get("list"); } if (list instanceof String) { diff --git a/core/src/main/java/org/apache/struts2/components/MergeIterator.java b/core/src/main/java/org/apache/struts2/components/MergeIterator.java index 861d85d4c..762cfa2a7 100644 --- a/core/src/main/java/org/apache/struts2/components/MergeIterator.java +++ b/core/src/main/java/org/apache/struts2/components/MergeIterator.java @@ -55,56 +55,56 @@ import java.util.List; *

  • Display third element of the thrid list
  • * * - * + *

    * *

      *
    • var (String) - the name where the resultant merged iterator will be stored in the stack's context
    • *
    * - * - * + *

    + *

    * * public class MergeIteratorTagAction extends ActionSupport { - * + *

    * private List myList1; * private List myList2; * private List myList3; - * + *

    * public List getMyList1() { * return myList1; * } - * + *

    * public List getMyList2() { * return myList2; * } - * + *

    * public List getMyList3() { * return myList3; * } - * - * + *

    + *

    * public String execute() throws Exception { - * + *

    * myList1 = new ArrayList(); * myList1.add("1"); * myList1.add("2"); * myList1.add("3"); - * + *

    * myList2 = new ArrayList(); * myList2.add("a"); * myList2.add("b"); * myList2.add("c"); - * + *

    * myList3 = new ArrayList(); * myList3.add("A"); * myList3.add("B"); * myList3.add("C"); - * + *

    * return "done"; * } * } * - * + *

    * * <s:merge var="myMergedIterator1"> * <s:param value="%{myList1}" /> @@ -115,23 +115,22 @@ import java.util.List; * <s:property /> * </s:iterator> * - * + *

    * * This wil generate "1aA2bB3cC". * * * @see org.apache.struts2.util.MergeIteratorFilter * @see org.apache.struts2.views.jsp.iterator.MergeIteratorTag - * */ -@StrutsTag(name="merge", tldTagClass="org.apache.struts2.views.jsp.iterator.MergeIteratorTag", description="Merge the values " + - "of a list of iterators into one iterator") +@StrutsTag(name = "merge", tldTagClass = "org.apache.struts2.views.jsp.iterator.MergeIteratorTag", + description = "Merge the values of a list of iterators into one iterator") public class MergeIterator extends ContextBean implements UnnamedParametric { private static final Logger LOG = LogManager.getLogger(MergeIterator.class); private MergeIteratorFilter mergeIteratorFilter = null; - private List _parameters; + private List attributesToMerge; public MergeIterator(ValueStack stack) { super(stack); @@ -140,15 +139,14 @@ public class MergeIterator extends ContextBean implements UnnamedParametric { public boolean start(Writer writer) { mergeIteratorFilter = new MergeIteratorFilter(); - _parameters = new ArrayList(); + attributesToMerge = new ArrayList<>(); return super.start(writer); } public boolean end(Writer writer, String body) { - - for (Object iteratorEntryObj : _parameters) { - if (! MakeIterator.isIterable(iteratorEntryObj)) { + for (Object iteratorEntryObj : attributesToMerge) { + if (!MakeIterator.isIterable(iteratorEntryObj)) { LOG.warn("param with value resolved as {} cannot be make as iterator, it will be ignored and hence will not appear in the merged iterator", iteratorEntryObj); continue; } @@ -165,13 +163,12 @@ public class MergeIterator extends ContextBean implements UnnamedParametric { return super.end(writer, body); } - @StrutsTagAttribute(description="The name where the resultant merged iterator will be stored in the stack's context") + @StrutsTagAttribute(description = "The name where the resultant merged iterator will be stored in the stack's context") public void setVar(String var) { super.setVar(var); } - // == UnnamedParametric interface implementation --------------------- public void addParameter(Object value) { - _parameters.add(value); + attributesToMerge.add(value); } } diff --git a/core/src/main/java/org/apache/struts2/components/OptGroup.java b/core/src/main/java/org/apache/struts2/components/OptGroup.java index d7fae9fa6..7f83e5708 100644 --- a/core/src/main/java/org/apache/struts2/components/OptGroup.java +++ b/core/src/main/java/org/apache/struts2/components/OptGroup.java @@ -104,7 +104,7 @@ public class OptGroup extends Component { internalUiBean.start(writer); internalUiBean.end(writer, body); - List listUiBeans = (List) select.getParameters().get(INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY); + List listUiBeans = (List) select.getAttributes().get(INTERNAL_LIST_UI_BEAN_LIST_PARAMETER_KEY); if (listUiBeans == null) { listUiBeans = new ArrayList(); } diff --git a/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java b/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java index 6e340ce1d..fb2045674 100644 --- a/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java +++ b/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java @@ -287,8 +287,8 @@ public class OptionTransferSelect extends DoubleListUIBean { // key -> select tag id, value -> headerKey (if exists) - Map formOptiontransferselectIds = (Map) formAncestor.getParameters().get("optiontransferselectIds"); - Map formOptiontransferselectDoubleIds = (Map) formAncestor.getParameters().get("optiontransferselectDoubleIds"); + Map formOptiontransferselectIds = (Map) formAncestor.getAttributes().get("optiontransferselectIds"); + Map formOptiontransferselectDoubleIds = (Map) formAncestor.getAttributes().get("optiontransferselectDoubleIds"); // init lists if (formOptiontransferselectIds == null) { @@ -300,21 +300,21 @@ public class OptionTransferSelect extends DoubleListUIBean { // id - String tmpId = (String) getParameters().get("id"); - String tmpHeaderKey = (String) getParameters().get("headerKey"); + String tmpId = (String) getAttributes().get("id"); + String tmpHeaderKey = (String) getAttributes().get("headerKey"); if (tmpId != null && (! formOptiontransferselectIds.containsKey(tmpId))) { formOptiontransferselectIds.put(tmpId, tmpHeaderKey); } // doubleId - String tmpDoubleId = (String) getParameters().get("doubleId"); - String tmpDoubleHeaderKey = (String) getParameters().get("doubleHeaderKey"); + String tmpDoubleId = (String) getAttributes().get("doubleId"); + String tmpDoubleHeaderKey = (String) getAttributes().get("doubleHeaderKey"); if (tmpDoubleId != null && (! formOptiontransferselectDoubleIds.containsKey(tmpDoubleId))) { formOptiontransferselectDoubleIds.put(tmpDoubleId, tmpDoubleHeaderKey); } - formAncestor.getParameters().put("optiontransferselectIds", formOptiontransferselectIds); - formAncestor.getParameters().put("optiontransferselectDoubleIds", formOptiontransferselectDoubleIds); + formAncestor.getAttributes().put("optiontransferselectIds", formOptiontransferselectIds); + formAncestor.getAttributes().put("optiontransferselectDoubleIds", formOptiontransferselectDoubleIds); } else { diff --git a/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java b/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java index ab87b77ad..e9eed2854 100644 --- a/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java +++ b/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java @@ -175,7 +175,7 @@ public class ServletUrlRenderer implements UrlRenderer { namespace, actionName); if (actionConfig != null) { - ActionMapping mapping = new ActionMapping(actionName, namespace, actionMethod, formComponent.parameters); + ActionMapping mapping = new ActionMapping(actionName, namespace, actionMethod, formComponent.attributes); String result = urlHelper.buildUrl(formComponent.actionMapper.getUriFromActionMapping(mapping), formComponent.request, formComponent.response, queryStringResult.getQueryParams(), scheme, formComponent.includeContext, true, false, false); formComponent.addParameter("action", result); diff --git a/core/src/main/java/org/apache/struts2/components/Token.java b/core/src/main/java/org/apache/struts2/components/Token.java index 89d5e2394..7d64a12b0 100644 --- a/core/src/main/java/org/apache/struts2/components/Token.java +++ b/core/src/main/java/org/apache/struts2/components/Token.java @@ -73,7 +73,7 @@ public class Token extends UIBean { super.evaluateExtraParams(); String tokenName; - Map parameters = getParameters(); + Map parameters = getAttributes(); if (parameters.containsKey("name")) { tokenName = (String) parameters.get("name"); diff --git a/core/src/main/java/org/apache/struts2/components/UIBean.java b/core/src/main/java/org/apache/struts2/components/UIBean.java index ff89c035d..dec726578 100644 --- a/core/src/main/java/org/apache/struts2/components/UIBean.java +++ b/core/src/main/java/org/apache/struts2/components/UIBean.java @@ -590,7 +590,7 @@ public abstract class UIBean extends Component { LOG.debug("Rendering template {}", template); - final TemplateRenderingContext context = new TemplateRenderingContext(template, writer, getStack(), getParameters(), this); + final TemplateRenderingContext context = new TemplateRenderingContext(template, writer, getStack(), getAttributes(), this); engine.renderTemplate(context); } @@ -796,11 +796,11 @@ public abstract class UIBean extends Component { populateComponentHtmlId(form); if (form != null ) { - addParameter("form", form.getParameters()); + addParameter("form", form.getAttributes()); if ( translatedName != null ) { // list should have been created by the form component - List tags = (List) form.getParameters().get("tagNames"); + List tags = (List) form.getAttributes().get("tagNames"); tags.add(translatedName); } } @@ -832,19 +832,19 @@ public abstract class UIBean extends Component { } //TODO: this is to keep backward compatibility, remove once when tooltipConfig is dropped - String jsTooltipEnabled = (String) getParameters().get("jsTooltipEnabled"); + String jsTooltipEnabled = (String) getAttributes().get("jsTooltipEnabled"); if (jsTooltipEnabled != null) this.javascriptTooltip = jsTooltipEnabled; //TODO: this is to keep backward compatibility, remove once when tooltipConfig is dropped - String tooltipIcon = (String) getParameters().get("tooltipIcon"); + String tooltipIcon = (String) getAttributes().get("tooltipIcon"); if (tooltipIcon != null) this.addParameter("tooltipIconPath", tooltipIcon); if (this.tooltipIconPath != null) this.addParameter("tooltipIconPath", findString(this.tooltipIconPath)); //TODO: this is to keep backward compatibility, remove once when tooltipConfig is dropped - String tooltipDelayParam = (String) getParameters().get("tooltipDelay"); + String tooltipDelayParam = (String) getAttributes().get("tooltipDelay"); if (tooltipDelayParam != null) this.addParameter("tooltipDelay", tooltipDelayParam); if (this.tooltipDelay != null) @@ -878,8 +878,8 @@ public abstract class UIBean extends Component { */ protected void applyValueParameter(String translatedName) { // see if the value has been specified as a parameter already - if (parameters.containsKey(ATTR_VALUE)) { - parameters.put(ATTR_NAME_VALUE, parameters.get(ATTR_VALUE)); + if (attributes.containsKey(ATTR_VALUE)) { + attributes.put(ATTR_NAME_VALUE, attributes.get(ATTR_VALUE)); } else { if (evaluateNameValue()) { final Class valueClazz = getValueClassType(); @@ -965,7 +965,7 @@ public abstract class UIBean extends Component { } protected Map getTooltipConfig(UIBean component) { - Object tooltipConfigObj = component.getParameters().get("tooltipConfig"); + Object tooltipConfigObj = component.getAttributes().get("tooltipConfig"); Map result = new LinkedHashMap<>(); if (tooltipConfigObj instanceof Map) { @@ -1025,7 +1025,7 @@ public abstract class UIBean extends Component { LOG.debug("Cannot determine id attribute for [{}], consider defining id, name or key attribute!", this); tryId = null; } else if (form != null) { - tryId = form.getParameters().get("id") + "_" + generatedId; + tryId = form.getAttributes().get("id") + "_" + generatedId; } else { tryId = generatedId; } @@ -1283,9 +1283,9 @@ public abstract class UIBean extends Component { * @see WW-4166 */ @Override - public void copyParams(Map params) { - super.copyParams(params); - for (Map.Entryentry : params.entrySet()) { + public void copyAttributes(Map attributesToCopy) { + super.copyAttributes(attributesToCopy); + for (Map.Entryentry : attributesToCopy.entrySet()) { String entryKey = entry.getKey(); if (!isValidTagAttribute(entryKey) && !entryKey.equals("dynamicAttributes")) { dynamicAttributes.put(entryKey, entry.getValue()); diff --git a/core/src/main/java/org/apache/struts2/components/URL.java b/core/src/main/java/org/apache/struts2/components/URL.java index 2da816f65..13de88703 100644 --- a/core/src/main/java/org/apache/struts2/components/URL.java +++ b/core/src/main/java/org/apache/struts2/components/URL.java @@ -111,7 +111,7 @@ public class URL extends ContextBean { public URL(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { super(stack); - urlProvider = new ComponentUrlProvider(this, this.parameters); + urlProvider = new ComponentUrlProvider(this, this.attributes); urlProvider.setHttpServletRequest(req); urlProvider.setHttpServletResponse(res); } diff --git a/core/src/main/java/org/apache/struts2/components/UpDownSelect.java b/core/src/main/java/org/apache/struts2/components/UpDownSelect.java index 2c6c0d287..727efa395 100644 --- a/core/src/main/java/org/apache/struts2/components/UpDownSelect.java +++ b/core/src/main/java/org/apache/struts2/components/UpDownSelect.java @@ -136,13 +136,13 @@ public class UpDownSelect extends Select { // inform form ancestor that we are using a custom onSubmit enableAncestorFormCustomOnsubmit(); - Map m = (Map) ancestorForm.getParameters().get("updownselectIds"); + Map m = (Map) ancestorForm.getAttributes().get("updownselectIds"); if (m == null) { // map with key -> id , value -> headerKey m = new LinkedHashMap(); } - m.put(getParameters().get("id"), getParameters().get("headerKey")); - ancestorForm.getParameters().put("updownselectIds", m); + m.put(getAttributes().get("id"), getAttributes().get("headerKey")); + ancestorForm.getAttributes().put("updownselectIds", m); } else { if (LOG.isWarnEnabled()) { diff --git a/core/src/main/java/org/apache/struts2/util/AppendIteratorFilter.java b/core/src/main/java/org/apache/struts2/util/AppendIteratorFilter.java index c873d3398..211276956 100644 --- a/core/src/main/java/org/apache/struts2/util/AppendIteratorFilter.java +++ b/core/src/main/java/org/apache/struts2/util/AppendIteratorFilter.java @@ -30,20 +30,15 @@ import java.util.List; * @see org.apache.struts2.components.AppendIterator * @see org.apache.struts2.views.jsp.iterator.AppendIteratorTag */ -public class AppendIteratorFilter extends IteratorFilterSupport implements Iterator, Action { +public class AppendIteratorFilter extends IteratorFilterSupport implements Iterator, Action { - List iterators = new ArrayList(); + private final List iterators = new ArrayList<>(); + private final List sources = new ArrayList<>(); - // Attributes ---------------------------------------------------- - List sources = new ArrayList(); - - - // Public -------------------------------------------------------- public void setSource(Object anIterator) { sources.add(anIterator); } - // Action implementation ----------------------------------------- @Override public String execute() { // Make source transformations @@ -54,11 +49,10 @@ public class AppendIteratorFilter extends IteratorFilterSupport implements Itera return SUCCESS; } - // Iterator implementation --------------------------------------- @Override public boolean hasNext() { if (!iterators.isEmpty()) { - return (((Iterator) iterators.get(0)).hasNext()); + return (((Iterator) iterators.get(0)).hasNext()); } else { return false; } @@ -67,10 +61,10 @@ public class AppendIteratorFilter extends IteratorFilterSupport implements Itera @Override public Object next() { try { - return ((Iterator) iterators.get(0)).next(); + return ((Iterator) iterators.get(0)).next(); } finally { if (!iterators.isEmpty()) { - if (!((Iterator) iterators.get(0)).hasNext()) { + if (!((Iterator) iterators.get(0)).hasNext()) { iterators.remove(0); } } diff --git a/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java b/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java index 2ba8f090f..8a6152663 100644 --- a/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java +++ b/core/src/main/java/org/apache/struts2/views/freemarker/tags/TagModel.java @@ -59,7 +59,7 @@ public abstract class TagModel implements TemplateTransformModel { container.inject(bean); Map unwrappedParameters = unwrapParameters(params); - bean.copyParams(unwrappedParameters); + bean.copyAttributes(unwrappedParameters); return new CallbackWriter(bean, writer); } diff --git a/core/src/main/java/org/apache/struts2/views/jsp/ComponentTagSupport.java b/core/src/main/java/org/apache/struts2/views/jsp/ComponentTagSupport.java index f7ce06f8c..853ec4bce 100644 --- a/core/src/main/java/org/apache/struts2/views/jsp/ComponentTagSupport.java +++ b/core/src/main/java/org/apache/struts2/views/jsp/ComponentTagSupport.java @@ -25,9 +25,8 @@ import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.jsp.JspException; import org.apache.struts2.components.Component; -/** - */ public abstract class ComponentTagSupport extends StrutsBodyTagSupport { + protected Component component; public abstract Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res); @@ -57,9 +56,9 @@ public abstract class ComponentTagSupport extends StrutsBodyTagSupport { } /** - * Define method to populate component state based on the Tag parameters. - * - * Descendants should override this method for custom behaviour, but should always call the ancestor method when doing so. + * Define method to populate component state based on the Tag attributes. + * Descendants should override this method for custom behaviour, + * but should always call the ancestor method when doing so. */ protected void populateParams() { populatePerformClearTagStateForTagPoolingServersParam(); @@ -67,7 +66,7 @@ public abstract class ComponentTagSupport extends StrutsBodyTagSupport { /** * Specialized method to populate the performClearTagStateForTagPoolingServers state of the Component to match the value set in the Tag. - * + *

    * Generally only unit tests would call this method directly, to avoid calling the whole populateParams() chain again after doStartTag() * has been called. Doing that can break tag / component state behaviour, but unit tests still need a way to set the * performClearTagStateForTagPoolingServers state for the component (which only comes into being after doStartTag() is called). @@ -84,7 +83,7 @@ public abstract class ComponentTagSupport extends StrutsBodyTagSupport { @Override protected void clearTagStateForTagPoolingServers() { - if (!getPerformClearTagStateForTagPoolingServers()) { + if (!getPerformClearTagStateForTagPoolingServers()) { return; // If flag is false (default setting), do not perform any state clearing. } super.clearTagStateForTagPoolingServers(); diff --git a/core/src/main/resources/template/css_xhtml/checkbox.ftl b/core/src/main/resources/template/css_xhtml/checkbox.ftl index 55a8447ad..ba5784e75 100644 --- a/core/src/main/resources/template/css_xhtml/checkbox.ftl +++ b/core/src/main/resources/template/css_xhtml/checkbox.ftl @@ -23,15 +23,15 @@ NOTE: The 'header' stuff that follows is in this one file for checkbox due to th that for checkboxes we do not want the label field to show up as checkboxes handle their own lables --> -<#assign hasFieldErrors = fieldErrors?? && fieldErrors.get(parameters.name)??/> -

    <#if parameters.id??>id="wwgrp_${parameters.id}"<#rt/> class="wwgrp"> +<#assign hasFieldErrors = fieldErrors?? && fieldErrors.get(attributes.name)??/> +
    <#if attributes.id??>id="wwgrp_${attributes.id}"<#rt/> class="wwgrp"> <#if hasFieldErrors> -
    <#if parameters.id??>id="wwerr_${parameters.id}"<#rt/> class="wwerr"> -<#list fieldErrors.get(parameters.name) as error> +
    <#if attributes.id??>id="wwerr_${attributes.id}"<#rt/> class="wwerr"> +<#list fieldErrors.get(attributes.name) as error> - <#if parameters.id??> - errorFor="${parameters.id}"<#rt/> + <#if attributes.id??> + errorFor="${attributes.id}"<#rt/> class="errorMessage"> ${error} @@ -39,24 +39,24 @@ lables
    <#t/> -<#if !parameters.labelPosition?? && (parameters.form.labelPosition)??> -<#assign labelPos = parameters.form.labelPosition/> -<#elseif parameters.labelPosition??> -<#assign labelPos = parameters.labelPosition/> +<#if !attributes.labelPosition?? && (attributes.form.labelPosition)??> +<#assign labelPos = attributes.form.labelPosition/> +<#elseif attributes.labelPosition??> +<#assign labelPos = attributes.labelPosition/> <#if (labelPos!"") == 'left'> -<#if parameters.id??>id="wwlbl_${parameters.id}"<#rt/> class="wwlbl"> +<#if attributes.id??>id="wwlbl_${attributes.id}"<#rt/> class="wwlbl"> -<#if parameters.id??> - for="${parameters.id}"<#rt/> +<#if attributes.id??> + for="${attributes.id}"<#rt/> <#if hasFieldErrors> class="checkboxErrorLabel"<#rt/> <#else> class="label"<#rt/> ->${parameters.label}<#rt/> +>${attributes.label}<#rt/> @@ -65,39 +65,39 @@ lables <#else> -<#if parameters.id??>id="wwctrl_${parameters.id}"<#rt/> class="wwctrl"> +<#if attributes.id??>id="wwctrl_${attributes.id}"<#rt/> class="wwctrl"> -<#if parameters.required!false> +<#if attributes.required!false> *<#t/> -<#include "/${parameters.templateDir}/simple/checkbox.ftl" /> +<#include "/${attributes.templateDir}/simple/checkbox.ftl" /> <#if (labelPos!"") != 'left'> <#if (labelPos!"top") == 'top'>
    <#rt/> <#else> <#rt/> -<#if parameters.label??> +<#if attributes.label??> <#if (labelPos!"top") == 'top'>
    <#else> -<#if parameters.id??>id="wwlbl_${parameters.id}"<#rt/> class="wwlbl"> +<#if attributes.id??>id="wwlbl_${attributes.id}"<#rt/> class="wwlbl"> -<#if parameters.id??> - for="${parameters.id}"<#rt/> +<#if attributes.id??> + for="${attributes.id}"<#rt/> <#if hasFieldErrors> class="checkboxErrorLabel"<#rt/> <#else> class="checkboxLabel"<#rt/> ->${parameters.label}<#rt/> +>${attributes.label}<#rt/> -<#if parameters.label??> +<#if attributes.label??> <#if (labelPos!"top") == 'top'>
    <#rt/> <#else> diff --git a/core/src/main/resources/template/css_xhtml/controlfooter.ftl b/core/src/main/resources/template/css_xhtml/controlfooter.ftl index cf023d0c3..d25b5790c 100644 --- a/core/src/main/resources/template/css_xhtml/controlfooter.ftl +++ b/core/src/main/resources/template/css_xhtml/controlfooter.ftl @@ -18,26 +18,26 @@ * under the License. */ --> -${parameters.after!}<#t/> +${attributes.after!}<#t/> <#lt/> -<#if !parameters.labelPosition?? && (parameters.form.labelPosition)??> -<#assign labelPos = parameters.form.labelPosition/> -<#elseif parameters.labelPosition??> -<#assign labelPos = parameters.labelPosition/> +<#if !attributes.labelPosition?? && (attributes.form.labelPosition)??> +<#assign labelPos = attributes.form.labelPosition/> +<#elseif attributes.labelPosition??> +<#assign labelPos = attributes.labelPosition/> <#if (labelPos!"top") == 'top'>
    <#rt/> <#else> <#rt/> -<#if (parameters.errorposition!"top") == 'bottom'> -<#assign hasFieldErrors = parameters.name?? && fieldErrors?? && fieldErrors.get(parameters.name)??/> +<#if (attributes.errorposition!"top") == 'bottom'> +<#assign hasFieldErrors = attributes.name?? && fieldErrors?? && fieldErrors.get(attributes.name)??/> <#if hasFieldErrors> -
    <#if parameters.id??>id="wwerr_${parameters.id}"<#rt/> class="wwerr"> -<#list fieldErrors.get(parameters.name) as error> +
    <#if attributes.id??>id="wwerr_${attributes.id}"<#rt/> class="wwerr"> +<#list fieldErrors.get(attributes.name) as error> - <#if parameters.id??> - errorFor="${parameters.id}"<#rt/> + <#if attributes.id??> + errorFor="${attributes.id}"<#rt/> class="errorMessage"> ${error} diff --git a/core/src/main/resources/template/css_xhtml/controlheader-core.ftl b/core/src/main/resources/template/css_xhtml/controlheader-core.ftl index cdae62331..206b638e8 100644 --- a/core/src/main/resources/template/css_xhtml/controlheader-core.ftl +++ b/core/src/main/resources/template/css_xhtml/controlheader-core.ftl @@ -22,16 +22,16 @@ Only show message if errors are available. This will be done if ActionSupport is used. --> -<#assign hasFieldErrors = parameters.name?? && fieldErrors?? && fieldErrors.get(parameters.name)??/> -
    <#if parameters.id??>id="wwgrp_${parameters.id}"<#rt/> class="wwgrp"> +<#assign hasFieldErrors = attributes.name?? && fieldErrors?? && fieldErrors.get(attributes.name)??/> +
    <#if attributes.id??>id="wwgrp_${attributes.id}"<#rt/> class="wwgrp"> -<#if (parameters.errorposition!"top") == 'top'> +<#if (attributes.errorposition!"top") == 'top'> <#if hasFieldErrors> -
    <#if parameters.id??>id="wwerr_${parameters.id}"<#rt/> class="wwerr"> -<#list fieldErrors.get(parameters.name) as error> +
    <#if attributes.id??>id="wwerr_${attributes.id}"<#rt/> class="wwerr"> +<#list fieldErrors.get(attributes.name) as error> - <#if parameters.id??> - errorFor="${parameters.id}"<#rt/> + <#if attributes.id??> + errorFor="${attributes.id}"<#rt/> class="errorMessage"> ${error} @@ -41,21 +41,21 @@ -<#if !parameters.labelPosition?? && (parameters.form.labelPosition)??> -<#assign labelPos = parameters.form.labelPosition/> -<#elseif parameters.labelPosition??> -<#assign labelPos = parameters.labelPosition/> +<#if !attributes.labelPosition?? && (attributes.form.labelPosition)??> +<#assign labelPos = attributes.form.labelPosition/> +<#elseif attributes.labelPosition??> +<#assign labelPos = attributes.labelPosition/> -<#if parameters.label??> +<#if attributes.label??> <#if (labelPos!"top") == 'top'>
    <#else> -<#if parameters.id??>id="wwlbl_${parameters.id}"<#rt/> class="wwlbl"> +<#if attributes.id??>id="wwlbl_${attributes.id}"<#rt/> class="wwlbl"> <#t/> <#if (labelPos!"top") == 'top'>

    <#rt/> diff --git a/core/src/main/resources/template/css_xhtml/controlheader.ftl b/core/src/main/resources/template/css_xhtml/controlheader.ftl index f7b7daae5..f76a9459b 100644 --- a/core/src/main/resources/template/css_xhtml/controlheader.ftl +++ b/core/src/main/resources/template/css_xhtml/controlheader.ftl @@ -18,15 +18,15 @@ * under the License. */ --> -<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader-core.ftl"> -<#if !parameters.labelPosition?? && (parameters.form.labelPosition)??> -<#assign labelPos = parameters.form.labelPosition/> -<#elseif parameters.labelPosition??> -<#assign labelPos = parameters.labelPosition/> +<#include "/${attributes.templateDir}/${attributes.expandTheme}/controlheader-core.ftl"> +<#if !attributes.labelPosition?? && (attributes.form.labelPosition)??> +<#assign labelPos = attributes.form.labelPosition/> +<#elseif attributes.labelPosition??> +<#assign labelPos = attributes.labelPosition/> <#if (labelPos!"top") == 'top'>
    <#else> -<#if parameters.id??>id="wwctrl_${parameters.id}"<#rt/> class="wwctrl"> +<#if attributes.id??>id="wwctrl_${attributes.id}"<#rt/> class="wwctrl"> diff --git a/core/src/main/resources/template/css_xhtml/form-validate.ftl b/core/src/main/resources/template/css_xhtml/form-validate.ftl index 8d46b594d..7beb7fab5 100644 --- a/core/src/main/resources/template/css_xhtml/form-validate.ftl +++ b/core/src/main/resources/template/css_xhtml/form-validate.ftl @@ -18,11 +18,11 @@ * under the License. */ --> -<#if parameters.validate!false == true> -<@s.script src="${base}${parameters.staticContentPath}/css_xhtml/validation.js"/> - <#if parameters.onsubmit??> - ${tag.addParameter('onsubmit', "${parameters.onsubmit}; return validateForm_${parameters.escapedId}();")} +<#if attributes.validate!false == true> +<@s.script src="${base}${attributes.staticContentPath}/css_xhtml/validation.js"/> + <#if attributes.onsubmit??> + ${tag.addParameter('onsubmit', "${attributes.onsubmit}; return validateForm_${attributes.escapedId}();")} <#else> - ${tag.addParameter('onsubmit', "return validateForm_${parameters.escapedId}();")} + ${tag.addParameter('onsubmit', "return validateForm_${attributes.escapedId}();")} diff --git a/core/src/main/resources/template/css_xhtml/head.ftl b/core/src/main/resources/template/css_xhtml/head.ftl index 0c0a39791..0614441f6 100644 --- a/core/src/main/resources/template/css_xhtml/head.ftl +++ b/core/src/main/resources/template/css_xhtml/head.ftl @@ -18,5 +18,5 @@ * under the License. */ --> -<@s.link rel="stylesheet" href="${base}${parameters.staticContentPath}/css_xhtml/styles.css" type="text/css" /> -<#include "/${parameters.templateDir}/simple/head.ftl" /> +<@s.link rel="stylesheet" href="${base}${attributes.staticContentPath}/css_xhtml/styles.css" type="text/css" /> +<#include "/${attributes.templateDir}/simple/head.ftl" /> diff --git a/core/src/main/resources/template/css_xhtml/hidden.ftl b/core/src/main/resources/template/css_xhtml/hidden.ftl index 2be605b67..062ea7d34 100644 --- a/core/src/main/resources/template/css_xhtml/hidden.ftl +++ b/core/src/main/resources/template/css_xhtml/hidden.ftl @@ -18,4 +18,4 @@ * under the License. */ --> -<#include "/${parameters.templateDir}/simple/hidden.ftl" /> +<#include "/${attributes.templateDir}/simple/hidden.ftl" /> diff --git a/core/src/main/resources/template/css_xhtml/label.ftl b/core/src/main/resources/template/css_xhtml/label.ftl index 03c6a6192..23701e715 100644 --- a/core/src/main/resources/template/css_xhtml/label.ftl +++ b/core/src/main/resources/template/css_xhtml/label.ftl @@ -18,28 +18,28 @@ * under the License. */ --> -<#--include "/${parameters.templateDir}/css_xhtml/controlheader.ftl" /--> -<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" /> +<#--include "/${attributes.templateDir}/css_xhtml/controlheader.ftl" /--> +<#include "/${attributes.templateDir}/${attributes.expandTheme}/controlheader.ftl" /> -<#if parameters.id??> - id="${parameters.id}"<#rt/> +<#if attributes.id??> + id="${attributes.id}"<#rt/> -<#if parameters.cssClass??> - class="${parameters.cssClass}"<#rt/> +<#if attributes.cssClass??> + class="${attributes.cssClass}"<#rt/> -<#if parameters.cssStyle??> - style="${parameters.cssStyle}"<#rt/> +<#if attributes.cssStyle??> + style="${attributes.cssStyle}"<#rt/> -<#if parameters.cssClass??> - class="${parameters.cssClass}"<#rt/> +<#if attributes.cssClass??> + class="${attributes.cssClass}"<#rt/> -<#if parameters.for??> - for="${parameters.for}"<#rt/> +<#if attributes.for??> + for="${attributes.for}"<#rt/> ><#rt/> -<#if parameters.nameValue??> -<@s.property value="parameters.nameValue"/><#t/> +<#if attributes.nameValue??> +<@s.property value="attributes.nameValue"/><#t/>   -<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" /> +<#include "/${attributes.templateDir}/${attributes.expandTheme}/controlfooter.ftl" /> diff --git a/core/src/main/resources/template/css_xhtml/reset.ftl b/core/src/main/resources/template/css_xhtml/reset.ftl index 534ab374b..17e242002 100644 --- a/core/src/main/resources/template/css_xhtml/reset.ftl +++ b/core/src/main/resources/template/css_xhtml/reset.ftl @@ -18,10 +18,10 @@ * under the License. */ --> -<#if !parameters.labelPosition?? && (parameters.form.labelPosition)??> -<#assign labelPos = parameters.form.labelPosition/> -<#elseif parameters.labelPosition??> -<#assign labelPos = parameters.labelPosition/> +<#if !attributes.labelPosition?? && (attributes.form.labelPosition)??> +<#assign labelPos = attributes.form.labelPosition/> +<#elseif attributes.labelPosition??> +<#assign labelPos = attributes.labelPosition/> <#if (labelPos!"top") == 'top'>
    @@ -29,11 +29,11 @@ class="formButton"<#t/> -<#if parameters.id??> - id="wwctrl_${parameters.id}"<#rt/> +<#if attributes.id??> + id="wwctrl_${attributes.id}"<#rt/> ><#t/> -<#include "/${parameters.templateDir}/simple/reset.ftl" /> +<#include "/${attributes.templateDir}/simple/reset.ftl" /> <#if (labelPos!"top") == 'top'>
    <#t/> <#else> diff --git a/core/src/main/resources/template/css_xhtml/submit-close.ftl b/core/src/main/resources/template/css_xhtml/submit-close.ftl index d581962c1..4fefff643 100644 --- a/core/src/main/resources/template/css_xhtml/submit-close.ftl +++ b/core/src/main/resources/template/css_xhtml/submit-close.ftl @@ -18,11 +18,11 @@ * under the License. */ --> -<#include "/${parameters.templateDir}/simple/submit-close.ftl" /> -<#if !parameters.labelPosition?? && (parameters.form.labelPosition)??> -<#assign labelPos = parameters.form.labelPosition/> -<#elseif parameters.labelPosition??> -<#assign labelPos = parameters.labelPosition/> +<#include "/${attributes.templateDir}/simple/submit-close.ftl" /> +<#if !attributes.labelPosition?? && (attributes.form.labelPosition)??> +<#assign labelPos = attributes.form.labelPosition/> +<#elseif attributes.labelPosition??> +<#assign labelPos = attributes.labelPosition/> <#if (labelPos!"top") == 'top'>
    <#t/> diff --git a/core/src/main/resources/template/css_xhtml/submit.ftl b/core/src/main/resources/template/css_xhtml/submit.ftl index 1f0ee1a10..0ed1e9391 100644 --- a/core/src/main/resources/template/css_xhtml/submit.ftl +++ b/core/src/main/resources/template/css_xhtml/submit.ftl @@ -18,10 +18,10 @@ * under the License. */ --> -<#if !parameters.labelPosition?? && (parameters.form.labelPosition)??> -<#assign labelPos = parameters.form.labelPosition/> -<#elseif parameters.labelPosition??> -<#assign labelPos = parameters.labelPosition/> +<#if !attributes.labelPosition?? && (attributes.form.labelPosition)??> +<#assign labelPos = attributes.form.labelPosition/> +<#elseif attributes.labelPosition??> +<#assign labelPos = attributes.labelPosition/> <#if (labelPos!"top") == 'top'>
    @@ -29,8 +29,8 @@ class="formButton"<#t/> -<#if parameters.id??> - id="wwctrl_${parameters.id}"<#rt/> +<#if attributes.id??> + id="wwctrl_${attributes.id}"<#rt/> ><#t/> -<#include "/${parameters.templateDir}/simple/submit.ftl" /> +<#include "/${attributes.templateDir}/simple/submit.ftl" /> diff --git a/core/src/main/resources/template/simple/a-close.ftl b/core/src/main/resources/template/simple/a-close.ftl index 1c808e18b..926db795e 100644 --- a/core/src/main/resources/template/simple/a-close.ftl +++ b/core/src/main/resources/template/simple/a-close.ftl @@ -19,28 +19,28 @@ */ --> -<#if parameters.id??> - id="${parameters.id}"<#rt/> +<#if attributes.id??> + id="${attributes.id}"<#rt/> -<#if parameters.href??> - href="${parameters.href?no_esc}"<#rt/> +<#if attributes.href??> + href="${attributes.href?no_esc}"<#rt/> -<#if parameters.disabled!false> +<#if attributes.disabled!false> disabled="disabled"<#rt/> -<#if parameters.tabindex??> - tabindex="${parameters.tabindex}"<#rt/> +<#if attributes.tabindex??> + tabindex="${attributes.tabindex}"<#rt/> -<#if parameters.cssClass??> - class="${parameters.cssClass}"<#rt/> +<#if attributes.cssClass??> + class="${attributes.cssClass}"<#rt/> -<#if parameters.cssStyle??> - style="${parameters.cssStyle}"<#rt/> +<#if attributes.cssStyle??> + style="${attributes.cssStyle}"<#rt/> -<#if parameters.title??> - title="${parameters.title}"<#rt/> +<#if attributes.title??> + title="${attributes.title}"<#rt/> -<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" /> -<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" /> -<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> ->${tag.escapeHtmlBody()?then(parameters.body, parameters.body?no_esc)} \ No newline at end of file +<#include "/${attributes.templateDir}/${attributes.expandTheme}/scripting-events.ftl" /> +<#include "/${attributes.templateDir}/${attributes.expandTheme}/common-attributes.ftl" /> +<#include "/${attributes.templateDir}/${attributes.expandTheme}/dynamic-attributes.ftl" /> +>${tag.escapeHtmlBody()?then(attributes.body, attributes.body?no_esc)} \ No newline at end of file diff --git a/core/src/main/resources/template/simple/actionerror.ftl b/core/src/main/resources/template/simple/actionerror.ftl index 37e1a2e85..4cd9a60b9 100644 --- a/core/src/main/resources/template/simple/actionerror.ftl +++ b/core/src/main/resources/template/simple/actionerror.ftl @@ -20,21 +20,21 @@ --> <#if (actionErrors?? && actionErrors?size > 0)> -<#if parameters.id??> - id="${parameters.id}"<#rt/> - -<#if parameters.cssClass??> - class="${parameters.cssClass}"<#rt/> +<#if attributes.id??> + id="${attributes.id}"<#rt/> + +<#if attributes.cssClass??> + class="${attributes.cssClass}"<#rt/> <#else> class="errorMessage"<#rt/> -<#if parameters.cssStyle??> - style="${parameters.cssStyle}"<#rt/> +<#if attributes.cssStyle??> + style="${attributes.cssStyle}"<#rt/> > <#list actionErrors as error> <#if error??> -
  • <#if parameters.escape>${error!}<#else>${error!?no_esc}<#rt/>
  • <#rt/> +
  • <#if attributes.escape>${error!}<#else>${error!?no_esc}<#rt/>
  • <#rt/> diff --git a/core/src/main/resources/template/simple/actionmessage.ftl b/core/src/main/resources/template/simple/actionmessage.ftl index a0f14110d..8933c2265 100644 --- a/core/src/main/resources/template/simple/actionmessage.ftl +++ b/core/src/main/resources/template/simple/actionmessage.ftl @@ -18,23 +18,23 @@ * under the License. */ --> -<#if (actionMessages?? && actionMessages?size > 0 && !parameters.isEmptyList)> +<#if (actionMessages?? && actionMessages?size > 0 && !attributes.isEmptyList)> -<#if parameters.id??> - id="${parameters.id}"<#rt/> +<#if attributes.id??> + id="${attributes.id}"<#rt/> -<#if parameters.cssClass??> - class="${parameters.cssClass}"<#rt/> +<#if attributes.cssClass??> + class="${attributes.cssClass}"<#rt/> <#else> class="actionMessage"<#rt/> -<#if parameters.cssStyle??> - style="${parameters.cssStyle}"<#rt/> +<#if attributes.cssStyle??> + style="${attributes.cssStyle}"<#rt/> > <#list actionMessages as message> <#if message??> -
  • <#if parameters.escape>${message!}<#else>${message!?no_esc}
  • +
  • <#if attributes.escape>${message!}<#else>${message!?no_esc}
  • diff --git a/core/src/main/resources/template/simple/checkbox.ftl b/core/src/main/resources/template/simple/checkbox.ftl index af563f4b5..c1839f3f4 100644 --- a/core/src/main/resources/template/simple/checkbox.ftl +++ b/core/src/main/resources/template/simple/checkbox.ftl @@ -18,30 +18,30 @@ * under the License. */ --> - -<#if parameters.nameValue?? && parameters.nameValue> + +<#if attributes.nameValue?? && attributes.nameValue> checked="checked"<#rt/> -<#if parameters.disabled!false> +<#if attributes.disabled!false> disabled="disabled"<#rt/> -<#if parameters.tabindex?has_content> - tabindex="${parameters.tabindex}"<#rt/> +<#if attributes.tabindex?has_content> + tabindex="${attributes.tabindex}"<#rt/> -<#if parameters.id?has_content> - id="${parameters.id}"<#rt/> +<#if attributes.id?has_content> + id="${attributes.id}"<#rt/> -<#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" /> -<#if parameters.title?has_content> - title="${parameters.title}"<#rt/> +<#include "/${attributes.templateDir}/${attributes.expandTheme}/css.ftl" /> +<#if attributes.title?has_content> + title="${attributes.title}"<#rt/> -<#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" /> -<#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" /> -<#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> +<#include "/${attributes.templateDir}/${attributes.expandTheme}/scripting-events.ftl" /> +<#include "/${attributes.templateDir}/${attributes.expandTheme}/common-attributes.ftl" /> +<#include "/${attributes.templateDir}/${attributes.expandTheme}/dynamic-attributes.ftl" /> /><#rt/> -<#if parameters.submitUnchecked!false> - -<#if parameters.disabled!false> +<#if attributes.submitUnchecked!false> + +<#if attributes.disabled!false> disabled="disabled"<#rt/> /><#rt/> diff --git a/core/src/main/resources/template/simple/checkboxlist.ftl b/core/src/main/resources/template/simple/checkboxlist.ftl index 87bef6651..63cf52e32 100644 --- a/core/src/main/resources/template/simple/checkboxlist.ftl +++ b/core/src/main/resources/template/simple/checkboxlist.ftl @@ -19,98 +19,98 @@ */ --> <#assign itemCount = 0/> -<#if parameters.list??> -<@s.iterator value="parameters.list"> +<#if attributes.list??> +<@s.iterator value="attributes.list"> <#assign itemCount = itemCount + 1/> - <#if parameters.listKey??> - <#assign itemKey = stack.findValue(parameters.listKey)/> - <#assign itemKeyStr = stack.findString(parameters.listKey)/> + <#if attributes.listKey??> + <#assign itemKey = stack.findValue(attributes.listKey)/> + <#assign itemKeyStr = stack.findString(attributes.listKey)/> <#else> <#assign itemKey = stack.findValue('top')/> <#assign itemKeyStr = stack.findString('top')> - <#if parameters.listLabelKey??> + <#if attributes.listLabelKey??> <#-- checks the valueStack for the 'valueKey.' The valueKey is then looked-up in the locale file for it's localized value. This is then used as a label --> - <#assign itemValue = struts.getText(stack.findString(parameters.listLabelKey))/> - <#elseif parameters.listValue??> - <#assign itemValue = stack.findString(parameters.listValue)!""/> + <#assign itemValue = struts.getText(stack.findString(attributes.listLabelKey))/> + <#elseif attributes.listValue??> + <#assign itemValue = stack.findString(attributes.listValue)!""/> <#else> <#assign itemValue = stack.findString('top')/> - <#if parameters.listCssClass??> - <#if stack.findString(parameters.listCssClass)??> - <#assign itemCssClass= stack.findString(parameters.listCssClass)/> + <#if attributes.listCssClass??> + <#if stack.findString(attributes.listCssClass)??> + <#assign itemCssClass= stack.findString(attributes.listCssClass)/> <#else> <#assign itemCssClass = ''/> - <#if parameters.listCssStyle??> - <#if stack.findString(parameters.listCssStyle)??> - <#assign itemCssStyle= stack.findString(parameters.listCssStyle)/> + <#if attributes.listCssStyle??> + <#if stack.findString(attributes.listCssStyle)??> + <#assign itemCssStyle= stack.findString(attributes.listCssStyle)/> <#else> <#assign itemCssStyle = ''/> - <#if parameters.listTitle??> - <#if stack.findString(parameters.listTitle)??> - <#assign itemTitle= stack.findString(parameters.listTitle)/> + <#if attributes.listTitle??> + <#if stack.findString(attributes.listTitle)??> + <#assign itemTitle= stack.findString(attributes.listTitle)/> <#else> <#assign itemTitle = ''/> - - <#if parameters.id?has_content> - id="${parameters.id}-${itemCount}"<#rt/> + + <#if attributes.id?has_content> + id="${attributes.id}-${itemCount}"<#rt/> <#else> - id="${parameters.name}-${itemCount}"<#rt/> + id="${attributes.name}-${itemCount}"<#rt/> - <#if tag.contains(parameters.nameValue, itemKey)> + <#if tag.contains(attributes.nameValue, itemKey)> checked="checked"<#rt/> - <#if parameters.disabled!false> + <#if attributes.disabled!false> disabled="disabled"<#rt/> <#if itemCssClass??> class="${itemCssClass}"<#rt/> <#else> - <#if parameters.cssClass?has_content> - class="${parameters.cssClass}"<#rt/> + <#if attributes.cssClass?has_content> + class="${attributes.cssClass}"<#rt/> <#if itemCssStyle??> style="${itemCssStyle}"<#rt/> <#else> - <#if parameters.cssStyle?has_content> - style="${parameters.cssStyle}"<#rt/> + <#if attributes.cssStyle?has_content> + style="${attributes.cssStyle}"<#rt/> <#if itemTitle??> title="${itemTitle}"<#rt/> <#else> - <#if parameters.title?has_content> - title="${parameters.title}"<#rt/> + <#if attributes.title?has_content> + title="${attributes.title}"<#rt/> - <#include "/${parameters.templateDir}/${parameters.expandTheme}/css.ftl" /> - <#include "/${parameters.templateDir}/${parameters.expandTheme}/scripting-events.ftl" /> - <#include "/${parameters.templateDir}/${parameters.expandTheme}/common-attributes.ftl" /> + <#include "/${attributes.templateDir}/${attributes.expandTheme}/css.ftl" /> + <#include "/${attributes.templateDir}/${attributes.expandTheme}/scripting-events.ftl" /> + <#include "/${attributes.templateDir}/${attributes.expandTheme}/common-attributes.ftl" /> <#global evaluate_dynamic_attributes = true/> - <#include "/${parameters.templateDir}/${parameters.expandTheme}/dynamic-attributes.ftl" /> + <#include "/${attributes.templateDir}/${attributes.expandTheme}/dynamic-attributes.ftl" /> /> - <#if parameters.id?has_content> - for="${parameters.id}-${itemCount}"<#rt/> + <#if attributes.id?has_content> + for="${attributes.id}-${itemCount}"<#rt/> <#else> - for="${parameters.name}-${itemCount}"<#rt/> + for="${attributes.name}-${itemCount}"<#rt/> class="checkboxLabel">${itemValue} <#else> - -<#if parameters.disabled!false> +<#if attributes.disabled!false> disabled="disabled"<#rt/> /> diff --git a/core/src/main/resources/template/simple/combobox.ftl b/core/src/main/resources/template/simple/combobox.ftl index 733e33c5f..400ae450d 100644 --- a/core/src/main/resources/template/simple/combobox.ftl +++ b/core/src/main/resources/template/simple/combobox.ftl @@ -19,69 +19,69 @@ */ --> <@s.script> - function autoPopulate_${parameters.escapedId}(targetElement) { - <#if parameters.headerKey?? && parameters.headerValue??> - if (targetElement.options[targetElement.selectedIndex].value == '${parameters.headerKey?js_string}') { + function autoPopulate_${attributes.escapedId}(targetElement) { + <#if attributes.headerKey?? && attributes.headerValue??> + if (targetElement.options[targetElement.selectedIndex].value == '${attributes.headerKey?js_string}') { return; } - <#if parameters.emptyOption!false> + <#if attributes.emptyOption!false> if (targetElement.options[targetElement.selectedIndex].value == '') { return; } - targetElement.form.elements['${parameters.name?js_string}'].value=targetElement.options[targetElement.selectedIndex].value; + targetElement.form.elements['${attributes.name?js_string}'].value=targetElement.options[targetElement.selectedIndex].value; } -<#include "/${parameters.templateDir}/simple/text.ftl" /> +<#include "/${attributes.templateDir}/simple/text.ftl" />
    -<#if parameters.list??> - +<#include "/${attributes.templateDir}/${attributes.expandTheme}/css.ftl" /> + <#if attributes.disabled!false> disabled="disabled"<#rt/> > - <#if (parameters.headerKey?? && parameters.headerValue??)> - + <#if (attributes.headerKey?? && attributes.headerValue??)> + - <#if parameters.emptyOption!false> + <#if attributes.emptyOption!false> - <@s.iterator value="parameters.list"> - <#if parameters.listKey??> - <#assign tmpListKey = stack.findString(parameters.listKey) /> + <@s.iterator value="attributes.list"> + <#if attributes.listKey??> + <#assign tmpListKey = stack.findString(attributes.listKey) /> <#else> <#assign tmpListKey = stack.findString('top') /> - <#if parameters.listValue??> - <#assign tmpListValue = stack.findString(parameters.listValue) /> + <#if attributes.listValue??> + <#assign tmpListValue = stack.findString(attributes.listValue) /> <#else> <#assign tmpListValue = stack.findString('top') /> - <#if parameters.listCssClass??> - <#if stack.findString(parameters.listCssClass)??> - <#assign itemCssClass= stack.findString(parameters.listCssClass)/> + <#if attributes.listCssClass??> + <#if stack.findString(attributes.listCssClass)??> + <#assign itemCssClass= stack.findString(attributes.listCssClass)/> <#else> <#assign itemCssClass = ''/> - <#if parameters.listCssStyle??> - <#if stack.findString(parameters.listCssStyle)??> - <#assign itemCssStyle= stack.findString(parameters.listCssStyle)/> + <#if attributes.listCssStyle??> + <#if stack.findString(attributes.listCssStyle)??> + <#assign itemCssStyle= stack.findString(attributes.listCssStyle)/> <#else> <#assign itemCssStyle = ''/> - <#if parameters.listTitle??> - <#if stack.findString(parameters.listTitle)??> - <#assign itemTitle= stack.findString(parameters.listTitle)/> + <#if attributes.listTitle??> + <#if stack.findString(attributes.listTitle)??> + <#assign itemTitle= stack.findString(attributes.listTitle)/> <#else> <#assign itemTitle = ''/>