Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updated to reflect latest changes

...

Code Block
  add(new AjaxLink("link") 
  {
    publicprotected void updateAttributes(AjaxRequestAttributes getAttributes(attributes)
    {
      return new AjaxRequestAttributes(super.getAttributesupdateAttributes(attributes)) 
      {;

        public FunctionList getPreconditions()
        {
          return superattributes.getPreconditions()
           .add("function(requestQueueItem) { return confirm('Really?'); }");
        } 
      }
    }
    public void onClick(AjaxRequestTarget target)
    {
      ...
    }
  }

...

Code Block
  add(new AjaxLink("link") 
  {
    protected publicvoid updateAttributes(AjaxRequestAttributes getAttributes(attributes)
    {
      return new AjaxRequestAttributes(super.getAttributesupdateAttributes(attributes)) 
      {;

        public Map<String, Object> getUrlArguments()
        {
          Map<String, Object> args = superattributes.getUrlArguments();
          args.put("param1", "value1");
          return args;
	}
      }
    }
    public void onClick(AjaxRequestTarget target)
    {
      ...
    }
  }

...

Code Block
  add(new AjaxLink("link") 
  {
    protected publicvoid updateAttributes(AjaxRequestAttributes getAttributes(attributes)
    {
      return new AjaxRequestAttributes(super.getAttributesupdateAttributes()) 
      {
        public FunctionList getUrlArgumentMethods()attributes);

        {
          return superattributes.getUrlArgumentMethods()
            .add("function(requestQueueItem) { return { x:4, y:someJavascriptExpression() }; }");
        }
      }
    }
    public void onClick(AjaxRequestTarget target)
    {
      ...
    }
  }