voyent
Component ace:selectMenu becomes not clickable after page refresh.  XML
Forum Index -> Components
Author Message
cezarto

Joined: 10/May/2010 04:07:17
Messages: 2
Offline


Hi,
I have encountered a problem, that expanding ace:aelectMenu just after refreshing the page causes that I cannot select any option.

Code:
 			<ace:selectMenu value="#{testBean.text}" 
 							label="List"
 							labelPosition="left"
 							styleClass="large"
 							height="400"
 							width="200"
 							listValue="#{testController.list}" 
 							listVar="text" 
 							itemValue="#{text}">
 
 				<f:facet name="row">
 					<h:outputText value="#{text}" />			
 				</f:facet>
 							
 				<ace:ajax event="valueChange" execute="@this" render="@all"/>
 			</ace:selectMenu>
 


It seems that first icepush update response (just after refresh), brings some update for the selectMenu component (but nothing has been changed in bean). When I expand options before this icepush update but just after page refresh, the component becomes not clickable.

Regards,
Cezary
arran.mccullough


Joined: 02/Jan/2007 00:00:00
Messages: 426
Offline


Hi Cezary,

What version of ICEfaces are you using?

Do you see any errors in the browser console logs? I suspect there may be a script error that would prevent the click from happening.

Regards,
Arran

Arran McCullough
Technical Support Engineer
ICEsoft Technologies Inc.
cezarto

Joined: 10/May/2010 04:07:17
Messages: 2
Offline


There is no javascript errors.
I noticed that problem occurs only when I use facet rendering. It seems that incoming icepush update replaces a part of DOM structure:
Code:
<div class="ui-selectmenu-facet" role="option">
 ...
 </div>

Maybe some JS script is not part of this update.

I modified your script to prevent from unnecessary update of DOM structure and it works but it is quite ugly workaround.

Code:
 ice.ace.SelectMenu.prototype.setContent = function(content) {
 	var current = jQuery(this.update.innerHTML).text();
 	var incomming = jQuery(content).text();
 	
 	if(current != incomming){
 		this.content = content;
 		this.update.innerHTML = this.content;
 		if (this.update.firstChild && this.update.firstChild.childNodes) {
 			this.entryCount = this.update.firstChild.childNodes.length;
 		}		
 	}	
 
 
 }


Regards,
Cezary



 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team