What I want to achieve is this:Whan a user enter information in a form and clicks on submit, it should trigger an email component (Written in Java using JavaMail 1.3 API) which reads that information from the fields and sends a mail.There are multiple ways in which It can be acheved. What accroding to you is the best approach?Any Ideas Shannon???
I was thinking at more simpler level... I was planning to wirte a teamsite custom servlet to which this form would be submitted as soon as the user clicks on the submit button. This servlet would pick the values up to send the mail. But this approach has a practical limitation. This approach will not work on the production runtime as there shall be no teamsite over there.
I was thinking at more simpler level... I was planning to wirte a teamsite custom servlet to which this form would be submitted as soon as the user clicks on the submit button. This servlet would pick the values up to send the mail. But this approach has a practical limitation. This approach will not work on the production runtime as there shall be no teamsite over there. We are integrating LiveSite with BEA. So another approach could be to write a small application with one servlet and deploy on the same BEA server which runs the production runtime.The third approach could be to write a servlet and modify the web.xml of the livesite production appliocation so that the servlet is recognized by it. But I am not sure whether that would be OK with Interwoven.I primarily did not think about AJAX-related as I have *no* idea about how it works What do you feel about the above approaches?Also, can please you share some knowledge on AJAX in general and AJAX File Explorer component in particular?
Hello Will,That sounds good but I have a question here.How do I make the external component act on the click of the submit button. I always thought external components get invoked during the component load time...
This is superb. Also, Is it possible to Show a thankyou page or some thing of that sort? Once the action in the form has successfully completed?
<br><br>Default view:<br><br><External><br></External><br><br>After form is submitted and external sends mail successfully:<br><br><External><br> <MailStatus>success</MailStatus><br></External><br><br>After form is submitted and external fails to send mail:<br><br><External><br> <MailStatus>error</MailStatus><br> <ErrorMessage>The SMTP server could not be contacted.</ErrorMessage><br></External><br><br>
Please forgive me If I am asking very basic questions again and again. I am in a fix. I did check the stock cheker component. But I failed to understand it as it does not have any documentation and neither does it have comments its code.Could you please eloborate the funtionality of this component the way it implements form validations and submit.This is urgent.Thanks in advance.
1. How can I implement the "mandatory fields" and "Error message stuff"? - I guess external call the in the component data xml can handle that. - Does it recieve tghe form parameters as a part of the "params" hashtable?
2. How can I redirect to an acknowledgement page if the submit was successful? - I have no idea how to do this...
If a component renders an HTML form, don't put any attributes on the form tag (no action="/whatever" or method="POST" or any of that). LiveSite will insert attributes into the form such that when it is submitted, it will return to the current page, and the component that rendered the form will be executed and given the form parameters. Typically, the component will render itself differently when receiving such parameters, like showing a success message or re-displaying the form with an error message.
if in the component, there is no form but only a general image, and when i click this image(onClick), i want the external class in content xml to process something and then display something in current page, is it possible only use external component? what i consider is that: it is actually is ajax, write a js to pass a parameter to servlet onClick, then get respond xml, at last using innerHTML to display in current page.but how i implement it, do i need to write a servlet as usual in web.xml? where should i put the java class, in webapps tomcat as usual? i am a little confuse in livesite
Based on a lot of you recent questions here in the forums it seems like things are way over what you are prepared for. You may want to explore some training and / or hire some professional help. Anyway, to answer your question: look at the SP Dev guide and you'll get the answers you are looking for.Look at Java Externals / Controllers and LiveSite toolkit sections in SP Dev guide. Also read up on $AJAX_URL token. Also look at the information on how a HTML form is submitted -- I know you don't have a form but you'll be able to get some idea to piece a solution together for your need.