com.sdm.quasar.client.jsf.dialog
Class PostParameters

java.lang.Object
  extended bycom.sdm.quasar.client.jsf.dialog.PostParameters

public class PostParameters
extends java.lang.Object

Simple helper class to collect post parameters for a request and add them as hidden fields to a response or as token, thas my be added to a link or view id. Here it is used to add the dialog identifying parameters (dialog id and dialog instance id) or the sequence number to the hidden fields of a form.


Constructor Summary
protected PostParameters()
          Protected Constructor.
 
Method Summary
 java.lang.String getPostParameters(java.lang.String key)
           
 java.util.Map getPostParametersMap()
           
 void putPostParameter(java.lang.String key, java.lang.String value)
          Add a new post parameter or change an existing.
static void writeHiddenField(UIComponent component, ResponseWriter writer, java.lang.String key, java.lang.String value)
          Writes a key value pair to the given writer of a response as hidden field.
 void writePostParameters(UIComponent component, ResponseWriter writer)
          Writes all post parameters of this to the given writer of a response as hidden fields.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostParameters

protected PostParameters()
Protected Constructor. PostParameters are added to every request and can be obtained from a RequestDataService.

Method Detail

getPostParametersMap

public java.util.Map getPostParametersMap()
Returns:
the HashMap with collected the post parameter

getPostParameters

public java.lang.String getPostParameters(java.lang.String key)
Parameters:
key - the key for a post parameter
Returns:
the value of the post parameter

putPostParameter

public void putPostParameter(java.lang.String key,
                             java.lang.String value)
Add a new post parameter or change an existing.

Parameters:
key - the key for a post parameter
value - the new value for the post parameter

writePostParameters

public void writePostParameters(UIComponent component,
                                ResponseWriter writer)
                         throws java.io.IOException
Writes all post parameters of this to the given writer of a response as hidden fields.

Throws:
java.io.IOException

writeHiddenField

public static void writeHiddenField(UIComponent component,
                                    ResponseWriter writer,
                                    java.lang.String key,
                                    java.lang.String value)
                             throws java.io.IOException
Writes a key value pair to the given writer of a response as hidden field.

Throws:
java.io.IOException