You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Patrick <pa...@gmail.com> on 2010/02/03 01:03:32 UTC

service parameters are missing from form target invocation

I have a user select a category from a drop-down, the form target is a
uri which invokes safeAddProductToCategory.  The following parameters
are missing to the service invocation,
{safeAddProductToCategory.productId,
safeAddProductToCategory.fromDate}

Once the category is selected how can I make those parameters
available to the service?  I think productId is already available in
the current context, but I don't know how to send it to the service.
Thanks.  Patrick

Re: service parameters are missing from form target invocation

Posted by Adrian Crum <ad...@yahoo.com>.
There are plenty of examples in the existing code. Just do a search for <hidden.

-Adrian

--- On Tue, 2/2/10, Patrick <pa...@gmail.com> wrote:

> From: Patrick <pa...@gmail.com>
> Subject: Re: service parameters are missing from form target invocation
> To: user@ofbiz.apache.org
> Date: Tuesday, February 2, 2010, 4:32 PM
> Hi Adrian
> Can you explain a little more?  How can I set the time
> from a form?
> I tried to set the productId with a hidden field, but there
> doesn't
> seem to be a "value" tag.
> 
> <field name="productId"  attribute-name="77"
> ><hidden/></field><!--
> this didnt work -->
> 
> Here's my entire form for reference.
> <form name="SubCategoryDropDown" 
> target="SubCategoryDropDownComplete"
> title="" type="single"
>         header-row-style="header-row"
> default-table-style="basic-table"
>         >
>         <field
> name="productId"  attribute-name="77"
> ><hidden/></field>
>           
> <field name="SubCategory" position="1">
>             <drop-down
> allow-empty="false">
>                
> <entity-options description="${categoryName}"
> entity-name="ProductCategoryAndProductCategoryRollup"
> key-field-name="productCategoryId">
>            
>         <entity-constraint
> name="parentProductCategoryId"
> operator="equals" value="${productCategoryId}"/>
>                
> </entity-options>
>            
> </drop-down>
>          </field>
>         <field name="Submit"
> widget-style="smallSubmit">
>             <submit
> button-type="button"/>
>         </field>
>     </form>
> 
> 
> 
> 
> 
> 
> On Tue, Feb 2, 2010 at 6:17 PM, Adrian Crum <ad...@hlmksw.com>
> wrote:
> > Try using hidden form fields. You can get the current
> date/time by using
> > nowTimestamp - a java.sql.Timestamp instance that is
> in the context.
> >
> > -Adrian
> >
> > Patrick wrote:
> >>
> >> I have a user select a category from a drop-down,
> the form target is a
> >> uri which invokes safeAddProductToCategory.  The
> following parameters
> >> are missing to the service invocation,
> >> {safeAddProductToCategory.productId,
> >> safeAddProductToCategory.fromDate}
> >>
> >> Once the category is selected how can I make those
> parameters
> >> available to the service?  I think productId is
> already available in
> >> the current context, but I don't know how to send
> it to the service.
> >> Thanks.  Patrick
> >>
> >
> 


      

Re: service parameters are missing from form target invocation

Posted by Patrick <pa...@gmail.com>.
Hi Adrian
Can you explain a little more?  How can I set the time from a form?
I tried to set the productId with a hidden field, but there doesn't
seem to be a "value" tag.

<field name="productId"  attribute-name="77" ><hidden/></field><!--
this didnt work -->

Here's my entire form for reference.
<form name="SubCategoryDropDown"  target="SubCategoryDropDownComplete"
title="" type="single"
        header-row-style="header-row" default-table-style="basic-table"
        >
        <field name="productId"  attribute-name="77" ><hidden/></field>
   		<field name="SubCategory" position="1">
            <drop-down allow-empty="false">
                <entity-options description="${categoryName}"
entity-name="ProductCategoryAndProductCategoryRollup"
key-field-name="productCategoryId">
					<entity-constraint name="parentProductCategoryId"
operator="equals" value="${productCategoryId}"/>
                </entity-options>
            </drop-down>
    	 </field>
        <field name="Submit" widget-style="smallSubmit">
        	<submit button-type="button"/>
        </field>
    </form>






On Tue, Feb 2, 2010 at 6:17 PM, Adrian Crum <ad...@hlmksw.com> wrote:
> Try using hidden form fields. You can get the current date/time by using
> nowTimestamp - a java.sql.Timestamp instance that is in the context.
>
> -Adrian
>
> Patrick wrote:
>>
>> I have a user select a category from a drop-down, the form target is a
>> uri which invokes safeAddProductToCategory.  The following parameters
>> are missing to the service invocation,
>> {safeAddProductToCategory.productId,
>> safeAddProductToCategory.fromDate}
>>
>> Once the category is selected how can I make those parameters
>> available to the service?  I think productId is already available in
>> the current context, but I don't know how to send it to the service.
>> Thanks.  Patrick
>>
>

Re: service parameters are missing from form target invocation

Posted by Adrian Crum <ad...@hlmksw.com>.
Try using hidden form fields. You can get the current date/time by using 
nowTimestamp - a java.sql.Timestamp instance that is in the context.

-Adrian

Patrick wrote:
> I have a user select a category from a drop-down, the form target is a
> uri which invokes safeAddProductToCategory.  The following parameters
> are missing to the service invocation,
> {safeAddProductToCategory.productId,
> safeAddProductToCategory.fromDate}
> 
> Once the category is selected how can I make those parameters
> available to the service?  I think productId is already available in
> the current context, but I don't know how to send it to the service.
> Thanks.  Patrick
>