org.wicketstuff.yui.helper
Class NameValuePair<T>

java.lang.Object
  extended by org.wicketstuff.yui.helper.TokenSeparatedValues
      extended by org.wicketstuff.yui.helper.NameValuePair<T>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CSSInlineStyle, JSObject

public abstract class NameValuePair<T>
extends TokenSeparatedValues

This is the abstract class that helps to generate the notations for name pairs 1. Inline Styles. eg. padding:1px ; color:#FF0000; 2. Javscript Objects. eg. {name:"josh" , age : "44"} as both are the same thing except it is used at different points (1) in "style=" and (2) in javascript this abstract class handles the basic concatenation of these name/value pairs and generate the "dhtml"

Author:
josh
See Also:
Serialized Form

Constructor Summary
NameValuePair()
          construct
 
Method Summary
 T add(NameValuePair another)
           
 T add(String element, int int_value)
           
 T add(String element, Object object)
           
abstract  String getNameValueSeparator()
           
 List<String> getValues()
          allow child to quote
 boolean isValid(String key, Object value)
           
protected  String wrapValue(String value)
           
 
Methods inherited from class org.wicketstuff.yui.helper.TokenSeparatedValues
getPrefix, getSuffix, getValueSeparator, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NameValuePair

public NameValuePair()
construct

Method Detail

add

public T add(String element,
             Object object)
Parameters:
element -

add

public T add(NameValuePair another)

add

public T add(String element,
             int int_value)
Parameters:
element -
int_value -
Returns:

getValues

public List<String> getValues()
Description copied from class: TokenSeparatedValues
allow child to quote

Specified by:
getValues in class TokenSeparatedValues
Returns:

isValid

public boolean isValid(String key,
                       Object value)

getNameValueSeparator

public abstract String getNameValueSeparator()
Returns:

wrapValue

protected String wrapValue(String value)


Copyright © 2013. All Rights Reserved.