You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ri...@apache.org on 2005/10/01 06:50:36 UTC
svn commit: r292919 -
/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/JavaControlUtils.java
Author: rich
Date: Fri Sep 30 21:50:29 2005
New Revision: 292919
URL: http://svn.apache.org/viewcvs?rev=292919&view=rev
Log:
Added some much-needed logging in JavaControlUtils.
tests: bvt in netui (WinXP)
BB: bvt in netui (linux)
Modified:
beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/JavaControlUtils.java
Modified: beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/JavaControlUtils.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/JavaControlUtils.java?rev=292919&r1=292918&r2=292919&view=diff
==============================================================================
--- beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/JavaControlUtils.java (original)
+++ beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/JavaControlUtils.java Fri Sep 30 21:50:29 2005
@@ -91,7 +91,12 @@
// Using the request first ensures that we don't get confused by session invalidation.
//
ControlBeanContext beanContext = ( ControlBeanContext ) request.getAttribute( CONTROL_CONTEXT_CLASSNAME );
- if ( beanContext != null ) return beanContext;
+ if ( beanContext != null ) {
+ if (_log.isTraceEnabled()) {
+ _log.trace("Found ControlBeanContext " + beanContext + " in the request.");
+ }
+ return beanContext;
+ }
HttpSession session = request.getSession( false );
if ( session != null )
@@ -100,6 +105,9 @@
if ( beanContext != null )
{
+ if (_log.isTraceEnabled()) {
+ _log.trace("Found ControlBeanContext " + beanContext + " in the session.");
+ }
request.setAttribute( CONTROL_CONTEXT_CLASSNAME, beanContext );
return beanContext;
}
@@ -114,6 +122,9 @@
AdapterManager.getServletContainerAdapter( servletContext ).createControlBeanContext( request, response );
request.getSession().setAttribute( CONTROL_CONTEXT_CLASSNAME, beanContext );
request.setAttribute( CONTROL_CONTEXT_CLASSNAME, beanContext );
+ if (_log.isDebugEnabled()) {
+ _log.debug("Created ControlBeanContext " + beanContext);
+ }
}
return beanContext;
@@ -123,7 +134,12 @@
{
assert controlInstance instanceof ControlBean : controlInstance.getClass().getName();
BeanContext beanContext = ( ( ControlBean ) controlInstance ).getBeanContext();
- if ( beanContext != null ) beanContext.remove( controlInstance );
+ if ( beanContext != null ) {
+ if (_log.isTraceEnabled()) {
+ _log.trace("Removing control " + controlInstance + " from ControlBeanContext " + beanContext);
+ }
+ beanContext.remove( controlInstance );
+ }
}
@@ -177,6 +193,10 @@
if ( ! Modifier.isPublic( field.getModifiers() ) ) field.setAccessible( true );
ret.put( field, new AnnotatedElementMap( field ) );
fieldNames.add( fieldName );
+ if (_log.isDebugEnabled()) {
+ _log.debug("Found control field " + fieldName + " in control client class "
+ + controlContainerClass.getName());
+ }
}
}
}
@@ -206,13 +226,21 @@
// Controls.initializeClient().
//
Map controlFields = getAccessibleControlFieldAnnotations( controlClientClass, servletContext );
- if ( controlFields.isEmpty() ) return;
+ if ( controlFields.isEmpty() ) {
+ if (_log.isTraceEnabled()) {
+ _log.trace("No control field annotations were found for " + controlClient);
+ }
+ return;
+ }
request = PageFlowUtils.unwrapMultipart( request );
ControlBeanContext beanContext = getControlBeanContext( request, response, servletContext, false );
assert beanContext != null : "ControlBeanContext was not initialized by PageFlowRequestProcessor";
try
{
+ if (_log.isDebugEnabled()) {
+ _log.debug("Initializing control client " + controlClient);
+ }
Controls.initializeClient(null, controlClient, beanContext);
}
catch ( Exception e )