Package org.apache.velocity.context

Examples of org.apache.velocity.context.Context


     * @exception Exception, a generic exception.
     */
    public ConcreteElement buildTemplate(RunData data)
            throws Exception
    {
        Context context = TurbineVelocity.getContext(data);

        String navigationTemplate = data.getTemplateInfo().getNavigationTemplate();
        String templateName
                = TurbineTemplate.getNavigationTemplateName(navigationTemplate);

View Full Code Here


     *
     * @return A Context object.
     */
    public Context getContext()
    {
        Context globalContext =
                pullModelActive ? pullService.getGlobalContext() : null;

        Context ctx = new VelocityContext(globalContext);
        return ctx;
    }
View Full Code Here

     *
     * @return A Context Object.
     */
    public Context getNewContext()
    {
        Context ctx = new VelocityContext();

        // Attach an Event Cartridge to it, so we get exceptions
        // while invoking methods from the Velocity Screens
        EventCartridge ec = new EventCartridge();
        ec.addEventHandler(this);
View Full Code Here

     */
    public Context getContext(RunData data)
    {
        // Attempt to get it from the data first.  If it doesn't
        // exist, create it and then stuff it into the data.
        Context context = (Context)
            data.getTemplateInfo().getTemplateContext(VelocityService.CONTEXT);

        if (context == null)
        {
            context = getContext();
            context.put(VelocityService.RUNDATA_KEY, data);

            if (pullModelActive)
            {
                // Populate the toolbox with request scope, session scope
                // and persistent scope tools (global tools are already in
View Full Code Here

  public boolean hasLine() {
    return _quadro != null;
  }

  public String getCodeImpl() throws Exception {
    Context context = new VelocityContext();
    context.put("quadro", _quadro);
    context.put("impresso", _impresso);


    StringWriter writer = new StringWriter();
    try {
      Velocity.init();
View Full Code Here

    /**
     * Obt�m o source code java, j� rendered que cont�m as valida��es deste validator.
     */
    public String getValidationCode() throws Exception {

        Context context = new VelocityContext();
        context.put("field", _field);

        return getValidationCodeImpl(context);
    }
View Full Code Here

        return getValidationCodeImpl(context);
    }
   public String getValidationCodeDecl() throws Exception {

        Context context = new VelocityContext();
        context.put("field", _field);

        return getValidationCodeImplDecl(context);
    }
View Full Code Here

        return getValidationCodeImplDecl(context);
    }
   public String getValidationCodeLoad() throws Exception {

        Context context = new VelocityContext();
        context.put("field", _field);

        return getValidationCodeImplLoad(context);
    }
View Full Code Here

        return getValidationCodeImplLoad(context);
    }
   public String getValidationCodeVal() throws Exception {

        Context context = new VelocityContext();
        context.put("field", _field);

        return getValidationCodeImplVal(context);
    }
View Full Code Here

     *
     * @return A Context object.
     */
    public Context getContext()
    {
        Context globalContext =
                pullModelActive ? pullService.getGlobalContext() : null;

        Context ctx = new VelocityContext(globalContext);
        return ctx;
    }
View Full Code Here

TOP

Related Classes of org.apache.velocity.context.Context

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.