Do you have xhtml-decorator in your calcScreens.xml ?


Regards
--
Chirag Manocha
HotWax Media Pvt. Ltd.
Website :- www.hotwaxmedia.com
Contact :- +91-98263-19099



su2 wrote:
Hi All, I have created a new component, it has a form widget, with FirstName, LastName and Submit Button. the target of my form is processFirstForm and method is post. I am able to see the firstname, lastname, submit button but when I fill up
the form and click submit it goes to my desired new screen - OneFormScreen
but its blank. I have added java handler in controller.xml My Screen is *********************************************************************************************** <screen name="OneFormScreen"> <section> <widgets> <decorator-screen name="xhtml-decorator"> <decorator-section name="body"> <label text="A Screen with just 1 form."/> <include-form name="FirstForm" location="component://calculator/widget/calculator/calcForms.xml"/> <section> <condition><not><if-empty field-name="parameters.submit"/></not></condition> <widgets> <container><label text="firstName: ${parameters.firstName}"/> </container> <container><label text="lastName: ${parameters.lastName}"/> </container> <container><label text="combined: ${parameters.combined}"/> </container> <container><label text="submit: ${parameters.submit}"/></container> <container><label text="All the parameters we received:"/> </container> <container><label text="${parameters.allParams}"/></container> </widgets> </section> </decorator-section> </decorator-screen> </widgets> </section> </screen> *********************************************************************************************** controller.xml has *********************************************************************************************** <request-map uri="processFirstForm"> <event type="java" path="org.ofbiz.calculator.calculator.calculatorEvents" invoke="processFirstForm"/> <response name="success" type="view" value="OneFormScreen"/> </request-map> <view-map name="OneFormScreen" type="screen" page="component://calculator/widget/calculator/calcScreens.xml#OneFormScreen"/> *********************************************************************************************** My Java class is ******************************************************************************************* public class calculatorEvents { public static String processFirstForm(HttpServletRequest request,HttpServletResponse response){ String firstName = request.getParameter("firstName"); String lastName = request.getParameter("lastName"); request.setAttribute("combined", firstName + " " + lastName); request.setAttribute("allParams", UtilHttp.getParameterMap(request)); request.setAttribute("submit", "Submitted"); return "success"; } } *******************************************************************************************
I would really appreciate your help.

Thanks in advance.

Reply via email to