protected void dumpAttributes(RenderRequest request) { Enumeration attrIter = request.getAttributeNames(); log.info( "request-attributes:"); while ( attrIter.hasMoreElements() ) { Object attrNm = attrIter.nextElement(); Object attrVal = request.getAttribute(ObjectUtils.toString(attrNm)); String attrValDesc = ( attrVal instanceof String ) ? (String)attrVal : (( attrVal == null ) ? "null" : attrVal.getClass().getName() ); log.info( " key=" + ObjectUtils.toString(attrNm,"null") + " value=" + attrValDesc); } } protected void dumpSession(RenderRequest request)
protected void dumpAttributes(RenderRequest request) { Enumeration attrIter = request.getAttributeNames(); log.info( "request-attributes:"); while ( attrIter.hasMoreElements() ) { Object attrNm = attrIter.nextElement(); Object attrVal = request.getAttribute(ObjectUtils.toString(attrNm)); String attrValDesc = ( attrVal instanceof String ) ? (String)attrVal : (( attrVal == null ) ? "null" : attrVal.getClass().getName() ); log.info( " key=" + ObjectUtils.toString(attrNm,"null") + " value=" + attrValDesc); } } protected void dumpSession(RenderRequest request)
protected void dumpAttributes(RenderRequest request) { Enumeration attrIter = request.getAttributeNames(); log.info( "request-attributes:"); while ( attrIter.hasMoreElements() ) { Object attrNm = attrIter.nextElement(); Object attrVal = request.getAttribute(ObjectUtils.toString(attrNm)); String attrValDesc = ( attrVal instanceof String ) ? (String)attrVal : (( attrVal == null ) ? "null" : attrVal.getClass().getName() ); log.info( " key=" + ObjectUtils.toString(attrNm,"null") + " value=" + attrValDesc); } }
public Enumeration getAttributeNames() { final Enumeration _e = _req.getAttributeNames(); final Iterator _it = _attrs.keySet().iterator(); return new Enumeration() { Object _next; { next(); } public boolean hasMoreElements() { return _next != null; } public Object nextElement() { Object next = _next; next(); return next; } private void next() { _next = null; while (_e.hasMoreElements()) { Object next = _e.nextElement(); if (!_attrs.containsKey(next)) { _next = next; return; //done } } if (_it.hasNext()) _next = _it.next(); } }; }
protected void redirectRenderFaces(RenderRequest request, RenderResponse response, String viewId) throws PortletException, java.io.IOException { if (logger.isDebugEnabled()) { logger.debug("called redirectRenderFaces.. viewId is " + viewId); } List excludedNameList = (List) request .getAttribute(EXCLUDED_ATTRIBUTE_LIST); // clear attribute for (Enumeration e = request.getAttributeNames(); e.hasMoreElements();) { String key = (String) e.nextElement(); if (!excludedNameList.contains(key)) { request.removeAttribute(key); } } // call renderFaces again request.getPortletSession().removeAttribute( FacesPortlet.PREVIOUS_PORTLET_MODE); request.setAttribute(FacesPortlet.DEFAULT_PAGE, viewId); renderFaces(request, response); }
Enumeration<String> attributeNames = renderRequest.getAttributeNames();
Enumeration<String> attributeNames = renderRequest.getAttributeNames();