DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=32756>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32756 Summary: exact patterns overwrite patterns with wildcards Product: Commons Version: unspecified Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Digester AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] In the code below the Rules with the wildcard-patterns don't seem to be fired (at least, when using the xml even more below). If the exact matching rules are put in comment, the wildcard matching rules do get fired. It seems like the SetRoot rule overwrites the ObjectCreate rule. Furthermore the pattern "datadescriptor//property" doesn't seem to match anywhere, but this may be due to a misunderstanding of the (rather short) explanation in the docs. yours sincerely, Maarten Van Puymbroeck. -- Java Code -- // Properties // create the object digester.addObjectCreate("*/property", RealProperty.class); // initialize properties String[] properties = new String[]{"name", "key", "tooltip", "mapsWith", "type", "ref"}; digester.addSetProperties("*/property", properties, properties); // add the properties to the correct collection digester.addSetRoot("datadescriptor/properties/property", "addProperty");//, "be.generic.Property"); digester.addSetRoot("datadescriptor/searchproperties/property", "addSearchProperty");//, "be.generic.Property"); digester.addSetRoot("datadescriptor/listproperties/property", "addListProperty");//, "be.generic.Property"); digester.addSetRoot("datadescriptor/editproperties/property", "addEditProperty");//, "be.generic.Property"); -- XML -- <?xml version="1.0" encoding="UTF-8"?> <!--Sample XML file generated by XMLSPY v5 rel. 4 U (http://www.xmlspy.com)--> <datadescriptor class="be.dto.LongReturnDTO" dataTypeName="GenericExample"> <actions create="true" update="true" delete="true"/> <properties> <property name="start_date" key="i-startDate" tooltip="i-startDateTooltip" mapsWith="startDate" type="Date" /> </properties> <searchproperties> <property name="expiration_date" key="i-expirationDate" tooltip="i-expirationDateSearchTooltip" mapsWith="endDate" type="Date" /> </searchproperties> <listproperties> <property name="expiration_date" key="i-expirationDate" tooltip="i-expirationDateListTooltip" mapsWith="endDate" type="Date" /> <property ref="start_date" tooltip="i-startDateListTooltip"/> </listproperties> <editproperties> <allProperties /> </editproperties> </datadescriptor> -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
