Examples of StringElement


Examples of org.apache.ecs.StringElement

            PortletWrapper wrapper = (PortletWrapper)portlet;
            if (!wrapper.getAllowView(rundata))
            {
                if (JetspeedResources.getBoolean("defaultportletcontrol.hide.decorator", true))
                {               
                    return new StringElement("");
                }
            }
        }

        // Create a new Velocity context and load default
        // application pull tools
        Context context = TurbineVelocity.getContext();
       
        context.put("data", rundata );
        context.put("actions", buildActionList( rundata, portlet ) );
        context.put("conf", getConfig() );
        context.put("skin", portlet.getPortletConfig().getPortletSkin() );

        // Put the request and session based contexts
        TurbinePull.populateContext(context, rundata);
       
        if ( portlet.getName().equals(jdata.getCustomized())
             && (!portlet.providesCustomization()) )
        {           
            context.put("portlet",JetspeedTool.getCustomizer(portlet));
            context.put("portlet_instance",JetspeedTool.getCustomizer(portlet));
        }
        else
        {
            context.put("portlet", portlet );
            if (PersistenceManager.getInstance(portlet, jdata) == null)
            {
              context.put("portlet_instance", portlet );
            }
            else
            {
              context.put("portlet_instance", PersistenceManager.getInstance(portlet, jdata) );
            }
        }
           
        // allow subclasses to add elements to the context
        buildContext( rundata, context );
       
        String theme = getConfig().getInitParameter("theme","default.vm");

        String s = "";
        try
        {
            String template = TemplateLocator.locateControlTemplate(rundata,theme);
            TurbineVelocity.handleRequest(context, template, rundata.getOut());
        }
        catch( Exception e )
        {
            logger.error( "Exception while creating content ", e );
            s = e.toString();
        }

        TurbineVelocity.requestFinished(context);

        return new StringElement( s );
    }
View Full Code Here

Examples of org.apache.ecs.StringElement

            {
                s= e.toString();
            }
        }

        return new StringElement( s );
    }
View Full Code Here

Examples of org.apache.ecs.StringElement

        catch( Exception e )
        {
            s = e.toString();
        }

        return new StringElement( s );
    }
View Full Code Here

Examples of org.apache.ecs.StringElement

    @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
    @version $Id: PollPortlet.java,v 1.3 2001/03/07 07:12:35 taylor Exp $
    */   
    private TD getColumn( String data ) {
       
        return getColumn( new StringElement( data ) );
       
    }
View Full Code Here

Examples of org.apache.ecs.StringElement

        default:
            text.append("MODE = UNKNOWN");
            break;
        }

        return (new StringElement(text.toString()));
    }
View Full Code Here

Examples of org.apache.ecs.StringElement

*/
public class HelloWorldPortlet extends AbstractInstancePortlet
{
    public ConcreteElement getContent (RunData runData)
    {
        return (new StringElement ("Hello World! #" + getID()));
    }
View Full Code Here

Examples of org.apache.ecs.StringElement

        if (name == null)
            name ="Anonymous";

        text.append (name);
        text.append ("!");
        return (new StringElement(text.toString()));
    }
View Full Code Here

Examples of org.apache.ecs.StringElement

            {
                uri = service.forward(data, this.name);
            }
            if (uri != null)
            {
                result = new StringElement(uri.toString());
            }

            // Output the result
            if (result != null)
            {
View Full Code Here

Examples of org.apache.ecs.StringElement

            try
            {
                String translation = this.tool.get(key, CustomLocalization.getLocale(data));
               
                translation = translation == null ? def : translation;
                result = new StringElement(translation);           
            }
            catch (Exception oe)
            {
                result = new StringElement(def);
                logger.error("Exception", oe);
            }

            // Output the result
            if (result != null)
View Full Code Here

Examples of org.apache.ecs.StringElement

                                              this.action == null ? "controls.Maximize" : this.action,
                                              null,
                                              baseLocator.getMediaType(),
                                              baseLocator.getLanguage(),
                                              baseLocator.getCountry());
                result = new StringElement(uri.toString());
                JetspeedLinkFactory.putInstance(link);
            }

            // Output the result
            if (result != null)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.