how access input value from FTL file in Java classes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how access input value from FTL file in Java classes

Amine Benkirane
     Hi all !

I want to add some specific OrderHeader attributes for my enterprise needs. For this purpose, I extend the OrderHeader entity to add attributes like comments, requestedDeliveryDate, ... Before checking out the order, I add a screen designed with FTL file where I put a form and some inputs (comments, requestedDeliveryDate, ...) and I add a checkout button here to process order. I use at this time the ofbiz processorder method in the OrderServices.java.

In this class, I want to set up the new attributes added in the OrderHeader entity with values recovered from the inputs (in my custom FTL page). So, my question is : what I have to do in order to recover this values from my FTL form in the processorder Java method ?

If someone can give me some information to do that or know any existing example in ofbiz, it will be very helpfull !!

Thanks,

Amine




_________________________________________________________________
Contrôlez les personnes autorisées à parler à vos enfants sur  MSN / Windows Live Messenger !
http://www.windowslive.fr/controleparental/default.asp
Reply | Threaded
Open this post in threaded view
|

Re: how access input value from FTL file in Java classes

Jacques Le Roux
Administrator
Which version are you using ? There is no processOrder method in OrderServices.java in trunk.

Anywsay, when you submit the form the inputs will be available in the context simply do something like this for each
String myInput = context.get("myInput");

Of course adapt the type in function of yor data.

Beware are you using a service or an event ? nN case of an event it's different, for instance

String myInput = request.getParameter("myInput");

Jacques

From: "Amine Benkirane" <[hidden email]>
     Hi all !

I want to add some specific OrderHeader attributes for my enterprise needs. For this purpose, I extend the OrderHeader entity to add
attributes like comments, requestedDeliveryDate, ... Before checking out the order, I add a screen designed with FTL file where I
put a form and some inputs (comments, requestedDeliveryDate, ...) and I add a checkout button here to process order. I use at this
time the ofbiz processorder method in the OrderServices.java.

In this class, I want to set up the new attributes added in the OrderHeader entity with values recovered from the inputs (in my
custom FTL page). So, my question is : what I have to do in order to recover this values from my FTL form in the processorder Java
method ?

If someone can give me some information to do that or know any existing example in ofbiz, it will be very helpfull !!

Thanks,

Amine




_________________________________________________________________
Contrôlez les personnes autorisées à parler à vos enfants sur  MSN / Windows Live Messenger !
http://www.windowslive.fr/controleparental/default.asp


Reply | Threaded
Open this post in threaded view
|

RE: how access input value from FTL file in Java classes

Amine Benkirane
Thank you Jacques for your response, I'm sorry but the right method is createOrder. I try that and I succeed to access my input values.
 
Best regards,
 
Amine



> From: [hidden email]> To: [hidden email]> Subject: Re: how access input value from FTL file in Java classes> Date: Sat, 9 Aug 2008 14:13:01 +0200> > Which version are you using ? There is no processOrder method in OrderServices.java in trunk.> > Anywsay, when you submit the form the inputs will be available in the context simply do something like this for each> String myInput = context.get("myInput");> > Of course adapt the type in function of yor data.> > Beware are you using a service or an event ? nN case of an event it's different, for instance> > String myInput = request.getParameter("myInput");> > Jacques> > From: "Amine Benkirane" <[hidden email]>> Hi all !> > I want to add some specific OrderHeader attributes for my enterprise needs. For this purpose, I extend the OrderHeader entity to add> attributes like comments, requestedDeliveryDate, ... Before checking out the order, I add a screen designed with FTL file where I> put a form and some inputs (comments, requestedDeliveryDate, ...) and I add a checkout button here to process order. I use at this> time the ofbiz processorder method in the OrderServices.java.> > In this class, I want to set up the new attributes added in the OrderHeader entity with values recovered from the inputs (in my> custom FTL page). So, my question is : what I have to do in order to recover this values from my FTL form in the processorder Java> method ?> > If someone can give me some information to do that or know any existing example in ofbiz, it will be very helpfull !!> > Thanks,> > Amine> > > > > _________________________________________________________________> Contrôlez les personnes autorisées à parler à vos enfants sur MSN / Windows Live Messenger !> http://www.windowslive.fr/controleparental/default.asp> >
_________________________________________________________________
Pendant tout l'été, consultez vos emails Hotmail sur votre mobile !
http://www.messengersurvotremobile.com/?d=hotmail