Domanda

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.

È stato utile?

Soluzione

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>  
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top