aem - CQ5 multifield configuration service -


I am trying to create a CQ5 service with a Multifield Configuration Interface. It will be something like this, but at the click of the plus button it will add not just a new row but rather a group of N rows.

property

  • field 1 +
  • field 2
  • ....
  • FieldN

Any advice?

As far as I know there is no such possibility in Apache Felix

< P> Based on your actual need I would consider reducing the configuration. If you try to move all the fields (groups of fields that you want to add through the plus button) in a different configuration, you will have a configurable factory approach near the slf4j.logger configuration.

A simple configuration function may look like the following

  @Component (instant = true, configurationfree = true, metatip = true, policy = configuration policy. = "Com .foo.bar.MyConfigurationProvider", label = "multiple configuration providers") @ service (serviceFactory = false, value = {MyConfigurationProvider.class}) @Properties ({@Property (name = "propertyA", label = " Value for property A "), @ property (name =" propertyby ", label =" value for property b ")}) public class MyConfigurationProvid Er {Private string property A; Private string property B; @active active active zero (last map & lt; string, object & gt; properties, final component contact component component) {propertyA = PropertiesUtil.toStringArray (properties.get ("propertyA"), defaultValue); PropertyBe = Properties. Staatriere (Properties ("Properties"), Default Value); }}  

Use it any @Component

  @Reference (cardinality = referenceCardinality OPTIONAL_MULTIPLE, Reference Interface = Micron Configuration Provider Class, Policy = Reference Policy. Dynamic) Private Final List & lt; MyConfigurationProvider & gt; Providers = new linked list & lt; MyConfigurationProvider & gt; (); Protected void bindProviders (MyConfigurationProvider Provider) {providers.add (provider); } Protected Zero Undisputed Provider (MICENIFFIFICATION PROVIDER PROVIDER) {providers.remove (provider); }  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -