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

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

Go to download

DWR is easy Ajax for Java. It makes it simple to call Java code directly from Javascript. It gets rid of almost all the boiler plate code between the web browser and your Java code.

The newest version!
package org.directwebremoting.webwork;

/**
 * Default implementation of AjaxTextResult
 *
 * @author Alexandru Popescu
 */
public class DefaultAjaxTextResult implements AjaxTextResult
{
    private String 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)
    {
        this.text = text;
    }

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

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

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy