myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From schneidc <simon.w...@gmx.de>
Subject Re: AW: double click problem in JSF
Date Fri, 10 Sep 2010 11:55:39 GMT

Hi,

I just stumbled upon this thread and tried to add the overlay method to
block inputs for a certain time to my pages.
Mostly it works fine, but I have a problem with <tr:selectOneChoice>. I
added this JS-function to the "onchange" event of the menu

	function show() {
		document.getElementById("overlay").style.visibility = 'visible';
	}

and the HTML

	<div id="overlay" style="visibility: hidden;">
	<div id="centered" style="position: absolute; top: 0; right: 0; bottom: 0;
left: 0; width: 50%; height: 50%; margin: auto;">
	<h:graphicImage
		value="/theme/ajax-loader.gif"
		style="margin-left: auto; margin-right: auto; display:
block;"></h:graphicImage>
	</div>
	</div>
	
which makes the overlay div visible. My problem is that the div doesn't
disappear again and the pages stays unaccessible. When I call this
JS-function via a button after the Java method finishes and the answer is
received by the browser the original css visibility attribute is set again
(which is "hidden).

This is how the JS-code generated by Trinidad looks like:
Button onClick:				return
_chain('show();','submitForm(\'form1\',1,{source:\'form1:j_id16\'});return
false;',this,event,true)
SelectOneChoice onChange:	return
_chain('show();','TrPage._autoSubmit(\'form1\',\'form1:menu2\',event,1);return
true;',this,event,true)

Can anybody explain to me, why the css-attribute of the div isn't being
reset?

Thanks
Simon

Eisentr├Ąger, Tobias wrote:
> 
> This is a great example:
> http://javathoughts.capesugarbird.com/2008/03/ajax-button-with-overlay-div-and-wait.html
> 
> Works good with trinidad
> 
> Toby
> 

-- 
View this message in context: http://old.nabble.com/double-click-problem-in-JSF-tp29569348p29676032.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Mime
View raw message