Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

XMLDecoder

Thread view: 
Richard Huddleston - 20 Mar 2006 19:31 GMT
so using the XMLDecoder I want to create a factory class, initialize it,
and then call the newFoo method on it.

to make it easy, i'll read in everything that can be read and ignore
anything that isn't off the appropriate type.

So, if Foo is my class I want, and FooFactory is the factory.

<object id="theFactory" class="FooFactory">
    <void property="bar">
        <string>Hello</string>
    </void>
</object>
<object idref="theFactory" method="newFoo" />

the second object being read in by the XMLDecoder is the FooFactory from
before, it's not even calling the newFoo method.

Any ideas?
Dave Mandelin - 21 Mar 2006 00:32 GMT
Try

<object id="theFactory" class="FooFactory">
       <void property="bar">
               <string>Hello</string>
       </void>
    <void id="theFoo" method="newFoo"/>
</object>
<object idref="theFoo"/>

I didn't find any good documentation, but I gather that if you put
<object idref="z"/> then the result of that element will definitely be
z, no matter what else is there.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.