Ejemplo n.º 1
0
  /** @see org.apache.tapestry.engine.IEngineService#getLink(boolean, java.lang.Object) */
  public ILink getLink(boolean post, Object parameter) {

    Defense.isAssignable(parameter, Object[].class, "参数");
    Object[] ps = (Object[]) parameter;

    if (ps[2] == null && ps[3] == null) {
      Defense.notNull(ps[2], "模板");
    }

    // 如果细节配置不完全
    if ((ps[4] != null && ps[5] == null) || (ps[4] == null && ps[5] != null)) {
      Defense.notNull(ps[4], "细节设置不充分");
    }

    Map<String, Object> parameters = new HashMap<String, Object>();
    parameters.put(ServiceConstants.PAGE, this.requestCycle.getPage().getPageName());
    parameters.put(ServiceConstants.PARAMETER, parameter);

    return linkFactory.constructLink(this, post, parameters, true);
  }
Ejemplo n.º 2
0
 public void setTitle(String title) {
   Defense.notNull(title, "title");
   this.title = title;
 }
 public AjaxDirectServiceParameter(IComponent component, Object[] serviceParameters) {
   Defense.notNull(component, "component");
   this.component = component;
   this.serviceParameters = serviceParameters;
 }