How to Create an Ownerdraw Dialog

Questions

How do I create an Ownerdraw dialog in CQ5?

Answer / Resolution

See the Ownerdraw source at /libs/cq/widgets/source/widgets/form/OwnerDraw.js.

The constructor reveals the config properties:

   constructor : function(config){ 
       this.html = config.html; 
       this.url = config.url ? config.url : ""; 
       this.hiddenField = new CQ.Ext.form.Hidden({ 
          "name": config.name 
       }); 
       CQ.Ext.applyIf(config, { 
           "border": false, 
           "items": this.hiddenField 
       }) 
       CQ.form.OwnerDraw.superclass.constructor.call(this, config); 
   } 

it allows you to include custom HTML (html config property) or calling an external URL (url config property). This makes most sense for static HTML display. If you require customized widgets or extensions to existing widgets, it is recommendable to create your own xtype (widget) instead.

Applies to

CQ5.1, CQ5.2

 Adobe

更快、更輕鬆地獲得協助

新的使用者?

Adobe MAX 2024

Adobe MAX
創意大會

10 月 14 至 16 日邁阿密海灘和線上

Adobe MAX

創意大會

10 月 14 至 16 日邁阿密海灘和線上

Adobe MAX 2024

Adobe MAX
創意大會

10 月 14 至 16 日邁阿密海灘和線上

Adobe MAX

創意大會

10 月 14 至 16 日邁阿密海灘和線上