[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Modeless PopUp  XML
Forum Index -> Development
Author Message
mreich

Power User
[Avatar]

Joined: 30/01/2009 08:34:23
Messages: 750
Offline

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
 Filename PopUp.PNG [Disk] Download
 Description
 Filesize 20 Kbytes
 Downloaded:  382 time(s)

[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5538
Offline

Hmmm,

we cannot reproduce here - and tested in many combinations... The position of the popup in the screenshot is 0,0 (this is the one that is referenced when no component was found for the id).

Could you send a client log to us (when you find some time): start client with parameters "loglevel=ALL clientlogfile=c:\temp\anyfilename.log", then exeute the scenarion (non in the layout editor preview, but outside), close the client and then send the logfile? Thanks!

Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5538
Offline

Hi,

after having received the log, we now know what's going on.

You seem to build up the ROWDYNAMICCONTENT with every roundtrip to the server. Consequence: optically the screen looks stable, but behind the scenes it is rebuilt in its dynamic areas with evenry response.

Now, when referring to an existing element via its id, this must be existing already. In your case it is removed and re-built with every response, so that the element is identified correctly, but the location is unknown at response point of time.

Best solution: try to avoid the re-building of the dynamic area with every rountrip, then the position is known (and the screen update is faster, and there is no mini-flickering, ...)

Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team