@SuppressWarnings("unchecked")
protected void doDecode(FacesContext context, UIComponent component) {
super.doDecode(context, component);
AbstractPopupPanel panel = (AbstractPopupPanel) component;
ExternalContext exCtx = context.getExternalContext();
Map<String, String> rqMap = exCtx.getRequestParameterMap();
Object panelOpenState = rqMap.get(panel.getClientId(context) + "OpenedState");
if (panel.isKeepVisualState()) {
if (null != panelOpenState) {
// Bug https://jira.jboss.org/jira/browse/RF-2466
// Incorrect old:
// panel.setShowWhenRendered(Boolean.parseBoolean((String) clnId));
// ShowWhenRendered can be settled separately with modal panel "showWhenRendered" attribute
// so we should combine ShowWhenRendered || KeepVisualState && (OpenedState==TRUE) against rewriting
boolean show = panel.isShow() || Boolean.parseBoolean((String) panelOpenState);
panel.setShow(show);
Map<String, Object> visualOptions = (Map<String, Object>) getHandledVisualOptions(panel);
Iterator<Entry<String, String>> it = rqMap.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, String> entry = it.next();