/** * Registers a single component as being AJAX capable. * * @param targetId the component to register. The component will be re-painted when the trigger occurs. * @param triggerId the id of the trigger that will cause the component to be painted. * @return the AjaxOperation control configuration object. */ public static AjaxOperation registerComponent(final String targetId, final String triggerId) { AjaxOperation operation = new AjaxOperation(triggerId, targetId); registerAjaxOperation(operation); return operation; }
/** * Registers one or more components as being AJAX capable. * * @param targetIds the components to register. Each component will be re-painted when the trigger occurs. * @param triggerId the id of the trigger that will cause the components to be painted. * @return the AjaxOperation control configuration object. */ public static AjaxOperation registerComponents(final List<String> targetIds, final String triggerId) { AjaxOperation operation = new AjaxOperation(triggerId, targetIds); registerAjaxOperation(operation); return operation; }
/** * This internal method is used to register an arbitrary target container. It must only used by components which * contain implicit AJAX capability. * * @param triggerId the id of the trigger that will cause the component to be painted. * @param containerId the target container id. This is not necessarily a WComponent id. * @param containerContentId the container content. * @return the AjaxOperation control configuration object. */ static AjaxOperation registerContainer(final String triggerId, final String containerId, final String containerContentId) { AjaxOperation operation = new AjaxOperation(triggerId, containerContentId); operation.setTargetContainerId(containerId); operation.setAction(AjaxOperation.AjaxAction.REPLACE_CONTENT); registerAjaxOperation(operation); return operation; }
/** * This internal method is used to register an arbitrary target container. It must only used by components which * contain implicit AJAX capability. * * @param triggerId the id of the trigger that will cause the component to be painted. * @param containerId the target container id. This is not necessarily a WComponent id. * @param containerContentIds the container content. * @return the AjaxOperation control configuration object. */ static AjaxOperation registerContainer(final String triggerId, final String containerId, final List<String> containerContentIds) { AjaxOperation operation = new AjaxOperation(triggerId, containerContentIds); operation.setTargetContainerId(containerId); operation.setAction(AjaxOperation.AjaxAction.REPLACE_CONTENT); registerAjaxOperation(operation); return operation; }