cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/binding UnionJXPathBinding.java
Date Tue, 27 Jan 2004 04:20:51 GMT
tim         2004/01/26 20:20:51

  Modified:    src/blocks/woody/java/org/apache/cocoon/woody/binding
                        UnionJXPathBinding.java
  Log:
  Make UnionJXPathBinding respect path attribute.
  
  Revision  Changes    Path
  1.4       +5 -3      cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/binding/UnionJXPathBinding.java
  
  Index: UnionJXPathBinding.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/binding/UnionJXPathBinding.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- UnionJXPathBinding.java	11 Jan 2004 20:51:16 -0000	1.3
  +++ UnionJXPathBinding.java	27 Jan 2004 04:20:51 -0000	1.4
  @@ -92,6 +92,7 @@
        */
       public void doLoad(Widget frmModel, JXPathContext jxpc) {
           Widget widget = frmModel.getWidget(this.widgetId);
  +        JXPathContext subContext = jxpc.getRelativeContext(jxpc.getPointer(this.xpath));
           if (!(widget instanceof Union))
               throw new RuntimeException("Binding: Expected Union widget, but received class:
\"" +
                       widget.getClass().getName() + "\".");
  @@ -100,7 +101,7 @@
           if (subBindings != null) {
               int size = subBindings.length;
               for (int i = 0; i < size; i++) {
  -                subBindings[i].loadFormFromModel(unionWidget, jxpc);
  +                subBindings[i].loadFormFromModel(unionWidget, subContext);
               }
           }
           if (getLogger().isDebugEnabled()) {
  @@ -115,11 +116,12 @@
        */
       public void doSave(Widget frmModel, JXPathContext jxpc) throws BindingException {
           Union unionWidget = (Union)frmModel.getWidget(this.widgetId);
  +        JXPathContext subContext = jxpc.getRelativeContext(jxpc.getPointer(this.xpath));
           Binding[] subBindings = getChildBindings();
           if (subBindings != null) {
               int size = subBindings.length;
               for (int i = 0; i < size; i++) {
  -                subBindings[i].saveFormToModel(unionWidget, jxpc);
  +                subBindings[i].saveFormToModel(unionWidget, subContext);
               }
           }
           if (getLogger().isDebugEnabled()) {
  
  
  

Mime
View raw message