|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.jsfunit.jsfsession.JSFServerSession
public class JSFServerSession
The JSFServerSession provides a simplified API that wraps parts of the JSF API for things that you would commonly do in testing.
Method Summary | |
---|---|
void |
afterRequest(com.gargoylesoftware.htmlunit.WebResponse webResponse)
This is called after the request is over. |
void |
beforeRequest(com.gargoylesoftware.htmlunit.WebRequest webRequest)
This is called before HtmlUnit makes a request to the server. |
javax.faces.component.UIComponent |
findComponent(String componentID)
Find a component in the JSF component tree. |
ClientIDs |
getClientIDs()
Get the immutable ClientIDs object. |
Object |
getComponentValue(String componentID)
Find a component in the JSF component tree and return its value. |
String |
getCurrentViewID()
Return the current view ID from the component tree. |
javax.faces.context.FacesContext |
getFacesContext()
Get the FacesContext object used in the last request. |
Iterator<javax.faces.application.FacesMessage> |
getFacesMessages()
Return all the FacesMessages generated with the last JSF request. |
Iterator<javax.faces.application.FacesMessage> |
getFacesMessages(String componentID)
Return all the FacesMessages generated for a component in the last JSF request. |
Object |
getManagedBeanValue(String elExpression)
Evaluate an EL ValueExpression and return the value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public ClientIDs getClientIDs()
ClientIDs
public String getCurrentViewID()
public javax.faces.context.FacesContext getFacesContext()
public javax.faces.component.UIComponent findComponent(String componentID)
componentID
- The JSF component ID or client ID suffix.
ComponentIDNotFoundException
- if the component can not be found
DuplicateClientIDException
- if more than one client ID matches the componentID suffixpublic Object getComponentValue(String componentID)
componentID
- The JSF component ID or client ID suffix.
ComponentIDNotFoundException
- if the component can not be found
DuplicateClientIDException
- if more than one client ID matches the componentID suffix
ClassCastException
- if the found component does not implement ValueHolderpublic Object getManagedBeanValue(String elExpression)
elExpression
- The expression.
null
if the managed bean is
request, session, or application scope and does not yet exist.public Iterator<javax.faces.application.FacesMessage> getFacesMessages()
componentID
- The JSF component ID or client ID suffix.
public Iterator<javax.faces.application.FacesMessage> getFacesMessages(String componentID)
componentID
- The JSF component ID or client ID suffix.
ComponentIDNotFoundException
- if the component can not be found
DuplicateClientIDException
- if more than one client ID matches the componentID suffixpublic void beforeRequest(com.gargoylesoftware.htmlunit.WebRequest webRequest)
RequestListener
beforeRequest
in interface RequestListener
webRequest
- The settings for the request.public void afterRequest(com.gargoylesoftware.htmlunit.WebResponse webResponse)
RequestListener
afterRequest
in interface RequestListener
webResponse
- The response, or null
if the request
threw an IOException.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |