Package org.apache.ecs

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


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

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

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

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

            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

                                              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

        }
       
        if (result == null)
        {
            result = new StringElement("Error retrieving Portal Page: " + msg);
        }

        return result;
    }
View Full Code Here

                    Entry entry = doc.getEntryById(id);
                    if (null == entry)
                    {
                        // FIXME: need to write this function
                        // Portlets ps = doc.getPortletsById(id);
                        result = new  StringElement("not implemented - PortletElement");
                    }
                    else
                    {
                        Portlet p = PortletFactory.getPortlet( entry );
                        if (p != null)
                        {
                            result = p.getContent(rundata);
                        }
                        else
                           result = new  StringElement("Error retrieving PortletElement");

                    }
                }               
            }
            catch (Exception e)
            {
                logger.error("Exception",  e);
            }
        }
       
        if (result == null)
        {
            result = new StringElement("Error fetching pane");
        }

        return result;

    }
View Full Code Here

            //save the portlet markup after you have made the changes.
            this.getContentMarkup( this.getURL( provider ) ).save();

        } catch ( Throwable t ) {
            logger.error("Throwable", t);
            return new StringElement( "Can't use this provider: " + t.getMessage() );
        }
       
        ec.addElement( "Your article '" + title + "' has been posted within '" + topic + "'" );
       
        return ec;
View Full Code Here

        Content content = null;
        try {
            content = this.getContentMarkup( this.getURL( provider ) ).getContent();
        } catch ( Exception e ) {
            logger.error("Exception",  e);
            return new StringElement( "Can't use this provider: " + e.getMessage() );
        }
       
        Select select = new Select();
        select.setName( "topic" );
View Full Code Here

            return content;

        } catch ( Throwable t ) {
            logger.error("Throwable",  t);
            return new StringElement( t.getMessage() );
        }

    }
View Full Code Here

TOP

Related Classes of org.apache.ecs.StringElement

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.