Package org.pentaho.platform.uifoundation.component

Examples of org.pentaho.platform.uifoundation.component.ActionComponent


    ArrayList messages = new ArrayList();
    SimpleParameterProvider parameterProvider = new SimpleParameterProvider();
    parameterProvider.setParameter( "solution", "test" ); //$NON-NLS-1$ //$NON-NLS-2$
    parameterProvider.setParameter( "path", "reporting" ); //$NON-NLS-1$ //$NON-NLS-2$
    parameterProvider.setParameter( "action", "JFree_XQuery_Chart_report.xaction" ); //$NON-NLS-1$ //$NON-NLS-2$
    ActionComponent component =
        new ActionComponent(
            "samples/reporting/JFree_XQuery_Chart_report.xaction", null, IOutputHandler.OUTPUT_TYPE_DEFAULT, urlFactory, messages ); //$NON-NLS-1$
    component.setParameterProvider( IParameterProvider.SCOPE_REQUEST, parameterProvider );
    StandaloneSession session =
        new StandaloneSession( Messages.getInstance().getString( "BaseTest.DEBUG_JUNIT_SESSION" ) ); //$NON-NLS-1$
    component.validate( session, null );
    OutputStream outputStream = getOutputStream( "ReportingTest.testJFreeReportWithChartActionComponent", ".html" ); //$NON-NLS-1$ //$NON-NLS-2$
    String content = component.getContent( "text/html" ); //$NON-NLS-1$
    try {
      outputStream.write( content.getBytes() );
    } catch ( Exception e ) {
      //ignore
    }
View Full Code Here


    ArrayList messages = new ArrayList();
    SimpleParameterProvider parameterProvider = new SimpleParameterProvider();
    parameterProvider.setParameter( "solution", "test" ); //$NON-NLS-1$ //$NON-NLS-2$
    parameterProvider.setParameter( "path", "chartbeans" ); //$NON-NLS-1$ //$NON-NLS-2$
    parameterProvider.setParameter( "action", "Chartbeans_All_Inclusive_OFC.xaction" ); //$NON-NLS-1$ //$NON-NLS-2$
    ActionComponent component =
        new ActionComponent(
            "test/chartbeans/Chartbeans_All_Inclusive_OFC.xaction", null, IOutputHandler.OUTPUT_TYPE_DEFAULT, urlFactory, messages ); //$NON-NLS-1$
    component.setParameterProvider( IParameterProvider.SCOPE_REQUEST, parameterProvider );
    component.validate( session, null );
    OutputStream outputStream = getOutputStream( "Chartbeans.testChartbeansAllInclusive_OFC", ".html" ); //$NON-NLS-1$ //$NON-NLS-2$

    String result = component.getContent( "text/html" ); //$NON-NLS-1$

    try {
      outputStream.write( result.getBytes() );

      assertTrue( result.startsWith( "<html><head>" ) ); //$NON-NLS-1$
View Full Code Here

    ArrayList messages = new ArrayList();
    SimpleParameterProvider parameterProvider = new SimpleParameterProvider();
    parameterProvider.setParameter( "solution", "test" ); //$NON-NLS-1$ //$NON-NLS-2$
    parameterProvider.setParameter( "path", "reporting" ); //$NON-NLS-1$ //$NON-NLS-2$
    parameterProvider.setParameter( "action", "custom-parameter-page-example.xaction" ); //$NON-NLS-1$ //$NON-NLS-2$
    ActionComponent component =
        new ActionComponent(
            "test/reporting/custom-parameter-page-example.xaction", null, IOutputHandler.OUTPUT_TYPE_DEFAULT, urlFactory, messages ); //$NON-NLS-1$
    component.setParameterProvider( IParameterProvider.SCOPE_REQUEST, parameterProvider );
    StandaloneSession session =
        new StandaloneSession( Messages.getInstance().getString( "BaseTest.DEBUG_JUNIT_SESSION" ) ); //$NON-NLS-1$
    component.validate( session, null );
    OutputStream outputStream = getOutputStream( "ReportingTest.testActionComponent", ".html" ); //$NON-NLS-1$ //$NON-NLS-2$
    String content = component.getContent( "text/html" ); //$NON-NLS-1$
    try {
      outputStream.write( content.getBytes() );
    } catch ( Exception e ) {
      //ignore
    }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.uifoundation.component.ActionComponent

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.