
org.directwebremoting.webwork.DefaultAjaxTextResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dwr Show documentation
Show all versions of dwr Show documentation
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.
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