/**
* Choose a RenderKit for the current request.
*/
static public String chooseRenderKit(FacesContext context)
{
RequestContext afc = RequestContext.getCurrentInstance();
// According to the spec FacesContext can be null.
// In that case RequestContext could also be null.
// bug 4695929:
if (afc != null)
{
// TODO: Obviously, this cheesy algorithm is not quite enough!
Agent agent = afc.getAgent();
if (Agent.TYPE_PDA.equals(agent.getType()))
return "org.apache.myfaces.trinidad.core.pda";
}
return "org.apache.myfaces.trinidad.core.desktop";
}