Results 1 to 4 of 4

Thread: listener ref child element parse bug?

  1. #1
    Join Date
    Nov 2004
    Location
    china
    Posts
    6

    Default listener ref child element parse bug?

    i using <ref local="saleOrderService"/>
    IEventHandlerValue.Source return null
    using <ref object="saleOrderService"/>, right!
    Code:
    	<object name="saleOrderService" class="SpringTest.SaleOrderService,SpringTest"/>
    		<object name="saleOrderServiceListener" class="SpringTest.SaleOrderServiceListener,SpringTest">
    			<listener event="PlaceOrderBefore" method="PlaceOrderBefore">
    				<ref local="saleOrderService"/>
    			</listener>
    		
    		</object>

  2. #2
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,

    Thanks for reporting this, will investigate!

    Cheers,
    Mark

  3. #3
    Join Date
    Nov 2004
    Location
    china
    Posts
    6

    Default

    i look DefaultXmlObjectFactoryDefinitionParser.ParseEvent ListenerDefinition method

    current only allow object /class

    Code:
       switch &#40;sourceAtt.LocalName&#41; &#123;
                    case ObjectsDtd.ObjectRefAttribute &#58;
                        // we're wiring up to an event exposed on another managed object &#40;instance&#41;
                        RuntimeObjectReference ror = new RuntimeObjectReference &#40;sourceAtt.Value&#41;;
                        myHandler.Source = ror;
                        break;
                    case ObjectsDtd.ClassAttribute &#58;
                        // we're wiring up to a static event exposed on a Type &#40;class&#41;
                        myHandler.Source = ObjectReader.Domain == null ?
                            &#40;object&#41; sourceAtt.Value &#58;
                            &#40;object&#41; ObjectUtils.ResolveType &#40;sourceAtt.Value&#41;;
                        break;
                &#125;

  4. #4
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,

    Thanks again. We will make the changes and also add support for the idref element. I'll post here when it is finished. You can register for email notification for forum replies if you like.

    Cheers,
    Mark

Similar Threads

  1. Possibility to delete DataBindings
    By sir-archimedes in forum Web
    Replies: 7
    Last Post: 05-06-2006, 07:33 AM
  2. Child object definitions and abstract classes.
    By Tom Whitner in forum Core Container
    Replies: 5
    Last Post: 12-08-2004, 07:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •