Changeset 3922


Ignore:
Timestamp:
Oct 29, 2010, 9:44:37 AM (13 years ago)
Author:
olle
Message:

Refs #714. Class/file waf/AbstractAction.java in api/waf/ updated:

  1. New protected adapter method

List<Integer> getSessionAttributeList(VInteger param)
added. It is used to retrieve an integer list from a session
attribute. The name of the VInteger parameter argument is used
as name for the session attribute, while the type of the argument
indicates that the list will contain Integer values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/api/waf/src/se/lu/thep/waf/AbstractAction.java

    r2444 r3922  
    3333import se.lu.thep.waf.constraints.VString;
    3434import java.security.Principal;
     35import java.util.List;
    3536import javax.servlet.http.HttpServletRequest;
    3637import javax.servlet.http.HttpServletResponse;
     
    218219
    219220
     221  /**
     222   * Adapter method for getRequest().getSession().getAttribute(name)
     223   * when retrieving a list of Integer values. The name of the
     224   * VInteger parameter argument is used as name for the session attribute,
     225   * while the type of the argument indicates that the list will
     226   * contain Integer values. 
     227   *
     228   * @param param VInteger The valid parameter coupled to the session attribute.
     229   * @return List<Integer> The list of Integer values obtained from the session attribute.
     230   */
     231  protected List<Integer> getSessionAttributeList(VInteger param)
     232  {
     233    return (List<Integer>) request.getSession().getAttribute(param.getName());
     234  }
     235
     236
    220237  @Override
    221238  public Object clone()
Note: See TracChangeset for help on using the changeset viewer.