cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components ContextInputModule.java
Date Mon, 01 Sep 2003 11:30:21 GMT
cziegeler    2003/09/01 04:30:21

  Modified:    src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components
                        ContextInputModule.java
  Log:
  Fixing bug when getting info from the authentication context
  
  Revision  Changes    Path
  1.2       +6 -3      cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components/ContextInputModule.java
  
  Index: ContextInputModule.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components/ContextInputModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ContextInputModule.java	28 Aug 2003 19:08:23 -0000	1.1
  +++ ContextInputModule.java	1 Sep 2003 11:30:20 -0000	1.2
  @@ -65,6 +65,8 @@
   import org.apache.cocoon.components.modules.input.InputModule;
   import org.apache.cocoon.webapps.session.ContextManager;
   import org.apache.cocoon.webapps.session.context.SessionContext;
  +import org.apache.cocoon.xml.dom.DOMUtil;
  +import org.w3c.dom.DocumentFragment;
   
   /**
    * This input module provides access to the information of a session
  @@ -99,12 +101,13 @@
           int pos = name.indexOf('/');
           if ( pos != -1 ) {
               final String contextName = name.substring(0, pos);
  -            final String path = name.substring(pos+1);
  +            final String path = name.substring(pos);
               
               try {
                   SessionContext context = this.contextManager.getContext(contextName);
                   if ( context != null ) {
  -                    return context.getValueOfNode(path);
  +                    DocumentFragment frag = context.getXML(path);
  +                    return DOMUtil.getValueOfNode(frag);
                   }
               } catch (ProcessingException pe) {
                   throw new ConfigurationException("Unable to get information from context.",
pe);
  
  
  

Mime
View raw message