if(
domLevel == null ||
domLevel == TrinidadAgent.DOM_CAP_NONE ||
domLevel == TrinidadAgent.DOM_CAP_FORM)
{
FormData formData = rc.getFormData();
if(formData != null)
{
boolean isPIE = Agent.PLATFORM_PPC.equalsIgnoreCase(
rc.getAgent().getPlatformName());
// =-=AdamWiner: this isn't correct - these
// parameters should be added by the components that need
// them, not globally by the form control
if (isPIE)
{
formData.addNeededValue(XhtmlConstants.SOURCE_PARAM);
formData.addNeededValue(XhtmlConstants.EVENT_PARAM);
formData.addNeededValue(XhtmlConstants.PARTIAL_TARGETS_PARAM);
formData.addNeededValue(XhtmlConstants.PARTIAL_PARAM);
// In the case of Windows-mobile(WM) browsers, store the value of
// the request-header field, UA-pixels, into a hidden-parameter's
// value attribute. WM browsers' PPRs don't contain UA-pixels in
// their request-headers. So during a WM browser's PPR, we need to
// manually (using JavaScript) set the field, UA-pixels, into
// the request-header with the hidden parameter's value.
Map<String, String> headerMap =
context.getExternalContext().getRequestHeaderMap();
_renderHiddenField(writer,
XhtmlConstants.WINDOWS_MOBILE_UAPIXELS,
headerMap.get("UA-pixels"));
}
else
{
formData.addNeededValue(XhtmlConstants.SOURCE_PARAM);
formData.addNeededValue(XhtmlConstants.EVENT_PARAM);
}
}
}
_renderNeededValues(context, rc);