• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SEAM email generation

 
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anyone know how to pull text out of a text box or text area on a jsf page and insert it in the body of an email? I have email working but only with a static template. I am trying to create a page where a user can write an email to the help desk. The user has to be able to type his or her question/problem onto the web page. I want to grab that text and insert it into the email template. I have an Email class with a String message and the appropriate setter/getter. I am trying to call email.setMessage("the user's text needs to go here"), but it isn't working. I'm not sure how to pass a parameter to the method or if it is even allowed. Thanks!
 
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,

this doesn't sound like a mailing issue to me, rather like a conceptual question about controllers / EJBs.

Setting up an email is pretty straight forward and well documented in the seam-docs. The idea is to call a special Renderer, which itself sends the mail by rendering a mail template template (read: a jsf-page with the mail-taglib included) . From within the template you have full access to everything in the seam context, so your reference to the mail body could be something like this #{myController.myField}

Does that give you a start?

cheers,
jan
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic