jsf - Positioning Primefaces Dialog just below a Command Link -


i trying use below syntax position dialog below command link. not working , moreover, dialog position changing whenever scrolling page or down.any appreciated.

<p:dialog context="'mainform:commandlinka','tl','br'" widgetvar="treedlg" header="select " draggable="false"> 

thanks , regards, renju

i managed solve problem using jquery. calling following jquery function on clicking command link , passing dialog id opened , souce command link id.

function adjustpositionandopendialog(currentdialog,commandsource) {      $(currentdialog).dialog( 'open' );           var mydialogx = jquery(commandsource).position().left+10;     var mydialogy = jquery(commandsource).position().top - ( jquery(document).scrolltop() + jquery('.ui-dialog').outerheight() )+142;     jquery(currentdialog).dialog( 'option', 'position', [mydialogx, mydialogy] ); } 

thanks,
renju


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -