• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Can a JOptionPane.showMessageDialog be used within JSF?

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody:

In my backing beans I'm trying to use some swing for popup messages...something like this:



The problem is sometimes that messages appear behind the browser window where the user doesn't see them. Usually they appear in font of the browser.

Since it's my first time using JSF (better to say first time using Java on the server side) I was wondering what is the correct way of using these kind of popup messages...or maybe if it's possible to use them in a server application? What is the choice instead of swing?... To be honest I've never seen swing in a server side application (Except applets)?

What would you recommend to a newbie?

Thanks a lot for your help.
 
Saloon Keeper
Posts: 28399
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Backing beans live on the server and only accessible directly via code on the server. To display on the client, your Swing code would have to be on the client (an Applet).

So the short answer is No. Swing cannot be used in JSF or any other J2EE server system (servlets, JSP, Struts, Wicket, etc..

Popup dialogs in JSF are managed via client-side JavaScript. Often in conjunction with AJAX.
 
Enrique Villamizar
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much Tim for your kind reply.

It's good to know it for rerouting the march. It's time of javascript.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic