Question

I need to get a button in JSF to bring up a simple message box saying Hello World. How would i do this Simply?

Ive looked at many examples online but they all dont relate to what i want. They use JavaBean classes to store users values ect.

Was it helpful?

Solution

If you are using primefaces, you should try this:

XHTML:

<p:commandButton id="basic" value="Basic" onclick="PF('dlg1').show();" type="button" />  

<p:dialog id="basicDialog" header="HELLO" widgetVar="dlg1">  
    <h:outputText value="Hello world!" />  
</p:dialog>  
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top