You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by amit charaya <of...@palinfocom.net> on 2007/06/30 06:55:55 UTC

receiving null

i have created a UI form using .ftl file. on clicking on the submit button i
called a java service via controller. but when i try to access data in java
file it receive null. here is code for ftl; and java file respectively. plz
tell where am i wrong?
Thanx in advance


#assign numberofesns=0/>
<#if receivedItems?has_content>

<form name="selectForm" method="post"
action="<@o...@ofbizUrl>" style="margin: 0;">

  <table width="100%" border="0" cellpadding="2" cellspacing="0">
  <input type="hidden" name="facilityId"
value="${requestParameters.facilityId?if_exists}"/>
    <tr><td colspan="4"><div
class="head3">${uiLabelMap.ProductReceiptPurchaseOrder}
#${purchaseOrder.orderId}</div></td></tr>
    <tr><td colspan="4"><hr class="sepbar"></td></tr>
    <tr>
      <td><div class="tableheadtext"><div class="head3">Inventory Item
Id#</div></td>
      <td><div class="tableheadtext"><div class="head3">Receipt
Id#</div></td>
      <td><div class="tableheadtext"><div class="head3">Product
Id#</div></td>
      <td><div class="tableheadtext"><div class="head3">Esn
Numbers#</div></td>
        <tr><td colspan="10"><hr class="sepbar"></td></tr>
    
    <#list receivedItems as item>
    
        
        <tr>
        <td><div class="tabletext">${item.inventoryItemId}</div></td>
         <td><div class="tabletext">${item.receiptId}</div></td>
        
        <td><div class="tabletext">${item.productId?default("Not
Found")}</div></td>
        <td><div class="tabletext"><input type="text" size="30"
name="${numberofesns}"/></div></td>
        <td><div class="tabletext"><input type="hidden"
name="id${numberofesns}" value=${item.inventoryItemId}/></div</td>
        
        
    </tr>  
      <#assign numberofesns = numberofesns + 1/>
    </#list>
    
    <tr><td colspan="4"><hr class="sepbar"></td></tr>
  <tr>
  <input type="hidden" name="esns" value="10" />
 
        <td colspan="2">&nbsp;</td>
        <td colspan="2">
          <input type="submit" name="submit" value="Submit"/>
        </td>
      </tr>
       </table>
  </form>
  <br/>
</#if>
-- 
View this message in context: http://www.nabble.com/receiving-null-tf4003685.html#a11370827
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: receiving null

Posted by Rodrigo Souza <ac...@gmail.com>.
Which the error message? That variable that she is null?
Confirm variable list in service.xml of your application.


2007/6/30, amit charaya <of...@palinfocom.net>:
>
> i have created a UI form using .ftl file. on clicking on the submit button i
> called a java service via controller. but when i try to access data in java
> file it receive null. here is code for ftl; and java file respectively. plz
> tell where am i wrong?
> Thanx in advance
>
>
> #assign numberofesns=0/>
> <#if receivedItems?has_content>
>
> <form name="selectForm" method="post"
> action="<@o...@ofbizUrl>" style="margin: 0;">
>
>  <table width="100%" border="0" cellpadding="2" cellspacing="0">
>  <input type="hidden" name="facilityId"
> value="${requestParameters.facilityId?if_exists}"/>
>    <tr><td colspan="4"><div
> class="head3">${uiLabelMap.ProductReceiptPurchaseOrder}
> #${purchaseOrder.orderId}</div></td></tr>
>    <tr><td colspan="4"><hr class="sepbar"></td></tr>
>    <tr>
>      <td><div class="tableheadtext"><div class="head3">Inventory Item
> Id#</div></td>
>      <td><div class="tableheadtext"><div class="head3">Receipt
> Id#</div></td>
>      <td><div class="tableheadtext"><div class="head3">Product
> Id#</div></td>
>      <td><div class="tableheadtext"><div class="head3">Esn
> Numbers#</div></td>
>        <tr><td colspan="10"><hr class="sepbar"></td></tr>
>
>    <#list receivedItems as item>
>
>
>        <tr>
>        <td><div class="tabletext">${item.inventoryItemId}</div></td>
>         <td><div class="tabletext">${item.receiptId}</div></td>
>
>        <td><div class="tabletext">${item.productId?default("Not
> Found")}</div></td>
>        <td><div class="tabletext"><input type="text" size="30"
> name="${numberofesns}"/></div></td>
>        <td><div class="tabletext"><input type="hidden"
> name="id${numberofesns}" value=${item.inventoryItemId}/></div</td>
>
>
>    </tr>
>      <#assign numberofesns = numberofesns + 1/>
>    </#list>
>
>    <tr><td colspan="4"><hr class="sepbar"></td></tr>
>  <tr>
>  <input type="hidden" name="esns" value="10" />
>
>        <td colspan="2">&nbsp;</td>
>        <td colspan="2">
>          <input type="submit" name="submit" value="Submit"/>
>        </td>
>      </tr>
>       </table>
>  </form>
>  <br/>
> </#if>
> --
> View this message in context: http://www.nabble.com/receiving-null-tf4003685.html#a11370827
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>

Re: receiving null

Posted by amit charaya <of...@palinfocom.net>.
received item list is 30





cjhowe wrote:
> 
> 1st suggestion, use camelCase for variable names.  It's much easier to
> read.
> 
> how large is the receivedItems list?
> --- amit charaya <of...@palinfocom.net> wrote:
> 
>> 
>> i have created a UI form using .ftl file. on clicking on the submit
>> button i
>> called a java service via controller. but when i try to access data
>> in java
>> file it receive null for fields except esns. here is code for ftl;
>> and java
>> file respectively. plz tell where am i wrong?
>> Thanx in advance
>> 
>> 
>> #assign numberofesns=0/>
>> <#if receivedItems?has_content>
>> 
>> <form name="selectForm" method="post"
>> action="<@o...@ofbizUrl>" style="margin: 0;">
>> 
>>   <table width="100%" border="0" cellpadding="2" cellspacing="0">
>>   <input type="hidden" name="facilityId"
>> value="${requestParameters.facilityId?if_exists}"/>
>>     <tr><td colspan="4"><div
>> class="head3">${uiLabelMap.ProductReceiptPurchaseOrder}
>> #${purchaseOrder.orderId}</div></td></tr>
>>     <tr><td colspan="4"><hr class="sepbar"></td></tr>
>>     <tr>
>>       <td><div class="tableheadtext"><div class="head3">Inventory
>> Item
>> Id#</div></td>
>>       <td><div class="tableheadtext"><div class="head3">Receipt
>> Id#</div></td>
>>       <td><div class="tableheadtext"><div class="head3">Product
>> Id#</div></td>
>>       <td><div class="tableheadtext"><div class="head3">Esn
>> Numbers#</div></td>
>>         <tr><td colspan="10"><hr class="sepbar"></td></tr>
>>     
>>     <#list receivedItems as item>
>>     
>>         
>>         <tr>
>>         <td><div class="tabletext">${item.inventoryItemId}</div></td>
>>          <td><div class="tabletext">${item.receiptId}</div></td>
>>         
>>         <td><div class="tabletext">${item.productId?default("Not
>> Found")}</div></td>
>>         <td><div class="tabletext"><input type="text" size="30"
>> name="${numberofesns}"/></div></td>
>>         <td><div class="tabletext"><input type="hidden"
>> name="id${numberofesns}" value=${item.inventoryItemId}/></div</td>
>>         
>>         
>>     </tr>  
>>       <#assign numberofesns = numberofesns + 1/>
>>     </#list>
>>     
>>     <tr><td colspan="4"><hr class="sepbar"></td></tr>
>>   <tr>
>>   <input type="hidden" name="esns" value="10" />
>>  
>>         <td colspan="2">&nbsp;</td>
>>         <td colspan="2">
>>           <input type="submit" name="submit" value="Submit"/>
>>         </td>
>>       </tr>
>>        </table>
>>   </form>
>>   <br/>
>> </#if>
>> -- 
>> View this message in context:
>> http://www.nabble.com/receiving-null-tf4003685.html#a11370827
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>> 
>> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/receiving-null-tf4003685.html#a11371309
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: receiving null

Posted by Chris Howe <cj...@yahoo.com>.
1st suggestion, use camelCase for variable names.  It's much easier to
read.

how large is the receivedItems list?
--- amit charaya <of...@palinfocom.net> wrote:

> 
> i have created a UI form using .ftl file. on clicking on the submit
> button i
> called a java service via controller. but when i try to access data
> in java
> file it receive null for fields except esns. here is code for ftl;
> and java
> file respectively. plz tell where am i wrong?
> Thanx in advance
> 
> 
> #assign numberofesns=0/>
> <#if receivedItems?has_content>
> 
> <form name="selectForm" method="post"
> action="<@o...@ofbizUrl>" style="margin: 0;">
> 
>   <table width="100%" border="0" cellpadding="2" cellspacing="0">
>   <input type="hidden" name="facilityId"
> value="${requestParameters.facilityId?if_exists}"/>
>     <tr><td colspan="4"><div
> class="head3">${uiLabelMap.ProductReceiptPurchaseOrder}
> #${purchaseOrder.orderId}</div></td></tr>
>     <tr><td colspan="4"><hr class="sepbar"></td></tr>
>     <tr>
>       <td><div class="tableheadtext"><div class="head3">Inventory
> Item
> Id#</div></td>
>       <td><div class="tableheadtext"><div class="head3">Receipt
> Id#</div></td>
>       <td><div class="tableheadtext"><div class="head3">Product
> Id#</div></td>
>       <td><div class="tableheadtext"><div class="head3">Esn
> Numbers#</div></td>
>         <tr><td colspan="10"><hr class="sepbar"></td></tr>
>     
>     <#list receivedItems as item>
>     
>         
>         <tr>
>         <td><div class="tabletext">${item.inventoryItemId}</div></td>
>          <td><div class="tabletext">${item.receiptId}</div></td>
>         
>         <td><div class="tabletext">${item.productId?default("Not
> Found")}</div></td>
>         <td><div class="tabletext"><input type="text" size="30"
> name="${numberofesns}"/></div></td>
>         <td><div class="tabletext"><input type="hidden"
> name="id${numberofesns}" value=${item.inventoryItemId}/></div</td>
>         
>         
>     </tr>  
>       <#assign numberofesns = numberofesns + 1/>
>     </#list>
>     
>     <tr><td colspan="4"><hr class="sepbar"></td></tr>
>   <tr>
>   <input type="hidden" name="esns" value="10" />
>  
>         <td colspan="2">&nbsp;</td>
>         <td colspan="2">
>           <input type="submit" name="submit" value="Submit"/>
>         </td>
>       </tr>
>        </table>
>   </form>
>   <br/>
> </#if>
> -- 
> View this message in context:
> http://www.nabble.com/receiving-null-tf4003685.html#a11370827
> Sent from the OFBiz - User mailing list archive at Nabble.com.
> 
>