Dynamically Set Title On Dialog


Dynamically Set Title On Dialog



    var dlg = $("#dialog").dialog({       autoOpen: false,       modal: true,       buttons: {         'Update': function() {           alert(clientCode);         },         Cancel: function() {           $(this).dialog('close');         }       }     });      $(".edit").click(function() {       myval = $(this).parent().children('td:nth-child(1)').text();       dlg.dialog('open');       return false;     }); 

How do I take "myval" and have it as the title of the dialog? I've tried passing it as an argument when doing dlg.dialog('open', myval) and no luck. I've also tried passing it as a parameter but with no luck either. I'm probably doing things in the wrong way, however.




Use argument in EL expression

1:



JSF Render a SelectOneRadio with a PanelGrid
create the dialog in the click-event and use this to set title:.
facelets totally escape xml
something like this:.
Include non-Facelet content in a Facelet template
$(".edit").click(function() {   myval = $(this).parent().children('td:nth-child(1)').text();    var dlg = $("#dialog").dialog({   autoOpen: false,   title: myval,   modal: true,   buttons: {       'Update': function() {         alert(clientCode);       },       Cancel: function() {         $(this).dialog('close');       }     }   });    dlg.dialog('open');   return false; }); 


JSF Myfaces NullPointerException: serialFactory


how to get jsf clientid of a component in datatable?

2:



Richfaces DataScroller executed when not needed
$("#your-dialog-id").dialog({     open: function() {         $(this).dialog("option", "title", "My new title");     } }); 


use Label and Value of f:selecteItems with rich:combobox


79 out of 100 based on 54 user ratings 279 reviews