当前位置: 首页>>代码示例>>Java>>正文


Java IEvent类代码示例

本文整理汇总了Java中org.apache.wicket.event.IEvent的典型用法代码示例。如果您正苦于以下问题:Java IEvent类的具体用法?Java IEvent怎么用?Java IEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IEvent类属于org.apache.wicket.event包,在下文中一共展示了IEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onEvent

import org.apache.wicket.event.IEvent; //导入依赖的package包/类
@Override
public void onEvent(IEvent<?> event) {
	super.onEvent(event);

	if (event.getPayload() instanceof AjaxRequestTarget) {

		AjaxRequestTarget target = (AjaxRequestTarget) event.getPayload();

		if (target.getComponents().contains(this)) {

			// if this component is being repainted by ajax, directly, we
			// must destroy Select2 so it removes
			// its elements from DOM

			target.prependJavaScript(JQuery.execute("$('#%s').select2('destroy');", getJquerySafeMarkupId()));
		}
	}
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:19,代码来源:AbstractSelect2Choice.java

示例2: onEvent

import org.apache.wicket.event.IEvent; //导入依赖的package包/类
@Override
public void onEvent(final IEvent<?> event) {

    if (event.getPayload() instanceof ConnConfModEvent) {

        final AjaxRequestTarget target =
                ((ConnConfModEvent) event.getPayload()).getTarget();

        final List<ConnConfProperty> conf =
                ((ConnConfModEvent) event.getPayload()).getConfiguration();

        mappings.removeAll();

        addMappingBtn.setEnabled(
                resourceTO.getConnectorId() != null
                && resourceTO.getConnectorId() > 0);

        schemaNames = getResourceSchemaNames(
                resourceTO.getConnectorId(),
                new HashSet<ConnConfProperty>(conf));

        target.add(mappingContainer);
    }
}
 
开发者ID:ilgrosso,项目名称:oldSyncopeIdM,代码行数:25,代码来源:ResourceMappingPanel.java

示例3: onEvent

import org.apache.wicket.event.IEvent; //导入依赖的package包/类
@Override
public void onEvent(IEvent<?> event) {
    Object payload = event.getPayload();
    if (payload instanceof ProfileEvent) {
        ProfileEvent profileEvent = (ProfileEvent) payload;
        boolean updatableProfile = authorizationService.isUpdatableProfile();
        updateLink.setEnabled(updatableProfile);
        cancelLink.setEnabled(updatableProfile);

        ProfileModel userProfile = getUserProfile();
        if (!ConstantValues.uiHideEncryptedPassword.getBoolean()) {
            mavenSettingsPanel = new MavenSettingsPanel("mavenSettingsPanel", userProfile);
            form.replace(mavenSettingsPanel);
        }
        bintrayProfilePanel.updateDefaultModel(userProfile, updatableProfile);
        profileEvent.getTarget().add(this, bintrayProfilePanel);
    }
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:19,代码来源:ProfilePage.java

示例4: onEvent

import org.apache.wicket.event.IEvent; //导入依赖的package包/类
@Override
public void onEvent( IEvent event )
{
    if ( event.getPayload() instanceof SaveModelEvent )
    {
        SaveModelEvent modelEvent = ( SaveModelEvent ) event.getPayload();
        switch ( modelEvent.getOperation() )
        {
            case ADD:
                add( modelEvent.getEntity() );
                break;
            case UPDATE:
                modelChanged();
                break;
            case DELETE:
                prune();
                break;
            default:
                LOG.error( "onEvent caught invalid operation" );
                break;
        }
        AjaxRequestTarget target = ( ( SaveModelEvent ) event.getPayload() ).getAjaxRequestTarget();
        target.add(grid);
        LOG.debug( ".onEvent AJAX - UserListPanel - SaveModelEvent: " + target.toString() );
    }
}
 
开发者ID:apache,项目名称:directory-fortress-commander,代码行数:27,代码来源:UserListPanel.java

示例5: onEvent

import org.apache.wicket.event.IEvent; //导入依赖的package包/类
@Override
public void onEvent( IEvent event )
{
    if ( event.getPayload() instanceof SaveModelEvent )
    {
        SaveModelEvent modelEvent = ( SaveModelEvent ) event.getPayload();
        switch ( modelEvent.getOperation() )
        {
            case ADD:
                add( modelEvent.getEntity() );
                break;
            case UPDATE:
                modelChanged();
                break;
            case DELETE:
                prune();
                break;
            default:
                break;
        }
        AjaxRequestTarget target = ( ( SaveModelEvent ) event.getPayload() ).getAjaxRequestTarget();
        target.add( grid );
        log.debug( ".onEvent SaveModelEvent: " + target.toString() );
    }
}
 
开发者ID:apache,项目名称:directory-fortress-commander,代码行数:26,代码来源:OUListPanel.java

示例6: onEvent

import org.apache.wicket.event.IEvent; //导入依赖的package包/类
@Override
public void onEvent( IEvent event )
{
    if ( event.getPayload() instanceof SaveModelEvent )
    {
        SaveModelEvent modelEvent = ( SaveModelEvent ) event.getPayload();
        switch ( modelEvent.getOperation() )
        {
            case ADD:
                add( modelEvent.getEntity() );
                break;
            case UPDATE:
                //modelEvent.
                modelChanged();
                break;
            case DELETE:
                prune();
                break;
            default:
                log.error( "onEvent caught invalid operation" );
                break;
        }
        AjaxRequestTarget target = ( ( SaveModelEvent ) event.getPayload() ).getAjaxRequestTarget();
        log.debug( ".onEvent AJAX - GroupListPanel - SaveModelEvent: " + target.toString() );
    }
}
 
开发者ID:apache,项目名称:directory-fortress-commander,代码行数:27,代码来源:GroupListPanel.java

示例7: onEvent

import org.apache.wicket.event.IEvent; //导入依赖的package包/类
@Override
public void onEvent( IEvent event )
{
    if ( event.getPayload() instanceof SaveModelEvent )
    {
        SaveModelEvent modelEvent = ( SaveModelEvent ) event.getPayload();
        switch ( modelEvent.getOperation() )
        {
            case ADD:
                add( modelEvent.getEntity() );
                break;
            case UPDATE:
                modelChanged();
                break;
            case DELETE:
                prune();
                break;
            default:
                log.error( "onEvent caught invalid operation" );
                break;
        }
        AjaxRequestTarget target = ( ( SaveModelEvent ) event.getPayload() ).getAjaxRequestTarget();
        log.debug( ".onEvent AJAX - ObjectListPanel - SaveModelEvent: " + target.toString() );
    }
}
 
开发者ID:apache,项目名称:directory-fortress-commander,代码行数:26,代码来源:ObjectListPanel.java

示例8: onEvent

import org.apache.wicket.event.IEvent; //导入依赖的package包/类
@Override
public void onEvent( final IEvent<?> event )
{
    if ( event.getPayload() instanceof SelectModelEvent )
    {
        SelectModelEvent modelEvent = ( SelectModelEvent ) event.getPayload();
        PwPolicy policy = ( PwPolicy ) modelEvent.getEntity();
        this.setModelObject( policy );
        String msg = "Policy: " + policy.getName() + " has been selected";
        log.debug( ".onEvent SelectModelEvent: " + policy.getName() );
        display.setMessage( msg );
        component = editForm;
    }
    else if ( event.getPayload() instanceof AjaxRequestTarget )
    {
        // only add the form to ajax target if something has changed...
        if ( component != null )
        {
            AjaxRequestTarget target = ( ( AjaxRequestTarget ) event.getPayload() );
            log.debug( ".onEvent AjaxRequestTarget: " + target.toString() );
            target.add( component );
            component = null;
        }
        display.display( ( AjaxRequestTarget ) event.getPayload() );
    }
}
 
开发者ID:apache,项目名称:directory-fortress-commander,代码行数:27,代码来源:PwPolicyDetailPanel.java

示例9: onEvent

import org.apache.wicket.event.IEvent; //导入依赖的package包/类
@Override
public void onEvent(IEvent<?> event) {
	super.onEvent(event);
	
	if (event.getPayload() instanceof DashboardEvent) {
		DashboardEvent dashboardEvent = (DashboardEvent) event.getPayload();
		DashboardEvent.EventType eventType = dashboardEvent.getType();
		if (DashboardEvent.EventType.WIDGET_ADDED == eventType) {
			onWidgetAdded(dashboardEvent);
		} else if (DashboardEvent.EventType.WIDGET_REMOVED == eventType) {
			onWidgetRemoved(dashboardEvent);
		} else if (DashboardEvent.EventType.WIDGETS_SORTED == eventType) {
			onWidgetsSorted(dashboardEvent);
		}
	}
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:17,代码来源:DashboardPanel.java

示例10: onEvent

import org.apache.wicket.event.IEvent; //导入依赖的package包/类
@Override
public void onEvent(final IEvent<?> event) {
    if (event.getPayload() instanceof EventDataWrapper) {
        final EventDataWrapper data = (EventDataWrapper) event.getPayload();

        if (data.getRows() < 1) {
            updateResultTable(data.isCreate());
        } else {
            updateResultTable(data.isCreate(), data.getRows());
        }

        if (DirectoryPanel.this.container.isVisibleInHierarchy()) {
            data.getTarget().add(DirectoryPanel.this.container);
        }
    }
    super.onEvent(event);
}
 
开发者ID:apache,项目名称:syncope,代码行数:18,代码来源:DirectoryPanel.java

示例11: onEvent

import org.apache.wicket.event.IEvent; //导入依赖的package包/类
@Override
public void onEvent(final IEvent<?> event) {
    if (event.getPayload() instanceof EventSelectionChanged) {
        final EventSelectionChanged eventSelectionChanged = (EventSelectionChanged) event.getPayload();

        for (String toBeRemoved : eventSelectionChanged.getToBeRemoved()) {
            model.getObject().remove(toBeRemoved);
        }

        for (String toBeAdded : eventSelectionChanged.getToBeAdded()) {
            if (!model.getObject().contains(toBeAdded)) {
                model.getObject().add(toBeAdded);
            }
        }

        eventSelectionChanged.getTarget().add(selectionContainer);
    }
}
 
开发者ID:apache,项目名称:syncope,代码行数:19,代码来源:SelectedEventsPanel.java

示例12: onEvent

import org.apache.wicket.event.IEvent; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void onEvent(final IEvent<?> event) {
    super.onEvent(event);

    if (event.getPayload() instanceof CreateEvent) {
        final CreateEvent resourceCreateEvent = CreateEvent.class.cast(event.getPayload());

        final TopologyNode node = new TopologyNode(
                resourceCreateEvent.getKey(),
                resourceCreateEvent.getDisplayName(),
                resourceCreateEvent.getKind());

        newlyCreated.getModelObject().add(node);
        resourceCreateEvent.getTarget().add(newlyCreatedContainer);

        resourceCreateEvent.getTarget().appendJavaScript(String.format(
                "window.Wicket.WebSocket.send('"
                + "{\"kind\":\"%s\",\"target\":\"%s\",\"source\":\"%s\",\"scope\":\"%s\"}"
                + "');",
                SupportedOperation.ADD_ENDPOINT,
                resourceCreateEvent.getKey(),
                resourceCreateEvent.getParent(),
                resourceCreateEvent.getKind()));
    }
}
 
开发者ID:apache,项目名称:syncope,代码行数:27,代码来源:Topology.java

示例13: onEvent

import org.apache.wicket.event.IEvent; //导入依赖的package包/类
@Override
public void onEvent(final IEvent<?> event) {
    if (event.getPayload() instanceof UpdateEvent) {
        final UpdateEvent updateEvent = UpdateEvent.class.cast(event.getPayload());
        final String key = updateEvent.getKey();
        final AjaxRequestTarget target = updateEvent.getTarget();

        if (node.getKind() == Kind.CONNECTOR && key.equalsIgnoreCase(node.getKey())) {
            ConnInstanceTO conn = new ConnectorRestClient().read(key);

            String displayName =
                    // [SYNCOPE-1233]
                    StringUtils.isBlank(conn.getDisplayName()) ? conn.getBundleName() : conn.getDisplayName();

            final String resourceName = displayName.length() > 14
                    ? displayName.subSequence(0, 10) + "..."
                    : displayName;

            label.setDefaultModelObject(resourceName);
            target.add(label);
            node.setDisplayName(displayName);
        }
    }
}
 
开发者ID:apache,项目名称:syncope,代码行数:25,代码来源:TopologyNodePanel.java

示例14: onEvent

import org.apache.wicket.event.IEvent; //导入依赖的package包/类
@Override
public void onEvent(final IEvent<?> event) {
    super.onEvent(event);

    if (event.getPayload() instanceof AjaxWizard.NewItemEvent) {
        AjaxWizard.NewItemEvent<?> newItemEvent = AjaxWizard.NewItemEvent.class.cast(event.getPayload());
        WizardModalPanel<?> modalPanel = newItemEvent.getModalPanel();

        if (event.getPayload() instanceof AjaxWizard.NewItemActionEvent && modalPanel != null) {
            final IModel<Serializable> model = new CompoundPropertyModel<>(modalPanel.getItem());
            templateModal.setFormModel(model);
            templateModal.header(newItemEvent.getResourceModel());
            newItemEvent.getTarget().add(templateModal.setContent(modalPanel));
            templateModal.show(true);
        } else if (event.getPayload() instanceof AjaxWizard.NewItemCancelEvent) {
            templateModal.close(newItemEvent.getTarget());
        } else if (event.getPayload() instanceof AjaxWizard.NewItemFinishEvent) {
            templateModal.close(newItemEvent.getTarget());
        }
    }
}
 
开发者ID:apache,项目名称:syncope,代码行数:22,代码来源:SAML2IdPsDirectoryPanel.java

示例15: onEvent

import org.apache.wicket.event.IEvent; //导入依赖的package包/类
@Override
public void onEvent( final IEvent<?> event )
{
    if ( event.getPayload() instanceof SelectModelEvent )
    {
        SelectModelEvent modelEvent = ( SelectModelEvent ) event.getPayload();
        final Page3EO page3EO = ( Page3EO ) modelEvent.getEntity();
        this.setModelObject(page3EO);
        LOG.info("Received SelectModelEvent, customer: " + page3EO.getCustomer());
    }
    else if ( event.getPayload() instanceof AjaxRequestTarget )
    {
        AjaxRequestTarget target = ( ( AjaxRequestTarget ) event.getPayload() );
        LOG.info( ".onEvent AjaxRequestTarget: " + target.toString() );
        target.add( editForm );
    }
}
 
开发者ID:shawnmckinney,项目名称:fortressdemo2,代码行数:18,代码来源:Page3.java


注:本文中的org.apache.wicket.event.IEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。