com.atlassian.confluence.pageobjects.component.editor
Class MacroPropertyPanel

java.lang.Object
  extended by com.atlassian.confluence.pageobjects.component.editor.PropertyPanel
      extended by com.atlassian.confluence.pageobjects.component.editor.MacroPropertyPanel
Direct Known Subclasses:
StatusMacro.PropertyPanel

public class MacroPropertyPanel
extends PropertyPanel

Represents the property panel for a MacroPlaceholder.

Different to a MacroPlaceholder, the PropertyPanel is not added to the DOM of the wysiwygTextarea_ifr IFrame, but instead to the parent DOM. The PropertyPanel is generated from the <property-panel> declaration in the macro descriptor. It may have been modified on the client side, but it should at least contain the Remove and Edit buttons.


Field Summary
 
Fields inherited from class com.atlassian.confluence.pageobjects.component.editor.PropertyPanel
propertyPanelElement
 
Constructor Summary
MacroPropertyPanel()
           
 
Method Summary
 void button(java.lang.String buttonId)
          Locates and clicks the <a> element for a given button id.
 void remove()
          Clicks the Remove button common to all generated property panels.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MacroPropertyPanel

public MacroPropertyPanel()
Method Detail

button

public void button(java.lang.String buttonId)
Locates and clicks the <a> element for a given button id.

The CSS class used for the lookup is generated by tinyMce-property-panel-macros.js. The button id is the one taken from the plugin descriptor, e.g.

 <xhtml-macro>
      ...  
      <property-panel>
          ...
          <button id="Grey" label=""/>
          ...
      </property-panel>
      ...
  </xhtml-macro>
 
 
means that you'd parametrise this method with Grey (case-sensitive) in order to retrieve the element representing this button.

Parameters:
buttonId - the button id

remove

public void remove()
Clicks the Remove button common to all generated property panels.

Clicking this button will remove the underlying macro placeholder.



Copyright © 2003-2013 Atlassian. All Rights Reserved.