All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.directwebremoting.webwork.DefaultAjaxTextResult Maven / Gradle / Ivy

package org.directwebremoting.webwork;

/**
 * Default implementation of AjaxTextResult
 *
 * @author Alexandru Popescu
 */
public class DefaultAjaxTextResult implements AjaxTextResult
{
    private String m_text;

    /**
     * Empty constructor.
     *
     * @see #setText
     */
    public DefaultAjaxTextResult()
    {
    }

    /**
     * Creates an DefaultAjaxTextResult wrapping the given string.
     *
     * @param text the string to be wrapped
     */
    public DefaultAjaxTextResult(String text)
    {
        m_text = text;
    }

    /**
     * @see org.directwebremoting.webwork.AjaxTextResult#getText()
     */
    public String getText()
    {
        return m_text;
    }

    /**
     * Sets the wrapped string.
     *
     * @param text the string to be wrapped in this result
     */
    public void setText(String text)
    {
        m_text = text;
    }

    /**
     * @see java.lang.Object#toString()
     */
    public String toString()
    {
        return "[AjaxTextResult: '" + m_text + "']";
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy