Package org.apache.wicket.ajax

Examples of org.apache.wicket.ajax.AjaxEventBehavior


    failMessage = "event must not be null";
    notNull(failMessage, event);

    // Run through all the behavior and select the LAST ADDED behavior which
    // matches the event parameter.
    AjaxEventBehavior ajaxEventBehavior = null;
    List behaviors = component.getBehaviors();
    for (Iterator iter = behaviors.iterator(); iter.hasNext();)
    {
      IBehavior behavior = (IBehavior)iter.next();

      // AjaxEventBehavior is the one to look for
      if (behavior instanceof AjaxEventBehavior)
      {
        AjaxEventBehavior tmp = (AjaxEventBehavior)behavior;

        if (event.equals(tmp.getEvent()))
        {
          ajaxEventBehavior = tmp;
        }
      }
    }
View Full Code Here


  {
    // Setup mocks
    final MockPageWithOneComponent page = new MockPageWithOneComponent();

    Label label = new Label("component", "Dblclick This To See Magick");
    label.add(new AjaxEventBehavior("ondblclick")
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onEvent(AjaxRequestTarget target)
View Full Code Here

    checkUsability(component);

    // Run through all the behavior and select the LAST ADDED behavior which
    // matches the event parameter.
    AjaxEventBehavior ajaxEventBehavior = null;
    List<IBehavior> behaviors = component.getBehaviors();
    for (IBehavior behavior : behaviors)
    {
      // AjaxEventBehavior is the one to look for
      if (behavior instanceof AjaxEventBehavior)
      {
        AjaxEventBehavior tmp = (AjaxEventBehavior)behavior;
        if (event.equals(tmp.getEvent()))
        {
          ajaxEventBehavior = tmp;
        }
      }
    }
View Full Code Here

   */
  public AjaxLink(final String id, final IModel<T> model)
  {
    super(id, model);

    add(new AjaxEventBehavior("onclick")
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onEvent(AjaxRequestTarget target)
View Full Code Here

   */
  public AjaxFallbackLink(final String id, final IModel<T> model)
  {
    super(id, model);

    add(new AjaxEventBehavior("onclick")
    {
      private static final long serialVersionUID = 1L;

      /**
       *
 
View Full Code Here

  {
    // Setup mocks
    final MockPageWithOneComponent page = new MockPageWithOneComponent();

    Label label = new Label("component", "Dblclick This To See Magick");
    label.add(new AjaxEventBehavior("ondblclick")
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onEvent(AjaxRequestTarget target)
View Full Code Here

    failMessage = "event must not be null";
    notNull(failMessage, event);

    // Run through all the behavior and select the LAST ADDED behavior which
    // matches the event parameter.
    AjaxEventBehavior ajaxEventBehavior = null;
    List behaviors = component.getBehaviors();
    for (Iterator iter = behaviors.iterator(); iter.hasNext();)
    {
      IBehavior behavior = (IBehavior)iter.next();

      // AjaxEventBehavior is the one to look for
      if (behavior instanceof AjaxEventBehavior)
      {
        AjaxEventBehavior tmp = (AjaxEventBehavior)behavior;

        if (event.equals(tmp.getEvent()))
        {
          ajaxEventBehavior = tmp;
        }
      }
    }
View Full Code Here

      @Override
      protected void populateItem(Item<Organisation> item) {
        final Organisation o = item.getModelObject();
        item.add(new Label("organisation_id", "" + o.getOrganisation_id()));
        item.add(new Label("name", "" + o.getName()));
        item.add(new AjaxEventBehavior("onclick") {
          private static final long serialVersionUID = -8069413566800571061L;

          protected void onEvent(AjaxRequestTarget target) {
            form.hideNewRecord();
            form.setModelObject(o);
View Full Code Here

        getBean(FlvRecordingDao.class).update(f);
        target.add(trees); //FIXME add correct refresh
      }
    };
    add(addFolder);
    add(new WebMarkupContainer("create").add(new AjaxEventBehavior("onclick") {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onEvent(AjaxRequestTarget target) {
        addFolder.open(target);
      }
    }));
    add(new WebMarkupContainer("refresh").add(new AjaxEventBehavior("onclick") {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onEvent(AjaxRequestTarget target) {
        target.add(trees); //FIXME add correct refresh
View Full Code Here

    add(container.setOutputMarkupId(true));
    setDefaultModel(rm);
   
    container.add(new Label("fileName"), new Label("duration"), new Label("recordEnd"), new Label("room_id", roomName),
        dFLV.setEnabled(false), dAVI.setEnabled(false));
    dAVI.add(new AjaxEventBehavior("click"){
      private static final long serialVersionUID = 1L;

      @Override
      protected void onEvent(AjaxRequestTarget target) {
        download.setFileName(rm.getObject().getAlternateDownload());
        download.setResourceStream(new FileResourceStream(getRecording(rm.getObject().getAlternateDownload())));
        download.initiate(target);
      }
    });
    dFLV.add(new AjaxEventBehavior("click"){
      private static final long serialVersionUID = 1L;

      @Override
      protected void onEvent(AjaxRequestTarget target) {
        download.setFileName(rm.getObject().getFileHash());
View Full Code Here

TOP

Related Classes of org.apache.wicket.ajax.AjaxEventBehavior

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.