not sure why you added a java handler,
if you using ofbiz trunk you should have
    <include
location="component://common/webcommon/WEB-INF/common-controller.xml"/>


su2 sent the following on 7/23/2009 6:26 PM:
> 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.
>  

-- 
BJ Freeman
http://www.businessesnetwork.com/automation
http://bjfreeman.elance.com
http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
Systems Integrator.

Reply via email to