select box

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

select box

Pal Infocom Technologies-2
 I want to add product category id into primaryProductCategoryId field.
i have added a select box  in the form that shows the product creation screen using following code:

<field name="productCategoryId" title="${uiLabelMap.ProductPrimaryCategory}" widget-style="selectBox">
            <drop-down allow-empty="true">
                <entity-options entity-name="ProductCategory"  description="${categoryName} [{productCategoryId}]">
                       <entity-order-by field-name="categoryName"/>
                </entity-options>
            </drop-down>
        </field>

and following line in simple method that create the product using map newEntity.
 <set field="newEntity.primaryProductCategoryId" from-field="parameters.productCategoryId"  />
it shows the values in select box but doesn't insert the selected value in the product. it returns null
where am i wrong?
please provide help..
Reply | Threaded
Open this post in threaded view
|

Re: select box

Daniel Martínez-4
Amit,

If I understood well, you have to commit the changes to the database:

<store-value value-name="newObject"> for updating
<create-value value-name="newObject"> for creating

PD: Please send this messages to the developers list

Greetings,
--
Daniel

amit charaya escribió:

>  I want to add product category id into primaryProductCategoryId field.
> i have added a select box  in the form that shows the product creation
> screen using following code:
>
> <field name="productCategoryId" title="${uiLabelMap.ProductPrimaryCategory}"
> widget-style="selectBox">
>             <drop-down allow-empty="true">
>                 <entity-options entity-name="ProductCategory"
> description="${categoryName} [{productCategoryId}]">
>                        <entity-order-by field-name="categoryName"/>
>                 </entity-options>
>             </drop-down>
>         </field>
>
> and following line in simple method that create the product using map
> newEntity.
>  <set field="newEntity.primaryProductCategoryId"
> from-field="parameters.productCategoryId"  />
> it shows the values in select box but doesn't insert the selected value in
> the product. it returns null
> where am i wrong?
> please provide help..
>  
Reply | Threaded
Open this post in threaded view
|

Re: select box

Jacques Le Roux
Administrator
No, please *don't* send this type of message to the dev ML.

The dev ML is intended to *developing* OFBiz not to *use* it !

Thanks

Jacques

De : "Daniel Martínez" <[hidden email]>

> Amit,
>
> If I understood well, you have to commit the changes to the database:
>
> <store-value value-name="newObject"> for updating
> <create-value value-name="newObject"> for creating
>
> PD: Please send this messages to the developers list
>
> Greetings,
> --
> Daniel
>
> amit charaya escribió:
> >  I want to add product category id into primaryProductCategoryId field.
> > i have added a select box  in the form that shows the product creation
> > screen using following code:
> >
> > <field name="productCategoryId" title="${uiLabelMap.ProductPrimaryCategory}"
> > widget-style="selectBox">
> >             <drop-down allow-empty="true">
> >                 <entity-options entity-name="ProductCategory"
> > description="${categoryName} [{productCategoryId}]">
> >                        <entity-order-by field-name="categoryName"/>
> >                 </entity-options>
> >             </drop-down>
> >         </field>
> >
> > and following line in simple method that create the product using map
> > newEntity.
> >  <set field="newEntity.primaryProductCategoryId"
> > from-field="parameters.productCategoryId"  />
> > it shows the values in select box but doesn't insert the selected value in
> > the product. it returns null
> > where am i wrong?
> > please provide help..
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: select box

Daniel Martínez-4
ok, thanks for the clarification Jacques.

I made a erroneous technical/functional distinction between the MLs (I
even sent this kind of messages to the dev list some months ago)
--
Daniel

Jacques Le Roux escribió:

> No, please *don't* send this type of message to the dev ML.
>
> The dev ML is intended to *developing* OFBiz not to *use* it !
>
> Thanks
>
> Jacques
>
> De : "Daniel Martínez" <[hidden email]>
>  
>> Amit,
>>
>> If I understood well, you have to commit the changes to the database:
>>
>> <store-value value-name="newObject"> for updating
>> <create-value value-name="newObject"> for creating
>>
>> PD: Please send this messages to the developers list
>>
>> Greetings,
>> --
>> Daniel
>>
>> amit charaya escribió:
>>    
>>>  I want to add product category id into primaryProductCategoryId field.
>>> i have added a select box  in the form that shows the product creation
>>> screen using following code:
>>>
>>> <field name="productCategoryId" title="${uiLabelMap.ProductPrimaryCategory}"
>>> widget-style="selectBox">
>>>             <drop-down allow-empty="true">
>>>                 <entity-options entity-name="ProductCategory"
>>> description="${categoryName} [{productCategoryId}]">
>>>                        <entity-order-by field-name="categoryName"/>
>>>                 </entity-options>
>>>             </drop-down>
>>>         </field>
>>>
>>> and following line in simple method that create the product using map
>>> newEntity.
>>>  <set field="newEntity.primaryProductCategoryId"
>>> from-field="parameters.productCategoryId"  />
>>> it shows the values in select box but doesn't insert the selected value in
>>> the product. it returns null
>>> where am i wrong?
>>> please provide help..
>>>
>>>      
>
>