Package com.astamuse.asta4d.web.dispatch.response.provider

Examples of com.astamuse.asta4d.web.dispatch.response.provider.Asta4DPageProvider


public class SpringWebPageViewResolver implements ViewResolver {

    @Override
    public View resolveViewName(String viewName, Locale locale) throws Exception {
        try {
            return new SpringWebPageView(new Asta4DPageProvider(Page.buildFromPath(viewName)));
        } catch (TemplateException e) {
            return null;
        }
    }
View Full Code Here


                try {
                    Page page = Page.buildFromPath(result.toString());
                    if (page == null) {
                        return new TemplateNotFoundException(result.toString());
                    } else {
                        Asta4DPageProvider provider = DeclareInstanceUtil.createInstance(Asta4DPageProvider.class);
                        provider.setPage(page);
                        return provider;
                    }
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
View Full Code Here

public class String2Asta4DPageTransformer implements ResultTransformer {

    @Override
    public Object transformToContentProvider(Object result) {
        if (result instanceof String) {
            Asta4DPageProvider provider = DeclareInstanceUtil.createInstance(Asta4DPageProvider.class);
            provider.setPath(result.toString());
            return provider;
        } else {
            return null;
        }
    }
View Full Code Here

        return this.forward(result, asta4dPageTransformer.transformToContentProvider(targetPath));
    }

    public HandyRuleWithForward forward(Object result, String targetPath, int status) {
        HeaderInfoProvider header = (HeaderInfoProvider) headerTransformer.transformToContentProvider(new HeaderInfo(status));
        Asta4DPageProvider page = (Asta4DPageProvider) asta4dPageTransformer.transformToContentProvider(targetPath);
        SerialProvider sp = new SerialProvider(header, page);
        return this.forward(result, sp);
    }
View Full Code Here

public class Asta4DPageTransformer implements ResultTransformer {

    @Override
    public Object transformToContentProvider(Object result) {
        if (result instanceof Page) {
            Asta4DPageProvider provider = DeclareInstanceUtil.createInstance(Asta4DPageProvider.class);
            provider.setPage((Page) result);
            return provider;
        } else {
            return null;
        }
    }
View Full Code Here

                try {
                    Page page = Page.buildFromPath(result.toString());
                    if (page == null) {
                        return new TemplateNotFoundException(result.toString());
                    } else {
                        Asta4DPageProvider provider = DeclareInstanceUtil.createInstance(Asta4DPageProvider.class);
                        provider.setPage(page);
                        return provider;
                    }
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
View Full Code Here

public class SpringWebPageViewResolver implements ViewResolver {

    @Override
    public View resolveViewName(String viewName, Locale locale) throws Exception {
        try {
            return new SpringWebPageView(new Asta4DPageProvider(viewName));
        } catch (TemplateException e) {
            return null;
        }
    }
View Full Code Here

TOP

Related Classes of com.astamuse.asta4d.web.dispatch.response.provider.Asta4DPageProvider

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.