org.apache.struts.util

Class LabelValueBean

Implemented Interfaces:
Serializable

public class LabelValueBean
extends java.lang.Object
implements Serializable

A simple JavaBean to represent label-value pairs. This is most commonly used when constructing user interface elements which have a label to be displayed to the user, and a corresponding value to be returned to the server. One example is the <html:options> tag.

Version:
$Revision: 1.2 $ $Date: 2002/03/12 06:30:56 $

Authors:
Craig R. McClanahan
Martin F N Cooper

Field Summary

private String
label
The property which supplies the option label visible to the end user.
private String
value
The property which supplies the value returned to the server.

Constructor Summary

LabelValueBean(String label, String value)
Construct an instance with the supplied property values.

Method Summary

String
getLabel()
String
getValue()
void
setLabel(String label)
void
setValue(String value)
String
toString()
Return a string representation of this object.

Field Details

label

private String label
The property which supplies the option label visible to the end user.


value

private String value
The property which supplies the value returned to the server.

Constructor Details

LabelValueBean

public LabelValueBean(String label,
                      String value)
Construct an instance with the supplied property values.

Parameters:
label - The label to be displayed to the user.
value - The value to be returned to the server.

Method Details

getLabel

public String getLabel()


getValue

public String getValue()


setLabel

public void setLabel(String label)


setValue

public void setValue(String value)


toString

public String toString()
Return a string representation of this object.


Copyright B) 2000-2005 - Apache Software Foundation