Package org.apache.tapestry5.runtime

Examples of org.apache.tapestry5.runtime.Component


        return coreResources.getLogger();
    }

    public Component getMixinByClassName(String mixinClassName)
    {
        Component result = mixinForClassName(mixinClassName);

        if (result == null)
            throw new TapestryException(StructureMessages.unknownMixin(completeId, mixinClassName), getLocation(), null);

        return result;
View Full Code Here


        this.validatorMacro = validatorMacro;
    }

    public FieldValidator createValidator(Field field, String validatorType, String constraintValue)
    {
        Component component = (Component) field;
        assert InternalUtils.isNonBlank(validatorType);
        ComponentResources componentResources = component.getComponentResources();
        String overrideId = componentResources.getId();

        // So, if you use a TextField on your EditUser page, we want to search the messages
        // of the EditUser page (the container), not the TextField (which will always be the same).
View Full Code Here

            // Add all the normal components to the final list.

            while (i.hasNext())
            {
                Component mixin = i.next();

                if (mixin.getComponentResources().getComponentModel().isMixinAfter()) continue;

                ordered.add(mixin);

                // Remove from list, leaving just the late executing mixins
View Full Code Here

        return coreResources.getLogger();
    }

    public Component getMixinByClassName(String mixinClassName)
    {
        Component result = null;

        if (mixinIdToComponentResources != null)
        {
            for (InternalComponentResources resources : mixinIdToComponentResources.values())
            {
View Full Code Here

        {
            logger.debug("Processing actions: {}", actionsBase64);

            ObjectInputStream ois = null;

            Component component = null;

            try
            {
                ois = new Base64ObjectInputStream(actionsBase64);

                while (true)
                {
                    String componentId = ois.readUTF();
                    ComponentAction action = (ComponentAction) ois.readObject();

                    component = source.getComponent(componentId);

                    logger.debug("Processing: {} {}", componentId, action);

                    action.execute(component);

                    component = null;
                }
            }
            catch (EOFException ex)
            {
                // Expected
            }
            catch (Exception ex)
            {
                Location location = component == null ? null : component.getComponentResources().getLocation();

                throw new TapestryException(ex.getMessage(), location, ex);
            }
            finally
            {
View Full Code Here

    {
        FileUploadException uploadException = decoder.getUploadException();

        if (uploadException != null)
        {
            Component page = componentSource.getPage(parameters.getActivePageName());

            ComponentResultProcessorWrapper callback = new ComponentResultProcessorWrapper(resultProcessor);

            page.getComponentResources().triggerEvent(UploadEvents.UPLOAD_EXCEPTION, new Object[] { uploadException },
                                                      callback);

            // If an event handler exists and returns a value, then the callback will be aborted and a response
            // (typically a redirect) will already have been sent to the client.
View Full Code Here

    @Test
    public void root_element_of_page()
    {
        RequestPageCache cache = mockRequestPageCache();
        Page page = mockPage();
        Component component = mockComponent();
        ComponentClassResolver resolver = mockComponentClassResolver();

        train_get(cache, PAGE_NAME, page);

        train_getRootComponent(page, component);
View Full Code Here

    public void nested_element_within_page()
    {
        RequestPageCache cache = mockRequestPageCache();
        Page page = mockPage();
        ComponentPageElement element = mockComponentPageElement();
        Component component = mockComponent();
        ComponentClassResolver resolver = mockComponentClassResolver();

        train_get(cache, PAGE_NAME, page);

        train_getComponentElementByNestedId(page, NESTED_ELEMENT_ID, element);
View Full Code Here

    @Test
    public void get_page_by_logical_name()
    {
        RequestPageCache cache = mockRequestPageCache();
        Page page = mockPage();
        Component component = mockComponent();
        ComponentClassResolver resolver = mockComponentClassResolver();

        train_get(cache, PAGE_NAME, page);
        train_getRootComponent(page, component);
View Full Code Here

    @Test
    public void get_page_by_class()
    {
        RequestPageCache cache = mockRequestPageCache();
        Page page = mockPage();
        Component component = mockComponent();
        ComponentClassResolver resolver = mockComponentClassResolver();

        train_resolvePageClassNameToPageName(resolver, ComponentSourceImplTest.class.getName(), PAGE_NAME);

        train_get(cache, PAGE_NAME, page);
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.runtime.Component

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.