Changeset 6560


Ignore:
Timestamp:
Oct 13, 2014, 8:25:20 AM (8 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1866: Warn about use of deprecated methods in taglibs and extensions

Location:
branches/3.3-stable
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/extensions/menu/FixedMenuItemFactory.java

    r6401 r6560  
    2323
    2424import net.sf.basedb.clients.web.extensions.AbstractJspActionFactory;
     25import net.sf.basedb.clients.web.taglib.DeprecationLogger;
    2526import net.sf.basedb.util.Values;
    2627import net.sf.basedb.util.extensions.InvokationContext;
     
    5556  private String submenuId;
    5657  private String icon;
     58  @Deprecated
    5759  private String onClick;
    5860  private String style;
     
    190192 
    191193  @VariableSetter
     194  @Deprecated
    192195  public void setOnClick(String onClick)
    193196  {
    194197    this.onClick = onClick;
     198    DeprecationLogger.warn("MenuItemAction", "onclick", "3.5");
    195199  }
    196200
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/extensions/menu/MenuItemBean.java

    r6401 r6560  
    2323
    2424import net.sf.basedb.clients.web.extensions.DynamicActionAttributeSupport;
     25import net.sf.basedb.clients.web.taglib.DeprecationLogger;
    2526
    2627/**
     
    4243  private String submenuId;
    4344  private String icon;
     45  @Deprecated
    4446  private String onClick;
    4547  private String clazz;
     
    183185  {
    184186    this.onClick = onClick;
     187    DeprecationLogger.warn("MenuItemAction", "onclick", "3.5");
    185188  }
    186189
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/extensions/menu/PermissionMenuItemFactory.java

    r6401 r6560  
    2424import net.sf.basedb.clients.web.extensions.AbstractJspActionFactory;
    2525import net.sf.basedb.clients.web.extensions.menu.MenuItemAction.MenuType;
     26import net.sf.basedb.clients.web.taglib.DeprecationLogger;
    2627import net.sf.basedb.core.Item;
    2728import net.sf.basedb.core.Permission;
     
    6970  private String disabledClazz;
    7071 
     72  @Deprecated
    7173  private String onClick;
    7274  private MenuType type;
     
    230232  {
    231233    this.onClick = onClick;
     234    DeprecationLogger.warn("MenuItemAction", "onclick", "3.5");
    232235  }
    233236
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/extensions/tabcontrol/FixedTabFactory.java

    r6164 r6560  
    2323
    2424import net.sf.basedb.clients.web.extensions.AbstractJspActionFactory;
     25import net.sf.basedb.clients.web.taglib.DeprecationLogger;
    2526import net.sf.basedb.util.Values;
    2627import net.sf.basedb.util.extensions.InvokationContext;
     
    202203  {
    203204    this.onValidate = onValidate;
     205    DeprecationLogger.warn("TabAction", "onvalidate", "3.5");
    204206  }
    205207
     
    209211  {
    210212    this.onActivate = onActivate;
     213    DeprecationLogger.warn("TabAction", "onactivate", "3.5");
    211214  }
    212215
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/extensions/tabcontrol/IncludeContentTabFactory.java

    r6402 r6560  
    2828import net.sf.basedb.clients.web.extensions.AbstractJspActionFactory;
    2929import net.sf.basedb.clients.web.extensions.JspContext;
     30import net.sf.basedb.clients.web.taglib.DeprecationLogger;
    3031import net.sf.basedb.clients.web.util.HTML;
    3132import net.sf.basedb.util.Values;
     
    143144  {
    144145    this.onValidate = onValidate;
     146    DeprecationLogger.warn("TabAction", "onvalidate", "3.5");
    145147  }
    146148
     
    150152  {
    151153    this.onActivate = onActivate;
     154    DeprecationLogger.warn("TabAction", "onactivate", "3.5");
    152155  }
    153156
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/extensions/tabcontrol/TabBean.java

    r6305 r6560  
    2323
    2424import net.sf.basedb.clients.web.extensions.DynamicActionAttributeSupport;
     25import net.sf.basedb.clients.web.taglib.DeprecationLogger;
    2526
    2627/**
     
    165166  {
    166167    this.onValidate = onValidate;
     168    DeprecationLogger.warn("TabAction", "onvalidate", "3.5");
    167169  }
    168170 
     
    171173  {
    172174    this.onActivate = onActivate;
     175    DeprecationLogger.warn("TabAction", "onactivate", "3.5");
    173176  }
    174177
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/extensions/toolbar/ButtonBean.java

    r6219 r6560  
    2323
    2424import net.sf.basedb.clients.web.extensions.DynamicActionAttributeSupport;
     25import net.sf.basedb.clients.web.taglib.DeprecationLogger;
    2526
    2627/**
     
    4041  private String icon;
    4142  private String id;
     43  @Deprecated
    4244  private String onClick;
    4345  private String style;
     
    137139  {
    138140    this.onClick = onClick;
     141    DeprecationLogger.warn("ButtonAction", "onclick", "3.5");
    139142  }
    140143
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/extensions/toolbar/FixedButtonFactory.java

    r6219 r6560  
    2323
    2424import net.sf.basedb.clients.web.extensions.AbstractJspActionFactory;
     25import net.sf.basedb.clients.web.taglib.DeprecationLogger;
    2526import net.sf.basedb.util.Values;
    2627import net.sf.basedb.util.extensions.InvokationContext;
     
    5960  private String clazz;
    6061  private String icon;
     62  @Deprecated
    6163  private String onClick;
    6264  private String style;
     
    176178  {
    177179    this.onClick = onClick;
     180    DeprecationLogger.warn("ButtonAction", "onclick", "3.5");
    178181  }
    179182
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/taglib/Body.java

    r6503 r6560  
    161161  {
    162162    this.onLoad = onLoad;
     163    DeprecationLogger.warn("base:body", "onload", "3.5");
    163164  }
    164165  @Deprecated
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/taglib/Button.java

    r6164 r6560  
    259259  {
    260260    this.onClick = onClick;
     261    DeprecationLogger.warn("base:button", "onclick", "3.5");
    261262  }
    262263  @Deprecated
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/taglib/Icon.java

    r6166 r6560  
    235235    this.onClick = onClick;
    236236    if (!setEnabledIsCalled) this.enabled = onClick != null;
     237    DeprecationLogger.warn("base:icon", "onclick", "3.5");
    237238  }
    238239  @Deprecated
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/taglib/Select.java

    r6300 r6560  
    495495  {
    496496    this.onChange = onChange;
     497    DeprecationLogger.warn("base:select", "onchange", "3.5");
    497498  }
    498499  @Deprecated
     
    506507  {
    507508    this.onSelect = onSelect;
     509    DeprecationLogger.warn("base:select", "onselect", "3.5");
    508510  }
    509511  @Deprecated
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/taglib/menu/Menuitem.java

    r6401 r6560  
    3030
    3131import net.sf.basedb.clients.web.extensions.DynamicActionAttribute;
     32import net.sf.basedb.clients.web.taglib.DeprecationLogger;
    3233import net.sf.basedb.clients.web.taglib.StylableTag;
    3334
     
    191192    Javascript statment to execute when the user clicks the menu.
    192193  */
     194  @Deprecated
    193195  private String onclick = null;
    194196   
     
    234236  {
    235237    this.onclick = onclick;
     238    DeprecationLogger.warn("base:menu", "onclick", "3.5");
    236239  }
    237240  @Deprecated
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/taglib/tab/Tab.java

    r6305 r6560  
    3535import net.sf.basedb.clients.web.extensions.DynamicActionAttributes;
    3636import net.sf.basedb.clients.web.extensions.tabcontrol.TabAction;
     37import net.sf.basedb.clients.web.taglib.DeprecationLogger;
    3738
    3839/**
     
    279280  {
    280281    this.validate = validate;
     282    DeprecationLogger.warn("t:tab", "validate", "3.5");
    281283  }
    282284  @Override
     
    294296  {
    295297    this.activate = activate;
     298    DeprecationLogger.warn("t:tab", "activate", "3.5");
    296299  }
    297300  /**
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/taglib/tab/TabControl.java

    r6305 r6560  
    2828import net.sf.basedb.clients.web.extensions.DynamicActionAttributeSupport;
    2929import net.sf.basedb.clients.web.extensions.tabcontrol.TabAction;
     30import net.sf.basedb.clients.web.taglib.DeprecationLogger;
    3031import net.sf.basedb.clients.web.taglib.StylableTag;
    3132import net.sf.basedb.util.extensions.ExtensionsInvoker;
     
    273274  {
    274275    this.switchtab = s;
     276    DeprecationLogger.warn("t:tabcontrol", "switch", "3.5");
    275277  }
    276278  @Deprecated
  • branches/3.3-stable/src/clients/web/net/sf/basedb/clients/web/taglib/table/Button.java

    r6219 r6560  
    2929import net.sf.basedb.clients.web.extensions.toolbar.ButtonAction;
    3030import net.sf.basedb.clients.web.extensions.toolbar.ToolbarButtonRenderer;
     31import net.sf.basedb.clients.web.taglib.DeprecationLogger;
    3132import net.sf.basedb.clients.web.taglib.StylableTag;
    3233
     
    237238  {
    238239    this.onClick = onClick;
     240    DeprecationLogger.warn("tbl:button", "onclick", "3.5");
    239241  }
    240242  @Deprecated
  • branches/3.3-stable/www/include/menu.jsp

    r6426 r6560  
    12241224        else if (action.getType() == MenuItemAction.MenuType.MENUITEM)
    12251225        {
    1226           %>
    1227           <m:menuitem
    1228             id="<%=action.getId() %>"
    1229             subclass="<%=action.getClazz() %>"
    1230             style="<%=action.getStyle()%>"
    1231             title="<%=action.getTitle()%>"
    1232             icon="<%=action.getIcon()%>"
    1233             tooltip="<%=action.getTooltip()%>"
    1234             enabled="<%=action.isEnabled()%>"
    1235             visible="<%=action.isVisible()%>"
    1236             onclick="<%=action.getOnClick()%>"
    1237             dynamic="<%=dynamicAttributes%>"
    1238           />
    1239           <%
     1226          if (action.getOnClick() != null)
     1227          {
     1228            %>
     1229            <m:menuitem
     1230              id="<%=action.getId() %>"
     1231              subclass="<%=action.getClazz() %>"
     1232              style="<%=action.getStyle()%>"
     1233              title="<%=action.getTitle()%>"
     1234              icon="<%=action.getIcon()%>"
     1235              tooltip="<%=action.getTooltip()%>"
     1236              enabled="<%=action.isEnabled()%>"
     1237              visible="<%=action.isVisible()%>"
     1238              onclick="<%=action.getOnClick()%>"
     1239              dynamic="<%=dynamicAttributes%>"
     1240            />
     1241            <%
     1242          }
     1243          else
     1244          {
     1245            %>
     1246            <m:menuitem
     1247              id="<%=action.getId() %>"
     1248              subclass="<%=action.getClazz() %>"
     1249              style="<%=action.getStyle()%>"
     1250              title="<%=action.getTitle()%>"
     1251              icon="<%=action.getIcon()%>"
     1252              tooltip="<%=action.getTooltip()%>"
     1253              enabled="<%=action.isEnabled()%>"
     1254              visible="<%=action.isVisible()%>"
     1255              dynamic="<%=dynamicAttributes%>"
     1256            />
     1257            <%
     1258          }
    12401259        }
    12411260        else if (action.getType() == MenuItemAction.MenuType.SUBMENU)
Note: See TracChangeset for help on using the changeset viewer.