org.jboss.jsfunit.richclient
Class RichFacesClient

java.lang.Object
  extended by org.jboss.jsfunit.richclient.RichFacesClient

public class RichFacesClient
extends Object

This class provides helper methods for RichFaces controls.

Since:
1.0
Author:
Stan Silvert

Constructor Summary
RichFacesClient(JSFClientSession jsfClient)
           
 
Method Summary
 void clickInputNumberSpinnerDown(String componentID)
          Click the down arrow on an InputNumberSpinner.
 void clickInputNumberSpinnerUp(String componentID)
          Click the up arrow on an InputNumberSpinner.
 void clickTab(String tabComponentID)
          Click a tab on a TabPanel.
 void clickTreeNodeHandle(String treeNodeKey, String treeNodeId)
          Click this handle icon for a node in a RichTree in order to toggle the open/closed state.
 void setCalendarValue(String componentID, String value)
          Set a parameter value on a RichCalendar component.
 void setComboBox(String componentID, String value)
          Set a parameter value on a RichComboBox component.
 void setDataFilterSlider(String componentID, String value)
          Set a parameter value on a DataFilterSlider.
 void setInplaceInput(String componentID, String value)
          Set the value of a RichInplaceInput component.
 void setInplaceInput(String componentID, String value, String customSaveID)
          Set the value of a RichInplaceInput component.
 void setInputNumberSlider(String componentID, String value)
          Set the value of an InputNumberSlider.
 void setInputNumberSpinner(String componentID, String value)
          Set the value of an InputNumberSpinner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RichFacesClient

public RichFacesClient(JSFClientSession jsfClient)
Method Detail

setDataFilterSlider

public void setDataFilterSlider(String componentID,
                                String value)
Set a parameter value on a DataFilterSlider.

Parameters:
componentID - The JSF component ID or a suffix of the client ID.
value - The value to set before the form is submitted.
Throws:
ComponentIDNotFoundException - if the component can not be found
DuplicateClientIDException - if more than one client ID matches the componentID suffix

setCalendarValue

public void setCalendarValue(String componentID,
                             String value)
                      throws IOException
Set a parameter value on a RichCalendar component.

Parameters:
componentID - The JSF component ID or a suffix of the client ID.
value - The value to set before the form is submitted.
Throws:
ComponentIDNotFoundException - if the component can not be found
DuplicateClientIDException - if more than one client ID matches the componentID suffix
IOException

setInplaceInput

public void setInplaceInput(String componentID,
                            String value,
                            String customSaveID)
                     throws IOException
Set the value of a RichInplaceInput component.

Parameters:
componentID - The JSF component ID or a suffix of the client ID.
value - The value to set
customSaveID - The JSF component ID or a suffix of a custom save button (null if not used)
Throws:
IOException

setInplaceInput

public void setInplaceInput(String componentID,
                            String value)
                     throws IOException
Set the value of a RichInplaceInput component. This method is used when a custom save button is not needed.

Parameters:
componentID - The JSF component ID or a suffix of the client ID.
value - The value to set
Throws:
IOException

clickTreeNodeHandle

public void clickTreeNodeHandle(String treeNodeKey,
                                String treeNodeId)
                         throws IOException
Click this handle icon for a node in a RichTree in order to toggle the open/closed state. In order to use this you will need the key value of the node (from the tree data) and the id="" attribute value from the rich:treeNode template declaration.

Parameters:
treeNodeKey - key value for the node to reference
treeNodeId - id of the treeNode template
Throws:
IOException
ComponentIDNotFoundException - if the component can not be found

clickTab

public void clickTab(String tabComponentID)
              throws IOException
Click a tab on a TabPanel. Note that this method is a no-op if the tab is in a disabled state or if the TabPanel is in client mode. In client mode, the tab click does not generate an ajax submit but only changes the visible tab already present on the client. JSFUnit does not currently deal with these kinds of "client only" operations.

Parameters:
tabPanelComponentID - The JSF component ID or a suffix of the client ID for the rich:tabPanel component.
tabPanelComponentID - The JSF component ID or a suffix of the client ID for the rich:tab component.
Throws:
IOException - if there is a problem submitting the form
ComponentIDNotFoundException - if the component can not be found
DuplicateClientIDException - if more than one client ID matches the componentID suffix

setComboBox

public void setComboBox(String componentID,
                        String value)
                 throws IOException
Set a parameter value on a RichComboBox component.

Parameters:
componentID - The JSF component ID or a suffix of the client ID.
value - The value to set before the form is submitted.
Throws:
IOException - if there is a problem submitting the form
ComponentIDNotFoundException - if the component can not be found
DuplicateClientIDException - if more than one client ID matches the componentID suffix

setInputNumberSpinner

public void setInputNumberSpinner(String componentID,
                                  String value)
                           throws IOException
Set the value of an InputNumberSpinner.

Parameters:
componentID - The JSF component ID or a suffix of the client ID.
value - The value to set before the form is submitted.
Throws:
IOException - if an internal refresh is needed and there is an error sending a request to the server.
DuplicateClientIDException - if more than one client ID matches the suffix
ClassCastException - if the current page is not an HtmlPage.

clickInputNumberSpinnerUp

public void clickInputNumberSpinnerUp(String componentID)
                               throws IOException
Click the up arrow on an InputNumberSpinner.

Parameters:
componentID - The JSF component ID or a suffix of the client ID.
Throws:
IOException - if an internal refresh is needed and there is an error sending a request to the server.
DuplicateClientIDException - if more than one client ID matches the suffix
ClassCastException - if the current page is not an HtmlPage.

clickInputNumberSpinnerDown

public void clickInputNumberSpinnerDown(String componentID)
                                 throws IOException
Click the down arrow on an InputNumberSpinner.

Parameters:
componentID - The JSF component ID or a suffix of the client ID.
Throws:
IOException - if an internal refresh is needed and there is an error sending a request to the server.
DuplicateClientIDException - if more than one client ID matches the suffix
ClassCastException - if the current page is not an HtmlPage.

setInputNumberSlider

public void setInputNumberSlider(String componentID,
                                 String value)
                          throws IOException
Set the value of an InputNumberSlider.

Parameters:
componentID - The JSF component ID or a suffix of the client ID.
value - The value to set before the form is submitted.
Throws:
IOException - if an internal refresh is needed and there is an error sending a request to the server.
DuplicateClientIDException - if more than one client ID matches the suffix
ClassCastException - if the current page is not an HtmlPage.


Copyright © 2007-2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.