Interface IPartialPageRequestHandler

    • Method Detail

      • add

        void add​(Component... components)
        Adds components to the list of components to be rendered.
        Parameters:
        components - components to be rendered
      • addChildren

        void addChildren​(MarkupContainer parent,
                         Class<?> childCriteria)
        Visits all children of the specified parent container and adds them to the target if they are of same type as childCriteria
        Parameters:
        parent - Must not be null.
        childCriteria - Must not be null. If you want to traverse all components use ` Component.class as the value for this argument.
      • appendJavaScript

        void appendJavaScript​(CharSequence javascript)
        Add JavasSript that will be evaluated on the client side after components are replaced

        If the JavaScript needs to do something asynchronously (i.e. uses window.setTimeout(), for example to do animations), it may call Wicket.Ajax.suspendCall() to suspend the evaluation of the current Ajax call. The returned function has to be called when the asynchronous task is finished, after which the evaluation of the Ajax call is continued, e.g.

         target.appendJavaScript("var continueCall = Wicket.Ajax.suspendCall(); try { ... } finally { continueCall(); }");
         
        Important: it is recommended to execute your code in try/finally to make sure the function is executed even if an error happens in your code, otherwise all following scripts and component replacements wont be made.
        Parameters:
        javascript -
      • prependJavaScript

        void prependJavaScript​(CharSequence javascript)
        Add JavaScript that will be evaluated on the client side before components are replaced.

        If the JavaScript needs to do something asynchronously (i.e. uses window.setTimeout(), for example to do animations), it may call Wicket.Ajax.suspendCall() to suspend the evaluation of the current Ajax call. The returned function has to be called when the asynchronous task is finished, after which the evaluation of the Ajax call is continued, e.g.

         target.prependJavaScript("var continueCall = Wicket.Ajax.suspendCall(); try { ... } finally { continueCall(); }");
         
        Important: it is recommended to execute your code in try/finally to make sure the function is executed even if an error happens in your code, otherwise all following scripts and component replacements wont be made.
        Parameters:
        javascript -
      • focusComponent

        void focusComponent​(Component component)
        Sets the focus in the browser to the given component. The markup id must be set. If the component is null the focus will not be set to any component.
        Parameters:
        component - The component to get the focus or null.
      • getComponents

        Collection<? extends ComponentgetComponents()
        Returns an unmodifiable collection of all components added to this target
        Returns:
        unmodifiable collection of all components added to this target
      • getHeaderResponse

        IHeaderResponse getHeaderResponse()
        Returns the header response associated with current handler. Beware that only renderOnDomReadyJavaScript and renderOnLoadJavaScript can be called outside the renderHeader(IHeaderResponse response) method. Calls to other render** methods will result in the call failing with a debug-level log statement to help you see why it failed.
        Returns:
        header response