Mailinglist Archive: yast-devel (128 mails)

< Previous Next >
[yast-devel] Webyast - keep attention what keys in xml you choose
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Mon, 22 Feb 2010 16:05:37 +0100
  • Message-id: <201002221605.38132.jreidinger@xxxxxxx>
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 ''. 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 Reidinger
YaST team
maintainer of perl-Bootloader, YaST2-Repair, parts of webyast
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages