How to bind dynamic content using ?

Like as in <p:graphicImage>, the value attribute can point to a bean property returning StreamedContent. This only requires a special getter method for the reasons which is explained in detail in the following answer on using <p:graphicImage> with a dynamic resource from a database: Display dynamic image from database with p:graphicImage and StreamedContent. In your … Read more

Event handler not working on dynamic content [duplicate]

You have to add the selector parameter, otherwise the event is directly bound instead of delegated, which only works if the element already exists (so it doesn’t work for dynamically loaded content). See http://api.jquery.com/on/#direct-and-delegated-events Change your code to $(document.body).on(‘click’, ‘.update’ ,function(){ The jQuery set receives the event then delegates it to elements matching the selector … Read more

How to provide dynamic HTML in PHP?

You could use include and ob_get_contents to get the html as string and do some str_replace or preg_replace on that. Your HTML: <html> <body> <img src=”https://stackoverflow.com/questions/10533622/{IMAGE_SRC}” width=”512″ height=”512″ name=”image” /> </body> </html> Your PHP: ob_start(); include ‘your_file.html’; $buffer = ob_get_contents(); ob_end_clean(); $buffer = str_replace(“https://stackoverflow.com/questions/10533622/{IMAGE_SRC}”, ‘your_image.png’, $buffer); print $buffer;