Hi,
I have a dynamicRowContent where I define a button, now I want to open a PopUp directly at the bottom of the the button component, but I didn't get it work, when I use setLefTopReferenceComponentId or setLefTopReferenceComponentIdBottom the popup opens in the upper left corner of the workpage?
dynamicRowContent:
Code:
<t:button actionListener='" + expressionBase + "onLabelSearch}' contentareafilled='false' image='/images/icons/magnifier.png' text='Label' id='LABELSEARCH'/>
expressionBase => I define this component in a superclass where I want to get the bean dynamically through
Code:
CCGenClass ccgenClass = getClass().getAnnotation(CCGenClass.class);
if(ccgenClass!=null) expressionBase = ccgenClass.expressionBase().replace('}', '.');
Button:
Code:
public void onLabelSearch(ActionEvent event) {
// return if labeling functionality is not set
if(!enableLabeling) return;
// return if entity id is not set
String entityID = getWorkpage().getId();
if(entityID==null||entityID.length()==0) return;
final ModelessPopup popup = getOwningDispatcher().createModelessPopup();
LabelPopUpUI labelPopUpUI = getLabelPopUpUI();
labelPopUpUI.setEntityID(entityID);
labelPopUpUI.initialize();
labelPopUpUI.prepareCallback(new LabelPopUpUI.IApplyingCallback(){
public void apply() {
setLabelRowDynamic();
popup.close();
}
});
popup.open(Constants.Page.LABELPOPUP.getUrl(), "Label", 250, 300, new DefaultModelessPopupListener(popup));
popup.setUndecorated(true);
popup.setLefTopReferenceComponentIdBottom("LABELSEARCH");
popup.setCloseonclickoutside(true);
}
Markus