Package org.apache.wicket.ajax

Examples of org.apache.wicket.ajax.AjaxEventBehavior


  public AjaxFallbackOrderByLink(String id, String property, ISortStateLocator stateLocator,
      ICssProvider cssProvider, final IAjaxCallDecorator decorator)
  {
    super(id, property, stateLocator, cssProvider);

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

      protected void onEvent(AjaxRequestTarget target)
      {
View Full Code Here


    animalSelectionLabel.setOutputMarkupId(true);
    add(animalSelectionLabel);

    // Image referencing captcha image resource
    image = new NonCachingImage("image", imageResource = new CaptchaImageResource(animals));
    image.add(new AjaxEventBehavior("onclick")
    {
      private static final long serialVersionUID = 7480352029955897654L;

      @Override
      protected CharSequence getCallbackScript(boolean onlyTargetActivePage)
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

      protected void populateItem(final Item<LdapConfig> item) {
        final LdapConfig ldapConfig = item.getModelObject();
        item.add(new Label("ldapConfigId", "" + ldapConfig.getLdapConfigId()));
        item.add(new Label("name", "" + ldapConfig.getName()));
        item.add(new Label("configFileName", "" + ldapConfig.getConfigFileName()));
        item.add(new AjaxEventBehavior("onclick") {
          private static final long serialVersionUID = -8069413566800571061L;

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

        if (u != null) {
          item.add(new Label("label", Model.of(getUser(u))));
        } else {
          item.add(new Label("label", Model.of("")));
        }
        item.add(new WebMarkupContainer("deleteUserBtn").add(new AjaxEventBehavior("onclick"){
          private static final long serialVersionUID = 1L;

          @Override
          protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
            super.updateAjaxAttributes(attributes);
View Full Code Here

      protected void populateItem(final Item<Configuration> item) {
        final Configuration configuration = item.getModelObject();
        item.add(new Label("configuration_id", "" + configuration.getConfiguration_id()));
        item.add(new Label("conf_key", "" + configuration.getConf_key()));
        item.add(new Label("conf_value", "" + configuration.getConf_value()));
        item.add(new AjaxEventBehavior("onclick") {
          private static final long serialVersionUID = -8069413566800571061L;

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

  @SuppressWarnings("unchecked")
  public GroupsPanel(String id) {
    super(id);
    final WebMarkupContainer listContainer = new WebMarkupContainer("listContainer");
        final WebMarkupContainer addUsersBtn = new WebMarkupContainer("addUsersBtn");
        addUsersBtn.add(new AjaxEventBehavior("onclick") {
      private static final long serialVersionUID = 6037994365235148885L;

      protected void onEvent(AjaxRequestTarget target) {
            addUsersForm.clear();
            target.add(addUsersForm);
            target.appendJavaScript("addUsers();");
          }
        });
       
    //Adding the Group Form
    form = new GroupForm("form", listContainer, new Organisation()){
      private static final long serialVersionUID = -3042797340375988889L;

      @Override
      protected void onModelChanged() {
        super.onModelChanged();
        boolean orgEmpty = getModelObject().getOrganisation_id() == null;
        if (orgEmpty) {
          addUsersBtn.add(AttributeModifier.replace("class", "formNewButton disabled"));
        } else {
          addUsersBtn.add(AttributeModifier.replace("class", "formNewButton"));
        }
        addUsersBtn.setEnabled(!orgEmpty);
        addUsersForm.setOrganisation(getModelObject());
      }
     
      @Override
      void updateView(AjaxRequestTarget target) {
        super.updateView(target);
        target.add(addUsersBtn);
      }
    };
        add(form.add(addUsersBtn.setOutputMarkupId(true)));
        addUsersForm = new AddUsersForm("addUsers", form);
    add(addUsersForm);

        //List view
        SearchableDataView<Organisation> dataView = new SearchableDataView<Organisation>("groupList", new SearchableDataProvider<Organisation>(OrganisationDao.class)) {
      private static final long serialVersionUID = 8715559628755439596L;

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

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

        target.add(listContainer);
      }
    });
    add(languages);

    add(new WebMarkupContainer("deleteLangBtn").add(new AjaxEventBehavior("onclick"){
      private static final long serialVersionUID = -1650946343073068686L;

      @Override
      protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
        super.updateAjaxAttributes(attributes);
View Full Code Here

      protected void populateItem(final Item<Room> item) {
        final Room room = item.getModelObject();
        item.add(new Label("rooms_id", "" + room.getRooms_id()));
        item.add(new Label("name", "" + room.getName()));
        item.add(new Label("ispublic", ""+room.getIspublic()));
        item.add(new AjaxEventBehavior("onclick") {
          private static final long serialVersionUID = -8069413566800571061L;

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

      protected void populateItem(final Item<Fieldvalues> item) {
        final Fieldvalues fv = item.getModelObject();
        item.add(new Label("lblId", "" + fv.getFieldvalues_id()));
        item.add(new Label("name", fv.getName()));
        item.add(new Label("value", fv.getFieldlanguagesvalue() != null ? fv.getFieldlanguagesvalue().getValue() : null));
        item.add(new AjaxEventBehavior("onclick") {
          private static final long serialVersionUID = -8069413566800571061L;

          protected void onEvent(AjaxRequestTarget target) {
            form.setModelObject(fv.getFieldlanguagesvalue());
            form.hideNewRecord();
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.