You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Avijit Bose <bo...@gmail.com> on 2022/04/28 03:48:56 UTC

Help required in Ofbiz development - Unable to retrieve parameter using HTTPRequest

My code is as follows:

“finalizeLC.ftl”
 --------------------
<div class="screenlet-body">
  <form method="post" action="<@o...@ofbizUrl>"
 name="finalizeLCUpdate" id="finalizeLCUpdate">

           <input type="hidden" name="LcReceiveDate" value="">
           <input type="hidden" name="countDownDays" value="">
           <input type="hidden" name="remarks" value="">


             <table width="100%" cellspacing="2">
            <tbody>
              <tr>
                <td align="right">
                </td>
                <td align="right">
                           <label
for="LcReceiveDate">${uiLabelMap.LcReceiveDate}&nbsp;</label>
                </td>
                <td colspan="4">
           <input type="date" id="LcReceiveDate" name="LcReceiveDate"
style="background-color:#D6F2FF" value="${LcReceiveDate!}" required>
                                            </td>
                <td></td>
              </tr>
              <tr>
                <td align="right">
                </td>
                <td align="right">
                           <label
for="countDownDays">${uiLabelMap.countDownDays}&nbsp;</label>
                </td>
                <td colspan="4">
                           <input type="number" id="countDownDays"
name="countDownDays" style="background-color:#D6F2FF"
value="${countDownDays!}" required>
                                            </td>
                <td></td>
              </tr>
                                            <tr>
                <td align="right">
                </td>
                <td align="right">
                           <label
for="remarks">${uiLabelMap.remarks}&nbsp;</label>
                </td>
                <td colspan="4">
                     <input type="text" id="remarks"
value="${remarks!}" name="remarks" size="100"
style="background-color:#D6F2FF" required>
                                            </td>
                <td></td>
              </tr>
            </tbody>
          </table>

             <table width="100%" cellspacing="2">
            <tbody>
              <tr>
                <td align="right">
                </td>
                <td align="right">

                </td>
                <td>

                     <button type="submit" form="finalizeLCUpdate"
value="Submit">${uiLabelMap.finalizeLC}</button>
           </td>
                <td></td>
              </tr>
            </tbody>
          </table>
</form>
</div>


“UpdateLCServices.java and method finalizeLCUpdate”
------------------------------------------------------------------------------------
           public static String finalizeLCUpdate(HttpServletRequest
request, HttpServletResponse response) {

                      Delegator delegator = (Delegator)
request.getAttribute("delegator");

                      String LcReceiveDate =
request.getParameter("LcReceiveDate").trim();
                     String countDownDays =
request.getParameter("countDownDays").trim();
                      String remarks = request.getParameter("remarks").trim();

                     Debug.logInfo("=======LcReceiveDate=========",
LcReceiveDate);
                     Debug.logInfo("=======countDownDays=========",
countDownDays);
                     Debug.logInfo("=======remarks=========", remarks);
               }


“Controller”
----------------
<request-map uri="finalizeLCUpdate">
        <security https="true" auth="true"/>
        <event type="java" path="com.akm.exim.events.UpdateLCServices"
invoke="finalizeLCUpdate"/>
        <response name="success" type="view" value="exportHome"/>
    </request-map>


I am passing hidden values from the “finalizeLC.ftl” file and unable
to retrieve data in the java class “UpdateLCServices.java and method
finalizeLCUpdate”. Debug.loginfo showing null values.

Pls help in how to pass form parameter values to ftl java class in Ofbiz.

Regards
Avijit Bose

Re: Help required in Ofbiz development - Unable to retrieve parameter using HTTPRequest

Posted by Nicolas Malin <ni...@nereide.fr>.
I use in groovy event

***
    Map requestAttrs = UtilHttp.getAttributeMap(request)
    Map parameters = UtilHttp.getParameterMap(request)
***

It's same with java
Nicolas

On 29/04/2022 04:34, Avijit Bose wrote:
> Hello Nicolas,
>
> Could you pls give me an example or some piece of code of how to use
> “raw method to resolve parameters from the request”?
>
> I am sending you this reply again because I had sent it in html format
> which the server refused.
>
> regards
> Avijit Bose
>
> On Thu, Apr 28, 2022 at 7:29 PM Avijit Bose <bo...@gmail.com> wrote:
>> Hello Sir,
>>
>>
>>
>> Could you pls show me an example of how to use “raw method to resolve parameters from the request”?
>>
>>
>>
>> regards
>>
>>
>>
>> Sent from Mail for Windows
>>
>>
>>
>> From: Nicolas Malin
>> Sent: 28 April 2022 12:19 PM
>> To: user@ofbiz.apache.org
>> Subject: Re: Help required in Ofbiz development - Unable to retrieve parameter using HTTPRequest
>>
>>
>>
>> Hello,
>>
>>
>>
>> You use a raw method to resolve parameters from the request.
>>
>>
>>
>> I suggest that the problem came from the form html definition. When you
>>
>> submit do you analyzed the request send by your browser ? (F12 ->
>>
>> Network on firefox)
>>
>>
>>
>> Nicolas
>>
>>
>>
>> On 28/04/2022 05:48, Avijit Bose wrote:
>>
>>> My code is as follows:
>>> “finalizeLC.ftl”
>>>  --------------------
>>> <div class="screenlet-body">
>>>   <form method="post" action="<@o...@ofbizUrl>"
>>>  name="finalizeLCUpdate" id="finalizeLCUpdate">
>>>            <input type="hidden" name="LcReceiveDate" value="">
>>>            <input type="hidden" name="countDownDays" value="">
>>>            <input type="hidden" name="remarks" value="">
>>>              <table width="100%" cellspacing="2">
>>>             <tbody>
>>>               <tr>
>>>                 <td align="right">
>>>                 </td>
>>>                 <td align="right">
>>>                            <label
>>> for="LcReceiveDate">${uiLabelMap.LcReceiveDate}&nbsp;</label>
>>>                 </td>
>>>                 <td colspan="4">
>>>            <input type="date" id="LcReceiveDate" name="LcReceiveDate"
>>> style="background-color:#D6F2FF" value="${LcReceiveDate!}" required>
>>>                                             </td>
>>>                 <td></td>
>>>               </tr>
>>>               <tr>
>>>                 <td align="right">
>>>                 </td>
>>>                 <td align="right">
>>>                            <label
>>> for="countDownDays">${uiLabelMap.countDownDays}&nbsp;</label>
>>>                 </td>
>>>                 <td colspan="4">
>>>                            <input type="number" id="countDownDays"
>>> name="countDownDays" style="background-color:#D6F2FF"
>>> value="${countDownDays!}" required>
>>>                                             </td>
>>>                 <td></td>
>>>               </tr>
>>>                                             <tr>
>>>                 <td align="right">
>>>                 </td>
>>>                 <td align="right">
>>>                            <label
>>> for="remarks">${uiLabelMap.remarks}&nbsp;</label>
>>>                 </td>
>>>                 <td colspan="4">
>>>                      <input type="text" id="remarks"
>>> value="${remarks!}" name="remarks" size="100"
>>> style="background-color:#D6F2FF" required>
>>>                                             </td>
>>>                 <td></td>
>>>               </tr>
>>>             </tbody>
>>>           </table>
>>>              <table width="100%" cellspacing="2">
>>>             <tbody>
>>>               <tr>
>>>                 <td align="right">
>>>                 </td>
>>>                 <td align="right">
>>>                 </td>
>>>                 <td>
>>>                      <button type="submit" form="finalizeLCUpdate"
>>> value="Submit">${uiLabelMap.finalizeLC}</button>
>>>            </td>
>>>                 <td></td>
>>>               </tr>
>>>             </tbody>
>>>           </table>
>>> </form>
>>> </div>
>>> “UpdateLCServices.java and method finalizeLCUpdate”
>>> ------------------------------------------------------------------------------------
>>>            public static String finalizeLCUpdate(HttpServletRequest
>>> request, HttpServletResponse response) {
>>>                       Delegator delegator = (Delegator)
>>> request.getAttribute("delegator");
>>>                       String LcReceiveDate =
>>> request.getParameter("LcReceiveDate").trim();
>>>                      String countDownDays =
>>> request.getParameter("countDownDays").trim();
>>>                       String remarks = request.getParameter("remarks").trim();
>>>                      Debug.logInfo("=======LcReceiveDate=========",
>>> LcReceiveDate);
>>>                      Debug.logInfo("=======countDownDays=========",
>>> countDownDays);
>>>                      Debug.logInfo("=======remarks=========", remarks);
>>>                }
>>> “Controller”
>>> ----------------
>>> <request-map uri="finalizeLCUpdate">
>>>         <security https="true" auth="true"/>
>>>         <event type="java" path="com.akm.exim.events.UpdateLCServices"
>>> invoke="finalizeLCUpdate"/>
>>>         <response name="success" type="view" value="exportHome"/>
>>>     </request-map>
>>> I am passing hidden values from the “finalizeLC.ftl” file and unable
>>> to retrieve data in the java class “UpdateLCServices.java and method
>>> finalizeLCUpdate”. Debug.loginfo showing null values.
>>> Pls help in how to pass form parameter values to ftl java class in Ofbiz.
>>> Regards
>>> Avijit Bose
>>
>>
>>


Re: Help required in Ofbiz development - Unable to retrieve parameter using HTTPRequest

Posted by Avijit Bose <bo...@gmail.com>.
Hello Nicolas,

Could you pls give me an example or some piece of code of how to use
“raw method to resolve parameters from the request”?

I am sending you this reply again because I had sent it in html format
which the server refused.

regards
Avijit Bose

On Thu, Apr 28, 2022 at 7:29 PM Avijit Bose <bo...@gmail.com> wrote:
>
> Hello Sir,
>
>
>
> Could you pls show me an example of how to use “raw method to resolve parameters from the request”?
>
>
>
> regards
>
>
>
> Sent from Mail for Windows
>
>
>
> From: Nicolas Malin
> Sent: 28 April 2022 12:19 PM
> To: user@ofbiz.apache.org
> Subject: Re: Help required in Ofbiz development - Unable to retrieve parameter using HTTPRequest
>
>
>
> Hello,
>
>
>
> You use a raw method to resolve parameters from the request.
>
>
>
> I suggest that the problem came from the form html definition. When you
>
> submit do you analyzed the request send by your browser ? (F12 ->
>
> Network on firefox)
>
>
>
> Nicolas
>
>
>
> On 28/04/2022 05:48, Avijit Bose wrote:
>
> > My code is as follows:
>
> >
>
> > “finalizeLC.ftl”
>
> >  --------------------
>
> > <div class="screenlet-body">
>
> >   <form method="post" action="<@o...@ofbizUrl>"
>
> >  name="finalizeLCUpdate" id="finalizeLCUpdate">
>
> >
>
> >            <input type="hidden" name="LcReceiveDate" value="">
>
> >            <input type="hidden" name="countDownDays" value="">
>
> >            <input type="hidden" name="remarks" value="">
>
> >
>
> >
>
> >              <table width="100%" cellspacing="2">
>
> >             <tbody>
>
> >               <tr>
>
> >                 <td align="right">
>
> >                 </td>
>
> >                 <td align="right">
>
> >                            <label
>
> > for="LcReceiveDate">${uiLabelMap.LcReceiveDate}&nbsp;</label>
>
> >                 </td>
>
> >                 <td colspan="4">
>
> >            <input type="date" id="LcReceiveDate" name="LcReceiveDate"
>
> > style="background-color:#D6F2FF" value="${LcReceiveDate!}" required>
>
> >                                             </td>
>
> >                 <td></td>
>
> >               </tr>
>
> >               <tr>
>
> >                 <td align="right">
>
> >                 </td>
>
> >                 <td align="right">
>
> >                            <label
>
> > for="countDownDays">${uiLabelMap.countDownDays}&nbsp;</label>
>
> >                 </td>
>
> >                 <td colspan="4">
>
> >                            <input type="number" id="countDownDays"
>
> > name="countDownDays" style="background-color:#D6F2FF"
>
> > value="${countDownDays!}" required>
>
> >                                             </td>
>
> >                 <td></td>
>
> >               </tr>
>
> >                                             <tr>
>
> >                 <td align="right">
>
> >                 </td>
>
> >                 <td align="right">
>
> >                            <label
>
> > for="remarks">${uiLabelMap.remarks}&nbsp;</label>
>
> >                 </td>
>
> >                 <td colspan="4">
>
> >                      <input type="text" id="remarks"
>
> > value="${remarks!}" name="remarks" size="100"
>
> > style="background-color:#D6F2FF" required>
>
> >                                             </td>
>
> >                 <td></td>
>
> >               </tr>
>
> >             </tbody>
>
> >           </table>
>
> >
>
> >              <table width="100%" cellspacing="2">
>
> >             <tbody>
>
> >               <tr>
>
> >                 <td align="right">
>
> >                 </td>
>
> >                 <td align="right">
>
> >
>
> >                 </td>
>
> >                 <td>
>
> >
>
> >                      <button type="submit" form="finalizeLCUpdate"
>
> > value="Submit">${uiLabelMap.finalizeLC}</button>
>
> >            </td>
>
> >                 <td></td>
>
> >               </tr>
>
> >             </tbody>
>
> >           </table>
>
> > </form>
>
> > </div>
>
> >
>
> >
>
> > “UpdateLCServices.java and method finalizeLCUpdate”
>
> > ------------------------------------------------------------------------------------
>
> >            public static String finalizeLCUpdate(HttpServletRequest
>
> > request, HttpServletResponse response) {
>
> >
>
> >                       Delegator delegator = (Delegator)
>
> > request.getAttribute("delegator");
>
> >
>
> >                       String LcReceiveDate =
>
> > request.getParameter("LcReceiveDate").trim();
>
> >                      String countDownDays =
>
> > request.getParameter("countDownDays").trim();
>
> >                       String remarks = request.getParameter("remarks").trim();
>
> >
>
> >                      Debug.logInfo("=======LcReceiveDate=========",
>
> > LcReceiveDate);
>
> >                      Debug.logInfo("=======countDownDays=========",
>
> > countDownDays);
>
> >                      Debug.logInfo("=======remarks=========", remarks);
>
> >                }
>
> >
>
> >
>
> > “Controller”
>
> > ----------------
>
> > <request-map uri="finalizeLCUpdate">
>
> >         <security https="true" auth="true"/>
>
> >         <event type="java" path="com.akm.exim.events.UpdateLCServices"
>
> > invoke="finalizeLCUpdate"/>
>
> >         <response name="success" type="view" value="exportHome"/>
>
> >     </request-map>
>
> >
>
> >
>
> > I am passing hidden values from the “finalizeLC.ftl” file and unable
>
> > to retrieve data in the java class “UpdateLCServices.java and method
>
> > finalizeLCUpdate”. Debug.loginfo showing null values.
>
> >
>
> > Pls help in how to pass form parameter values to ftl java class in Ofbiz.
>
> >
>
> > Regards
>
> > Avijit Bose
>
>
>
>

Re: Help required in Ofbiz development - Unable to retrieve parameter using HTTPRequest

Posted by Nicolas Malin <ni...@nereide.fr>.
Hello,

You use a raw method to resolve parameters from the request.

I suggest that the problem came from the form html definition. When you
submit do you analyzed the request send by your browser ? (F12 ->
Network on firefox)

Nicolas

On 28/04/2022 05:48, Avijit Bose wrote:
> My code is as follows:
>
> “finalizeLC.ftl”
>  --------------------
> <div class="screenlet-body">
>   <form method="post" action="<@o...@ofbizUrl>"
>  name="finalizeLCUpdate" id="finalizeLCUpdate">
>
>            <input type="hidden" name="LcReceiveDate" value="">
>            <input type="hidden" name="countDownDays" value="">
>            <input type="hidden" name="remarks" value="">
>
>
>              <table width="100%" cellspacing="2">
>             <tbody>
>               <tr>
>                 <td align="right">
>                 </td>
>                 <td align="right">
>                            <label
> for="LcReceiveDate">${uiLabelMap.LcReceiveDate}&nbsp;</label>
>                 </td>
>                 <td colspan="4">
>            <input type="date" id="LcReceiveDate" name="LcReceiveDate"
> style="background-color:#D6F2FF" value="${LcReceiveDate!}" required>
>                                             </td>
>                 <td></td>
>               </tr>
>               <tr>
>                 <td align="right">
>                 </td>
>                 <td align="right">
>                            <label
> for="countDownDays">${uiLabelMap.countDownDays}&nbsp;</label>
>                 </td>
>                 <td colspan="4">
>                            <input type="number" id="countDownDays"
> name="countDownDays" style="background-color:#D6F2FF"
> value="${countDownDays!}" required>
>                                             </td>
>                 <td></td>
>               </tr>
>                                             <tr>
>                 <td align="right">
>                 </td>
>                 <td align="right">
>                            <label
> for="remarks">${uiLabelMap.remarks}&nbsp;</label>
>                 </td>
>                 <td colspan="4">
>                      <input type="text" id="remarks"
> value="${remarks!}" name="remarks" size="100"
> style="background-color:#D6F2FF" required>
>                                             </td>
>                 <td></td>
>               </tr>
>             </tbody>
>           </table>
>
>              <table width="100%" cellspacing="2">
>             <tbody>
>               <tr>
>                 <td align="right">
>                 </td>
>                 <td align="right">
>
>                 </td>
>                 <td>
>
>                      <button type="submit" form="finalizeLCUpdate"
> value="Submit">${uiLabelMap.finalizeLC}</button>
>            </td>
>                 <td></td>
>               </tr>
>             </tbody>
>           </table>
> </form>
> </div>
>
>
> “UpdateLCServices.java and method finalizeLCUpdate”
> ------------------------------------------------------------------------------------
>            public static String finalizeLCUpdate(HttpServletRequest
> request, HttpServletResponse response) {
>
>                       Delegator delegator = (Delegator)
> request.getAttribute("delegator");
>
>                       String LcReceiveDate =
> request.getParameter("LcReceiveDate").trim();
>                      String countDownDays =
> request.getParameter("countDownDays").trim();
>                       String remarks = request.getParameter("remarks").trim();
>
>                      Debug.logInfo("=======LcReceiveDate=========",
> LcReceiveDate);
>                      Debug.logInfo("=======countDownDays=========",
> countDownDays);
>                      Debug.logInfo("=======remarks=========", remarks);
>                }
>
>
> “Controller”
> ----------------
> <request-map uri="finalizeLCUpdate">
>         <security https="true" auth="true"/>
>         <event type="java" path="com.akm.exim.events.UpdateLCServices"
> invoke="finalizeLCUpdate"/>
>         <response name="success" type="view" value="exportHome"/>
>     </request-map>
>
>
> I am passing hidden values from the “finalizeLC.ftl” file and unable
> to retrieve data in the java class “UpdateLCServices.java and method
> finalizeLCUpdate”. Debug.loginfo showing null values.
>
> Pls help in how to pass form parameter values to ftl java class in Ofbiz.
>
> Regards
> Avijit Bose


Re: Help required in Ofbiz development - Unable to retrieve parameter using HTTPRequest

Posted by Avijit Bose <bo...@gmail.com>.
I understood your suggestion. But for knowledge sake.... i have to
pass the field hidden else the fields or parameters will not be
available in the java class. As I am calling request.getParameters
method.... it is expecting some parameters.

Is it so that all the form fields/parameters are available to the
corresponding class file by default in ofbiz?

Pls clarify.

On Tue, May 3, 2022 at 8:18 PM Scott Gray <sc...@hotwaxsystems.com> wrote:
>
> Your form contains duplicate inputs for each of your field names, one
> hidden for each and one visible (date, number etc.).
>
> When this is submitted, the duplicates will be combined into an array of
> values for the given parameter name.
>
> ServletRequest#getParameter will only return the FIRST value in the array
> (i.e. your empty hidden inputs).
>
> See the servlet spec for more info, section 3.1:
> https://javaee.github.io/servlet-spec/downloads/servlet-4.0/servlet-4_0_FINAL.pdf
>
> Regards
> Scott
>
> On Thu, 28 Apr 2022 at 04:49, Avijit Bose <bo...@gmail.com> wrote:
>
> > My code is as follows:
> >
> > “finalizeLC.ftl”
> >  --------------------
> > <div class="screenlet-body">
> >   <form method="post" action="<@o...@ofbizUrl>"
> >  name="finalizeLCUpdate" id="finalizeLCUpdate">
> >
> >            <input type="hidden" name="LcReceiveDate" value="">
> >            <input type="hidden" name="countDownDays" value="">
> >            <input type="hidden" name="remarks" value="">
> >
> >
> >              <table width="100%" cellspacing="2">
> >             <tbody>
> >               <tr>
> >                 <td align="right">
> >                 </td>
> >                 <td align="right">
> >                            <label
> > for="LcReceiveDate">${uiLabelMap.LcReceiveDate}&nbsp;</label>
> >                 </td>
> >                 <td colspan="4">
> >            <input type="date" id="LcReceiveDate" name="LcReceiveDate"
> > style="background-color:#D6F2FF" value="${LcReceiveDate!}" required>
> >                                             </td>
> >                 <td></td>
> >               </tr>
> >               <tr>
> >                 <td align="right">
> >                 </td>
> >                 <td align="right">
> >                            <label
> > for="countDownDays">${uiLabelMap.countDownDays}&nbsp;</label>
> >                 </td>
> >                 <td colspan="4">
> >                            <input type="number" id="countDownDays"
> > name="countDownDays" style="background-color:#D6F2FF"
> > value="${countDownDays!}" required>
> >                                             </td>
> >                 <td></td>
> >               </tr>
> >                                             <tr>
> >                 <td align="right">
> >                 </td>
> >                 <td align="right">
> >                            <label
> > for="remarks">${uiLabelMap.remarks}&nbsp;</label>
> >                 </td>
> >                 <td colspan="4">
> >                      <input type="text" id="remarks"
> > value="${remarks!}" name="remarks" size="100"
> > style="background-color:#D6F2FF" required>
> >                                             </td>
> >                 <td></td>
> >               </tr>
> >             </tbody>
> >           </table>
> >
> >              <table width="100%" cellspacing="2">
> >             <tbody>
> >               <tr>
> >                 <td align="right">
> >                 </td>
> >                 <td align="right">
> >
> >                 </td>
> >                 <td>
> >
> >                      <button type="submit" form="finalizeLCUpdate"
> > value="Submit">${uiLabelMap.finalizeLC}</button>
> >            </td>
> >                 <td></td>
> >               </tr>
> >             </tbody>
> >           </table>
> > </form>
> > </div>
> >
> >
> > “UpdateLCServices.java and method finalizeLCUpdate”
> >
> > ------------------------------------------------------------------------------------
> >            public static String finalizeLCUpdate(HttpServletRequest
> > request, HttpServletResponse response) {
> >
> >                       Delegator delegator = (Delegator)
> > request.getAttribute("delegator");
> >
> >                       String LcReceiveDate =
> > request.getParameter("LcReceiveDate").trim();
> >                      String countDownDays =
> > request.getParameter("countDownDays").trim();
> >                       String remarks =
> > request.getParameter("remarks").trim();
> >
> >                      Debug.logInfo("=======LcReceiveDate=========",
> > LcReceiveDate);
> >                      Debug.logInfo("=======countDownDays=========",
> > countDownDays);
> >                      Debug.logInfo("=======remarks=========", remarks);
> >                }
> >
> >
> > “Controller”
> > ----------------
> > <request-map uri="finalizeLCUpdate">
> >         <security https="true" auth="true"/>
> >         <event type="java" path="com.akm.exim.events.UpdateLCServices"
> > invoke="finalizeLCUpdate"/>
> >         <response name="success" type="view" value="exportHome"/>
> >     </request-map>
> >
> >
> > I am passing hidden values from the “finalizeLC.ftl” file and unable
> > to retrieve data in the java class “UpdateLCServices.java and method
> > finalizeLCUpdate”. Debug.loginfo showing null values.
> >
> > Pls help in how to pass form parameter values to ftl java class in Ofbiz.
> >
> > Regards
> > Avijit Bose
> >

Re: Help required in Ofbiz development - Unable to retrieve parameter using HTTPRequest

Posted by Scott Gray <sc...@hotwaxsystems.com>.
Your form contains duplicate inputs for each of your field names, one
hidden for each and one visible (date, number etc.).

When this is submitted, the duplicates will be combined into an array of
values for the given parameter name.

ServletRequest#getParameter will only return the FIRST value in the array
(i.e. your empty hidden inputs).

See the servlet spec for more info, section 3.1:
https://javaee.github.io/servlet-spec/downloads/servlet-4.0/servlet-4_0_FINAL.pdf

Regards
Scott

On Thu, 28 Apr 2022 at 04:49, Avijit Bose <bo...@gmail.com> wrote:

> My code is as follows:
>
> “finalizeLC.ftl”
>  --------------------
> <div class="screenlet-body">
>   <form method="post" action="<@o...@ofbizUrl>"
>  name="finalizeLCUpdate" id="finalizeLCUpdate">
>
>            <input type="hidden" name="LcReceiveDate" value="">
>            <input type="hidden" name="countDownDays" value="">
>            <input type="hidden" name="remarks" value="">
>
>
>              <table width="100%" cellspacing="2">
>             <tbody>
>               <tr>
>                 <td align="right">
>                 </td>
>                 <td align="right">
>                            <label
> for="LcReceiveDate">${uiLabelMap.LcReceiveDate}&nbsp;</label>
>                 </td>
>                 <td colspan="4">
>            <input type="date" id="LcReceiveDate" name="LcReceiveDate"
> style="background-color:#D6F2FF" value="${LcReceiveDate!}" required>
>                                             </td>
>                 <td></td>
>               </tr>
>               <tr>
>                 <td align="right">
>                 </td>
>                 <td align="right">
>                            <label
> for="countDownDays">${uiLabelMap.countDownDays}&nbsp;</label>
>                 </td>
>                 <td colspan="4">
>                            <input type="number" id="countDownDays"
> name="countDownDays" style="background-color:#D6F2FF"
> value="${countDownDays!}" required>
>                                             </td>
>                 <td></td>
>               </tr>
>                                             <tr>
>                 <td align="right">
>                 </td>
>                 <td align="right">
>                            <label
> for="remarks">${uiLabelMap.remarks}&nbsp;</label>
>                 </td>
>                 <td colspan="4">
>                      <input type="text" id="remarks"
> value="${remarks!}" name="remarks" size="100"
> style="background-color:#D6F2FF" required>
>                                             </td>
>                 <td></td>
>               </tr>
>             </tbody>
>           </table>
>
>              <table width="100%" cellspacing="2">
>             <tbody>
>               <tr>
>                 <td align="right">
>                 </td>
>                 <td align="right">
>
>                 </td>
>                 <td>
>
>                      <button type="submit" form="finalizeLCUpdate"
> value="Submit">${uiLabelMap.finalizeLC}</button>
>            </td>
>                 <td></td>
>               </tr>
>             </tbody>
>           </table>
> </form>
> </div>
>
>
> “UpdateLCServices.java and method finalizeLCUpdate”
>
> ------------------------------------------------------------------------------------
>            public static String finalizeLCUpdate(HttpServletRequest
> request, HttpServletResponse response) {
>
>                       Delegator delegator = (Delegator)
> request.getAttribute("delegator");
>
>                       String LcReceiveDate =
> request.getParameter("LcReceiveDate").trim();
>                      String countDownDays =
> request.getParameter("countDownDays").trim();
>                       String remarks =
> request.getParameter("remarks").trim();
>
>                      Debug.logInfo("=======LcReceiveDate=========",
> LcReceiveDate);
>                      Debug.logInfo("=======countDownDays=========",
> countDownDays);
>                      Debug.logInfo("=======remarks=========", remarks);
>                }
>
>
> “Controller”
> ----------------
> <request-map uri="finalizeLCUpdate">
>         <security https="true" auth="true"/>
>         <event type="java" path="com.akm.exim.events.UpdateLCServices"
> invoke="finalizeLCUpdate"/>
>         <response name="success" type="view" value="exportHome"/>
>     </request-map>
>
>
> I am passing hidden values from the “finalizeLC.ftl” file and unable
> to retrieve data in the java class “UpdateLCServices.java and method
> finalizeLCUpdate”. Debug.loginfo showing null values.
>
> Pls help in how to pass form parameter values to ftl java class in Ofbiz.
>
> Regards
> Avijit Bose
>