I have the following situation:A custom control contains a panel set to position:fixed and display:none with CSS.
In a browser I use one button to make the panel visible (setting display:block) and another to hide it again. This looks and behaves like a dialogue-box, and works fine aside from being non-modal.
However… When editing an XPage containing that custom control, the panel overlaps other controls on the XPage and prevents them being selected with the mouse. This makes things difficult.
So my question is:
Is there currently any way to make such a panel visible only when directly editing the custom control that contains the panel, but hide the panel when editing any XPage or other custom control that contains the first custom control?
Subject: Re: Hide custom control
If you’re using 8.5.1, one option is to hide the custom control by forcing it to display an image instead of the contents of the custom control, by setting the Design Definition. Steve Castledine blogged about it here: http://www.stevecastledine.com/sc.nsf/dx/providing-illustration-for-your-xpage-custom-controls-design-definition. You could use a blank gif or a small image.
If you want to see it in action and also get an example of using a dojo dialog (which will force it to be modal, the bit you mention is missing here), have a look at my blog post and sample of an Audit Comments custom control: http://hermes.intec.co.uk/Intec/Blog.nsf/dx/16122009200447HERRK2.htm?opendocument (In the comments I’ve posted a link to an enhancement to prevent the user closing the dojo dialog by pressing F5 or Esc).
In practice, I tend to use the Source pane most of the time. I’ve soon picked up the xp: codes for the controls and I find it quicker. In the Design pane you can also use the outline window to select specific design elements - that’s probably your best option.
Subject: Thanks…
Looks like I have some options. I think I’ll try the Dojo dialogue, since it’d be nice to make it modal.