org.jboss.jsfunit.richfaces
Class RichFacesClient

java.lang.Object
  extended by org.jboss.jsfunit.richfaces.Ajax4jsfClient
      extended by org.jboss.jsfunit.richfaces.RichFacesClient

public class RichFacesClient
extends Ajax4jsfClient

When Ajax4jsf was merged into RichFaces, some classes were renamed and placed in different packages. Therefore, you need to use the RichFacesClient instead of Ajax4jsfClient if you use RichFaces 3.1 or later.

Author:
Stan Silvert

Field Summary
 
Fields inherited from class org.jboss.jsfunit.richfaces.Ajax4jsfClient
ajaxResponse, client, requestFactory
 
Constructor Summary
RichFacesClient(JSFClientSession client)
           
 
Method Summary
 void clickDataTableScroller(String componentID, int value)
          Click a value on a DataTableScroller.
 void clickDataTableScroller(String componentID, ScrollerControl control)
          Click an arrow (control) on a DataTableScroller.
 void clickPanelMenuItem(String componentID)
          Click a rich:panelMenuItem inside a rich:panelMenu.
 void clickTab(String tabPanelComponentID, String tabComponentID)
          Click a tab on a TabPanel.
 void dragAndDrop(String dragComponentID, String dropTargetComponentID)
          Drag a component with rich:dragSupport to a component with rich:dropSupport.
 void setCalendarValue(String componentID, String value)
          Set a parameter value on a RichCalendar component.
 void setDataFilterSlider(String componentID, String value)
          Set a parameter value on a DataFilterSlider.
 void setInputNumberSlider(String componentID, String value)
          Set the value of a InputNumberSlider.
 void setInputNumberSpinner(String componentID, String value)
          Set the value of an InputNumberSpinner.
 
Methods inherited from class org.jboss.jsfunit.richfaces.Ajax4jsfClient
addExtraA4JParams, addExtraUserParams, ajaxSubmit, ajaxSubmit, doAjaxRequest, getAjaxResponse, getContentType, restoreRowIndices, setRowIndicies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RichFacesClient

public RichFacesClient(JSFClientSession client)
Method Detail

setDataFilterSlider

public void setDataFilterSlider(String componentID,
                                String value)
                         throws SAXException
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:
SAXException - if the current response page can not be parsed
ComponentIDNotFoundException - if the component can not be found
DuplicateClientIDException - if more than one client ID matches the componentID suffix

setInputNumberSlider

public void setInputNumberSlider(String componentID,
                                 String value)
                          throws SAXException,
                                 IOException
Set the value of a 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:
SAXException - if the current response page can not be parsed
IOException - if an internal refresh is needed and there is an error sending a request to the server.
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 SAXException,
                                  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:
SAXException - if the current response page can not be parsed
IOException - if an internal refresh is needed and there is an error sending a request to the server.
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 SAXException,
                             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:
SAXException - if the current response page can not be parsed
ComponentIDNotFoundException - if the component can not be found
DuplicateClientIDException - if more than one client ID matches the componentID suffix
IOException

clickDataTableScroller

public void clickDataTableScroller(String componentID,
                                   int value)
                            throws SAXException,
                                   IOException
Click a value on a DataTableScroller.

Parameters:
componentID - The JSF component ID or a suffix of the client ID.
value - The number to click on the scroller.
Throws:
SAXException - if the current response page can not be parsed
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

clickDataTableScroller

public void clickDataTableScroller(String componentID,
                                   ScrollerControl control)
                            throws SAXException,
                                   IOException
Click an arrow (control) on a DataTableScroller.

Parameters:
componentID - The JSF component ID or a suffix of the client ID.
value - The control to click on the scroller.
Throws:
SAXException - if the current response page can not be parsed
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

clickPanelMenuItem

public void clickPanelMenuItem(String componentID)
                        throws SAXException,
                               IOException
Click a rich:panelMenuItem inside a rich:panelMenu.

Parameters:
componentID - The JSF component ID or a suffix of the client ID of the rich:panelMenuItem to be clicked.
Throws:
SAXException - if the current response page can not be parsed
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

dragAndDrop

public void dragAndDrop(String dragComponentID,
                        String dropTargetComponentID)
                 throws SAXException,
                        IOException
Drag a component with rich:dragSupport to a component with rich:dropSupport.

Parameters:
dragComponentID - The JSF component ID or a suffix of the client ID for the rich:dragSupport component.
dropTargetComponentID - The JSF component ID or a suffix of the client ID for the target rich:dropSupport component.
Throws:
SAXException - if the current response page can not be parsed
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

clickTab

public void clickTab(String tabPanelComponentID,
                     String tabComponentID)
              throws SAXException,
                     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:
SAXException - if the current response page can not be parsed
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


Copyright © 2007-2008 JBoss Inc.. All Rights Reserved.