Werner,

No problem at all... I owe it to you, castor has been very useful to our
project. 

Are the instructions for a unified patch on the web site? I am rather
new to castor... So I am not familiar with your patching system.... 

Also there are other properties in the infoFactory that are not set
anywhere... Not sure if someone should take a look at them as well. 


Barbara

-----Original Message-----
From: Werner Guttmann (JIRA) [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 10, 2006 3:27 AM
To: Prechtl, Barbara [VMMH:RP21:EXCH]
Subject: [jira] Commented: (CASTOR-1346) notifyPropertyChangeListeners
not called when bound properties is set true.


    [
http://jira.codehaus.org/browse/CASTOR-1346?page=comments#action_60625 ]


Werner Guttmann commented on CASTOR-1346:
-----------------------------------------

Barbara, as you have done the investigation already, and seemed to have
come up wirth a working solution, could you (pretty) please attach a
unified patch ? 

> notifyPropertyChangeListeners not called when bound properties is set 
> true.
>
------------------------------------------------------------------------
---
>
>          Key: CASTOR-1346
>          URL: http://jira.codehaus.org/browse/CASTOR-1346
>      Project: castor
>         Type: Bug

>   Components: XML source generator
>     Versions: 1.0 M2, 1.0 M3
>  Environment: Using with Eclipse on Win  XP and Win 2000
>     Reporter: Barbara Prechtl
>      Fix For: 1.0 M4

>
>
> SourceGenerator sgen = new SourceGenerator(); 
> sgen.setDefaultProperties(props.getPropTable().getTable());
> sgen.generateSource(schema, pkgName);
> When using the source generator in the above manner and having the 
> property table with the setting for 
> org.exolab.castor.builder.boundproperties=true. The
notifyPropertyChangeListener code is not added to the setter methods of
the generated code. I steped throught the code to find two problems:
> 1) In the source generator on line 305 : _sourceFactory = new
SourceFactory(this, _infoFactory); 
> This is in the constructor and the property values have not been
changed. I commented out this line and added the following at the start
of generateSource:
>       if (_sourceFactory == null)
>               _sourceFactory = new SourceFactory(this, _infoFactory);
> at this point the properties have been set by the call to
setDefaultProperties so _sourceFactory has access to them.
> 2) The above was not enough to fix the problem I had to also change
the SourceFactory at line 194 by adding the following to set the bound
property of the infoFactory (after it was created).
>  infoFactory.setBoundProperties(config.boundPropertiesEnabled());
> Not sure what other properties are missing from the infoFactory.... so
this might want to be investigated more.
> After doing the above, my classes were generated correctly. The
setters call the notify listeners. 
> Please let me know if you need any additional information.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to