File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes JSF Mail Components Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "JSF Mail Components " Watch "JSF Mail Components " New topic
Author

JSF Mail Components

Bipin Sanker
Greenhorn

Joined: Mar 17, 2008
Posts: 2
Hi. I want to display a datatable in the body of the email while sending it. Is there is any components for doing that.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 12513

Not directly. The simplest way would be to simply iterate the data model and write out the data as plain text lines (I'm not a fan of HTML email). However, you could also build a JSF page that produces HTML form - including the datatable tag, and have your action processor do an internal HTTP request for that page, which you would then encapsulate in the email message you're building. There's a fair amount of overhead involved there, including the fact that you'd probably need to propagate your session to the internal request. However, it's relatively immune to breakage.

If you're sufficiently devious, you could probably gain some speed by short-circuiting the internal HTTP request, but that would put you more at risk when the framework changes. Also, it would limit some of your load-balancing options, but that's only an issue for really heavy load systems.


One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
Bipin Sanker
Greenhorn

Joined: Mar 17, 2008
Posts: 2
HI thanks for your kind information. Is there is any other API or third party vendors who has the easy way of sendinf email with the datatable in it???
Because it has to be done immediatly....
 
IntelliJ Java IDE
 
subject: JSF Mail Components
 
Threads others viewed
Which part of Java is sexy for you?
Exam Topics
LightWightComponents
Swing Components
Regarding J2EE
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture