[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
setROWComponent & clear()  XML
Forum Index -> Development
Author Message
twalters



Joined: 17/04/2009 12:08:11
Messages: 3
Offline

Hi,

I´m having problems with clearing rowchildren, when dynamically generating the contents of a popup.

As result, the rowchildren are not cleared. After each run of the function I get another instance of the row.

I tried a workaround like, without success -->

http://www.casabacdemo.com/forum/posts/list/21.page

My code is:

Code:
QueryParserAdapter qpa = QueryParserAdapter)getOwningDispatcher().getDispatchedBean(QueryParserAdapter.class);
 		qpa.init(replaceMents);
 		
 		popUp = ModalPopup.createInstance();
 		popUp.open("/" + de.medint.reports.main.Constants.PAGE_QUERYPARSER, "Query Content", 1024, 768, this);
 		popUp.setContentReplaceDrillDown(getOwningDispatcher().getContentReplace());
 



Init:

Code:
 rc.getChildren().clear();
 		
 		this.replacements = replaceMents;
 		
 		return;
 



In the opening popup the rows setter is:


Code:
 public void setRc(ROWComponent rowc) {
 	
 		if(rowc == rc)
 			return;
 		else
 			this.rc = rowc;
 			
 		buildTheBar();
 
 	}
 



buildTheBar():

Code:
 rc.getChildren().clear(); --> does not clear!!
 		
 ... create Grids...
 
 



I´d like to create the Grid new each time. What am I doing wrong?

Tommy
CaptainCasa

Power User
[Avatar]

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

Hi,

....hmm, may I suggest one thing...: please use ROWDYNAMICCONTENT - this is much easier for what you want to do, and the "fighting" with the JSF component tree is hidden in front of the developer.

In the documentation we recommend to use the ROWDYNAMICCONTENT before using you the direct manipulation of JSF components... Problem is: the ROWDYNAMICCONTENT followed some time after the direct manipulation was available, so you'll find more posts on direct manipulation issues...

Hope this answer is not too unfair, because I did not look into the very details of what you described...

Björn

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