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.. |
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.. > |
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.. > > > |
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.. >>> >>> > > |
Free forum by Nabble | Edit this page |