[yast-devel] Webyast - keep attention what keys in xml you choose
Hi, in short: choose as XML key name of webclient model only if you really want to initialize it with values inside this tag. long version: today I debug interesting problem which has Martin Kudlvasr. When he test his firewall model he get cannot load 'org.opensuse.yast.services'. That is quite strange because he doesn't use Service model where is this interface defined. After some work with rdebug I found that it correctly has interface attached to model Firewall, so problem is not in YastModel but I found it load model Service. Why? Firewall use array of services with service as key. ActiveResource has feature(?) which search in ancestors of ActiveResource and tries found if there is class which has name Service. And it has. So it take nested XML and send it to Service initializer. Possible solution of this situation is: 1) use different name for key (quick and easy) 2) really use same structure for data and benefit from nested models 3) enclose deeper xml key, because ARes search in modules if deep of XML element is bigger then 1 (arrays is not counted) Josef -- Josef Reidinger YaST team maintainer of perl-Bootloader, YaST2-Repair, parts of webyast -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (1)
-
Josef Reidinger